{"version":3,"file":"useRenderTarget.BYOYVFPv.mjs","names":[],"sources":["https:/framerusercontent.com/modules/cuQH4dmpDnV8YK1mSgQX/KqRXqunFjE6ufhpc7ZRu/useFontControls.js","https:/framerusercontent.com/modules/afBE9Yx1W6bY5q32qPxe/m3q7puE2tbo1S2C0s0CT/useRenderTarget.js"],"sourcesContent":["// @ts-ignore\nimport{fontStore}from\"framer\";import{useEffect}from\"react\";import{fontStack}from\"https://framerusercontent.com/modules/VTUDdizacRHpwbkOamr7/AykinQJbgwl92LvMGZwu/constants.js\";const fontWeights={100:\"Thin\",200:\"Extra-light\",300:\"Light\",400:\"Regular\",500:\"Medium\",600:\"Semi-bold\",700:\"Bold\",800:\"Extra-bold\",900:\"Black\"};export function useFontControls(props){const{fontFamily=\"Inter\",fontSize=16,fontWeight=400,font=false}=props;const fontWeightName=fontWeights[fontWeight];const customFontStack=`\"${fontFamily} ${fontWeightName}\", \"${fontFamily}\", ${fontStack}`;const fontFamilyStyle=fontFamily?{fontSize,fontWeight,fontFamily:customFontStack}:{fontSize,fontWeight};const fetchCustomFonts=async()=>{await fontStore.loadWebFontsFromSelectors([`CUSTOM;${fontFamily}`,`CUSTOM;${fontFamily} ${fontWeightName}`,`GF;${fontFamily}-${fontWeightName.toLowerCase()}`,]).catch(e=>console.error(e));};useEffect(()=>{if(font)fetchCustomFonts();},[font,fontFamily,fontWeight]);return fontFamilyStyle;}\nexport const __FramerMetadata__ = {\"exports\":{\"useFontControls\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useFontControls.map","import { useMemo } from \"react\";\nimport { RenderTarget } from \"framer\";\nexport function useRenderTarget() {\n    const currentRenderTarget = useMemo(()=>RenderTarget.current()\n    , []);\n    return currentRenderTarget;\n}\nexport function useIsInPreview() {\n    const inPreview = useMemo(()=>RenderTarget.current() === RenderTarget.preview\n    , []);\n    return inPreview;\n}\nexport function useIsOnCanvas() {\n    const onCanvas = useMemo(()=>RenderTarget.current() === RenderTarget.canvas\n    , []);\n    return onCanvas;\n}\n\nexport const __FramerMetadata__ = {\"exports\":{\"useIsInPreview\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRenderTarget\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIsOnCanvas\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useRenderTarget.map"],"mappings":"0SAC+T,SAAgB,EAAgB,EAAM,CAAC,GAAK,CAAC,aAAW,QAAQ,WAAS,GAAG,aAAW,IAAI,QAAK,EAAM,CAAC,EAAY,EAAe,EAAY,GAAkB,GAAiB,GAAG,EAAW,GAAG,EAAe,MAAM,EAAW,KAAK,IAAkB,EAAgB,EAAW,CAAC,WAAS,aAAW,WAAW,CAAgB,EAAC,CAAC,WAAS,YAAW,EAAO,EAAiB,SAAS,CAAC,KAAM,GAAU,0BAA0B,EAAE,SAAS,KAAc,SAAS,EAAW,GAAG,KAAkB,KAAK,EAAW,GAAG,EAAe,aAAa,EAAI,EAAC,CAAC,MAAM,GAAG,QAAQ,MAAM,EAAE,CAAC,AAAE,EAA2E,MAA1E,GAAU,IAAI,CAAC,AAAG,GAAK,GAAkB,AAAE,EAAC,CAAC,EAAK,EAAW,CAAW,EAAC,CAAQ,CAAiB,gBAAtyB,AAArL,GAA8B,IAA6B,IAAoH,CAAM,EAAY,CAAC,IAAI,OAAO,IAAI,cAAc,IAAI,QAAQ,IAAI,UAAU,IAAI,SAAS,IAAI,YAAY,IAAI,OAAO,IAAI,aAAa,IAAI,OAAQ,ICC9T,SAAgB,GAAkB,CAC9B,IAAM,EAAsB,EAAQ,IAAI,EAAa,SAAS,CAC5D,CAAE,EAAC,CACL,OAAO,CACV,CAMD,SAAgB,GAAgB,CAC5B,IAAM,EAAW,EAAQ,IAAI,EAAa,SAAS,GAAK,EAAa,OACnE,CAAE,EAAC,CACL,OAAO,CACV,cAfD,AADA,GAAgC,CAChC,GAAsC"}