@honeypathkar/react-native-predictive-back-gesture 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -231,12 +231,14 @@ const SwipeableScreen = ({ children, enabled = true, style, onHaptic, background
231
231
  overflow: "hidden",
232
232
  };
233
233
  });
234
- // Dims the screen underneath (visible because the navigator presents screens as
235
- // transparent modals) and clears as this card moves out of the way.
236
234
  const backdropStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
237
- const revealed = Math.max(peek.value, exit.value);
235
+ const p = peek.value;
236
+ const e = exit.value;
237
+ if (e > 0) {
238
+ return { opacity: 0 };
239
+ }
238
240
  return {
239
- opacity: (0, react_native_reanimated_1.interpolate)(revealed, [0, 1], [MAX_DIM, 0], react_native_reanimated_1.Extrapolation.CLAMP),
241
+ opacity: (0, react_native_reanimated_1.interpolate)(p, [0, 1], [MAX_DIM, 0], react_native_reanimated_1.Extrapolation.CLAMP),
240
242
  };
241
243
  });
242
244
  return (react_1.default.createElement(react_native_1.View, { style: styles.outerWrapper },
@@ -256,7 +258,8 @@ const styles = react_native_1.StyleSheet.create({
256
258
  },
257
259
  backdrop: {
258
260
  ...react_native_1.StyleSheet.absoluteFillObject,
259
- backgroundColor: "#000000",
261
+ // backgroundColor: '#000000',
262
+ opacity: 0,
260
263
  zIndex: 0,
261
264
  },
262
265
  screen: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@honeypathkar/react-native-predictive-back-gesture",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Android 14+ Predictive Back gesture animations and swipeable screen component for React Native.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -240,12 +240,16 @@ const SwipeableScreen = ({ children, enabled = true, style, onHaptic, background
240
240
  };
241
241
  });
242
242
 
243
- // Dims the screen underneath (visible because the navigator presents screens as
244
- // transparent modals) and clears as this card moves out of the way.
245
243
  const backdropStyle = useAnimatedStyle(() => {
246
- const revealed = Math.max(peek.value, exit.value);
244
+ const p = peek.value;
245
+ const e = exit.value;
246
+
247
+ if (e > 0) {
248
+ return { opacity: 0 };
249
+ }
250
+
247
251
  return {
248
- opacity: interpolate(revealed, [0, 1], [MAX_DIM, 0], Extrapolation.CLAMP),
252
+ opacity: interpolate(p, [0, 1], [MAX_DIM, 0], Extrapolation.CLAMP),
249
253
  };
250
254
  });
251
255
 
@@ -280,7 +284,8 @@ const styles = StyleSheet.create({
280
284
  },
281
285
  backdrop: {
282
286
  ...StyleSheet.absoluteFillObject,
283
- backgroundColor: "#000000",
287
+ // backgroundColor: '#000000',
288
+ opacity: 0,
284
289
  zIndex: 0,
285
290
  },
286
291
  screen: {