{"version":3,"file":"Examples.CNyDgaub.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/ISwzeSXN0wdzjRC5x1ie/MPtaR9goDkWGUdOcZjsK/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}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\";import{useState,useEffect}from\"react\";// 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()});}});});}export function withThemeGradient(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[theme,setTheme]=useState(\"light\");useEffect(()=>{if(typeof window!==\"undefined\"){const storedTheme=sessionStorage.getItem(\"currentToggleState\")||(window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\");setTheme(storedTheme);}},[]);useEffect(()=>{if(typeof window===\"undefined\")return;const handleThemeChange=event=>{setTheme(event.detail);};window.addEventListener(\"themeChange\",handleThemeChange);return()=>window.removeEventListener(\"themeChange\",handleThemeChange);},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style,background:theme===\"dark\"?\"linear-gradient(to bottom, #222328 0%, #121317 50%, #040405 100%)\":\"linear-gradient(to bottom, #CCCCCC 0%, #FFFFFF 50%, #F7F7F7 100%)\"}});});}export function withDragScroll(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[isDragging,setIsDragging]=useState(false);const[dragStart,setDragStart]=useState({x:0,y:0});const[scrollStart,setScrollStart]=useState({x:0,y:0});const handleMouseDown=e=>{setIsDragging(true);setDragStart({x:e.clientX,y:e.clientY});if(ref?.current){setScrollStart({x:ref.current.scrollLeft,y:ref.current.scrollTop});}e.preventDefault();};const handleMouseMove=e=>{if(!isDragging||!ref?.current)return;const deltaX=e.clientX-dragStart.x;const deltaY=e.clientY-dragStart.y;ref.current.scrollLeft=scrollStart.x-deltaX;ref.current.scrollTop=scrollStart.y-deltaY;};const handleMouseUp=()=>{setIsDragging(false);};useEffect(()=>{if(isDragging){document.addEventListener(\"mousemove\",handleMouseMove);document.addEventListener(\"mouseup\",handleMouseUp);return()=>{document.removeEventListener(\"mousemove\",handleMouseMove);document.removeEventListener(\"mouseup\",handleMouseUp);};}},[isDragging,dragStart,scrollStart]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onMouseDown:handleMouseDown,style:{...props.style,cursor:isDragging?\"grabbing\":\"grab\",userSelect:\"none\",scrollbarWidth:\"none\",msOverflowStyle:\"none\"},css:{\"&::-webkit-scrollbar\":{display:\"none\"},...props.css}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withDragScroll\":{\"type\":\"reactHoc\",\"name\":\"withDragScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withThemeGradient\":{\"type\":\"reactHoc\",\"name\":\"withThemeGradient\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"sNAAa,EAAgB,CACzB,QAAS,OACT,eAAgB,SAChB,WAAY,SACf,CAWG,CADA,GAAG,EACO,qBEdkpB,SAAgB,EAAkB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,EAAM,GAAUA,EAAS,QAAQ,CAA2c,OAA1c,MAAc,CAAW,IAAS,QAAwJ,EAAzH,eAAe,QAAQ,qBAAqB,GAAG,EAAO,WAAW,+BAA+B,CAAC,QAAQ,OAAO,SAA8B,EAAI,EAAE,CAAC,CAAC,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM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