UNPKG

react-native-haptic-feedback

Version:
81 lines (69 loc) 3.66 kB
"use strict"; export let HapticFeedbackTypes = /*#__PURE__*/function (HapticFeedbackTypes) { HapticFeedbackTypes["selection"] = "selection"; HapticFeedbackTypes["impactLight"] = "impactLight"; HapticFeedbackTypes["impactMedium"] = "impactMedium"; HapticFeedbackTypes["impactHeavy"] = "impactHeavy"; HapticFeedbackTypes["rigid"] = "rigid"; HapticFeedbackTypes["soft"] = "soft"; HapticFeedbackTypes["notificationSuccess"] = "notificationSuccess"; HapticFeedbackTypes["notificationWarning"] = "notificationWarning"; HapticFeedbackTypes["notificationError"] = "notificationError"; HapticFeedbackTypes["clockTick"] = "clockTick"; HapticFeedbackTypes["contextClick"] = "contextClick"; HapticFeedbackTypes["keyboardPress"] = "keyboardPress"; HapticFeedbackTypes["keyboardRelease"] = "keyboardRelease"; HapticFeedbackTypes["keyboardTap"] = "keyboardTap"; HapticFeedbackTypes["longPress"] = "longPress"; HapticFeedbackTypes["textHandleMove"] = "textHandleMove"; HapticFeedbackTypes["virtualKey"] = "virtualKey"; HapticFeedbackTypes["virtualKeyRelease"] = "virtualKeyRelease"; HapticFeedbackTypes["effectClick"] = "effectClick"; HapticFeedbackTypes["effectDoubleClick"] = "effectDoubleClick"; HapticFeedbackTypes["effectHeavyClick"] = "effectHeavyClick"; HapticFeedbackTypes["effectTick"] = "effectTick"; HapticFeedbackTypes["confirm"] = "confirm"; HapticFeedbackTypes["reject"] = "reject"; HapticFeedbackTypes["gestureStart"] = "gestureStart"; HapticFeedbackTypes["gestureEnd"] = "gestureEnd"; HapticFeedbackTypes["segmentTick"] = "segmentTick"; HapticFeedbackTypes["segmentFrequentTick"] = "segmentFrequentTick"; HapticFeedbackTypes["toggleOn"] = "toggleOn"; HapticFeedbackTypes["toggleOff"] = "toggleOff"; HapticFeedbackTypes["dragStart"] = "dragStart"; HapticFeedbackTypes["gestureThresholdActivate"] = "gestureThresholdActivate"; HapticFeedbackTypes["gestureThresholdDeactivate"] = "gestureThresholdDeactivate"; HapticFeedbackTypes["noHaptics"] = "noHaptics"; return HapticFeedbackTypes; }({}); /** A single allowed character in a pattern notation string. */ // ─── AHAP types (iOS only) ──────────────────────────────────────────────────── // These mirror the Apple Haptic and Audio Pattern format used by CHHapticEngine. // See: https://developer.apple.com/documentation/corehaptics/representing_haptic_patterns_in_ahap_files /** @platform ios */ /** @platform ios */ /** @platform ios */ /** @platform ios */ /** A single event entry in an AHAP Pattern array. @platform ios */ /** A parameter curve entry in an AHAP Pattern array. @platform ios */ /** * An Apple Haptic and Audio Pattern (AHAP) object. * Can be passed to `playAHAP` as an alternative to a file name (iOS only). * * @platform ios * @see https://developer.apple.com/documentation/corehaptics/representing_haptic_patterns_in_ahap_files */ // ───────────────────────────────────────────────────────────────────────────── /** * Returns true if the ringer is in silent mode. * On iOS `ringerMode` is always `null` (not exposed by the OS), so this * returns `false` — treat silence as unknown, not as silent. * * @example * const status = await getSystemHapticStatus(); * if (isRingerSilent(status)) showSilentBadge(); */ export function isRingerSilent(status) { return status.ringerMode === "silent"; } //# sourceMappingURL=types.js.map