{"version":3,"file":"cursor.ymWoJO5C.mjs","names":["useStore","useState"],"sources":["https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/eXRXJxasDXrqhqjDR07Z/w6gD8XkDx3DXmVFbB7Un/cursor.js"],"sourcesContent":["import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map","/*\n * createStore (framer/store@1.0.1)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";// Learn more: https://www.framer.com/docs/guides/overrides/\nconst useStore=createStore({backgroundVariant:\"default\",iconVariant:\"default\"});export function withVariant(Component){return props=>{const[mousePosition,setMousePosition]=useState({x:0,y:0});useEffect(()=>{const mouseMove=e=>{setMousePosition({x:e.clientX,y:e.clientY});};window.addEventListener(\"mousemove\",mouseMove);return()=>{window.removeEventListener(\"mousemove\",mouseMove);};},[]);const variants={default:{x:mousePosition.x-4,y:mousePosition.y-4,background:\"rgba(0, 0, 0, 1)\",backdropFilter:\"blur(0px)\",width:8,height:8},transparentDark:{x:mousePosition.x-32,y:mousePosition.y-32,background:\"rgba(0, 0, 0, 0.4)\",backdropFilter:\"blur(10px)\",width:64,height:64},transparentLight:{x:mousePosition.x-32,y:mousePosition.y-32,background:\"rgba(250, 251, 252, 0.4)\",backdropFilter:\"blur(10px)\",width:64,height:64},invert:{x:mousePosition.x-32,y:mousePosition.y-32,background:\"rgba(30, 30, 30, 0)\",backdropFilter:\"invert(1)\",width:64,height:64},black:{x:mousePosition.x-32,y:mousePosition.y-32,background:\"rgba(0, 0, 0, 1)\",backdropFilter:\"blur(0px)\",width:64,height:64},white:{x:mousePosition.x-32,y:mousePosition.y-32,background:\"rgba(255, 255, 255, 1)\",backdropFilter:\"blur(0px)\",width:64,height:64},avatar:{x:mousePosition.x+32,y:mousePosition.y-32,width:64,height:64}};const[store,setStore]=useStore();return /*#__PURE__*/ _jsx(Component,{...props,style:{pointerEvents:\"none\"},variants:variants,animate:store.backgroundVariant,transition:{x:{type:\"spring\",shiftness:900,mass:.01},y:{type:\"spring\",shiftness:900,mass:.01}}});};}export function withVariantIconExpandWhite(Component){return props=>{const[store,setStore]=useStore();const variants={default:{scale:0},show:{scale:1}};return /*#__PURE__*/ _jsx(Component,{...props,variants:variants,animate:store.iconVariant===\"expandWhite\"?\"show\":\"default\"});};}export function withVariantIconExpandBlack(Component){return props=>{const[store,setStore]=useStore();const variants={default:{scale:0},show:{scale:1}};return /*#__PURE__*/ _jsx(Component,{...props,variants:variants,animate:store.iconVariant===\"expandBlack\"?\"show\":\"default\"});};}export function withVariantIconArrow(Component){return props=>{const[store,setStore]=useStore();const variants={default:{scale:0,rotate:0},left:{scale:1,rotate:0},right:{scale:1,rotate:180}};return /*#__PURE__*/ _jsx(Component,{...props,variants:variants,animate:store.iconVariant===\"arrowLeft\"?\"left\":store.iconVariant===\"arrowRight\"?\"right\":\"default\",transition:{rotate:{shiftness:500,damping:60}}});};}export function withVariantIconRemix(Component){return props=>{const[store,setStore]=useStore();const variants={default:{opacity:0,x:-20},show:{opacity:1,x:0}};return /*#__PURE__*/ _jsx(Component,{...props,variants:variants,animate:store.iconVariant===\"remix\"?\"show\":\"default\",transition:{rotate:{shiftness:500,damping:60}}});};}export function withVariantAvatar(Component){return props=>{const[store,setStore]=useStore();const variants={default:{scale:0},show:{scale:1}};return /*#__PURE__*/ _jsx(Component,{...props,variants:variants,animate:store.iconVariant===\"avatar\"?\"show\":\"default\"});};}export function withHoveriOSDark(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/ _jsx(Component,{...props,onMouseEnter:()=>{setStore({backgroundVariant:\"transparentDark\"});},onMouseLeave:()=>{setStore({backgroundVariant:\"default\"});}});};}export function withHoveriOSLight(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/ _jsx(Component,{...props,onMouseEnter:()=>{setStore({backgroundVariant:\"transparentLight\"});},onMouseLeave:()=>{setStore({backgroundVariant:\"default\"});}});};}export function withHoverInvert(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/ _jsx(Component,{...props,onMouseEnter:()=>{setStore({backgroundVariant:\"invert\"});},onMouseLeave:()=>{setStore({backgroundVariant:\"default\"});}});};}export function withHoverIconExpandDark(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/ _jsx(Component,{...props,onMouseEnter:()=>{setStore({backgroundVariant:\"black\",iconVariant:\"expandWhite\"});},onMouseLeave:()=>{setStore({backgroundVariant:\"default\",iconVariant:\"default\"});}});};}export function withHoverIconExpandLight(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/ _jsx(Component,{...props,onMouseEnter:()=>{setStore({backgroundVariant:\"white\",iconVariant:\"expandBlack\"});},onMouseLeave:()=>{setStore({backgroundVariant:\"default\",iconVariant:\"default\"});}});};}export function withHoverIconArrowLeft(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/ _jsx(Component,{...props,onMouseEnter:()=>{setStore({backgroundVariant:\"white\",iconVariant:\"arrowLeft\"});},onMouseLeave:()=>{setStore({backgroundVariant:\"default\",iconVariant:\"default\"});}});};}export function withHoverIconArrowRight(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/ _jsx(Component,{...props,onMouseEnter:()=>{setStore({backgroundVariant:\"white\",iconVariant:\"arrowRight\"});},onMouseLeave:()=>{setStore({backgroundVariant:\"default\",iconVariant:\"default\"});}});};}export function withHoverIconRemix(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/ _jsx(Component,{...props,onMouseEnter:()=>{setStore({backgroundVariant:\"black\",iconVariant:\"remix\"});},onMouseLeave:()=>{setStore({backgroundVariant:\"default\",iconVariant:\"default\"});}});};}export function withHoverAvatar(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/ _jsx(Component,{...props,onMouseEnter:()=>{setStore({backgroundVariant:\"avatar\",iconVariant:\"avatar\"});},onMouseLeave:()=>{setStore({backgroundVariant:\"default\",iconVariant:\"default\"});}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withHoverIconExpandLight\":{\"type\":\"reactHoc\",\"name\":\"withHoverIconExpandLight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVariantIconRemix\":{\"type\":\"reactHoc\",\"name\":\"withVariantIconRemix\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHoveriOSLight\":{\"type\":\"reactHoc\",\"name\":\"withHoveriOSLight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHoverInvert\":{\"type\":\"reactHoc\",\"name\":\"withHoverInvert\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVariantAvatar\":{\"type\":\"reactHoc\",\"name\":\"withVariantAvatar\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHoverAvatar\":{\"type\":\"reactHoc\",\"name\":\"withHoverAvatar\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVariantIconArrow\":{\"type\":\"reactHoc\",\"name\":\"withVariantIconArrow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVariant\":{\"type\":\"reactHoc\",\"name\":\"withVariant\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHoveriOSDark\":{\"type\":\"reactHoc\",\"name\":\"withHoveriOSDark\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHoverIconExpandDark\":{\"type\":\"reactHoc\",\"name\":\"withHoverIconExpandDark\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHoverIconArrowLeft\":{\"type\":\"reactHoc\",\"name\":\"withHoverIconArrowLeft\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVariantIconExpandBlack\":{\"type\":\"reactHoc\",\"name\":\"withVariantIconExpandBlack\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHoverIconRemix\":{\"type\":\"reactHoc\",\"name\":\"withHoverIconRemix\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVariantIconExpandWhite\":{\"type\":\"reactHoc\",\"name\":\"withVariantIconExpandWhite\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHoverIconArrowRight\":{\"type\":\"reactHoc\",\"name\":\"withHoverIconArrowRight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./cursor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