react-native-tab-view 3.3.2 → 3.3.4
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/lib/commonjs/Pager.android.js +0 -2
- package/lib/commonjs/Pager.android.js.map +1 -1
- package/lib/commonjs/Pager.ios.js +0 -2
- package/lib/commonjs/Pager.ios.js.map +1 -1
- package/lib/commonjs/Pager.js +0 -2
- package/lib/commonjs/Pager.js.map +1 -1
- package/lib/commonjs/PagerViewAdapter.js +0 -24
- package/lib/commonjs/PagerViewAdapter.js.map +1 -1
- package/lib/commonjs/PanResponderAdapter.js +11 -42
- package/lib/commonjs/PanResponderAdapter.js.map +1 -1
- package/lib/commonjs/PlatformPressable.js +1 -7
- package/lib/commonjs/PlatformPressable.js.map +1 -1
- package/lib/commonjs/SceneMap.js +0 -5
- package/lib/commonjs/SceneMap.js.map +1 -1
- package/lib/commonjs/SceneView.js +4 -15
- package/lib/commonjs/SceneView.js.map +1 -1
- package/lib/commonjs/TabBar.js +19 -57
- package/lib/commonjs/TabBar.js.map +1 -1
- package/lib/commonjs/TabBarIndicator.js +7 -18
- package/lib/commonjs/TabBarIndicator.js.map +1 -1
- package/lib/commonjs/TabBarItem.js +2 -27
- package/lib/commonjs/TabBarItem.js.map +1 -1
- package/lib/commonjs/TabView.js +6 -18
- package/lib/commonjs/TabView.js.map +1 -1
- package/lib/commonjs/index.js +0 -6
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/useAnimatedValue.js +0 -7
- package/lib/commonjs/useAnimatedValue.js.map +1 -1
- package/lib/module/Pager.android.js.map +1 -1
- package/lib/module/Pager.ios.js.map +1 -1
- package/lib/module/Pager.js.map +1 -1
- package/lib/module/PagerViewAdapter.js +0 -14
- package/lib/module/PagerViewAdapter.js.map +1 -1
- package/lib/module/PanResponderAdapter.js +11 -28
- package/lib/module/PanResponderAdapter.js.map +1 -1
- package/lib/module/PlatformPressable.js +1 -2
- package/lib/module/PlatformPressable.js.map +1 -1
- package/lib/module/SceneMap.js.map +1 -1
- package/lib/module/SceneView.js +4 -9
- package/lib/module/SceneView.js.map +1 -1
- package/lib/module/TabBar.js +19 -45
- package/lib/module/TabBar.js.map +1 -1
- package/lib/module/TabBarIndicator.js +7 -10
- package/lib/module/TabBarIndicator.js.map +1 -1
- package/lib/module/TabBarItem.js +2 -15
- package/lib/module/TabBarItem.js.map +1 -1
- package/lib/module/TabView.js +6 -8
- package/lib/module/TabView.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/useAnimatedValue.js +0 -2
- package/lib/module/useAnimatedValue.js.map +1 -1
- package/lib/typescript/src/Pager.android.d.ts +1 -0
- package/lib/typescript/src/Pager.android.d.ts.map +1 -0
- package/lib/typescript/src/Pager.d.ts +1 -0
- package/lib/typescript/src/Pager.d.ts.map +1 -0
- package/lib/typescript/src/Pager.ios.d.ts +1 -0
- package/lib/typescript/src/Pager.ios.d.ts.map +1 -0
- package/lib/typescript/src/PagerViewAdapter.d.ts +1 -0
- package/lib/typescript/src/PagerViewAdapter.d.ts.map +1 -0
- package/lib/typescript/src/PanResponderAdapter.d.ts +1 -0
- package/lib/typescript/src/PanResponderAdapter.d.ts.map +1 -0
- package/lib/typescript/src/PlatformPressable.d.ts +1 -0
- package/lib/typescript/src/PlatformPressable.d.ts.map +1 -0
- package/lib/typescript/src/SceneMap.d.ts +1 -0
- package/lib/typescript/src/SceneMap.d.ts.map +1 -0
- package/lib/typescript/src/SceneView.d.ts +1 -0
- package/lib/typescript/src/SceneView.d.ts.map +1 -0
- package/lib/typescript/src/TabBar.d.ts +1 -0
- package/lib/typescript/src/TabBar.d.ts.map +1 -0
- package/lib/typescript/src/TabBarIndicator.d.ts +1 -0
- package/lib/typescript/src/TabBarIndicator.d.ts.map +1 -0
- package/lib/typescript/src/TabBarItem.d.ts +1 -0
- package/lib/typescript/src/TabBarItem.d.ts.map +1 -0
- package/lib/typescript/src/TabView.d.ts +1 -0
- package/lib/typescript/src/TabView.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +1 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/useAnimatedValue.d.ts +1 -0
- package/lib/typescript/src/useAnimatedValue.d.ts.map +1 -0
- package/package.json +4 -3
|
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
return _PagerViewAdapter.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _PagerViewAdapter = _interopRequireDefault(require("./PagerViewAdapter"));
|
|
14
|
-
|
|
15
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
14
|
//# sourceMappingURL=Pager.android.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["Pager.android.tsx"],"
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["Pager.android.tsx"],"mappings":";;;;;;;;;;;AAAA;AAA6C"}
|
|
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
return _PagerViewAdapter.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _PagerViewAdapter = _interopRequireDefault(require("./PagerViewAdapter"));
|
|
14
|
-
|
|
15
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
14
|
//# sourceMappingURL=Pager.ios.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["Pager.ios.tsx"],"
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["Pager.ios.tsx"],"mappings":";;;;;;;;;;;AAAA;AAA6C"}
|
package/lib/commonjs/Pager.js
CHANGED
|
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
return _PanResponderAdapter.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _PanResponderAdapter = _interopRequireDefault(require("./PanResponderAdapter"));
|
|
14
|
-
|
|
15
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
14
|
//# sourceMappingURL=Pager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["Pager.tsx"],"mappings":";;;;;;;;;;;AAAA;AAAgD"}
|
|
@@ -4,25 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = PagerViewAdapter;
|
|
7
|
-
|
|
8
7
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
9
|
var _reactNativePagerView = _interopRequireDefault(require("react-native-pager-view"));
|
|
13
|
-
|
|
14
10
|
var _useAnimatedValue = _interopRequireDefault(require("./useAnimatedValue"));
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
-
|
|
20
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
-
|
|
22
14
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
-
|
|
24
15
|
const AnimatedViewPager = _reactNative.Animated.createAnimatedComponent(_reactNativePagerView.default);
|
|
25
|
-
|
|
26
16
|
function PagerViewAdapter(_ref) {
|
|
27
17
|
let {
|
|
28
18
|
keyboardDismissMode = 'auto',
|
|
@@ -50,14 +40,11 @@ function PagerViewAdapter(_ref) {
|
|
|
50
40
|
});
|
|
51
41
|
const jumpTo = React.useCallback(key => {
|
|
52
42
|
const index = navigationStateRef.current.routes.findIndex(route => route.key === key);
|
|
53
|
-
|
|
54
43
|
if (animationEnabled) {
|
|
55
44
|
var _pagerRef$current;
|
|
56
|
-
|
|
57
45
|
(_pagerRef$current = pagerRef.current) === null || _pagerRef$current === void 0 ? void 0 : _pagerRef$current.setPage(index);
|
|
58
46
|
} else {
|
|
59
47
|
var _pagerRef$current2;
|
|
60
|
-
|
|
61
48
|
(_pagerRef$current2 = pagerRef.current) === null || _pagerRef$current2 === void 0 ? void 0 : _pagerRef$current2.setPageWithoutAnimation(index);
|
|
62
49
|
position.setValue(index);
|
|
63
50
|
}
|
|
@@ -66,31 +53,25 @@ function PagerViewAdapter(_ref) {
|
|
|
66
53
|
if (keyboardDismissMode === 'auto') {
|
|
67
54
|
_reactNative.Keyboard.dismiss();
|
|
68
55
|
}
|
|
69
|
-
|
|
70
56
|
if (indexRef.current !== index) {
|
|
71
57
|
if (animationEnabled) {
|
|
72
58
|
var _pagerRef$current3;
|
|
73
|
-
|
|
74
59
|
(_pagerRef$current3 = pagerRef.current) === null || _pagerRef$current3 === void 0 ? void 0 : _pagerRef$current3.setPage(index);
|
|
75
60
|
} else {
|
|
76
61
|
var _pagerRef$current4;
|
|
77
|
-
|
|
78
62
|
(_pagerRef$current4 = pagerRef.current) === null || _pagerRef$current4 === void 0 ? void 0 : _pagerRef$current4.setPageWithoutAnimation(index);
|
|
79
63
|
position.setValue(index);
|
|
80
64
|
}
|
|
81
65
|
}
|
|
82
66
|
}, [keyboardDismissMode, index, animationEnabled, position]);
|
|
83
|
-
|
|
84
67
|
const onPageScrollStateChanged = state => {
|
|
85
68
|
const {
|
|
86
69
|
pageScrollState
|
|
87
70
|
} = state.nativeEvent;
|
|
88
|
-
|
|
89
71
|
switch (pageScrollState) {
|
|
90
72
|
case 'idle':
|
|
91
73
|
onSwipeEnd === null || onSwipeEnd === void 0 ? void 0 : onSwipeEnd();
|
|
92
74
|
return;
|
|
93
|
-
|
|
94
75
|
case 'dragging':
|
|
95
76
|
{
|
|
96
77
|
const subscription = offset.addListener(_ref2 => {
|
|
@@ -98,11 +79,9 @@ function PagerViewAdapter(_ref) {
|
|
|
98
79
|
value
|
|
99
80
|
} = _ref2;
|
|
100
81
|
const next = index + (value > 0 ? Math.ceil(value) : Math.floor(value));
|
|
101
|
-
|
|
102
82
|
if (next !== index) {
|
|
103
83
|
listenersRef.current.forEach(listener => listener(next));
|
|
104
84
|
}
|
|
105
|
-
|
|
106
85
|
offset.removeListener(subscription);
|
|
107
86
|
});
|
|
108
87
|
onSwipeStart === null || onSwipeStart === void 0 ? void 0 : onSwipeStart();
|
|
@@ -110,12 +89,10 @@ function PagerViewAdapter(_ref) {
|
|
|
110
89
|
}
|
|
111
90
|
}
|
|
112
91
|
};
|
|
113
|
-
|
|
114
92
|
const addEnterListener = React.useCallback(listener => {
|
|
115
93
|
listenersRef.current.push(listener);
|
|
116
94
|
return () => {
|
|
117
95
|
const index = listenersRef.current.indexOf(listener);
|
|
118
|
-
|
|
119
96
|
if (index > -1) {
|
|
120
97
|
listenersRef.current.splice(index, 1);
|
|
121
98
|
}
|
|
@@ -149,7 +126,6 @@ function PagerViewAdapter(_ref) {
|
|
|
149
126
|
}), children)
|
|
150
127
|
});
|
|
151
128
|
}
|
|
152
|
-
|
|
153
129
|
const styles = _reactNative.StyleSheet.create({
|
|
154
130
|
container: {
|
|
155
131
|
flex: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AnimatedViewPager","Animated","createAnimatedComponent","ViewPager","PagerViewAdapter","keyboardDismissMode","swipeEnabled","navigationState","onIndexChange","onSwipeStart","onSwipeEnd","children","style","animationEnabled","rest","index","listenersRef","React","useRef","pagerRef","indexRef","navigationStateRef","position","useAnimatedValue","offset","useEffect","current","jumpTo","useCallback","key","routes","findIndex","route","setPage","setPageWithoutAnimation","setValue","Keyboard","dismiss","onPageScrollStateChanged","state","pageScrollState","nativeEvent","subscription","addListener","value","next","Math","ceil","floor","forEach","listener","removeListener","addEnterListener","push","indexOf","splice","memoizedPosition","useMemo","add","render","styles","container","event","useNativeDriver","e","StyleSheet","create","flex"],"
|
|
1
|
+
{"version":3,"names":["AnimatedViewPager","Animated","createAnimatedComponent","ViewPager","PagerViewAdapter","keyboardDismissMode","swipeEnabled","navigationState","onIndexChange","onSwipeStart","onSwipeEnd","children","style","animationEnabled","rest","index","listenersRef","React","useRef","pagerRef","indexRef","navigationStateRef","position","useAnimatedValue","offset","useEffect","current","jumpTo","useCallback","key","routes","findIndex","route","setPage","setPageWithoutAnimation","setValue","Keyboard","dismiss","onPageScrollStateChanged","state","pageScrollState","nativeEvent","subscription","addListener","value","next","Math","ceil","floor","forEach","listener","removeListener","addEnterListener","push","indexOf","splice","memoizedPosition","useMemo","add","render","styles","container","event","useNativeDriver","e","StyleSheet","create","flex"],"sourceRoot":"../../src","sources":["PagerViewAdapter.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AAWA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GC,CAAC,IAAK;QACrB,MAAMjD,KAAK,GAAGiD,CAAC,CAACvB,WAAW,CAACnB,QAAQ;QACpCF,QAAQ,CAACM,OAAO,GAAGX,KAAK;QACxBP,aAAa,CAACO,KAAK,CAAC;MACtB,CAAE;MACF,wBAAwB,EAAEuB,wBAAyB;MACnD,aAAa,EAAEhC;IAAa,IAE3BK,QAAQ;EAGf,CAAC,CAAC;AACJ;AAEA,MAAMiD,MAAM,GAAGK,uBAAU,CAACC,MAAM,CAAC;EAC/BL,SAAS,EAAE;IACTM,IAAI,EAAE;EACR;AACF,CAAC,CAAC"}
|
|
@@ -4,21 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = PanResponderAdapter;
|
|
7
|
-
|
|
8
7
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
9
|
var _useAnimatedValue = _interopRequireDefault(require("./useAnimatedValue"));
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
|
|
18
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
|
|
20
13
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
-
|
|
22
14
|
const DEAD_ZONE = 12;
|
|
23
15
|
const DefaultTransitionSpec = {
|
|
24
16
|
timing: _reactNative.Animated.spring,
|
|
@@ -27,7 +19,6 @@ const DefaultTransitionSpec = {
|
|
|
27
19
|
mass: 3,
|
|
28
20
|
overshootClamping: true
|
|
29
21
|
};
|
|
30
|
-
|
|
31
22
|
function PanResponderAdapter(_ref) {
|
|
32
23
|
let {
|
|
33
24
|
layout,
|
|
@@ -61,22 +52,20 @@ function PanResponderAdapter(_ref) {
|
|
|
61
52
|
timing,
|
|
62
53
|
...transitionConfig
|
|
63
54
|
} = DefaultTransitionSpec;
|
|
64
|
-
|
|
65
55
|
if (animate) {
|
|
66
|
-
_reactNative.Animated.parallel([timing(panX, {
|
|
56
|
+
_reactNative.Animated.parallel([timing(panX, {
|
|
57
|
+
...transitionConfig,
|
|
67
58
|
toValue: offset,
|
|
68
59
|
useNativeDriver: false
|
|
69
60
|
})]).start(_ref2 => {
|
|
70
61
|
let {
|
|
71
62
|
finished
|
|
72
63
|
} = _ref2;
|
|
73
|
-
|
|
74
64
|
if (finished) {
|
|
75
65
|
onIndexChangeRef.current(index);
|
|
76
66
|
pendingIndexRef.current = undefined;
|
|
77
67
|
}
|
|
78
68
|
});
|
|
79
|
-
|
|
80
69
|
pendingIndexRef.current = index;
|
|
81
70
|
} else {
|
|
82
71
|
panX.setValue(offset);
|
|
@@ -97,84 +86,69 @@ function PanResponderAdapter(_ref) {
|
|
|
97
86
|
if (keyboardDismissMode === 'auto') {
|
|
98
87
|
_reactNative.Keyboard.dismiss();
|
|
99
88
|
}
|
|
100
|
-
|
|
101
89
|
if (layout.width && currentIndexRef.current !== index) {
|
|
102
90
|
currentIndexRef.current = index;
|
|
103
91
|
jumpToIndex(index);
|
|
104
92
|
}
|
|
105
93
|
}, [jumpToIndex, keyboardDismissMode, layout.width, index]);
|
|
106
|
-
|
|
107
94
|
const isMovingHorizontally = (_, gestureState) => {
|
|
108
95
|
return Math.abs(gestureState.dx) > Math.abs(gestureState.dy * 2) && Math.abs(gestureState.vx) > Math.abs(gestureState.vy * 2);
|
|
109
96
|
};
|
|
110
|
-
|
|
111
97
|
const canMoveScreen = (event, gestureState) => {
|
|
112
98
|
if (swipeEnabled === false) {
|
|
113
99
|
return false;
|
|
114
100
|
}
|
|
115
|
-
|
|
116
101
|
const diffX = _reactNative.I18nManager.isRTL ? -gestureState.dx : gestureState.dx;
|
|
117
102
|
return isMovingHorizontally(event, gestureState) && (diffX >= DEAD_ZONE && currentIndexRef.current > 0 || diffX <= -DEAD_ZONE && currentIndexRef.current < routes.length - 1);
|
|
118
103
|
};
|
|
119
|
-
|
|
120
104
|
const startGesture = () => {
|
|
121
105
|
onSwipeStart === null || onSwipeStart === void 0 ? void 0 : onSwipeStart();
|
|
122
|
-
|
|
123
106
|
if (keyboardDismissMode === 'on-drag') {
|
|
124
107
|
_reactNative.Keyboard.dismiss();
|
|
125
108
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
109
|
+
panX.stopAnimation();
|
|
110
|
+
// @ts-expect-error: _value is private, but docs use it as well
|
|
129
111
|
panX.setOffset(panX._value);
|
|
130
112
|
};
|
|
131
|
-
|
|
132
113
|
const respondToGesture = (_, gestureState) => {
|
|
133
114
|
const diffX = _reactNative.I18nManager.isRTL ? -gestureState.dx : gestureState.dx;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
diffX > 0 && index <= 0 ||
|
|
115
|
+
if (
|
|
116
|
+
// swiping left
|
|
117
|
+
diffX > 0 && index <= 0 ||
|
|
118
|
+
// swiping right
|
|
137
119
|
diffX < 0 && index >= routes.length - 1) {
|
|
138
120
|
return;
|
|
139
121
|
}
|
|
140
|
-
|
|
141
122
|
if (layout.width) {
|
|
142
123
|
// @ts-expect-error: _offset is private, but docs use it as well
|
|
143
124
|
const position = (panX._offset + diffX) / -layout.width;
|
|
144
125
|
const next = position > index ? Math.ceil(position) : Math.floor(position);
|
|
145
|
-
|
|
146
126
|
if (next !== index) {
|
|
147
127
|
listenersRef.current.forEach(listener => listener(next));
|
|
148
128
|
}
|
|
149
129
|
}
|
|
150
|
-
|
|
151
130
|
panX.setValue(diffX);
|
|
152
131
|
};
|
|
153
|
-
|
|
154
132
|
const finishGesture = (_, gestureState) => {
|
|
155
133
|
panX.flattenOffset();
|
|
156
134
|
onSwipeEnd === null || onSwipeEnd === void 0 ? void 0 : onSwipeEnd();
|
|
157
135
|
const currentIndex = typeof pendingIndexRef.current === 'number' ? pendingIndexRef.current : currentIndexRef.current;
|
|
158
136
|
let nextIndex = currentIndex;
|
|
159
|
-
|
|
160
137
|
if (Math.abs(gestureState.dx) > Math.abs(gestureState.dy) && Math.abs(gestureState.vx) > Math.abs(gestureState.vy) && (Math.abs(gestureState.dx) > swipeDistanceThreshold || Math.abs(gestureState.vx) > swipeVelocityThreshold)) {
|
|
161
138
|
nextIndex = Math.round(Math.min(Math.max(0, _reactNative.I18nManager.isRTL ? currentIndex + gestureState.dx / Math.abs(gestureState.dx) : currentIndex - gestureState.dx / Math.abs(gestureState.dx)), routes.length - 1));
|
|
162
139
|
currentIndexRef.current = nextIndex;
|
|
163
140
|
}
|
|
164
|
-
|
|
165
141
|
if (!isFinite(nextIndex)) {
|
|
166
142
|
nextIndex = currentIndex;
|
|
167
143
|
}
|
|
168
|
-
|
|
169
144
|
jumpToIndex(nextIndex, true);
|
|
170
|
-
};
|
|
171
|
-
|
|
145
|
+
};
|
|
172
146
|
|
|
147
|
+
// TODO: use the listeners
|
|
173
148
|
const addEnterListener = React.useCallback(listener => {
|
|
174
149
|
listenersRef.current.push(listener);
|
|
175
150
|
return () => {
|
|
176
151
|
const index = listenersRef.current.indexOf(listener);
|
|
177
|
-
|
|
178
152
|
if (index > -1) {
|
|
179
153
|
listenersRef.current.splice(index, 1);
|
|
180
154
|
}
|
|
@@ -184,7 +158,6 @@ function PanResponderAdapter(_ref) {
|
|
|
184
158
|
const index = navigationStateRef.current.routes.findIndex(route => route.key === key);
|
|
185
159
|
jumpToIndex(index);
|
|
186
160
|
}, [jumpToIndex]);
|
|
187
|
-
|
|
188
161
|
const panResponder = _reactNative.PanResponder.create({
|
|
189
162
|
onMoveShouldSetPanResponder: canMoveScreen,
|
|
190
163
|
onMoveShouldSetPanResponderCapture: canMoveScreen,
|
|
@@ -194,18 +167,15 @@ function PanResponderAdapter(_ref) {
|
|
|
194
167
|
onPanResponderRelease: finishGesture,
|
|
195
168
|
onPanResponderTerminationRequest: () => true
|
|
196
169
|
});
|
|
197
|
-
|
|
198
170
|
const maxTranslate = layout.width * (routes.length - 1);
|
|
199
|
-
|
|
200
171
|
const translateX = _reactNative.Animated.multiply(panX.interpolate({
|
|
201
172
|
inputRange: [-maxTranslate, 0],
|
|
202
173
|
outputRange: [-maxTranslate, 0],
|
|
203
174
|
extrapolate: 'clamp'
|
|
204
175
|
}), _reactNative.I18nManager.isRTL ? -1 : 1);
|
|
205
|
-
|
|
206
176
|
const position = React.useMemo(() => layout.width ? _reactNative.Animated.divide(panX, -layout.width) : null, [layout.width, panX]);
|
|
207
177
|
return children({
|
|
208
|
-
position: position
|
|
178
|
+
position: position ?? new _reactNative.Animated.Value(index),
|
|
209
179
|
addEnterListener,
|
|
210
180
|
jumpTo,
|
|
211
181
|
render: children => /*#__PURE__*/React.createElement(_reactNative.Animated.View, _extends({
|
|
@@ -227,7 +197,6 @@ function PanResponderAdapter(_ref) {
|
|
|
227
197
|
}))
|
|
228
198
|
});
|
|
229
199
|
}
|
|
230
|
-
|
|
231
200
|
const styles = _reactNative.StyleSheet.create({
|
|
232
201
|
sheet: {
|
|
233
202
|
flex: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DEAD_ZONE","DefaultTransitionSpec","timing","Animated","spring","stiffness","damping","mass","overshootClamping","PanResponderAdapter","layout","keyboardDismissMode","swipeEnabled","navigationState","onIndexChange","onSwipeStart","onSwipeEnd","children","style","animationEnabled","routes","index","panX","useAnimatedValue","listenersRef","React","useRef","navigationStateRef","layoutRef","onIndexChangeRef","currentIndexRef","pendingIndexRef","swipeVelocityThreshold","swipeDistanceThreshold","width","jumpToIndex","useCallback","animate","offset","current","transitionConfig","parallel","toValue","useNativeDriver","start","finished","undefined","setValue","useEffect","Keyboard","dismiss","isMovingHorizontally","_","gestureState","Math","abs","dx","dy","vx","vy","canMoveScreen","event","diffX","I18nManager","isRTL","length","startGesture","stopAnimation","setOffset","_value","respondToGesture","position","_offset","next","ceil","floor","forEach","listener","finishGesture","flattenOffset","currentIndex","nextIndex","round","min","max","isFinite","addEnterListener","push","indexOf","splice","jumpTo","key","findIndex","route","panResponder","PanResponder","create","onMoveShouldSetPanResponder","onMoveShouldSetPanResponderCapture","onPanResponderGrant","onPanResponderMove","onPanResponderTerminate","onPanResponderRelease","onPanResponderTerminationRequest","maxTranslate","translateX","multiply","interpolate","inputRange","outputRange","extrapolate","useMemo","divide","Value","render","styles","sheet","transform","panHandlers","Children","map","child","i","focused","StyleSheet","absoluteFill","flex","flexDirection","alignItems"],"sources":["PanResponderAdapter.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n Animated,\n GestureResponderEvent,\n I18nManager,\n Keyboard,\n PanResponder,\n PanResponderGestureState,\n StyleSheet,\n View,\n} from 'react-native';\n\nimport type {\n EventEmitterProps,\n Layout,\n Listener,\n NavigationState,\n PagerProps,\n Route,\n} from './types';\nimport useAnimatedValue from './useAnimatedValue';\n\ntype Props<T extends Route> = PagerProps & {\n layout: Layout;\n onIndexChange: (index: number) => void;\n navigationState: NavigationState<T>;\n children: (\n props: EventEmitterProps & {\n // Animated value which represents the state of current index\n // It can include fractional digits as it represents the intermediate value\n position: Animated.AnimatedInterpolation;\n // Function to actually render the content of the pager\n // The parent component takes care of rendering\n render: (children: React.ReactNode) => React.ReactNode;\n // Callback to call when switching the tab\n // The tab switch animation is performed even if the index in state is unchanged\n jumpTo: (key: string) => void;\n }\n ) => React.ReactElement;\n};\n\nconst DEAD_ZONE = 12;\n\nconst DefaultTransitionSpec = {\n timing: Animated.spring,\n stiffness: 1000,\n damping: 500,\n mass: 3,\n overshootClamping: true,\n};\n\nexport default function PanResponderAdapter<T extends Route>({\n layout,\n keyboardDismissMode = 'auto',\n swipeEnabled = true,\n navigationState,\n onIndexChange,\n onSwipeStart,\n onSwipeEnd,\n children,\n style,\n animationEnabled = false,\n}: Props<T>) {\n const { routes, index } = navigationState;\n\n const panX = useAnimatedValue(0);\n\n const listenersRef = React.useRef<Listener[]>([]);\n\n const navigationStateRef = React.useRef(navigationState);\n const layoutRef = React.useRef(layout);\n const onIndexChangeRef = React.useRef(onIndexChange);\n\n const currentIndexRef = React.useRef(index);\n const pendingIndexRef = React.useRef<number>();\n\n const swipeVelocityThreshold = 0.15;\n const swipeDistanceThreshold = layout.width / 1.75;\n\n const jumpToIndex = React.useCallback(\n (index: number, animate = animationEnabled) => {\n const offset = -index * layoutRef.current.width;\n\n const { timing, ...transitionConfig } = DefaultTransitionSpec;\n\n if (animate) {\n Animated.parallel([\n timing(panX, {\n ...transitionConfig,\n toValue: offset,\n useNativeDriver: false,\n }),\n ]).start(({ finished }) => {\n if (finished) {\n onIndexChangeRef.current(index);\n pendingIndexRef.current = undefined;\n }\n });\n pendingIndexRef.current = index;\n } else {\n panX.setValue(offset);\n onIndexChangeRef.current(index);\n pendingIndexRef.current = undefined;\n }\n },\n [animationEnabled, panX]\n );\n\n React.useEffect(() => {\n navigationStateRef.current = navigationState;\n layoutRef.current = layout;\n onIndexChangeRef.current = onIndexChange;\n });\n\n React.useEffect(() => {\n const offset = -navigationStateRef.current.index * layout.width;\n\n panX.setValue(offset);\n }, [layout.width, panX]);\n\n React.useEffect(() => {\n if (keyboardDismissMode === 'auto') {\n Keyboard.dismiss();\n }\n\n if (layout.width && currentIndexRef.current !== index) {\n currentIndexRef.current = index;\n jumpToIndex(index);\n }\n }, [jumpToIndex, keyboardDismissMode, layout.width, index]);\n\n const isMovingHorizontally = (\n _: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) => {\n return (\n Math.abs(gestureState.dx) > Math.abs(gestureState.dy * 2) &&\n Math.abs(gestureState.vx) > Math.abs(gestureState.vy * 2)\n );\n };\n\n const canMoveScreen = (\n event: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) => {\n if (swipeEnabled === false) {\n return false;\n }\n\n const diffX = I18nManager.isRTL ? -gestureState.dx : gestureState.dx;\n\n return (\n isMovingHorizontally(event, gestureState) &&\n ((diffX >= DEAD_ZONE && currentIndexRef.current > 0) ||\n (diffX <= -DEAD_ZONE && currentIndexRef.current < routes.length - 1))\n );\n };\n\n const startGesture = () => {\n onSwipeStart?.();\n\n if (keyboardDismissMode === 'on-drag') {\n Keyboard.dismiss();\n }\n\n panX.stopAnimation();\n // @ts-expect-error: _value is private, but docs use it as well\n panX.setOffset(panX._value);\n };\n\n const respondToGesture = (\n _: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) => {\n const diffX = I18nManager.isRTL ? -gestureState.dx : gestureState.dx;\n\n if (\n // swiping left\n (diffX > 0 && index <= 0) ||\n // swiping right\n (diffX < 0 && index >= routes.length - 1)\n ) {\n return;\n }\n\n if (layout.width) {\n // @ts-expect-error: _offset is private, but docs use it as well\n const position = (panX._offset + diffX) / -layout.width;\n const next =\n position > index ? Math.ceil(position) : Math.floor(position);\n\n if (next !== index) {\n listenersRef.current.forEach((listener) => listener(next));\n }\n }\n\n panX.setValue(diffX);\n };\n\n const finishGesture = (\n _: GestureResponderEvent,\n gestureState: PanResponderGestureState\n ) => {\n panX.flattenOffset();\n\n onSwipeEnd?.();\n\n const currentIndex =\n typeof pendingIndexRef.current === 'number'\n ? pendingIndexRef.current\n : currentIndexRef.current;\n\n let nextIndex = currentIndex;\n\n if (\n Math.abs(gestureState.dx) > Math.abs(gestureState.dy) &&\n Math.abs(gestureState.vx) > Math.abs(gestureState.vy) &&\n (Math.abs(gestureState.dx) > swipeDistanceThreshold ||\n Math.abs(gestureState.vx) > swipeVelocityThreshold)\n ) {\n nextIndex = Math.round(\n Math.min(\n Math.max(\n 0,\n I18nManager.isRTL\n ? currentIndex + gestureState.dx / Math.abs(gestureState.dx)\n : currentIndex - gestureState.dx / Math.abs(gestureState.dx)\n ),\n routes.length - 1\n )\n );\n\n currentIndexRef.current = nextIndex;\n }\n\n if (!isFinite(nextIndex)) {\n nextIndex = currentIndex;\n }\n\n jumpToIndex(nextIndex, true);\n };\n\n // TODO: use the listeners\n const addEnterListener = React.useCallback((listener: Listener) => {\n listenersRef.current.push(listener);\n\n return () => {\n const index = listenersRef.current.indexOf(listener);\n\n if (index > -1) {\n listenersRef.current.splice(index, 1);\n }\n };\n }, []);\n\n const jumpTo = React.useCallback(\n (key: string) => {\n const index = navigationStateRef.current.routes.findIndex(\n (route: { key: string }) => route.key === key\n );\n\n jumpToIndex(index);\n },\n [jumpToIndex]\n );\n\n const panResponder = PanResponder.create({\n onMoveShouldSetPanResponder: canMoveScreen,\n onMoveShouldSetPanResponderCapture: canMoveScreen,\n onPanResponderGrant: startGesture,\n onPanResponderMove: respondToGesture,\n onPanResponderTerminate: finishGesture,\n onPanResponderRelease: finishGesture,\n onPanResponderTerminationRequest: () => true,\n });\n\n const maxTranslate = layout.width * (routes.length - 1);\n const translateX = Animated.multiply(\n panX.interpolate({\n inputRange: [-maxTranslate, 0],\n outputRange: [-maxTranslate, 0],\n extrapolate: 'clamp',\n }),\n I18nManager.isRTL ? -1 : 1\n );\n\n const position = React.useMemo(\n () => (layout.width ? Animated.divide(panX, -layout.width) : null),\n [layout.width, panX]\n );\n\n return children({\n position: position ?? new Animated.Value(index),\n addEnterListener,\n jumpTo,\n render: (children) => (\n <Animated.View\n style={[\n styles.sheet,\n layout.width\n ? {\n width: routes.length * layout.width,\n transform: [{ translateX }],\n }\n : null,\n style,\n ]}\n {...panResponder.panHandlers}\n >\n {React.Children.map(children, (child, i) => {\n const route = routes[i];\n const focused = i === index;\n\n return (\n <View\n key={route.key}\n style={\n layout.width\n ? { width: layout.width }\n : focused\n ? StyleSheet.absoluteFill\n : null\n }\n >\n {focused || layout.width ? child : null}\n </View>\n );\n })}\n </Animated.View>\n ),\n });\n}\n\nconst styles = StyleSheet.create({\n sheet: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'stretch',\n },\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AAmBA;;;;;;;;;;AAqBA,MAAMA,SAAS,GAAG,EAAlB;AAEA,MAAMC,qBAAqB,GAAG;EAC5BC,MAAM,EAAEC,qBAAA,CAASC,MADW;EAE5BC,SAAS,EAAE,IAFiB;EAG5BC,OAAO,EAAE,GAHmB;EAI5BC,IAAI,EAAE,CAJsB;EAK5BC,iBAAiB,EAAE;AALS,CAA9B;;AAQe,SAASC,mBAAT,OAWF;EAAA,IAXgD;IAC3DC,MAD2D;IAE3DC,mBAAmB,GAAG,MAFqC;IAG3DC,YAAY,GAAG,IAH4C;IAI3DC,eAJ2D;IAK3DC,aAL2D;IAM3DC,YAN2D;IAO3DC,UAP2D;IAQ3DC,QAR2D;IAS3DC,KAT2D;IAU3DC,gBAAgB,GAAG;EAVwC,CAWhD;EACX,MAAM;IAAEC,MAAF;IAAUC;EAAV,IAAoBR,eAA1B;EAEA,MAAMS,IAAI,GAAG,IAAAC,yBAAA,EAAiB,CAAjB,CAAb;EAEA,MAAMC,YAAY,GAAGC,KAAK,CAACC,MAAN,CAAyB,EAAzB,CAArB;EAEA,MAAMC,kBAAkB,GAAGF,KAAK,CAACC,MAAN,CAAab,eAAb,CAA3B;EACA,MAAMe,SAAS,GAA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D,EAAQC,CAAR,KAAc;MAC1C,MAAM7B,KAAK,GAAGzE,MAAM,CAACsG,CAAD,CAApB;MACA,MAAMC,OAAO,GAAGD,CAAC,KAAKrG,KAAtB;MAEA,oBACE,oBAAC,iBAAD;QACE,GAAG,EAAEwE,KAAK,CAACF,GADb;QAEE,KAAK,EACHjF,MAAM,CAACwB,KAAP,GACI;UAAEA,KAAK,EAAExB,MAAM,CAACwB;QAAhB,CADJ,GAEIyF,OAAO,GACPC,uBAAA,CAAWC,YADJ,GAEP;MAPR,GAUGF,OAAO,IAAIjH,MAAM,CAACwB,KAAlB,GAA0BuF,KAA1B,GAAkC,IAVrC,CADF;IAcD,CAlBA,CAbH;EALY,CAAD,CAAf;AAwCD;;AAED,MAAMN,MAAM,GAAGS,uBAAA,CAAW5B,MAAX,CAAkB;EAC/BoB,KAAK,EAAE;IACLU,IAAI,EAAE,CADD;IAELC,aAAa,EAAE,KAFV;IAGLC,UAAU,EAAE;EAHP;AADwB,CAAlB,CAAf"}
|
|
1
|
+
{"version":3,"names":["DEAD_ZONE","DefaultTransitionSpec","timing","Animated","spring","stiffness","damping","mass","overshootClamping","PanResponderAdapter","layout","keyboardDismissMode","swipeEnabled","navigationState","onIndexChange","onSwipeStart","onSwipeEnd","children","style","animationEnabled","routes","index","panX","useAnimatedValue","listenersRef","React","useRef","navigationStateRef","layoutRef","onIndexChangeRef","currentIndexRef","pendingIndexRef","swipeVelocityThreshold","swipeDistanceThreshold","width","jumpToIndex","useCallback","animate","offset","current","transitionConfig","parallel","toValue","useNativeDriver","start","finished","undefined","setValue","useEffect","Keyboard","dismiss","isMovingHorizontally","_","gestureState","Math","abs","dx","dy","vx","vy","canMoveScreen","event","diffX","I18nManager","isRTL","length","startGesture","stopAnimation","setOffset","_value","respondToGesture","position","_offset","next","ceil","floor","forEach","listener","finishGesture","flattenOffset","currentIndex","nextIndex","round","min","max","isFinite","addEnterListener","push","indexOf","splice","jumpTo","key","findIndex","route","panResponder","PanResponder","create","onMoveShouldSetPanResponder","onMoveShouldSetPanResponderCapture","onPanResponderGrant","onPanResponderMove","onPanResponderTerminate","onPanResponderRelease","onPanResponderTerminationRequest","maxTranslate","translateX","multiply","interpolate","inputRange","outputRange","extrapolate","useMemo","divide","Value","render","styles","sheet","transform","panHandlers","Children","map","child","i","focused","StyleSheet","absoluteFill","flex","flexDirection","alignItems"],"sourceRoot":"../../src","sources":["PanResponderAdapter.tsx"],"mappings":";;;;;;AAAA;AACA;AAmBA;AAAkD;AAAA;AAAA;AAAA;AAqBlD,MAAMA,SAAS,GAAG,EAAE;AAEpB,MAAMC,qBAAqB,GAAG;EAC5BC,MAAM,EAAEC,qBAAQ,CAACC,MAAM;EACvBC,SAAS,EAAE,IAAI;EACfC,OAAO,EAAE,GAAG;EACZC,IAAI,EAAE,CAAC;EACPC,iBAAiB,EAAE;AACrB,CAAC;AAEc,SAASC,mBAAmB,OAW9B;EAAA,IAXgD;IAC3DC,MAAM;IACNC,mBAAmB,GAAG,MAAM;IAC5BC,YAAY,GAAG,IAAI;IACnBC,eAAe;IACfC,aAAa;IACbC,YAAY;IACZC,UAAU;IACVC,QAAQ;IACRC,KAAK;IACLC,gBAAgB,GAAG;EACX,CAAC;EACT,MAAM;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAGR,eAAe;EAEzC,MAAMS,IAAI,GAAG,IAAAC,yBAAgB,EAAC,CAAC,CAAC;EAEhC,MAAMC,YAAY,GAAGC,KAAK,CAACC,MAAM,CAAa,EAAE,CAAC;EAEjD,MAAMC,kBAAkB,GAAGF,KAAK,CAACC,MAAM,CAACb,eAAe,CAAC;EACxD,MAAMe,SAAS,GAAGH,KAAK,CAACC,MAAM,CAAChB,MAAM,CAAC;EACtC,MAAMmB,gBAAgB,GAAGJ,KAAK,CAACC,MAAM,CAACZ,aAAa,CAAC;EAEpD,MAAMgB,eAAe,GAAGL,KAAK,CAACC,MAAM,CAACL,KAAK,CAAC;EAC3C,MAAMU,eAAe,GAAGN,KAAK,CAACC,MA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ACC,YAAY,GACvB;MACL,GAEAF,OAAO,IAAIjH,MAAM,CAACwB,KAAK,GAAGuF,KAAK,GAAG,IAAI,CAClC;IAEX,CAAC,CAAC;EAGR,CAAC,CAAC;AACJ;AAEA,MAAMN,MAAM,GAAGS,uBAAU,CAAC5B,MAAM,CAAC;EAC/BoB,KAAK,EAAE;IACLU,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC"}
|
|
@@ -4,19 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = PlatformPressable;
|
|
7
|
-
|
|
8
7
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
9
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
-
|
|
14
10
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
-
|
|
16
11
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
-
|
|
18
12
|
const ANDROID_VERSION_LOLLIPOP = 21;
|
|
19
13
|
const ANDROID_SUPPORTS_RIPPLE = _reactNative.Platform.OS === 'android' && _reactNative.Platform.Version >= ANDROID_VERSION_LOLLIPOP;
|
|
14
|
+
|
|
20
15
|
/**
|
|
21
16
|
* PlatformPressable provides an abstraction on top of TouchableNativeFeedback and
|
|
22
17
|
* TouchableOpacity to handle platform differences.
|
|
@@ -24,7 +19,6 @@ const ANDROID_SUPPORTS_RIPPLE = _reactNative.Platform.OS === 'android' && _react
|
|
|
24
19
|
* On Android, you can pass the props of TouchableNativeFeedback.
|
|
25
20
|
* On other platforms, you can pass the props of TouchableOpacity.
|
|
26
21
|
*/
|
|
27
|
-
|
|
28
22
|
function PlatformPressable(_ref) {
|
|
29
23
|
let {
|
|
30
24
|
android_ripple,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ANDROID_VERSION_LOLLIPOP","ANDROID_SUPPORTS_RIPPLE","Platform","OS","Version","PlatformPressable","android_ripple","pressColor","pressOpacity","style","rest","color","undefined","pressed","opacity"],"
|
|
1
|
+
{"version":3,"names":["ANDROID_VERSION_LOLLIPOP","ANDROID_SUPPORTS_RIPPLE","Platform","OS","Version","PlatformPressable","android_ripple","pressColor","pressOpacity","style","rest","color","undefined","pressed","opacity"],"sourceRoot":"../../src","sources":["PlatformPressable.tsx"],"mappings":";;;;;;AAAA;AACA;AAAmE;AAAA;AAAA;AAQnE,MAAMA,wBAAwB,GAAG,EAAE;AACnC,MAAMC,uBAAuB,GAC3BC,qBAAQ,CAACC,EAAE,KAAK,SAAS,IAAID,qBAAQ,CAACE,OAAO,IAAIJ,wBAAwB;;AAE3E;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASK,iBAAiB,OAM/B;EAAA,IANgC;IACxCC,cAAc;IACdC,UAAU,GAAG,oBAAoB;IACjCC,YAAY;IACZC,KAAK;IACL,GAAGC;EACE,CAAC;EACN,oBACE,oBAAC,sBAAS;IACR,cAAc,EACZT,uBAAuB,GACnB;MAAEU,KAAK,EAAEJ,UAAU;MAAE,GAAGD;IAAe,CAAC,GACxCM,SACL;IACD,KAAK,EAAE;MAAA,IAAC;QAAEC;MAAQ,CAAC;MAAA,OAAK,CACtB;QAAEC,OAAO,EAAED,OAAO,IAAI,CAACZ,uBAAuB,GAAGO,YAAY,GAAG;MAAE,CAAC,EACnE,OAAOC,KAAK,KAAK,UAAU,GAAGA,KAAK,CAAC;QAAEI;MAAQ,CAAC,CAAC,GAAGJ,KAAK,CACzD;IAAA;EAAC,GACEC,IAAI,EACR;AAEN"}
|
package/lib/commonjs/SceneMap.js
CHANGED
|
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = SceneMap;
|
|
7
|
-
|
|
8
7
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
-
|
|
12
9
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
-
|
|
14
10
|
const SceneComponent = /*#__PURE__*/React.memo(_ref => {
|
|
15
11
|
let {
|
|
16
12
|
component,
|
|
@@ -18,7 +14,6 @@ const SceneComponent = /*#__PURE__*/React.memo(_ref => {
|
|
|
18
14
|
} = _ref;
|
|
19
15
|
return /*#__PURE__*/React.createElement(component, rest);
|
|
20
16
|
});
|
|
21
|
-
|
|
22
17
|
function SceneMap(scenes) {
|
|
23
18
|
return _ref2 => {
|
|
24
19
|
let {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SceneComponent","React","memo","component","rest","createElement","SceneMap","scenes","route","jumpTo","position","key"],"
|
|
1
|
+
{"version":3,"names":["SceneComponent","React","memo","component","rest","createElement","SceneMap","scenes","route","jumpTo","position","key"],"sourceRoot":"../../src","sources":["SceneMap.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAQ/B,MAAMA,cAAc,gBAAGC,KAAK,CAACC,IAAI,CAC/B,QAGS;EAAA,IAHwD;IAC/DC,SAAS;IACT,GAAGC;EACF,CAAC;EACF,oBAAOH,KAAK,CAACI,aAAa,CAACF,SAAS,EAAEC,IAAI,CAAC;AAC7C,CAAC,CACF;AAEc,SAASE,QAAQ,CAAgBC,MAE/C,EAAE;EACD,OAAO;IAAA,IAAC;MAAEC,KAAK;MAAEC,MAAM;MAAEC;IAAqB,CAAC;IAAA,oBAC7C,oBAAC,cAAc;MACb,GAAG,EAAEF,KAAK,CAACG,GAAI;MACf,SAAS,EAAEJ,MAAM,CAACC,KAAK,CAACG,GAAG,CAAE;MAC7B,KAAK,EAAEH,KAAM;MACb,MAAM,EAAEC,MAAO;MACf,QAAQ,EAAEC;IAAS,EACnB;EAAA,CACH;AACH"}
|
|
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = SceneView;
|
|
7
|
-
|
|
8
7
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
9
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
-
|
|
14
10
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
-
|
|
16
11
|
function SceneView(_ref) {
|
|
17
12
|
let {
|
|
18
13
|
children,
|
|
@@ -25,12 +20,10 @@ function SceneView(_ref) {
|
|
|
25
20
|
style
|
|
26
21
|
} = _ref;
|
|
27
22
|
const [isLoading, setIsLoading] = React.useState(Math.abs(navigationState.index - index) > lazyPreloadDistance);
|
|
28
|
-
|
|
29
23
|
if (isLoading && Math.abs(navigationState.index - index) <= lazyPreloadDistance) {
|
|
30
24
|
// Always render the route when it becomes focused
|
|
31
25
|
setIsLoading(false);
|
|
32
26
|
}
|
|
33
|
-
|
|
34
27
|
React.useEffect(() => {
|
|
35
28
|
const handleEnter = value => {
|
|
36
29
|
// If we're entering the current route, we need to load it
|
|
@@ -39,15 +32,12 @@ function SceneView(_ref) {
|
|
|
39
32
|
if (prevState) {
|
|
40
33
|
return false;
|
|
41
34
|
}
|
|
42
|
-
|
|
43
35
|
return prevState;
|
|
44
36
|
});
|
|
45
37
|
}
|
|
46
38
|
};
|
|
47
|
-
|
|
48
39
|
let unsubscribe;
|
|
49
40
|
let timer;
|
|
50
|
-
|
|
51
41
|
if (lazy && isLoading) {
|
|
52
42
|
// If lazy mode is enabled, listen to when we enter screens
|
|
53
43
|
unsubscribe = addEnterListener(handleEnter);
|
|
@@ -56,10 +46,8 @@ function SceneView(_ref) {
|
|
|
56
46
|
// This improves the initial startup time as the scene is no longer blocking
|
|
57
47
|
timer = setTimeout(() => setIsLoading(false), 0);
|
|
58
48
|
}
|
|
59
|
-
|
|
60
49
|
return () => {
|
|
61
50
|
var _unsubscribe;
|
|
62
|
-
|
|
63
51
|
(_unsubscribe = unsubscribe) === null || _unsubscribe === void 0 ? void 0 : _unsubscribe();
|
|
64
52
|
clearTimeout(timer);
|
|
65
53
|
};
|
|
@@ -68,19 +56,20 @@ function SceneView(_ref) {
|
|
|
68
56
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
69
57
|
accessibilityElementsHidden: !focused,
|
|
70
58
|
importantForAccessibility: focused ? 'auto' : 'no-hide-descendants',
|
|
71
|
-
style: [styles.route,
|
|
59
|
+
style: [styles.route,
|
|
60
|
+
// If we don't have the layout yet, make the focused screen fill the container
|
|
72
61
|
// This avoids delay before we are able to render pages side by side
|
|
73
62
|
layout.width ? {
|
|
74
63
|
width: layout.width
|
|
75
64
|
} : focused ? _reactNative.StyleSheet.absoluteFill : null, style]
|
|
76
|
-
},
|
|
65
|
+
},
|
|
66
|
+
// Only render the route only if it's either focused or layout is available
|
|
77
67
|
// When layout is not available, we must not render unfocused routes
|
|
78
68
|
// so that the focused route can fill the screen
|
|
79
69
|
focused || layout.width ? children({
|
|
80
70
|
loading: isLoading
|
|
81
71
|
}) : null);
|
|
82
72
|
}
|
|
83
|
-
|
|
84
73
|
const styles = _reactNative.StyleSheet.create({
|
|
85
74
|
route: {
|
|
86
75
|
flex: 1,
|