{"version":3,"file":"ScrollFillText.fgUmSJJk.mjs","names":["useState","useRef","__esmMin","window","init_ssg_sandbox_shims","init_npm_react_18_3_1","_e","de","ce","useScroll","motion","useReducedMotion","init_framer_motion_DhsWWWsN","useTransform","init_framer_CKT6jEEQ","addPropertyControls","useIsStaticRenderer","fontStore","ControlType","fonts","css","className","init_YCC2sQ47B","useFontsReady","ready","setReady","active","alive","show","fallback","Word","color","progress","range","baseColor","fillColor","word","ScrollFillText","props","ref","isStatic","reduceMotion","fontsReady","start","end","words","text","count","w","Tag","tag","baseStyle","style","font","i","filled","k","index","scrollYProgress","init_ScrollFillText","init_jsx_runtime"],"sources":["https:/framerusercontent.com/modules/Pa3n7nlo0vLgYLnkUEm7/sXobuhsBBZOXT4ex7TVM/YCC2sQ47B.js","https:/framerusercontent.com/modules/hGFtwdhuv0li2VIuwRIw/8Jj6Hedn2EnIGpTfYMVv/ScrollFillText.js"],"sourcesContent":["// Generated by Framer (f8e97a5)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"CUSTOMV2;Geist SemiBold\",\"CUSTOMV2;Geist Bold\",\"CUSTOMV2;Geist Bold\",\"CUSTOMV2;Geist SemiBold\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"Geist SemiBold\",openType:true,source:\"custom\",style:\"normal\",uiFamilyName:\"Geist\",url:\"https://framerusercontent.com/assets/PqMVOI3kkchBA2OwMwZ4zn4.woff2\",weight:\"600\"},{cssFamilyName:\"Geist Bold\",openType:true,source:\"custom\",style:\"normal\",uiFamilyName:\"Geist\",url:\"https://framerusercontent.com/assets/HuwrE7f9Qav1ZNnUugfGB9EFk.woff2\",weight:\"700\"}]}];export const css=['.framer-70xtc .framer-styles-preset-kog9k6:not(.rich-text-wrapper), .framer-70xtc .framer-styles-preset-kog9k6.rich-text-wrapper p { --framer-font-family: \"Geist SemiBold\", \"Geist SemiBold Placeholder\", sans-serif; --framer-font-family-bold: \"Geist Bold\", \"Geist Bold Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Geist Bold\", \"Geist Bold Placeholder\", sans-serif; --framer-font-family-italic: \"Geist SemiBold\", \"Geist SemiBold Placeholder\", sans-serif; --framer-font-open-type-features: \\'blwf\\' on, \\'cv03\\' on, \\'cv04\\' on, \\'cv09\\' on, \\'cv11\\' on, \\'tnum\\' on; --framer-font-size: 80px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-style-bold-italic: normal; --framer-font-style-italic: normal; --framer-font-variation-axes: normal; --framer-font-weight: 600; --framer-font-weight-bold: 700; --framer-font-weight-bold-italic: 700; --framer-font-weight-italic: 600; --framer-letter-spacing: -0.055em; --framer-line-height: 0.9em; --framer-paragraph-spacing: 20px; --framer-text-alignment: left; --framer-text-color: var(--token-1a9884d6-b7ee-4250-8e33-0026b55cd8ef); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }','@media (max-width: 1199px) and (min-width: 810px) { .framer-70xtc .framer-styles-preset-kog9k6:not(.rich-text-wrapper), .framer-70xtc .framer-styles-preset-kog9k6.rich-text-wrapper p { --framer-font-family: \"Geist SemiBold\", \"Geist SemiBold Placeholder\", sans-serif; --framer-font-family-bold: \"Geist Bold\", \"Geist Bold Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Geist Bold\", \"Geist Bold Placeholder\", sans-serif; --framer-font-family-italic: \"Geist SemiBold\", \"Geist SemiBold Placeholder\", sans-serif; --framer-font-open-type-features: \\'blwf\\' on, \\'cv03\\' on, \\'cv04\\' on, \\'cv09\\' on, \\'cv11\\' on, \\'tnum\\' on; --framer-font-size: 64px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-style-bold-italic: normal; --framer-font-style-italic: normal; --framer-font-variation-axes: normal; --framer-font-weight: 600; --framer-font-weight-bold: 700; --framer-font-weight-bold-italic: 700; --framer-font-weight-italic: 600; --framer-letter-spacing: -0.05em; --framer-line-height: 0.9em; --framer-paragraph-spacing: 20px; --framer-text-alignment: left; --framer-text-color: var(--token-1a9884d6-b7ee-4250-8e33-0026b55cd8ef); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }','@media (max-width: 809px) and (min-width: 0px) { .framer-70xtc .framer-styles-preset-kog9k6:not(.rich-text-wrapper), .framer-70xtc .framer-styles-preset-kog9k6.rich-text-wrapper p { --framer-font-family: \"Geist SemiBold\", \"Geist SemiBold Placeholder\", sans-serif; --framer-font-family-bold: \"Geist Bold\", \"Geist Bold Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Geist Bold\", \"Geist Bold Placeholder\", sans-serif; --framer-font-family-italic: \"Geist SemiBold\", \"Geist SemiBold Placeholder\", sans-serif; --framer-font-open-type-features: \\'blwf\\' on, \\'cv03\\' on, \\'cv04\\' on, \\'cv09\\' on, \\'cv11\\' on, \\'tnum\\' on; --framer-font-size: 56px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-style-bold-italic: normal; --framer-font-style-italic: normal; --framer-font-variation-axes: normal; --framer-font-weight: 600; --framer-font-weight-bold: 700; --framer-font-weight-bold-italic: 700; --framer-font-weight-italic: 600; --framer-letter-spacing: -0.045em; --framer-line-height: 0.9em; --framer-paragraph-spacing: 20px; --framer-text-alignment: left; --framer-text-color: var(--token-1a9884d6-b7ee-4250-8e33-0026b55cd8ef); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }'];export const className=\"framer-70xtc\";\nexport const __FramerMetadata__ = {\"exports\":{\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,useScroll,useTransform,useReducedMotion}from\"framer-motion\";// Erst sichtbar, wenn die Webfonts geladen sind: Jedes Wort ist ein eigenes\n// Element. Bricht die Ersatzschrift anders um als Geist, würden die Wörter\n// beim Schriftwechsel einzeln springen (Layout-Verschiebung, CLS).\nfunction useFontsReady(active){const[ready,setReady]=useState(false);useEffect(()=>{if(!active||typeof document===\"undefined\")return;const fonts=document.fonts;if(!fonts||fonts.status===\"loaded\"){setReady(true);return;}let alive=true;const show=()=>{if(alive)setReady(true);};fonts.ready.then(show,show);const fallback=window.setTimeout(show,2500);return()=>{alive=false;window.clearTimeout(fallback);};},[active]);return ready||!active;}function Word({word,progress,range,baseColor,fillColor}){const color=useTransform(progress,range,[baseColor,fillColor]);return /*#__PURE__*/_jsx(motion.span,{style:{color},children:word});}/**\n * Scroll Fill Text\n *\n * Text färbt sich beim Scrollen Wort für Wort von Grau zu Weiß –\n * und beim Zurückscrollen wieder zurück.\n *\n * @framerIntrinsicWidth 760\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function ScrollFillText(props){const{text=\"Hydraulik gilt nicht gerade als klassisches Social-Media-Thema.\",font,baseColor=\"rgba(255, 255, 255, 0.25)\",fillColor=\"#FFFFFF\",start=85,end=40,tag=\"p\",style}=props;const ref=useRef(null);const isStatic=useIsStaticRenderer();const reduceMotion=useReducedMotion();const fontsReady=useFontsReady(!isStatic);const{scrollYProgress}=useScroll({target:ref,offset:[`start ${start/100}`,`end ${end/100}`]});const words=(text||\"\").split(/(\\s+)/);const count=words.filter(w=>w.trim().length>0).length||1;const Tag=tag;const baseStyle={...style,position:\"relative\",margin:0,whiteSpace:\"pre-wrap\",...{textWrap:\"pretty\"},...font,visibility:fontsReady?\"visible\":\"hidden\"};// Canvas & „Bewegung reduzieren“: statischer Zustand ohne Scroll-Logik\nif(isStatic||reduceMotion){let i=0;return /*#__PURE__*/_jsx(Tag,{ref:ref,style:baseStyle,children:words.map((w,k)=>{if(!w.trim())return w;const filled=reduceMotion||i++<count*.45;return /*#__PURE__*/_jsx(\"span\",{style:{color:filled?fillColor:baseColor},children:w},k);})});}let index=0;return /*#__PURE__*/_jsx(Tag,{ref:ref,style:baseStyle,\"aria-label\":text,children:words.map((w,k)=>{if(!w.trim())return w;const i=index++;return /*#__PURE__*/_jsx(Word,{word:w,progress:scrollYProgress,range:[i/count,(i+1)/count],baseColor:baseColor,fillColor:fillColor},k);})});}addPropertyControls(ScrollFillText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Hydraulik gilt nicht gerade als klassisches Social-Media-Thema.\",displayTextArea:true},font:{type:ControlType.Font,title:\"Schrift\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"52px\",variant:\"Medium\",letterSpacing:\"-0.04em\",lineHeight:\"1.1em\",textAlign:\"left\"}},baseColor:{type:ControlType.Color,title:\"Start (Grau)\",defaultValue:\"rgba(255, 255, 255, 0.25)\"},fillColor:{type:ControlType.Color,title:\"Ziel (Wei\\xdf)\",defaultValue:\"#FFFFFF\"},start:{type:ControlType.Number,title:\"Start bei\",description:\"Textanfang erreicht diese H\\xf6he im Fenster (% von oben)\",defaultValue:85,min:0,max:100,unit:\"%\"},end:{type:ControlType.Number,title:\"Fertig bei\",description:\"Textende erreicht diese H\\xf6he im Fenster (% von oben)\",defaultValue:40,min:0,max:100,unit:\"%\"},tag:{type:ControlType.Enum,title:\"Tag\",options:[\"p\",\"h2\",\"h3\"],defaultValue:\"p\",displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrollFillText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"760\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollFillText.map"],"mappings":"A,8TAC8BiB,EAAU,UAAU,CAAC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