{"version":3,"file":"HandText.fAGMehOS.mjs","names":["_jsxs","Tag","_jsx","React.Fragment","__esmMin","x","init_npm_react_18_3_1","p","c","init_jsx_runtime","init_framer_BWzg2IRg","ControlType","addPropertyControls","init_BrittanyHandFont","brittanyHandFontFace","HandText","props","text","font","color","handColor","handScale","align","tag","style","parts","s","i","init_HandText"],"sources":["https:/framerusercontent.com/modules/Wcz9col6yLlli8nbc8pV/nSMYgIz048CHOVoPP8Ot/HandText.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{brittanyHandFontFace}from\"https://framerusercontent.com/modules/jodb94yB3JXPIwd1fgfQ/1NnpMzXio84147zXiz4y/BrittanyHandFont.js\";/**\n * Text where anything in [square brackets] is written in Brittany's handwriting. Line breaks are kept.\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function HandText(props){const{text=\"Your text with a [handwritten] aside\",font,color=\"#33404F\",handColor,handScale=1.2,align=\"left\",tag=\"p\",style}=props;const parts=String(text).split(/(\\[[^\\]]*\\])/g).filter(s=>s!==\"\");const Tag=tag;return /*#__PURE__*/_jsxs(Tag,{style:{...style,margin:0,width:\"100%\",color,textAlign:align,whiteSpace:\"pre-line\",textWrap:\"pretty\",...font||{}},children:[/*#__PURE__*/_jsx(\"style\",{children:brittanyHandFontFace}),parts.map((p,i)=>p.startsWith(\"[\")&&p.endsWith(\"]\")?/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:'\"Brittany Hand\", cursive',fontSize:handScale+\"em\",lineHeight:1,letterSpacing:0,fontWeight:400,fontStyle:\"normal\",color:handColor||color},children:p.slice(1,-1)},i):/*#__PURE__*/_jsx(React.Fragment,{children:p},i))]});}addPropertyControls(HandText,{text:{type:ControlType.String,title:\"Text\",displayTextArea:true,description:\"Put [square brackets] around words to write them in your handwriting.\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#33404F\"},handColor:{type:ControlType.Color,title:\"Handwriting Color\",optional:true},handScale:{type:ControlType.Number,title:\"Handwriting Size\",min:.6,max:3,step:.05,defaultValue:1.2},align:{type:ControlType.Enum,title:\"Align\",options:[\"left\",\"center\",\"right\"],defaultValue:\"left\"},tag:{type:ControlType.Enum,title:\"Tag\",options:[\"p\",\"h2\",\"h3\",\"span\"],defaultValue:\"p\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HandText\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HandText.map"],"mappings":"A,4OAIG,SAAwBe,EAASC,EAAM,CAAC,GAAK,CAACC,OAAK,uCAAuCC,OAAKC,QAAM,UAAUC,YAAUC,YAAU,IAAIC,QAAM,OAAOC,MAAI,IAAIC,SAAOR,EAAYS,EAAM,OAAOR,CAAI,CAAC,CAAC,MAAM,eAAe,CAAC,CAAC,OAAOS,GAAGA,IAAI,EAAE,EAAgB,MAAoB1B,gBAAMC,EAAI,CAAC,MAAM,CAAC,GAAGuB,EAAM,OAAO,EAAE,MAAM,OAAOL,QAAM,UAAUG,EAAM,WAAW,WAAW,SAAS,SAAS,GAAGJ,GAAM,CAAC,CAAC,EAAE,SAAS,CAAchB,gBAAK,QAAQ,CAAC,SAASY,CAAoB,CAAC,EAAEW,EAAM,KAAKlB,EAAEoB,IAAIpB,EAAE,WAAW,GAAG,GAAGA,EAAE,SAAS,GAAG,EAAeL,gBAAK,OAAO,CAAC,MAAM,CAAC,WAAW,2BAA2B,SAASmB,EAAU,KAAK,WAAW,EAAE,cAAc,EAAE,WAAW,IAAI,UAAU,SAAS,MAAMD,GAAWD,CAAK,EAAE,SAASZ,EAAE,MAAM,EAAE,EAAE,CAAC,E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