{"version":3,"file":"Examples.w9OUH2X8.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js","https:/framer.com/m/framer/utils.js@^0.9.0","https:/framerusercontent.com/modules/AiCX3PzVt7QDzFiA2i3O/sQkuVS4ofXYH35VWtBm0/Examples.js"],"sourcesContent":["export const centerContent = {\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nexport const autoSizingText = {\n    width: \"max-content\",\n    wordBreak: \"break-word\",\n    overflowWrap: \"break-word\",\n    overflow: \"hidden\",\n    whiteSpace: \"pre-wrap\",\n    flexShrink: 0\n};\nexport const defaultContainerStyles = {\n    ...centerContent,\n    overflow: \"hidden\"\n};\nexport const containerStyles = defaultContainerStyles;\nexport const randomColor = ()=>\"#\" + Math.floor(Math.random() * 16777215).toString(16)\n;\n\nexport const __FramerMetadata__ = {\"exports\":{\"centerContent\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"autoSizingText\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultContainerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomColor\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./Utils.map","/*\n * Utils (framer/utils@0.9.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useState,useEffect}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";// Learn more: https://www.framer.com/developers/overrides/\nconst useStore=createStore({background:\"#0099FF\"});export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});});}// ----------------------\n// NEW: OnlyOnce Override\n// ----------------------\nexport function OnlyOnce(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[visible,setVisible]=useState(false);const[shouldAnimate,setShouldAnimate]=useState(false);const SESSION_STORAGE_KEY=\"OnlyOnceSectionAppeared\";useEffect(()=>{if(typeof window===\"undefined\")return;const hasAppeared=sessionStorage.getItem(SESSION_STORAGE_KEY);if(hasAppeared===\"true\"){setVisible(true);setShouldAnimate(false);}else{setShouldAnimate(true);const timeout=setTimeout(()=>{setVisible(true);sessionStorage.setItem(SESSION_STORAGE_KEY,\"true\");},1e3)// 1s delay\n;return()=>clearTimeout(timeout);}},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style,opacity:visible?1:0,transition:shouldAnimate?\"opacity 0.8s cubic-bezier(.66,.01,.17,.99)\":\"none\"}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"OnlyOnce\":{\"type\":\"reactHoc\",\"name\":\"OnlyOnce\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"sNAAa,EAAgB,CACzB,QAAS,OACT,eAAgB,SAChB,WAAY,QAChB,EAWI,CADA,GAAG,CACO,sBEXd,SAAgB,EAAS,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAS,EAAK,EAAO,CAAC,EAAc,GAAkBA,EAAS,EAAK,EAAQ,EAAoB,0BACnK,OAD6L,MAAc,CAAI,GAAO,IAAS,OAAiF,GAA5C,eAAe,QAAQ,CAAkC,IAAI,OAAQ,EAAW,EAAI,EAAE,EAAiB,EAAK,MAAO,CAAC,EAAiB,EAAI,EAAE,IAAM,EAAQ,eAAe,CAAC,EAAW,EAAI,EAAE,eAAe,QAAQ,EAAoB,MAAM,CAAE,EAAE,GAAG,EAC7hB,UAAU,aAAa,CAAO,CAAE,CAAC,EAAE,CAAC,CAAC,EAAsB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,MAAM,CAAC,GAAG,EAAM,MAAM,QAAQ,KAAY,WAAW,EAAc,6CAA6C,MAAM,CAAC,CAAC,CAAE,CAAC,CAAE,qBALhL,IAAiD,IAAqE,IAAqE,EACtN,EAAY,CAAC,WAAW,SAAS,CAAC"}