{"version":3,"file":"SequentialHoverText.Ba5jPQVU.mjs","names":["useMemo","useState","useRef","__esmMin","pe","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","te","_e","p","init_jsx_runtime","ce","de","motion","useReducedMotion","init_framer_motion_DhsWWWsN","init_framer_Bf4_tcb2","useIsStaticRenderer","addPropertyControls","ControlType","SequentialHoverText","props","lines","line1","line2","line3","isStatic","reduceMotion","lineIndex","setLineIndex","characterCount","setCharacterCount","hoveredLine","setHoveredLine","rootRef","componentWidth","setComponentWidth","fillsWidth","style","root","measure","observer","measuredPx","maxPx","minPx","scaleVw","responsiveFontSize","currentLine","isComplete","timer","value","lineDelayMs","typeMs","visibleLineCount","typingFinished","autoHeight","fixedHeight","textColor","font","line","showCursor","index","cursorChar","isCurrent","shownText","isHovered","keepsFinalCursor","hoverColor","blinkS","init_SequentialHoverText"],"sources":["https:/framerusercontent.com/modules/Opo6yEVeNs6EePQAue4g/tZuwI7M0G0vy3KFk01Db/SequentialHoverText.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useMemo,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,useReducedMotion}from\"framer-motion\";/**\n * Sequential type-on headline: completed lines stay visible and new lines append below.\n * Each line uses a left-to-right background wipe on hover.\n *\n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 230\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function SequentialHoverText(props){const{line1=\"Brand Strategy\",line2=\"Visual Identity\",line3=\"Digital Experience\",font={},textColor=\"#1D99B5\",hoverColor=\"#F0F0F0\",typeMs=50,lineDelayMs=280,fixedHeight=230,autoHeight=false,minPx=16,maxPx=64,scaleVw=6,showCursor=true,cursorChar=\"_\",blinkS=.5,transition={type:\"tween\",ease:[.44,0,.56,1],duration:.3},style}=props;const lines=useMemo(()=>[line1,line2,line3].filter(Boolean),[line1,line2,line3]);const isStatic=useIsStaticRenderer();const reduceMotion=useReducedMotion();const[lineIndex,setLineIndex]=useState(0);const[characterCount,setCharacterCount]=useState(0);const[hoveredLine,setHoveredLine]=useState(null);const rootRef=useRef(null);const[componentWidth,setComponentWidth]=useState(0);const fillsWidth=style?.width===\"100%\";useEffect(()=>{if(!fillsWidth||typeof ResizeObserver===\"undefined\")return;const root=rootRef.current;if(!root)return;const measure=()=>setComponentWidth(root.clientWidth);measure();const observer=new ResizeObserver(measure);observer.observe(root);return()=>observer.disconnect();},[fillsWidth]);const measuredPx=Math.min(maxPx,Math.max(minPx,componentWidth*scaleVw/100));const responsiveFontSize=fillsWidth?`${componentWidth>0?measuredPx:minPx}px`:`clamp(${minPx}px, ${scaleVw}vw, ${maxPx}px)`;useEffect(()=>{startTransition(()=>{setLineIndex(0);setCharacterCount(0);});},[line1,line2,line3]);useEffect(()=>{if(isStatic||reduceMotion||lines.length===0||lineIndex>=lines.length)return;const currentLine=lines[lineIndex];const isComplete=characterCount>=currentLine.length;const timer=window.setTimeout(()=>{startTransition(()=>{if(isComplete){setLineIndex(value=>value+1);setCharacterCount(0);}else{setCharacterCount(value=>value+1);}});},Math.max(0,isComplete?lineDelayMs:typeMs));return()=>window.clearTimeout(timer);},[characterCount,isStatic,lineDelayMs,lineIndex,lines,reduceMotion,typeMs]);const visibleLineCount=isStatic||reduceMotion?lines.length:Math.min(lineIndex+1,lines.length);const typingFinished=isStatic||reduceMotion||lineIndex>=lines.length;return /*#__PURE__*/_jsxs(\"div\",{ref:rootRef,style:{...style,position:\"relative\",display:\"flex\",flexDirection:\"column\",alignItems:\"flex-start\",width:style?.width===\"100%\"?\"100%\":\"max-content\",minWidth:style?.width===\"100%\"?undefined:\"max-content\",height:autoHeight?\"auto\":`${fixedHeight}px`,minHeight:autoHeight?undefined:`${fixedHeight}px`,flexShrink:0,overflow:\"visible\",color:textColor,...font,fontSize:responsiveFontSize},\"aria-label\":lines.join(\", \"),children:[autoHeight&&/*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{visibility:\"hidden\",pointerEvents:\"none\",display:\"flex\",flexDirection:\"column\",alignItems:\"flex-start\",width:\"max-content\",maxWidth:\"100%\"},children:lines.map((line,index)=>/*#__PURE__*/_jsxs(\"span\",{style:{display:\"block\",width:\"max-content\",maxWidth:\"100%\",whiteSpace:\"nowrap\"},children:[line,showCursor&&index===lines.length-1?cursorChar:null]},index))}),/*#__PURE__*/_jsx(\"div\",{style:{position:autoHeight?\"absolute\":\"relative\",left:0,top:0,display:\"flex\",flexDirection:\"column\",alignItems:\"flex-start\",width:\"max-content\",maxWidth:\"100%\"},children:lines.slice(0,visibleLineCount).map((line,index)=>{const isCurrent=!typingFinished&&index===lineIndex;const shownText=isCurrent?line.slice(0,characterCount):line;const isHovered=hoveredLine===index;const keepsFinalCursor=typingFinished&&index===lines.length-1;return /*#__PURE__*/_jsxs(\"span\",{style:{position:\"relative\",display:\"block\",width:\"max-content\",maxWidth:\"100%\",cursor:\"default\",isolation:\"isolate\",whiteSpace:\"nowrap\"},onMouseEnter:()=>setHoveredLine(index),onMouseLeave:()=>setHoveredLine(null),children:[/*#__PURE__*/_jsx(motion.span,{\"aria-hidden\":\"true\",initial:false,animate:{scaleX:isHovered?1:0},transition:transition,style:{position:\"absolute\",inset:0,zIndex:-1,backgroundColor:hoverColor,transformOrigin:\"left center\"}}),shownText,showCursor&&(isCurrent||keepsFinalCursor)&&/*#__PURE__*/_jsx(motion.span,{\"aria-hidden\":\"true\",animate:{opacity:[1,1,0,0]},transition:{duration:Math.max(.2,blinkS*2),repeat:Infinity,times:[0,.45,.5,1]},children:cursorChar})]},index);})})]});}addPropertyControls(SequentialHoverText,{line1:{type:ControlType.String,title:\"Line 1\",defaultValue:\"Brand Strategy\"},line2:{type:ControlType.String,title:\"Line 2\",defaultValue:\"Visual Identity\"},line3:{type:ControlType.String,title:\"Line 3\",defaultValue:\"Digital Experience\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"64px\",lineHeight:\"1.2em\",letterSpacing:\"0em\"}},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#1D99B5\"},hoverColor:{type:ControlType.Color,title:\"Hover\",defaultValue:\"#F0F0F0\"},typeMs:{type:ControlType.Number,title:\"Type Speed\",defaultValue:50,min:10,max:200,step:5,unit:\"ms\"},lineDelayMs:{type:ControlType.Number,title:\"Line Delay\",defaultValue:280,min:0,max:2e3,step:20,unit:\"ms\"},autoHeight:{type:ControlType.Boolean,title:\"Auto Height\",defaultValue:false},fixedHeight:{type:ControlType.Number,title:\"Fixed Height\",defaultValue:230,min:80,max:600,step:1,unit:\"px\",hidden:({autoHeight})=>Boolean(autoHeight)},minPx:{type:ControlType.Number,title:\"Min Size\",defaultValue:16,min:8,max:48,unit:\"px\"},maxPx:{type:ControlType.Number,title:\"Max Size\",defaultValue:64,min:24,max:160,unit:\"px\"},scaleVw:{type:ControlType.Number,title:\"Scale\",defaultValue:6,min:1,max:12,step:.1,unit:\"vw\"},showCursor:{type:ControlType.Boolean,title:\"Cursor\",defaultValue:true},cursorChar:{type:ControlType.String,title:\"Character\",defaultValue:\"_\",hidden:({showCursor})=>!showCursor},blinkS:{type:ControlType.Number,title:\"Blink\",defaultValue:.5,min:.1,max:2,step:.1,unit:\"s\",hidden:({showCursor})=>!showCursor},transition:{type:ControlType.Transition,title:\"Hover Motion\",defaultValue:{type:\"tween\",ease:[.44,0,.56,1],duration:.3}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SequentialHoverText\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"600\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"230\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SequentialHoverText.map"],"mappings":"A,2RAQG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