@honeypathkar/react-native-predictive-back-gesture 1.0.6 → 1.0.8
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.
- package/LICENSE +21 -0
- package/lib/commonjs/SwipableScreen.js +8 -5
- package/package.json +10 -1
- package/src/SwipableScreen.jsx +10 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 honeypathkar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -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
|
|
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)(
|
|
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:
|
|
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.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Android 14+ Predictive Back gesture animations and swipeable screen component for React Native.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -28,6 +28,15 @@
|
|
|
28
28
|
"swipeable-screen",
|
|
29
29
|
"reanimated"
|
|
30
30
|
],
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/honeypathkar/react-native-components.git",
|
|
34
|
+
"directory": "react-native-predective-back-gesture"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://github.com/honeypathkar/react-native-components/tree/master/react-native-predective-back-gesture#readme",
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/honeypathkar/react-native-components/issues"
|
|
39
|
+
},
|
|
31
40
|
"author": "honeypathkar",
|
|
32
41
|
"license": "MIT",
|
|
33
42
|
"peerDependencies": {
|
package/src/SwipableScreen.jsx
CHANGED
|
@@ -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
|
|
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(
|
|
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:
|
|
287
|
+
// backgroundColor: '#000000',
|
|
288
|
+
opacity: 0,
|
|
284
289
|
zIndex: 0,
|
|
285
290
|
},
|
|
286
291
|
screen: {
|