@react-navigation/stack 7.0.0-rc.23 → 7.0.0-rc.25
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/TransitionConfigs/HeaderStyleInterpolators.js +3 -4
- package/lib/commonjs/TransitionConfigs/HeaderStyleInterpolators.js.map +1 -1
- package/lib/commonjs/utils/throttle.js.map +1 -1
- package/lib/module/TransitionConfigs/HeaderStyleInterpolators.js +3 -4
- package/lib/module/TransitionConfigs/HeaderStyleInterpolators.js.map +1 -1
- package/lib/module/utils/throttle.js.map +1 -1
- package/lib/typescript/commonjs/src/TransitionConfigs/HeaderStyleInterpolators.d.ts.map +1 -1
- package/lib/typescript/commonjs/tsconfig.build.tsbuildinfo +1 -1
- package/lib/typescript/module/src/TransitionConfigs/HeaderStyleInterpolators.d.ts.map +1 -1
- package/lib/typescript/module/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/TransitionConfigs/HeaderStyleInterpolators.tsx +3 -6
- package/src/utils/throttle.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-navigation/stack",
|
|
3
3
|
"description": "Stack navigator component for iOS and Android with animated transitions and gestures",
|
|
4
|
-
"version": "7.0.0-rc.
|
|
4
|
+
"version": "7.0.0-rc.25",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"clean": "del lib"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@react-navigation/elements": "^2.0.0-rc.
|
|
54
|
+
"@react-navigation/elements": "^2.0.0-rc.23",
|
|
55
55
|
"color": "^4.2.3"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@jest/globals": "^29.7.0",
|
|
59
|
-
"@react-navigation/native": "^7.0.0-rc.
|
|
59
|
+
"@react-navigation/native": "^7.0.0-rc.19",
|
|
60
60
|
"@testing-library/react-native": "^12.4.3",
|
|
61
61
|
"@types/color": "^3.0.6",
|
|
62
62
|
"@types/react": "~18.2.79",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"typescript": "^5.5.2"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"@react-navigation/native": "^7.0.0-rc.
|
|
73
|
+
"@react-navigation/native": "^7.0.0-rc.19",
|
|
74
74
|
"react": ">= 18.2.0",
|
|
75
75
|
"react-native": ">= 0.72.0",
|
|
76
76
|
"react-native-gesture-handler": ">= 2.0.0",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
]
|
|
103
103
|
]
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "25a59bc3307ae0b2d93b58bd3d331e56a278757b"
|
|
106
106
|
}
|
|
@@ -21,7 +21,6 @@ export function forUIKit({
|
|
|
21
21
|
layouts,
|
|
22
22
|
}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {
|
|
23
23
|
const defaultOffset = 100;
|
|
24
|
-
const titleLeftMargin = 16;
|
|
25
24
|
const leftSpacing =
|
|
26
25
|
27 +
|
|
27
26
|
(Platform.OS === 'ios' && layouts.screen.width >= IPAD_MINI_MEDIUM_WIDTH
|
|
@@ -37,9 +36,7 @@ export function forUIKit({
|
|
|
37
36
|
? (layouts.screen.width - layouts.leftLabel.width) / 2 - leftSpacing
|
|
38
37
|
: defaultOffset;
|
|
39
38
|
const titleLeftOffset = layouts.title
|
|
40
|
-
? (layouts.screen.width - layouts.title.width) / 2 -
|
|
41
|
-
leftSpacing +
|
|
42
|
-
titleLeftMargin
|
|
39
|
+
? (layouts.screen.width - layouts.title.width) / 2 - leftSpacing
|
|
43
40
|
: defaultOffset;
|
|
44
41
|
|
|
45
42
|
// When the current title is animating to right, it is centered in the right half of screen in middle of transition
|
|
@@ -91,8 +88,8 @@ export function forUIKit({
|
|
|
91
88
|
},
|
|
92
89
|
titleStyle: {
|
|
93
90
|
opacity: progress.interpolate({
|
|
94
|
-
inputRange: [0, 0.
|
|
95
|
-
outputRange: [0, 0.1, 1, 0],
|
|
91
|
+
inputRange: [0, 0.5, 0.75, 1, 1.5],
|
|
92
|
+
outputRange: [0, 0, 0.1, 1, 0],
|
|
96
93
|
}),
|
|
97
94
|
transform: [
|
|
98
95
|
{
|
package/src/utils/throttle.tsx
CHANGED
|
@@ -2,7 +2,7 @@ export function throttle<T extends (...args: any[]) => void>(
|
|
|
2
2
|
func: T,
|
|
3
3
|
duration: number
|
|
4
4
|
): T {
|
|
5
|
-
let timeout:
|
|
5
|
+
let timeout: ReturnType<typeof setTimeout> | undefined;
|
|
6
6
|
|
|
7
7
|
return function (this: unknown, ...args) {
|
|
8
8
|
if (timeout == null) {
|