{"version":3,"file":"TextBG_Highlight.Dz9Tng9F.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx","useRef","useState","useId","__esmMin","init_npm_react_18_3_1","ie","_e","oe","c","init_jsx_runtime","ce","de","addPropertyControls","init_framer_BWFVvmND","ControlType","DataObserverContext","Card_Hover_Checker","withCard_Hover_Checker","C","props","init_Hover_Checker","injectGlobalStyle","globalStyleId","style","TextBG_Highlight","ref","hovered","setHovered","id","el","target","onEnter","onLeave","fontStyle","font","lineClamp","highlightColor","highlightTextColor","textColor","text","init_TextBG_Highlight"],"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\":\"variable\"}}}\n//# sourceMappingURL=./TextBG_Highlight.map"],"mappings":"A,6MAA2C,SAAgBkB,GAAoB,CAAC,MAAM,CAAC,sBAAsB,EAAI,CAAE,CAAoJ,SAAgBC,EAAuB,EAAE,CAAC,MAAO,KAAQV,EAA+BT,CAAuC,EAASC,EAAKmB,EAAE,CAAC,GAAGC,EAAM,GAAGH,EAAmBG,CAAK,CAAC,CAAC,EAAI,C,0CAAC,EAAuB,YAAY,oB,OCA7S,SAASE,GAAmB,CAAC,GAAG,SAAS,eAAeC,CAAa,EAAE,OAAO,IAAMC,EAAM,SAAS,cAAc,OAAO,EAAE,EAAM,GAAGD,EAAc,EAAM,YAAY;;;;;;MAMrV,SAAS,KAAK,YAAYC,CAAK,CAAE,CAAC,SAAwBC,EAAiB,CAAC,OAAK,qCAAqC,OAAK,YAAU,UAAU,qBAAmB,UAAU,iBAAe,UAAU,YAAU,GAAG,CAAC,IAAMC,EAAIzB,EAAO,IAAI,EAAO,CAAC0B,EAAQC,GAAY1B,EAAS,EAAK,EAAQ2B,EAAG1B,EAAM,CAAC,CAAC,QAAQ,KAAK,EAAE,EAAEQ,MAAc,CAACW,EAAkB,CAAE,EAAE,CAAC,CAAC,EAAEX,MAAc,CAAC,IAAMmB,EAAGJ,EAAI,QAAQ,GAAG,CAACI,EAAG,OAAO,IAAMC,EAAOD,EAAG,QAAQ,uBAAuB,GAAGA,EAAG,eAAeA,EAASE,MAAYJ,EAAW,EAAI,EAAQK,MAAYL,EAAW,EAAK,EAA8F,OAA5FG,EAAO,iBAAiB,aAAa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