{"version":3,"file":"LineMaskSplitText.BVmYqdge.mjs","names":["React.useRef"],"sources":["https:/framerusercontent.com/modules/Hp5gqVZZoB663jwer0f0/YVNgCpokxwcQChcno7jZ/LineMaskSplitText.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{motion,useInView}from\"framer-motion\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";export default function LineMaskSplitText(props){const{text,color,fontFamily,fontSize,stagger,duration,previewVisible,style,...rest}=props;const ref=React.useRef(null);const isInView=useInView(ref,{once:false});// Détecte si on est dans la maquette\nconst isCanvas=RenderTarget.current()===RenderTarget.canvas;const words=text.split(\" \");const container={hidden:{},visible:{transition:{staggerChildren:stagger}}};const wordAnimation={hidden:{opacity:0,y:100,filter:\"blur(10px)\"},visible:{opacity:1,y:0,filter:\"blur(0px)\",transition:{duration:duration,ease:[.48,0,.1,1.01]}}};return /*#__PURE__*/_jsx(\"div\",{ref:ref,...rest,style:{display:\"flex\",justifyContent:\"center\",textAlign:\"center\",flexWrap:\"wrap\",overflow:\"hidden\",...style},children:/*#__PURE__*/_jsx(motion.div,{variants:container,initial:\"hidden\",animate:isCanvas&&previewVisible?\"visible\":isInView?\"visible\":\"hidden\",style:{display:\"flex\",flexWrap:\"wrap\",justifyContent:\"center\"},children:words.map((word,index)=>/*#__PURE__*/_jsx(\"span\",{style:{overflow:\"hidden\",display:\"inline-block\"},children:/*#__PURE__*/_jsx(motion.span,{variants:wordAnimation,style:{display:\"inline-block\",marginRight:\"0.25em\",color:color,fontFamily:fontFamily,fontSize:fontSize},children:word})},index))})});}LineMaskSplitText.defaultProps={text:\"Line Mask Split Animation\",color:\"#ECF1DD\",fontFamily:\"Inter\",fontSize:48,stagger:.06,duration:.5,previewVisible:true};addPropertyControls(LineMaskSplitText,{text:{type:ControlType.String,title:\"Text\"},previewVisible:{type:ControlType.Boolean,title:\"Visible en maquette\",defaultValue:true,displaySegmentedControl:true},color:{type:ControlType.Color,title:\"Color\"},fontFamily:{type:ControlType.String,title:\"Font\"},fontSize:{type:ControlType.Number,title:\"Size\"},stagger:{type:ControlType.Number,title:\"Stagger\",step:.01},duration:{type:ControlType.Number,title:\"Duration\",step:.1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LineMaskSplitText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LineMaskSplitText.map"],"mappings":"yOAAoL,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,OAAK,QAAM,aAAW,WAAS,UAAQ,WAAS,iBAAe,QAAM,GAAG,GAAM,EAAY,EAAIA,EAAa,KAAK,CAAO,EAAS,EAAU,EAAI,CAAC,KAAK,GAAM,CAAC,CAChY,EAAS,EAAa,SAAS,GAAG,EAAa,OAAa,EAAM,EAAK,MAAM,IAAI,CAAO,EAAU,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,gBAAgB,EAAQ,CAAC,CAAC,CAAO,EAAc,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,IAAI,OAAO,aAAa,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAE,OAAO,YAAY,WAAW,CAAU,WAAS,KAAK,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,OAAoB,EAAK,MAAM,CAAK,MAAI,GAAG,EAAK,MAAM,CAAC,QAAQ,OAAO,eAAe,SAAS,UAAU,SAAS,SAAS,OAAO,SAAS,SAAS,GAAG,EAAM,CAAC,SAAsB,EAAK,EAAO,IAAI,CAAC,SAAS,EAAU,QAAQ,SAAS,QAAQ,GAAU,GAAyB,EAAV,UAA6B,SAAS,MAAM,CAAC,QAAQ,OAAO,SAAS,OAAO,eAAe,SAAS,CAAC,SAAS,EAAM,KAAK,EAAK,IAAqB,EAAK,OAAO,CAAC,MAAM,CAAC,SAAS,SAAS,QAAQ,eAAe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