{"version":3,"file":"TextMaskImage.CVdRDwzo.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/UT3JYeveZIPAhu3aDJ9s/uWAwsASpOI0Ql3cO5CNX/TextMaskImage.js"],"sourcesContent":["// Image masked onto text, like Figma image fill for text\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";/**\n * TextMaskImage\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function TextMaskImage(props){const{text,image={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Gradient 1 - Blue\"},font,background,alignment=\"center\",style}=props;const textStyle=useMemo(()=>({...font,backgroundImage:`url(${image.src})`,backgroundSize:\"cover\",backgroundPosition:\"center\",WebkitBackgroundClip:\"text\",WebkitTextFillColor:\"transparent\",backgroundClip:\"text\",color:\"transparent\",display:\"inline-block\",width:\"max-content\",minWidth:1,lineHeight:font?.lineHeight||1.1,verticalAlign:\"middle\",paddingBottom:\"0.2em\"}),[font,image.src]);return /*#__PURE__*/_jsx(\"div\",{style:{...style,width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:alignment===\"center\"?\"center\":alignment===\"right\"?\"flex-end\":\"flex-start\",background,overflow:\"hidden\",position:\"relative\"},children:/*#__PURE__*/_jsx(\"span\",{style:{...textStyle,textAlign:alignment},\"aria-label\":image.alt,children:text})});}addPropertyControls(TextMaskImage,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Image Mask\"},alignment:{type:ControlType.Enum,title:\"Alignment\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],displaySegmentedControl:true,defaultValue:\"center\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"64px\",variant:\"Bold\",letterSpacing:\"-0.04em\",lineHeight:\"1em\"}},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextMaskImage\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextMaskImage.map"],"mappings":"kQAMG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,OAAK,QAAM,CAAC,IAAI,sEAAsE,IAAI,oBAAoB,CAAC,OAAK,aAAW,YAAU,SAAS,SAAO,EAAY,EAAUA,OAAa,CAAC,GAAG,EAAK,gBAAgB,OAAO,EAAM,IAAI,GAAG,eAAe,QAAQ,mBAAmB,SAAS,qBAAqB,OAAO,oBAAoB,cAAc,eAAe,OAAO,MAAM,cAAc,QAAQ,eAAe,MAAM,cAAc,SAAS,EAAE,WAAW,GAAM,YAAY,IAAI,cAAc,SAAS,cAAc,QAAQ,EAAE,CAAC,EAAK,EAAM,IAAI,CAAC,CAAC,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,OAAO,OAAO,OAAO,QAAQ,OAAO,WAAW,SAAS,eAAe,IAAY,SAAS,SAAS,IAAY,QAAQ,WAAW,aAAa,aAAW,SAAS,SAAS,SAAS,WAAW,CAAC,SAAsB,EAAK,OAAO,CAAC,MAAM,CAAC,GAAG,EAAU,UAAU,EAAU,CAAC,aAAa,EAAM,IAAI,SAAS,EAAK,CAAC,CAAC,CAAC,kBALp5B,IAAoD,IAA2B,CAKu0B,EAAoB,EAAc,CAAC,KAAK,CAAC,KAAK,EAAY,OAAO,MAAM,OAAO,aAAa,aAAa,CAAC,UAAU,CAAC,KAAK,EAAY,KAAK,MAAM,YAAY,QAAQ,CAAC,OAAO,SAAS,QAAQ,CAAC,aAA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