Files
ETB/ETB-FrontEnd/node_modules/.cache/babel-loader/120a91705aa54f2055fac1ab4996d3e28d88b35392945b4c4b41a2d4b6e770a7.json
Iliyan Angelov 306b20e24a Frontend start
2025-09-14 00:54:48 +03:00

1 line
5.8 KiB
JSON

{"ast":null,"code":"\"use client\";\n\nimport { jsx } from 'react/jsx-runtime';\nimport { useState, useRef, useEffect } from 'react';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { loadFeatures } from '../../motion/features/load-features.mjs';\n\n/**\n * Used in conjunction with the `m` component to reduce bundle size.\n *\n * `m` is a version of the `motion` component that only loads functionality\n * critical for the initial render.\n *\n * `LazyMotion` can then be used to either synchronously or asynchronously\n * load animation and gesture support.\n *\n * ```jsx\n * // Synchronous loading\n * import { LazyMotion, m, domAnimation } from \"framer-motion\"\n *\n * function App() {\n * return (\n * <LazyMotion features={domAnimation}>\n * <m.div animate={{ scale: 2 }} />\n * </LazyMotion>\n * )\n * }\n *\n * // Asynchronous loading\n * import { LazyMotion, m } from \"framer-motion\"\n *\n * function App() {\n * return (\n * <LazyMotion features={() => import('./path/to/domAnimation')}>\n * <m.div animate={{ scale: 2 }} />\n * </LazyMotion>\n * )\n * }\n * ```\n *\n * @public\n */\nfunction LazyMotion({\n children,\n features,\n strict = false\n}) {\n const [, setIsLoaded] = useState(!isLazyBundle(features));\n const loadedRenderer = useRef(undefined);\n /**\n * If this is a synchronous load, load features immediately\n */\n if (!isLazyBundle(features)) {\n const {\n renderer,\n ...loadedFeatures\n } = features;\n loadedRenderer.current = renderer;\n loadFeatures(loadedFeatures);\n }\n useEffect(() => {\n if (isLazyBundle(features)) {\n features().then(({\n renderer,\n ...loadedFeatures\n }) => {\n loadFeatures(loadedFeatures);\n loadedRenderer.current = renderer;\n setIsLoaded(true);\n });\n }\n }, []);\n return jsx(LazyContext.Provider, {\n value: {\n renderer: loadedRenderer.current,\n strict\n },\n children: children\n });\n}\nfunction isLazyBundle(features) {\n return typeof features === \"function\";\n}\nexport { LazyMotion };","map":{"version":3,"names":["jsx","useState","useRef","useEffect","LazyContext","loadFeatures","LazyMotion","children","features","strict","setIsLoaded","isLazyBundle","loadedRenderer","undefined","renderer","loadedFeatures","current","then","Provider","value"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/framer-motion/dist/es/components/LazyMotion/index.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { useState, useRef, useEffect } from 'react';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { loadFeatures } from '../../motion/features/load-features.mjs';\n\n/**\n * Used in conjunction with the `m` component to reduce bundle size.\n *\n * `m` is a version of the `motion` component that only loads functionality\n * critical for the initial render.\n *\n * `LazyMotion` can then be used to either synchronously or asynchronously\n * load animation and gesture support.\n *\n * ```jsx\n * // Synchronous loading\n * import { LazyMotion, m, domAnimation } from \"framer-motion\"\n *\n * function App() {\n * return (\n * <LazyMotion features={domAnimation}>\n * <m.div animate={{ scale: 2 }} />\n * </LazyMotion>\n * )\n * }\n *\n * // Asynchronous loading\n * import { LazyMotion, m } from \"framer-motion\"\n *\n * function App() {\n * return (\n * <LazyMotion features={() => import('./path/to/domAnimation')}>\n * <m.div animate={{ scale: 2 }} />\n * </LazyMotion>\n * )\n * }\n * ```\n *\n * @public\n */\nfunction LazyMotion({ children, features, strict = false }) {\n const [, setIsLoaded] = useState(!isLazyBundle(features));\n const loadedRenderer = useRef(undefined);\n /**\n * If this is a synchronous load, load features immediately\n */\n if (!isLazyBundle(features)) {\n const { renderer, ...loadedFeatures } = features;\n loadedRenderer.current = renderer;\n loadFeatures(loadedFeatures);\n }\n useEffect(() => {\n if (isLazyBundle(features)) {\n features().then(({ renderer, ...loadedFeatures }) => {\n loadFeatures(loadedFeatures);\n loadedRenderer.current = renderer;\n setIsLoaded(true);\n });\n }\n }, []);\n return (jsx(LazyContext.Provider, { value: { renderer: loadedRenderer.current, strict }, children: children }));\n}\nfunction isLazyBundle(features) {\n return typeof features === \"function\";\n}\n\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