{"version":3,"file":"MosaicText.CGtkNO9K.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/VzPUa9nLBEWkvnx6DDYT/HTqdcCrh8vpxnhsuSmYc/MosaicText.js"],"sourcesContent":["// Mosaic text element with two columns that animate on scroll\n// Top sentence slides in from left, bottom from right\n// Continues motion as user scrolls through the section\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useScroll,useTransform,motion}from\"framer-motion\";import{useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function MosaicText(props){const{topText,bottomText,textColor,backgroundColor,topFont,bottomFont,gap,topStartPosition,topCenterPosition,topEndPosition,bottomStartPosition,bottomCenterPosition,bottomEndPosition,scrollOffsetStart,scrollOffsetEnd,breakpoint,desktopScale,tabletScale,mobileScale}=props;const containerRef=useRef(null);const{scrollYProgress}=useScroll({target:containerRef,offset:[\"start end\",\"end start\"]});const topX=useTransform(scrollYProgress,[0,.5,1],[\"-50%\",\"0%\",\"50%\"]);const bottomX=useTransform(scrollYProgress,[0,.5,1],[\"50%\",\"0%\",\"-50%\"]);// Calculate scale based on breakpoint\nconst getScale=()=>{switch(breakpoint){case\"mobile\":return mobileScale;case\"tablet\":return tabletScale;case\"desktop\":default:return desktopScale;}};const scale=getScale();// Apply scale to font sizes\nconst scaledTopFont={...topFont,fontSize:typeof topFont.fontSize===\"string\"?`calc(${topFont.fontSize} * ${scale})`:topFont.fontSize*scale};const scaledBottomFont={...bottomFont,fontSize:typeof bottomFont.fontSize===\"string\"?`calc(${bottomFont.fontSize} * ${scale})`:bottomFont.fontSize*scale};return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{...props.style,position:\"relative\",width:\"100%\",height:\"100%\",backgroundColor,overflow:\"hidden\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",gap:gap*scale,padding:\"40px 0\"},children:[/*#__PURE__*/_jsx(motion.div,{style:{x:topX,color:textColor,whiteSpace:\"nowrap\",...scaledTopFont},children:topText}),/*#__PURE__*/_jsx(motion.div,{style:{x:bottomX,color:textColor,whiteSpace:\"nowrap\",textAlign:\"right\",...scaledBottomFont},children:bottomText})]});}addPropertyControls(MosaicText,{topText:{type:ControlType.String,title:\"Top Text\",defaultValue:\"CREATIVE DESIGN\"},bottomText:{type:ControlType.String,title:\"Bottom Text\",defaultValue:\"INNOVATIVE SOLUTIONS\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},topFont:{type:ControlType.Font,title:\"Top Font\",defaultValue:{fontSize:\"40px\",variant:\"Bold\",letterSpacing:\"-0.04em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},bottomFont:{type:ControlType.Font,title:\"Bottom Font\",defaultValue:{fontSize:\"40px\",variant:\"Bold\",letterSpacing:\"-0.04em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:40},breakpoint:{type:ControlType.Enum,title:\"Breakpoint\",options:[\"desktop\",\"tablet\",\"mobile\"],optionTitles:[\"Desktop\",\"Tablet\",\"Mobile\"],defaultValue:\"desktop\",displaySegmentedControl:true},desktopScale:{type:ControlType.Number,title:\"Desktop Scale\",defaultValue:1,min:.1,max:3,step:.1},tabletScale:{type:ControlType.Number,title:\"Tablet Scale\",defaultValue:.7,min:.1,max:3,step:.1},mobileScale:{type:ControlType.Number,title:\"Mobile Scale\",defaultValue:.5,min:.1,max:3,step:.1},topStartPosition:{type:ControlType.Number,title:\"Top Start Position\",defaultValue:0},topCenterPosition:{type:ControlType.Number,title:\"Top Center Position\",defaultValue:.5},topEndPosition:{type:ControlType.Number,title:\"Top End Position\",defaultValue:1},bottomStartPosition:{type:ControlType.Number,title:\"Bottom Start Position\",defaultValue:0},bottomCenterPosition:{type:ControlType.Number,title:\"Bottom Center Position\",defaultValue:.5},bottomEndPosition:{type:ControlType.Number,title:\"Bottom End Position\",defaultValue:1},scrollOffsetStart:{type:ControlType.Number,title:\"Scroll Offset Start\",defaultValue:0},scrollOffsetEnd:{type:ControlType.Number,title:\"Scroll Offset End\",defaultValue:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MosaicText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MosaicText.map"],"mappings":"gPAMG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,UAAQ,aAAW,YAAU,kBAAgB,UAAQ,aAAW,MAAI,mBAAiB,oBAAkB,iBAAe,sBAAoB,uBAAqB,oBAAkB,oBAAkB,kBAAgB,aAAW,eAAa,cAAY,eAAa,EAAY,EAAaA,EAAO,IAAI,EAAO,CAAC,mBAAiB,EAAU,CAAC,OAAO,EAAa,OAAO,CAAC,YAAY,WAAW,CAAC,CAAC,EAAQ,EAAK,EAAa,EAAgB,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,OAAO,KAAK,KAAK,CAAC,EAAQ,EAAQ,EAAa,EAAgB,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,MAAM,KAAK,MAAM,CAAC,EACza,OAAvI,CAAC,OAAO,EAAP,CAAmB,IAAI,SAAS,OAAO,EAAY,IAAI,SAAS,OAAO,EAA0B,QAAQ,OAAO,CAAa,CAAC,EAAc,CAAS,EACnK,EAAc,CAAC,GAAG,EAAQ,SAAS,OAAO,EAAQ,UAAW,SAAS,QAAQ,EAAQ,SAAS,KAAK,EAAM,GAAG,EAAQ,SAAS,CAAK,EAAQ,EAAiB,CAAC,GAAG,EAAW,SAAS,OAAO,EAAW,UAAW,SAAS,QAAQ,EAAW,SAAS,K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