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

1 line
4.3 KiB
JSON

{"ast":null,"code":"import { warnOnce } from 'motion-utils';\nimport { useState } from 'react';\nimport { initPrefersReducedMotion } from './index.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\n/**\n * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.\n *\n * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing\n * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.\n *\n * It will actively respond to changes and re-render your components with the latest setting.\n *\n * ```jsx\n * export function Sidebar({ isOpen }) {\n * const shouldReduceMotion = useReducedMotion()\n * const closedX = shouldReduceMotion ? 0 : \"-100%\"\n *\n * return (\n * <motion.div animate={{\n * opacity: isOpen ? 1 : 0,\n * x: isOpen ? 0 : closedX\n * }} />\n * )\n * }\n * ```\n *\n * @return boolean\n *\n * @public\n */\nfunction useReducedMotion() {\n /**\n * Lazy initialisation of prefersReducedMotion\n */\n !hasReducedMotionListener.current && initPrefersReducedMotion();\n const [shouldReduceMotion] = useState(prefersReducedMotion.current);\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\", \"reduced-motion-disabled\");\n }\n /**\n * TODO See if people miss automatically updating shouldReduceMotion setting\n */\n return shouldReduceMotion;\n}\nexport { useReducedMotion };","map":{"version":3,"names":["warnOnce","useState","initPrefersReducedMotion","hasReducedMotionListener","prefersReducedMotion","useReducedMotion","current","shouldReduceMotion","process","env","NODE_ENV"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs"],"sourcesContent":["import { warnOnce } from 'motion-utils';\nimport { useState } from 'react';\nimport { initPrefersReducedMotion } from './index.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\n/**\n * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.\n *\n * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing\n * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.\n *\n * It will actively respond to changes and re-render your components with the latest setting.\n *\n * ```jsx\n * export function Sidebar({ isOpen }) {\n * const shouldReduceMotion = useReducedMotion()\n * const closedX = shouldReduceMotion ? 0 : \"-100%\"\n *\n * return (\n * <motion.div animate={{\n * opacity: isOpen ? 1 : 0,\n * x: isOpen ? 0 : closedX\n * }} />\n * )\n * }\n * ```\n *\n * @return boolean\n *\n * @public\n */\nfunction useReducedMotion() {\n /**\n * Lazy initialisation of prefersReducedMotion\n */\n !hasReducedMotionListener.current && initPrefersReducedMotion();\n const [shouldReduceMotion] = useState(prefersReducedMotion.current);\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\", \"reduced-motion-disabled\");\n }\n /**\n * TODO See if people miss automatically updating shouldReduceMotion setting\n */\n return shouldReduceMotion;\n}\n\nexport { useReducedMotion };\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,QAAQ,QAAQ,OAAO;AAChC,SAASC,wBAAwB,QAAQ,aAAa;AACtD,SAASC,wBAAwB,EAAEC,oBAAoB,QAAQ,aAAa;;AAE5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CAAA,EAAG;EACxB;AACJ;AACA;EACI,CAACF,wBAAwB,CAACG,OAAO,IAAIJ,wBAAwB,CAAC,CAAC;EAC/D,MAAM,CAACK,kBAAkB,CAAC,GAAGN,QAAQ,CAACG,oBAAoB,CAACE,OAAO,CAAC;EACnE,IAAIE,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACvCV,QAAQ,CAACO,kBAAkB,KAAK,IAAI,EAAE,wFAAwF,EAAE,yBAAyB,CAAC;EAC9J;EACA;AACJ;AACA;EACI,OAAOA,kBAAkB;AAC7B;AAEA,SAASF,gBAAgB","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}