{"version":3,"file":"GuideThread.CgwjUTvd.mjs","names":["React.useRef","React.useMemo","p","__esmMin","pe","init_npm_react_18_3_1","p","c","init_jsx_runtime","de","motion","useTransform","useReducedMotion","useScroll","init_framer_motion_DhsWWWsN","motionValue","init_framer_BWFVvmND","addPropertyControls","ControlType","useIsStaticRenderer","GuideThread","props","ref","isStatic","reduce","anchor","full","p$1","scrollYProgress","tipTop","v","tipOpacity","style","track","color","tip","init_GuideThread"],"sources":["https:/framerusercontent.com/modules/uo9wdzFTvqofOuo5WIlS/CpTUqYFAkSqPwPXl41c8/GuideThread.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,motionValue,useReducedMotion,useScroll,useTransform}from\"framer-motion\";/**\n * A dashed cut-line that gets traced in ink as you read, with the tip following the middle of the viewport.\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function GuideThread(props){const{color=\"#010800\",track=\"#D9DAD3\",tip=\"#FD8A03\",anchor=.5,style}=props;const ref=React.useRef(null);const isStatic=useIsStaticRenderer();const reduce=useReducedMotion();const{scrollYProgress}=useScroll({target:ref,offset:[`start ${anchor}`,`end ${anchor}`]});const full=React.useMemo(()=>motionValue(1),[]);const p=isStatic||reduce?full:scrollYProgress;const tipTop=useTransform(p,v=>`${v*100}%`);const tipOpacity=useTransform(p,[0,.002,.998,1],[0,1,1,0]);return /*#__PURE__*/_jsxs(\"div\",{ref:ref,\"aria-hidden\":\"true\",style:{position:\"relative\",width:\"100%\",height:\"100%\",pointerEvents:\"none\",...style},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:\"50%\",top:0,bottom:0,borderLeft:`1px dashed ${track}`}}),/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",left:\"50%\",top:0,height:\"100%\",width:1,background:color,scaleY:p,transformOrigin:\"50% 0%\"}}),!isStatic&&!reduce&&/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",left:\"50%\",top:tipTop,width:7,height:7,marginLeft:-3,marginTop:-3.5,borderRadius:\"50%\",background:tip,opacity:tipOpacity}})]});}addPropertyControls(GuideThread,{color:{type:ControlType.Color,title:\"Ink\",defaultValue:\"#010800\"},track:{type:ControlType.Color,title:\"Track\",defaultValue:\"#D9DAD3\"},tip:{type:ControlType.Color,title:\"Tip\",defaultValue:\"#FD8A03\"},anchor:{type:ControlType.Number,title:\"Anchor\",defaultValue:.5,min:.1,max:.9,step:.05}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GuideThread\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GuideThread.map"],"mappings":"A,6QAIG,SAAwBoB,EAAY,EAAM,CAAC,GAAK,CAAC,QAAM,UAAU,QAAM,UAAU,MAAI,UAAU,SAAO,GAAG,SAAOC,EAAYC,EAAItB,EAAa,IAAI,EAAQuB,EAASJ,EAAoB,EAAQK,EAAOZ,EAAiB,EAAO,CAAC,mBAAiBC,EAAU,CAAC,OAAOS,EAAI,OAAO,CAAC,SAASG,IAAS,OAAOA,GAAQ,CAAC,CAAC,EAAQC,EAAKzB,MAAkBc,EAAY,CAAC,EAAE,CAAC,CAAC,EAAQb,EAAEqB,GAAUC,EAAOE,EAAKE,EAAsBC,EAAOlB,EAAaT,EAAE,GAAG,GAAG4B,EAAE,IAAI,EAAE,EAAQC,EAAWpB,EAAaT,EAAE,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,MAAoB,gBAAM,MAAM,CAAK,MAAI,cAAc,OAAO,MAAM,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,cAAc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