{"version":3,"file":"shared-lib.DCYVnFPS.mjs","names":["useState","useMemo","fonts","css","className","metadata","siteMetadata","metadataVersion","__FramerMetadata__","metadata","siteMetadata"],"sources":["https:/framerusercontent.com/modules/l9U6d41UbIlPHwVVvQrA/5Z1iMTlhInDw6oW8lkKF/StaggerFirstLetter.js","https:/framerusercontent.com/modules/oYyVMyltEforpQ30pmcW/NGBkfT40ugW4SvzmGuls/KgHoz1mZx.js","https:/framerusercontent.com/modules/gEy5fBnOOgyTyGhVFJQQ/VmsjCSuTJz8xKpuIPNVg/lCp62NaeX.js","https:/framerusercontent.com/modules/bUrZj464xh7vcxklZbOr/CD4W82rYlcZPhRyqpdAV/siteMetadata.js","https:/framerusercontent.com/modules/tUX8APeLUe9Wpb44ikMx/0s8JQhfIthQBDUin9Roj/augiA20Il.js","https:/framerusercontent.com/modules/3ntBKl2GnBYcnUOp5FHk/mxnpyQtnTWKr0Pn0fHwd/Zs9ebEYL6.js"],"sourcesContent":["// Component that displays text with only first letters visible by default,\n// revealing remaining letters on hover with a stagger animation similar to Framer's Stagger Text effect.\n// Hidden letters occupy space using opacity to prevent layout shift.\n// Animation reverses on mouse leave with same stagger timing.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useMemo,useEffect,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function StaggerFirstLetter(props){const{text=\"Hello World Example\",font,color,staggerDelay,animationDuration,fill,initialRevealDuration,strokeWidth,strokeColor,strokeSides,style}=props;const[isHovered,setIsHovered]=useState(false);const[showInitialReveal,setShowInitialReveal]=useState(true);const words=useMemo(()=>{return text.split(\" \").map(word=>{if(word.length===0)return{first:\"\",rest:[]};return{first:word[0],rest:word.slice(1).split(\"\")};});},[text]);const totalLetters=useMemo(()=>{return words.reduce((acc,word)=>acc+word.rest.length,0);},[words]);useEffect(()=>{const timer=setTimeout(()=>{startTransition(()=>setShowInitialReveal(false));},initialRevealDuration*1e3);return()=>clearTimeout(timer);},[initialRevealDuration]);let letterIndex=0;const shouldReveal=isHovered||showInitialReveal;const isFixedWidth=style?.width===\"100%\";return /*#__PURE__*/_jsxs(\"div\",{style:{...style,position:\"relative\",display:isFixedWidth?\"block\":\"inline-block\",width:isFixedWidth?\"100%\":\"max-content\",borderTop:strokeSides.top?`${strokeWidth}px solid ${strokeColor}`:\"none\",borderRight:strokeSides.right?`${strokeWidth}px solid ${strokeColor}`:\"none\",borderBottom:strokeSides.bottom?`${strokeWidth}px solid ${strokeColor}`:\"none\",borderLeft:strokeSides.left?`${strokeWidth}px solid ${strokeColor}`:\"none\"},onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",backgroundColor:fill,zIndex:-1}}),/*#__PURE__*/_jsx(\"span\",{style:{...font,color,display:\"inline-flex\",flexWrap:\"wrap\",gap:\"0.25em\"},children:words.map((word,wordIdx)=>/*#__PURE__*/_jsxs(\"span\",{style:{display:\"inline-flex\",whiteSpace:\"nowrap\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{opacity:1},children:word.first}),word.rest.map((letter,letterIdx)=>{const currentIndex=letterIndex++;return /*#__PURE__*/_jsx(motion.span,{initial:{opacity:1},animate:{opacity:shouldReveal?1:0},transition:{duration:animationDuration,delay:shouldReveal?currentIndex*staggerDelay:(totalLetters-currentIndex-1)*staggerDelay,ease:[.25,.1,.25,1]},style:{display:\"inline-block\"},children:letter},letterIdx);})]},wordIdx))})]});}addPropertyControls(StaggerFirstLetter,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Hello World Example\",displayTextArea:true},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"40px\",variant:\"Bold\",letterSpacing:\"-0.04em\",lineHeight:\"1em\"}},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"},fill:{type:ControlType.Color,title:\"Fill\",defaultValue:\"#FFFFFF\"},strokeWidth:{type:ControlType.Number,title:\"Stroke Width\",defaultValue:0,min:0,max:20,step:.1,unit:\"px\"},strokeColor:{type:ControlType.Color,title:\"Stroke Color\",defaultValue:\"#000000\"},strokeSides:{type:ControlType.Object,title:\"Stroke Sides\",controls:{top:{type:ControlType.Boolean,title:\"Top\",defaultValue:true},right:{type:ControlType.Boolean,title:\"Right\",defaultValue:true},bottom:{type:ControlType.Boolean,title:\"Bottom\",defaultValue:true},left:{type:ControlType.Boolean,title:\"Left\",defaultValue:true}},defaultValue:{top:true,right:true,bottom:true,left:true}},initialRevealDuration:{type:ControlType.Number,title:\"Initial Reveal\",defaultValue:2,min:0,max:10,step:.5,unit:\"s\"},staggerDelay:{type:ControlType.Number,title:\"Stagger Delay\",defaultValue:.03,min:0,max:.2,step:.01,unit:\"s\"},animationDuration:{type:ControlType.Number,title:\"Duration\",defaultValue:.3,min:.1,max:1,step:.05,unit:\"s\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StaggerFirstLetter\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StaggerFirstLetter.map","// Generated by Framer (6bbae76)\nimport{fontStore}from\"framer\";fontStore.loadFonts([]);export const fonts=[{explicitInter:true,fonts:[]}];export const css=[\".framer-IAJJy .framer-styles-preset-1gdysq0:not(.rich-text-wrapper), .framer-IAJJy .framer-styles-preset-1gdysq0.rich-text-wrapper a { --framer-link-hover-text-color: #808080; --framer-link-text-color: var(--token-80399cde-c4e9-4463-abb9-d004fe6b6e9c, #a2a2a2); }\"];export const className=\"framer-IAJJy\";\nexport const __FramerMetadata__ = {\"exports\":{\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (c9d77eb)\nimport{fontStore}from\"framer\";fontStore.loadFonts([]);export const fonts=[{explicitInter:true,fonts:[]}];export const css=[\".framer-6cmBR .framer-styles-preset-1ikrl84:not(.rich-text-wrapper), .framer-6cmBR .framer-styles-preset-1ikrl84.rich-text-wrapper a { --framer-link-hover-text-color: #111111; --framer-link-hover-text-decoration: underline; --framer-link-text-color: #111111; }\"];export const className=\"framer-6cmBR\";\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\"}}}","// Generated by Framer (ed8dc63)\nexport default function metadata(params,activeLocale){return{description:\"@philiphyoo\",favicon:\"https://framerusercontent.com/assets/eUrNRv3Ykg3Nfun9rEwtQUZ644.jpeg\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/eUrNRv3Ykg3Nfun9rEwtQUZ644.jpeg\",title:\"Philip.\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (ed8dc63)\nimport siteMetadata from\"https://framerusercontent.com/modules/bUrZj464xh7vcxklZbOr/CD4W82rYlcZPhRyqpdAV/siteMetadata.js\";export default function metadata(params,activeLocale){return{breakpoints:[{hash:\"18p8jjb\",mediaQuery:\"(min-width: 1600px)\"},{hash:\"72rtr7\",mediaQuery:\"(min-width: 1200px) and (max-width: 1599.98px)\"},{hash:\"x71w53\",mediaQuery:\"(min-width: 810px) and (max-width: 1199.98px)\"},{hash:\"9dhw8t\",mediaQuery:\"(max-width: 809.98px)\"}],description:siteMetadata(params,activeLocale).description,elements:{},robots:\"max-image-preview:large\",serializationId:\"framer-6jBop\",title:siteMetadata(params,activeLocale).title||\"Home\",viewport:\"width=device-width\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (6bbae76)\nimport siteMetadata from\"https://framerusercontent.com/modules/bUrZj464xh7vcxklZbOr/CD4W82rYlcZPhRyqpdAV/siteMetadata.js\";export default function metadata(params,activeLocale){return{breakpoints:[{hash:\"qewj3a\",mediaQuery:\"(min-width: 1440px)\"},{hash:\"xgdnk5\",mediaQuery:\"(min-width: 1200px) and (max-width: 1439.98px)\"},{hash:\"qjfgg2\",mediaQuery:\"(min-width: 810px) and (max-width: 1199.98px)\"},{hash:\"1ti87kn\",mediaQuery:\"(max-width: 809.98px)\"}],description:siteMetadata(params,activeLocale).description,elements:{},robots:\"max-image-preview:large\",serializationId:\"framer-f4P75\",title:siteMetadata(params,activeLocale).title||\"Gallery\",viewport:\"width=device-width\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"8PAOG,SAAwB,EAAmB,EAAM,CAAC,GAAK,CAAC,OAAK,sBAAsB,OAAK,QAAM,eAAa,oBAAkB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