{"version":3,"file":"WorkshopHighlight.DEzzHO-R.mjs","names":["React.useMemo","React.useState","React.useCallback","React.Fragment"],"sources":["https:/framerusercontent.com/modules/3llQTdxSs1kbGABkMWJA/GbHSAQFsPhNc1iic4TuI/WorkshopHighlight.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";// I want a marketer style \"Free Workshop\" highlight text, the base color should be 182230 and it should be chalk yellow marketer highlight\n/**\n * @framerIntrinsicWidth 240\n * @framerIntrinsicHeight 56\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function WorkshopHighlight(props){const{normalText,highlightedText,textColor,highlightColor,font,paddingX,paddingY,paddingTop,radius,tilt,intensity,zIndex,style}=props;const baseFontSizePx=React.useMemo(()=>{const raw=font?.fontSize;if(typeof raw===\"number\")return raw;const m=String(raw??\"\").trim().match(/^(-?\\d+(?:\\.\\d+)?)px$/i);if(m)return Number(m[1]);return 52;},[font]);const[responsiveFontSize,setResponsiveFontSize]=React.useState(()=>{if(typeof window===\"undefined\")return`${baseFontSizePx}px`;const ratio=42/52;const nextPx=window.innerWidth>=1024?baseFontSizePx:Math.round(baseFontSizePx*ratio);return`${nextPx}px`;});React.useEffect(()=>{if(typeof window===\"undefined\")return;const update=()=>{const ratio=42/52;const nextPx=window.innerWidth>=1024?baseFontSizePx:Math.round(baseFontSizePx*ratio);React.startTransition(()=>setResponsiveFontSize(`${nextPx}px`));};update();window.addEventListener(\"resize\",update);return()=>window.removeEventListener(\"resize\",update);},[baseFontSizePx]);const tiltDeg=Math.max(-12,Math.min(12,tilt));const amt=Math.max(0,Math.min(1,intensity));const highlightStyle=React.useMemo(()=>{// Slightly textured marker feel using layered gradients + subtle noise-like stripes\nconst stripeAlpha=.06+amt*.12;const baseAlpha=.78+amt*.18;return{position:\"absolute\",left:-paddingX*.35,right:-paddingX*.35,top:\"52%\",height:`calc(1em + ${paddingY*2}px)`,transform:`translateY(-50%) rotate(${tiltDeg}deg)`,transformOrigin:\"50% 50%\",borderRadius:Math.max(0,radius),backgroundImage:[// main fill\n`linear-gradient(0deg, color-mix(in srgb, ${highlightColor} ${Math.round(baseAlpha*100)}%, transparent), color-mix(in srgb, ${highlightColor} ${Math.round(baseAlpha*100)}%, transparent))`,// chalky, dry-brush texture stripes\n`repeating-linear-gradient(90deg,\n                    rgba(255,255,255,${stripeAlpha}) 0px,\n                    rgba(255,255,255,${stripeAlpha}) 3px,\n                    rgba(0,0,0,${stripeAlpha*.65}) 4px,\n                    rgba(255,255,255,0) 8px\n                )`,// subtle edge variation\n`linear-gradient(180deg,\n                    rgba(255,255,255,${.18+amt*.08}) 0%,\n                    rgba(255,255,255,0) 18%,\n                    rgba(0,0,0,${.08+amt*.06}) 100%\n                )`].join(\",\"),boxShadow:`0 ${Math.max(1,3+amt*6)}px ${Math.max(6,14+amt*18)}px rgba(0,0,0,${.08+amt*.08})`,filter:`saturate(${1.05+amt*.25}) contrast(${1.02+amt*.12})`,pointerEvents:\"none\"};},[highlightColor,paddingX,paddingY,radius,tiltDeg,amt]);const renderWithLineBreaks=React.useCallback(value=>{const parts=String(value??\"\").split(/\\n/);return parts.map((part,i)=>/*#__PURE__*/_jsxs(React.Fragment,{children:[part,i<parts.length-1?/*#__PURE__*/_jsx(\"br\",{}):null]},i));},[]);const highlightLines=React.useMemo(()=>{return String(highlightedText??\"\").split(/\\n/);},[highlightedText]);return /*#__PURE__*/_jsx(\"span\",{style:{position:\"relative\",display:\"inline-block\",zIndex,padding:`${paddingY}px ${paddingX}px`,paddingTop:`${paddingTop}px`,color:textColor,WebkitFontSmoothing:\"antialiased\",textRendering:\"geometricPrecision\",...font,fontSize:responsiveFontSize,whiteSpace:\"pre-wrap\",...style},children:/*#__PURE__*/_jsxs(\"span\",{style:{position:\"relative\",zIndex:1},children:[renderWithLineBreaks(normalText),normalText&&highlightedText?\" \":null,highlightLines.map((line,i)=>{const wrapperKey=`hl-${i}`;return /*#__PURE__*/_jsxs(React.Fragment,{children:[/*#__PURE__*/_jsxs(\"span\",{style:{position:\"relative\",display:\"inline-block\"},children:[/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:highlightStyle}),/*#__PURE__*/_jsx(\"span\",{style:{position:\"relative\",zIndex:1},children:line})]}),i<highlightLines.length-1?/*#__PURE__*/_jsx(\"br\",{}):null]},wrapperKey);})]})});}addPropertyControls(WorkshopHighlight,{normalText:{type:ControlType.String,title:\"Normal Text\",defaultValue:\"\",displayTextArea:true},highlightedText:{type:ControlType.String,title:\"Highlighted Text\",defaultValue:\"Free Workshop\",displayTextArea:true},textColor:{type:ControlType.Color,title:\"Base Color\",defaultValue:\"#182230\"},highlightColor:{type:ControlType.Color,title:\"Highlight\",defaultValue:\"#F4D24A\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"52px\",variant:\"Extra Bold\",letterSpacing:\"-0.04em\",lineHeight:\"1em\"}},zIndex:{type:ControlType.Number,title:\"Z-Index\",defaultValue:0,min:-100,max:100,step:1},paddingX:{type:ControlType.Number,title:\"Pad X\",defaultValue:16,min:0,max:48,step:1,unit:\"px\"},paddingY:{type:ControlType.Number,title:\"Pad Y\",defaultValue:10,min:0,max:40,step:1,unit:\"px\"},paddingTop:{type:ControlType.Number,title:\"Pad Top\",defaultValue:10,min:0,max:60,step:1,unit:\"px\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:10,min:0,max:40,step:1,unit:\"px\"},tilt:{type:ControlType.Number,title:\"Tilt\",defaultValue:-3,min:-12,max:12,step:.5,unit:\"deg\"},intensity:{type:ControlType.Number,title:\"Texture\",defaultValue:.65,min:0,max:1,step:.01}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WorkshopHighlight\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"240\",\"framerSupported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