84 lines
3.4 KiB
JavaScript
84 lines
3.4 KiB
JavaScript
// Metro module 447 (f448).
|
|
import Module448 from "./Module448";
|
|
import RCTDeviceEventEmitterImpl from "./RCTDeviceEventEmitterImpl";
|
|
import legacySendAccessibilityEvent from "./legacySendAccessibilityEvent";
|
|
import * as _Module114 from "./Module114";
|
|
let c459_3 = new Map([["change", "touchExplorationDidChange"], ["reduceMotionChanged", "reduceMotionDidChange"], ["highTextContrastChanged", "highTextContrastDidChange"], ["screenReaderChanged", "touchExplorationDidChange"], ["accessibilityServiceChanged", "accessibilityServiceDidChange"], ["invertColorsChanged", "invertColorDidChange"], ["grayscaleChanged", "grayscaleModeDidChange"]]);
|
|
export default {
|
|
isBoldTextEnabled: () => Promise.resolve(false),
|
|
isGrayscaleEnabled: () => new Promise((resolve, reject) => {
|
|
if (Module448?.isGrayscaleEnabled != null) {
|
|
Module448.isGrayscaleEnabled(resolve);
|
|
} else {
|
|
reject(new Error("NativeAccessibilityInfoAndroid.isGrayscaleEnabled is not available"));
|
|
}
|
|
}),
|
|
isInvertColorsEnabled: () => new Promise((resolve, reject) => {
|
|
if (Module448?.isInvertColorsEnabled != null) {
|
|
Module448.isInvertColorsEnabled(resolve);
|
|
} else {
|
|
reject(new Error("NativeAccessibilityInfoAndroid.isInvertColorsEnabled is not available"));
|
|
}
|
|
}),
|
|
isReduceMotionEnabled: () => new Promise((resolve, reject) => {
|
|
if (Module448 != null) {
|
|
Module448.isReduceMotionEnabled(resolve);
|
|
} else {
|
|
reject(new Error("NativeAccessibilityInfoAndroid is not available"));
|
|
}
|
|
}),
|
|
isHighTextContrastEnabled: () => new Promise((resolve, reject) => {
|
|
if (Module448?.isHighTextContrastEnabled != null) {
|
|
Module448.isHighTextContrastEnabled(resolve);
|
|
} else {
|
|
reject(new Error("NativeAccessibilityInfoAndroid.isHighTextContrastEnabled is not available"));
|
|
}
|
|
}),
|
|
isDarkerSystemColorsEnabled: () => Promise.resolve(false),
|
|
prefersCrossFadeTransitions: () => Promise.resolve(false),
|
|
isReduceTransparencyEnabled: () => Promise.resolve(false),
|
|
isScreenReaderEnabled: () => new Promise((resolve, reject) => {
|
|
if (Module448 != null) {
|
|
Module448.isTouchExplorationEnabled(resolve);
|
|
} else {
|
|
reject(new Error("NativeAccessibilityInfoAndroid is not available"));
|
|
}
|
|
}),
|
|
isAccessibilityServiceEnabled: () => new Promise((resolve, reject) => {
|
|
if (Module448 != null && Module448.isAccessibilityServiceEnabled != null) {
|
|
Module448.isAccessibilityServiceEnabled(resolve);
|
|
} else {
|
|
reject(new Error("NativeAccessibilityInfoAndroid.isAccessibilityServiceEnabled is not available"));
|
|
}
|
|
}),
|
|
addEventListener: (a0, a1) => {
|
|
const r5 = c459_3.get(a0);
|
|
return r5 == null ? {
|
|
remove: () => {}
|
|
} : RCTDeviceEventEmitterImpl.addListener(r5, a1);
|
|
},
|
|
setAccessibilityFocus: (a0) => {
|
|
legacySendAccessibilityEvent(a0, "focus");
|
|
},
|
|
sendAccessibilityEvent: (a0, a1) => {
|
|
_Module114.sendAccessibilityEvent(a0, a1);
|
|
},
|
|
announceForAccessibility: (a0) => {
|
|
if (Module448 != null) {
|
|
Module448.announceForAccessibility(a0);
|
|
}
|
|
},
|
|
announceForAccessibilityWithOptions: (a0, a1) => {
|
|
if (Module448 != null) {
|
|
Module448.announceForAccessibility(a0);
|
|
}
|
|
},
|
|
getRecommendedTimeoutMillis: (c12332_0) => new Promise((resolve, reject) => {
|
|
if (Module448?.getRecommendedTimeoutMillis != null) {
|
|
Module448.getRecommendedTimeoutMillis(c12332_0, resolve);
|
|
} else {
|
|
resolve(c12332_0);
|
|
}
|
|
})
|
|
};
|