expo-template-default 52.0.37 → 52.0.40
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.
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { PropsWithChildren, useState } from 'react';
|
|
2
|
-
import { StyleSheet, TouchableOpacity
|
|
2
|
+
import { StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { ThemedText } from '@/components/ThemedText';
|
|
5
5
|
import { ThemedView } from '@/components/ThemedView';
|
|
6
6
|
import { IconSymbol } from '@/components/ui/IconSymbol';
|
|
7
7
|
import { Colors } from '@/constants/Colors';
|
|
8
|
+
import { useColorScheme } from '@/hooks/useColorScheme';
|
|
8
9
|
|
|
9
10
|
export function Collapsible({ children, title }: PropsWithChildren & { title: string }) {
|
|
10
11
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropsWithChildren, ReactElement } from 'react';
|
|
2
|
-
import { StyleSheet
|
|
2
|
+
import { StyleSheet } from 'react-native';
|
|
3
3
|
import Animated, {
|
|
4
4
|
interpolate,
|
|
5
5
|
useAnimatedRef,
|
|
@@ -9,6 +9,7 @@ import Animated, {
|
|
|
9
9
|
|
|
10
10
|
import { ThemedView } from '@/components/ThemedView';
|
|
11
11
|
import { useBottomTabOverflow } from '@/components/ui/TabBarBackground';
|
|
12
|
+
import { useColorScheme } from '@/hooks/useColorScheme';
|
|
12
13
|
|
|
13
14
|
const HEADER_HEIGHT = 250;
|
|
14
15
|
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { useColorScheme as useRNColorScheme } from 'react-native';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* To support static rendering, this value needs to be re-calculated on the client side for web
|
|
6
|
+
*/
|
|
6
7
|
export function useColorScheme() {
|
|
8
|
+
const [hasHydrated, setHasHydrated] = useState(false);
|
|
9
|
+
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
setHasHydrated(true);
|
|
12
|
+
}, []);
|
|
13
|
+
|
|
14
|
+
const colorScheme = useRNColorScheme();
|
|
15
|
+
|
|
16
|
+
if (hasHydrated) {
|
|
17
|
+
return colorScheme;
|
|
18
|
+
}
|
|
19
|
+
|
|
7
20
|
return 'light';
|
|
8
21
|
}
|
package/hooks/useThemeColor.ts
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* https://docs.expo.dev/guides/color-schemes/
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { useColorScheme } from 'react-native';
|
|
7
|
-
|
|
8
6
|
import { Colors } from '@/constants/Colors';
|
|
7
|
+
import { useColorScheme } from '@/hooks/useColorScheme';
|
|
9
8
|
|
|
10
9
|
export function useThemeColor(
|
|
11
10
|
props: { light?: string; dark?: string },
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "expo-template-default",
|
|
3
3
|
"license": "0BSD",
|
|
4
4
|
"main": "expo-router/entry",
|
|
5
|
-
"version": "52.0.
|
|
5
|
+
"version": "52.0.40",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "expo start",
|
|
8
8
|
"reset-project": "node ./scripts/reset-project.js",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"@expo/vector-icons": "^14.0.2",
|
|
20
20
|
"@react-navigation/bottom-tabs": "^7.0.0",
|
|
21
21
|
"@react-navigation/native": "^7.0.0",
|
|
22
|
-
"expo": "~52.0.
|
|
22
|
+
"expo": "~52.0.8",
|
|
23
23
|
"expo-blur": "~14.0.1",
|
|
24
24
|
"expo-constants": "~17.0.3",
|
|
25
25
|
"expo-font": "~13.0.1",
|
|
26
26
|
"expo-haptics": "~14.0.0",
|
|
27
|
-
"expo-linking": "~7.0.
|
|
28
|
-
"expo-router": "~4.0.
|
|
27
|
+
"expo-linking": "~7.0.3",
|
|
28
|
+
"expo-router": "~4.0.7",
|
|
29
29
|
"expo-splash-screen": "~0.29.11",
|
|
30
30
|
"expo-status-bar": "~2.0.0",
|
|
31
31
|
"expo-symbols": "~0.2.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"react-native-safe-area-context": "4.12.0",
|
|
40
40
|
"react-native-screens": "~4.1.0",
|
|
41
41
|
"react-native-web": "~0.19.13",
|
|
42
|
-
"react-native-webview": "13.12.
|
|
42
|
+
"react-native-webview": "13.12.4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@babel/core": "^7.25.2",
|