{"version":3,"file":"TextHighlighter.fsffdWm8.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/M9n7Epx2by1hlSO1hFB3/twmSPVn75yY9ghkAo95O/TextHighlighter.js"],"sourcesContent":["// Custom text selection highlight color component\n// Lets user set highlight color and selected text color\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";/**\n * TextHighlighter\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function TextHighlighter(props){const{text,highlightColor,selectedTextColor,font,style}=props;// Memoize the style tag to avoid unnecessary rerenders\nconst selectionStyle=useMemo(()=>/*#__PURE__*/_jsx(\"style\",{children:`\n      ::selection {\n        background: ${highlightColor};\n        color: ${selectedTextColor};\n      }\n      ::-moz-selection {\n        background: ${highlightColor};\n        color: ${selectedTextColor};\n      }\n    `}),[highlightColor,selectedTextColor]);return /*#__PURE__*/_jsxs(\"span\",{className:\"framer-highlight-text\",style:{...font,...style,width:\"max-content\",minWidth:\"max-content\",display:\"inline-block\"},children:[selectionStyle,text]});}addPropertyControls(TextHighlighter,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"\",displayTextArea:true},highlightColor:{type:ControlType.Color,title:\"Highlight Color\",defaultValue:\"#F5F5A5\"},selectedTextColor:{type:ControlType.Color,title:\"Selected Text Color\",defaultValue:\"#000000\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"22px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextHighlighter\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextHighlighter.map"],"mappings":"iLAOG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,OAAK,iBAAe,oBAAkB,OAAK,SAAO,EACpG,EAAeA,MAAyB,EAAK,QAAQ,CAAC,SAAS;;sBAE/C,EAAe;iBACpB,EAAkB;;;sBAGb,EAAe;iBACpB,EAAkB;;MAE7B,CAAC,CAAC,CAAC,EAAe,EAAkB,CAAC,CAAC,OAAoB,EAAM,OAAO,CAAC,UAAU,wBAAwB,MAAM,CAAC,GAAG,EAAK,GAAG,EAAM,MAAM,cAAc,SAAS,cAAc,QAAQ,eAAe,CAAC,SAAS,CAAC,EAAe,EAAK,CAAC,CAAC,kBAflL,IAAoD,IAA2B,CAeqG,EAAoB,EAAgB,CAAC,KAAK,CAAC,KAAK,EAAY,OAAO,MAAM,OAAO,aAAa,GAAG,gBAAgB,GAAK,CAAC,eAAe,CAAC,KAAK,EAAY,MAAM,MAAM,kBAAkB,aAAa,UAAU,CAAC,kBAAkB,CAAC,KAAK,EAAY,MAAM,MAAM,sBAAsB,aAAa,UAAU,CAAC,KAAK,CAAC,KAAK,EAAY,KAAK,MAAM,OAAO,SAAS,WAAW,gBAAgB,aAAa,aAAa,CAAC,SAAS,OAAO,QAAQ,WAAW,cAAc,UAAU,WAAW,QAAQ,CAAC,CAAC,CAAC"}