2026-08-15 05:55:55 +00:00
|
|
|
// Module ID: 1695
|
|
|
|
|
// Function ID: 1696
|
2026-07-29 08:29:29 +00:00
|
|
|
// Name: isReducedMotionEnabledInSystem
|
2026-08-15 05:55:55 +00:00
|
|
|
// Dependencies: [1657, 1691]
|
2026-07-29 08:29:29 +00:00
|
|
|
// Exports: isReducedMotionEnabledInSystem
|
|
|
|
|
|
2026-08-15 05:55:55 +00:00
|
|
|
// Module 1695 (isReducedMotionEnabledInSystem)
|
2026-08-24 06:08:38 +00:00
|
|
|
import isJest from "isJest" /* 1657 */;
|
|
|
|
|
import addCompilerSafeGetAndSet from "addCompilerSafeGetAndSet" /* 1691 */;
|
2026-07-29 08:29:29 +00:00
|
|
|
|
|
|
|
|
if (isJest.isWeb()) {
|
2026-08-24 06:08:38 +00:00
|
|
|
const _module1 = isJest;
|
2026-07-29 08:29:29 +00:00
|
|
|
let matches = _module1.isWindowAvailable();
|
|
|
|
|
if (matches) {
|
|
|
|
|
let _window = window;
|
|
|
|
|
matches = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
|
|
|
}
|
|
|
|
|
let prop = matches;
|
|
|
|
|
} else {
|
|
|
|
|
prop = global._REANIMATED_IS_REDUCED_MOTION;
|
|
|
|
|
}
|
|
|
|
|
const obj = { jsValue: prop, uiValue: null, setEnabled: null };
|
|
|
|
|
function isReducedMotionEnabledInSystem() {
|
|
|
|
|
if (obj.isWeb()) {
|
2026-08-24 06:08:38 +00:00
|
|
|
let matches = isJest.isWindowAvailable();
|
2026-07-29 08:29:29 +00:00
|
|
|
if (matches) {
|
|
|
|
|
const _window = window;
|
|
|
|
|
matches = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
|
|
|
}
|
|
|
|
|
let prop = matches;
|
2026-08-24 06:08:38 +00:00
|
|
|
const tmpResult = isJest;
|
2026-07-29 08:29:29 +00:00
|
|
|
} else {
|
|
|
|
|
prop = global._REANIMATED_IS_REDUCED_MOTION;
|
|
|
|
|
}
|
|
|
|
|
return prop;
|
|
|
|
|
}
|
|
|
|
|
obj[1] = addCompilerSafeGetAndSet.makeMutable(prop);
|
|
|
|
|
obj[2] = function setEnabled(jsValue) {
|
|
|
|
|
obj.jsValue = jsValue;
|
|
|
|
|
obj.uiValue.value = jsValue;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export { isReducedMotionEnabledInSystem };
|
|
|
|
|
export const ReducedMotionManager = obj;
|