{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/gR1oSpgjTyDJAWHjQeDo/UfnBXgQZQ3MTVAdyAzRS/TextImageWrap.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @copyright \u00A9framer-code.com\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 400\n * @framerDisableUnlink\n **/export default function TextImageWrap({content,font,color,tag,imageObject,isMixedMargin=false}){const{fontFamily,fontSize,fontWeight,lineHeight,letterSpacing,textAlign}=font;const{image,width,align,radius,border,borderColor}=imageObject;const[currentContent,setCurrentContent]=React.useState(content||defaultContent);const[currentImage,setCurrentImage]=React.useState(image||defaultImage);React.useEffect(()=>{setCurrentContent(content||defaultContent);},[content]);React.useEffect(()=>{setCurrentImage(image||defaultImage);},[image]);const textStyles={color:color,whiteSpace:\"pre-wrap\",wordBreak:\"break-word\",fontFamily,fontSize,fontWeight,lineHeight,letterSpacing};const wrapperStyles={textAlign,overflow:\"hidden\"};const marginValue=isMixedMargin?`${imageObject.margin}px`:`${imageObject.topMargin}px ${imageObject.rightMargin}px ${imageObject.bottomMargin}px ${imageObject.leftMargin}px`;const imageStyles={float:align,width:`${width}%`,margin:marginValue,borderRadius:`${radius}px`,border:`${border}px solid ${borderColor}`};const renderTag=()=>{const TagName=tag||\"p\";return /*#__PURE__*/React.createElement(TagName,{style:{all:\"unset\",...textStyles}},currentContent);};return /*#__PURE__*/_jsxs(\"div\",{style:wrapperStyles,children:[currentImage&&/*#__PURE__*/_jsx(\"img\",{src:currentImage,style:imageStyles,alt:\"\"}),renderTag()]});}const defaultContent=\"During my 10-day hiking adventure in Yosemite, I trekked along the popular Mist Trail, through groves of giant sequoias, along rushing rivers and thundering waterfalls, past granite monoliths, meadows, and alpine lakes. There's an endless and always-scenic variety of hiking routes in Yosemite waiting to be explored on foot.\";const defaultImage=\"https://images.unsplash.com/photo-1526182178-ecca0799acd8?q=80&w=3348&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\";TextImageWrap.defaultProps={content:defaultContent,color:\"#000000\",imageObject:{image:defaultImage,width:50,margin:0,align:\"left\",radius:0,border:0,borderColor:\"#000000\"},isMixedMargin:false};addPropertyControls(TextImageWrap,{content:{type:ControlType.String,title:\"Content\",defaultValue:TextImageWrap.defaultProps.content,placeholder:\"Type something\u2026\",displayTextArea:true},font:{type:ControlType.Font,controls:\"extended\",displayFontSize:true,defaultFontType:\"sans-serif\",displayTextAlignment:false,defaultValue:{fontSize:15,lineHeight:1.4,letterSpacing:0}},color:{type:ControlType.Color,title:\"\u200E\",defaultValue:TextImageWrap.defaultProps.color},imageObject:{type:ControlType.Object,title:\"Image\",controls:{image:{type:ControlType.Image,title:\"Image\",defaultValue:TextImageWrap.defaultProps.imageObject.image},width:{type:ControlType.Number,title:\"Width (%)\",defaultValue:TextImageWrap.defaultProps.imageObject.width,min:1,max:100,displayStepper:true},margin:{type:ControlType.FusedNumber,title:\"Margin\",defaultValue:TextImageWrap.defaultProps.imageObject.margin,toggleKey:\"isMixedMargin\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"topMargin\",\"rightMargin\",\"bottomMargin\",\"leftMargin\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0},align:{type:ControlType.SegmentedEnum,title:\"Align\",options:[\"left\",\"right\"],optionTitles:[\"Left\",\"Right\"],defaultValue:TextImageWrap.defaultProps.imageObject.align},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:TextImageWrap.defaultProps.imageObject.radius,min:0,displayStepper:true},border:{type:ControlType.Number,title:\"Border\",defaultValue:TextImageWrap.defaultProps.imageObject.border,min:0,displayStepper:true},borderColor:{type:ControlType.Color,title:\"\u200E\",defaultValue:TextImageWrap.defaultProps.imageObject.borderColor}}},tag:{type:ControlType.Enum,title:\"Tag\",options:[\"p\",\"span\"],optionTitles:[\"p\",\"span\"],defaultValue:\"p\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextImageWrap\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"400\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextImageWrap.map"],
  "mappings": "mFAMmB,SAARA,EAA+B,CAAC,QAAAC,EAAQ,KAAAC,EAAK,MAAAC,EAAM,IAAAC,EAAI,YAAAC,EAAY,cAAAC,EAAc,EAAK,EAAE,CAAC,GAAK,CAAC,WAAAC,EAAW,SAAAC,EAAS,WAAAC,EAAW,WAAAC,EAAW,cAAAC,EAAc,UAAAC,CAAS,EAAEV,EAAU,CAAC,MAAAW,EAAM,MAAAC,EAAM,MAAAC,EAAM,OAAAC,EAAO,OAAAC,EAAO,YAAAC,CAAW,EAAEb,EAAiB,CAACc,EAAeC,CAAiB,EAAQC,EAASpB,GAASqB,CAAc,EAAO,CAACC,EAAaC,CAAe,EAAQH,EAASR,GAAOY,CAAY,EAAQC,EAAU,IAAI,CAACN,EAAkBnB,GAASqB,CAAc,CAAE,EAAE,CAACrB,CAAO,CAAC,EAAQyB,EAAU,IAAI,CAACF,EAAgBX,GAAOY,CAAY,CAAE,EAAE,CAACZ,CAAK,CAAC,EAAE,IAAMc,EAAW,CAAC,MAAMxB,EAAM,WAAW,WAAW,UAAU,aAAa,WAAAI,EAAW,SAAAC,EAAS,WAAAC,EAAW,WAAAC,EAAW,cAAAC,CAAa,EAAQiB,EAAc,CAAC,UAAAhB,EAAU,SAAS,QAAQ,EAAQiB,EAAYvB,EAAc,GAAGD,EAAY,WAAW,GAAGA,EAAY,eAAeA,EAAY,iBAAiBA,EAAY,kBAAkBA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YAAY,MAAM,SAAS,aAAanC,EAAc,aAAa,YAAY,OAAO,UAAU,gBAAgB,aAAa,CAAC,MAAM,YAAY,EAAE,UAAU,CAAC,YAAY,cAAc,eAAe,YAAY,EAAE,YAAY,CAAC,IAAI,IAAI,IAAI,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,KAAKmC,EAAY,cAAc,MAAM,QAAQ,QAAQ,CAAC,OAAO,OAAO,EAAE,aAAa,CAAC,OAAO,OAAO,EAAE,aAAanC,EAAc,aAAa,YAAY,KAAK,EAAE,OAAO,CAAC,KAAKmC,EAAY,OAAO,MAAM,SAAS,aAAanC,EAAc,aAAa,YAAY,OAAO,IAAI,EAAE,eAAe,EAAI,EAAE,OAAO,CAAC,KAAKmC,EAAY,OAAO,MAAM,SAAS,aAAanC,EAAc,aAAa,YAAY,OAAO,IAAI,EAAE,eAAe,EAAI,EAAE,YAAY,CAAC,KAAKmC,EAAY,MAAM,MAAM,SAAI,aAAanC,EAAc,aAAa,YAAY,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC,KAAKmC,EAAY,KAAK,MAAM,MAAM,QAAQ,CAAC,IAAI,MAAM,EAAE,aAAa,CAAC,IAAI,MAAM,EAAE,aAAa,GAAG,CAAC,CAAC",
  "names": ["TextImageWrap", "content", "font", "color", "tag", "imageObject", "isMixedMargin", "fontFamily", "fontSize", "fontWeight", "lineHeight", "letterSpacing", "textAlign", "image", "width", "align", "radius", "border", "borderColor", "currentContent", "setCurrentContent", "ye", "defaultContent", "currentImage", "setCurrentImage", "defaultImage", "ue", "textStyles", "wrapperStyles", "marginValue", "imageStyles", "u", "p", "B", "addPropertyControls", "ControlType"]
}
