{"version":3,"file":"TextBG_Highlight.DauLGgA-.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx","useRef","useState","useId"],"sources":["https:/framerusercontent.com/modules/ywLpv1SKhaw6kK1vkU4f/VTfACOsrRi8ea71KUsWx/Hover_Checker.js","https:/framerusercontent.com/modules/gJDyKWL9Y9D3zaKX0uxE/s0XvXm9rfUGhh7N5ukMe/TextBG_Highlight.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";export function Card_Hover_Checker(){return{\"data-highlight-card\":true};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withCard_Hover_Checker(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...Card_Hover_Checker(props)});};}withCard_Hover_Checker.displayName=\"Card_Hover_Checker\";\nexport const __FramerMetadata__ = {\"exports\":{\"Card_Hover_Checker\":{\"type\":\"override\",\"name\":\"Card_Hover_Checker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCard_Hover_Checker\":{\"type\":\"reactHoc\",\"name\":\"withCard_Hover_Checker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Hover_Checker.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect,useRef,useId}from\"react\";import{addPropertyControls,ControlType}from\"framer\";const globalStyleId=\"hl-global-style\";function injectGlobalStyle(){if(document.getElementById(globalStyleId))return;const style=document.createElement(\"style\");style.id=globalStyleId;style.textContent=`\n        @property --hl-color {\n            syntax: '<color>';\n            inherits: false;\n            initial-value: transparent;\n        }\n    `;document.head.appendChild(style);}export default function TextBG_Highlight({text=\"Pliability App Unveiled to Golfers\",font,textColor=\"#000000\",highlightTextColor=\"#000000\",highlightColor=\"#FFFFFF\",lineClamp=0}){const ref=useRef(null);const[hovered,setHovered]=useState(false);const id=useId().replace(/:/g,\"\");useEffect(()=>{injectGlobalStyle();},[]);useEffect(()=>{const el=ref.current;if(!el)return;const target=el.closest(\"[data-highlight-card]\")||el.parentElement||el;const onEnter=()=>setHovered(true);const onLeave=()=>setHovered(false);target.addEventListener(\"mouseenter\",onEnter);target.addEventListener(\"mouseleave\",onLeave);return()=>{target.removeEventListener(\"mouseenter\",onEnter);target.removeEventListener(\"mouseleave\",onLeave);};},[]);const fontStyle=font&&typeof font===\"object\"?font:{};const clampStyle=lineClamp>0?{display:\"-webkit-box\",WebkitLineClamp:lineClamp,WebkitBoxOrient:\"vertical\",overflow:\"hidden\"}:{};return /*#__PURE__*/_jsx(\"span\",{ref:ref,style:clampStyle,children:/*#__PURE__*/_jsx(\"span\",{id:`hl-${id}`,style:{display:\"inline\",boxDecorationBreak:\"clone\",WebkitBoxDecorationBreak:\"clone\",\"--hl-color\":hovered?highlightColor:\"transparent\",backgroundImage:\"linear-gradient(var(--hl-color), var(--hl-color))\",backgroundSize:\"100% 1em\",backgroundPosition:\"0 center\",backgroundRepeat:\"no-repeat\",color:hovered?highlightTextColor:textColor,transition:\"--hl-color 0.3s ease, color 0.3s ease\",...fontStyle},children:text})});}addPropertyControls(TextBG_Highlight,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Pliability App Unveiled to Golfers\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},highlightTextColor:{type:ControlType.Color,title:\"Highlight Text Color\",defaultValue:\"#000000\"},highlightColor:{type:ControlType.Color,title:\"Highlight Color\",defaultValue:\"#FFFFFF\"},lineClamp:{type:ControlType.Number,title:\"Line Truncation\",defaultValue:0,min:0,max:10,step:1,description:\"Max lines before truncating with ellipsis. 0 = no limit.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextBG_Highlight\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\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