expo-router 4.0.3 → 4.0.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.
|
Binary file
|
|
@@ -155,11 +155,11 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
155
155
|
...react_native_1.Platform.select({
|
|
156
156
|
web: {
|
|
157
157
|
fontSize: 64,
|
|
158
|
-
lineHeight:
|
|
158
|
+
lineHeight: 64,
|
|
159
159
|
},
|
|
160
160
|
default: {
|
|
161
161
|
fontSize: 56,
|
|
162
|
-
lineHeight:
|
|
162
|
+
lineHeight: 56,
|
|
163
163
|
},
|
|
164
164
|
}),
|
|
165
165
|
color: '#fff',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tutorial.js","sourceRoot":"","sources":["../../src/onboard/Tutorial.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAkF;AAClF,mFAA8D;AAE9D,uDAAyD;AACzD,wCAAkC;AAClC,kDAA+C;AAE/C,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,IAAI,CAAC;AAElE,SAAgB,QAAQ;IACtB,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,uBAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;YACzB,gEAAgE;YAChE,uCAAuC;YACvC,+DAA+D;YAC/D,uGAAuG;YACvG,oFAAoF;YACpF,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,QAAQ,CAAC,QAAQ,KAAK,GAAG,EAAE;gBAChE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;aACvB;YACD,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW,EAAE;gBAC3E,MAAM,CAAC,QAAQ,CAAC,KAAK,GAAG,iBAAiB,CAAC;aAC3C;SACF;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,O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AC;KACH;IACD,IAAI,EAAE;QACJ,GAAG,uBAAQ,CAAC,MAAM,CAAC;YACjB,GAAG,EAAE;gBACH,kBAAkB,EAAE,OAAO;gBAC3B,UAAU,EAAE,oBAAoB;aACjC;YACD,OAAO,EAAE;gBACP,UAAU,EAAE,uBAAQ,CAAC,MAAM,CAAC;oBAC1B,GAAG,EAAE,aAAa;oBAClB,OAAO,EAAE,WAAW;iBACrB,CAAC;aACH;SACF,CAAC;QACF,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,MAAM;QAClB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACnB;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,QAAQ;KACpB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,EAAE;QACd,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,SAAS;QAChB,SAAS,EAAE,EAAE;QACb,GAAG,uBAAQ,CAAC,MAAM,CAAC;YACjB,GAAG,EAAE;gBACH,YAAY,EAAE,EAAE;aACjB;SACF,CAAC;KACH;IACD,aAAa,EAAE;QACb,KAAK,EAAE,SAAS;KACjB;CACF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Platform, StatusBar, StyleSheet, Text, View, Image } from 'react-native';\nimport { SafeAreaView } from 'react-native-safe-area-context';\n\nimport { createEntryFileAsync } from './createEntryFile';\nimport { Link } from '../exports';\nimport { Pressable } from '../views/Pressable';\n\nconst canAutoTouchFile = process.env.EXPO_ROUTER_APP_ROOT != null;\n\nexport function Tutorial() {\n React.useEffect(() => {\n if (Platform.OS === 'web') {\n // Reset the route on web so the initial route isn't a 404 after\n // the user has created the entry file.\n // This is useful for cases where you are testing the tutorial.\n // To test: touch the new file, then navigate to a missing route `/foobar`, then delete the app folder.\n // you should see the tutorial again and be able to create the entry file once more.\n if (typeof location !== 'undefined' && location.pathname !== '/') {\n location.replace('/');\n }\n if (typeof window !== 'undefined' && typeof window.document !== 'undefined') {\n window.document.title = 'Welcome to Expo';\n }\n }\n }, []);\n\n return (\n <SafeAreaView style={styles.background}>\n <StatusBar barStyle=\"light-content\" />\n <View style={styles.container}>\n <View style={styles.logotypeWrapper}>\n <Image style={styles.logotype} source={require('expo-router/assets/logotype.png')} />\n </View>\n <Text role=\"heading\" aria-level={1} style={styles.title}>\n Welcome to Expo\n </Text>\n <Text role=\"heading\" aria-level={2} style={[styles.subtitle, styles.textSecondary]}>\n Start by creating a file{Platform.OS !== 'web' ? '\\n' : ' '}in the{' '}\n <Text style={{ fontWeight: '600' }}>{getRootDir()}</Text> directory.\n </Text>\n <Text>\n <Link\n href=\"https://docs.expo.dev/router/introduction/\"\n {...Platform.select({ web: { target: '_blank' }, native: { asChild: true } })}>\n <Pressable>\n {({ hovered, pressed }) => (\n <Text\n style={[\n styles.link,\n Platform.select({\n web: {\n transitionDuration: '200ms',\n marginBottom: 12,\n },\n }),\n hovered && {\n opacity: 0.8,\n textDecorationLine: 'underline',\n },\n pressed && {\n opacity: 0.8,\n },\n ]}>\n Learn more about Expo Router in the documentation.\n </Text>\n )}\n </Pressable>\n </Link>\n </Text>\n {canAutoTouchFile && <Button />}\n </View>\n </SafeAreaView>\n );\n}\n\nfunction getRootDir() {\n const dir = process.env.EXPO_ROUTER_ABS_APP_ROOT!;\n if (dir.match(/\\/src\\/app$/)) {\n return 'src/app';\n } else if (dir.match(/\\/app$/)) {\n return 'app';\n }\n return dir.split('/').pop() ?? dir;\n}\n\nfunction Button() {\n return (\n <Pressable\n onPress={() => {\n createEntryFileAsync();\n }}\n style={styles.button}>\n {({ pressed, hovered }) => (\n <View\n style={[\n styles.buttonContainer,\n hovered && {\n backgroundColor: '#fff',\n },\n pressed &&\n Platform.select({\n web: {\n transform: 'scale(0.98)',\n transitionDuration: '200ms',\n },\n default: {\n backgroundColor: '#fff',\n },\n }),\n ]}>\n <Text\n style={[\n styles.code,\n hovered && { color: '#000' },\n pressed &&\n Platform.select({\n native: { color: '#000' },\n }),\n ]}>\n <Text style={styles.textSecondary}>$</Text> touch {getRootDir()}\n /index.tsx\n </Text>\n </View>\n )}\n </Pressable>\n );\n}\n\nconst styles = StyleSheet.create({\n background: {\n backgroundColor: '#000',\n flex: 1,\n },\n container: {\n flex: 1,\n padding: 24,\n paddingBottom: 64,\n alignItems: 'center',\n justifyContent: 'center',\n marginHorizontal: 'auto',\n gap: 16,\n ...Platform.select({\n web: {\n maxWidth: 960,\n },\n native: {\n width: '100%',\n },\n }),\n },\n logotypeWrapper: {\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: '#151718',\n borderRadius: 12,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '#313538',\n width: 78,\n height: 78,\n marginBottom: 8,\n },\n logotype: {\n width: 48,\n height: 44,\n },\n title: {\n ...Platform.select({\n web: {\n fontSize: 64,\n lineHeight: 68,\n },\n default: {\n fontSize: 56,\n lineHeight: 60,\n },\n }),\n color: '#fff',\n fontWeight: '800',\n textAlign: 'center',\n },\n buttonContainer: {\n ...Platform.select({\n web: {\n transitionDuration: '200ms',\n },\n }),\n backgroundColor: 'transparent',\n borderColor: '#fff',\n borderWidth: 2,\n paddingVertical: 12,\n paddingHorizontal: 24,\n borderRadius: 8,\n },\n button: {\n ...Platform.select({\n web: {\n marginTop: 12,\n },\n native: {\n position: 'absolute',\n bottom: 24,\n left: 32,\n right: 32,\n overflow: 'hidden',\n },\n }),\n },\n code: {\n ...Platform.select({\n web: {\n transitionDuration: '200ms',\n fontFamily: 'Courier, monospace',\n },\n default: {\n fontFamily: Platform.select({\n ios: 'Courier New',\n android: 'monospace',\n }),\n },\n }),\n color: '#fff',\n textAlign: 'center',\n userSelect: 'none',\n fontSize: 18,\n fontWeight: 'bold',\n },\n subtitle: {\n fontSize: 34,\n fontWeight: '200',\n textAlign: 'center',\n },\n link: {\n fontSize: 20,\n lineHeight: 26,\n textAlign: 'center',\n color: '#52a9ff',\n marginTop: 12,\n ...Platform.select({\n web: {\n marginBottom: 24,\n },\n }),\n },\n textSecondary: {\n color: '#9ba1a6',\n },\n});\n"]}
|
|
1
|
+
{"version":3,"file":"Tutorial.js","sourceRoot":"","sources":["../../src/onboard/Tutorial.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAkF;AAClF,mFAA8D;AAE9D,uDAAyD;AACzD,wCAAkC;AAClC,kDAA+C;AAE/C,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,IAAI,CAAC;AAElE,SAAgB,QAAQ;IACtB,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,uBAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;YACzB,gEAAgE;YAChE,uCAAuC;YACvC,+DAA+D;YAC/D,uGAAuG;YACvG,oFAAoF;YACpF,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,QAAQ,CAAC,QAAQ,KAAK,GAAG,EAAE;gBAChE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;aACvB;YACD,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW,EAAE;gBAC3E,MAAM,CAAC,QAAQ,CAAC,KAAK,GAAG,iBAAiB,CAAC;aAC3C;SACF;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,CAAC,6CAAY,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CACrC;MAAA,CAAC,wBAAS,CAAC,QAAQ,CAAC,eAAe,EACnC;MAAA,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;QAAA,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAClC;UAAA,CAAC,oBAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAA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nB,UAAU,EAAE,MAAM;QAClB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACnB;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,QAAQ;KACpB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,EAAE;QACd,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,SAAS;QAChB,SAAS,EAAE,EAAE;QACb,GAAG,uBAAQ,CAAC,MAAM,CAAC;YACjB,GAAG,EAAE;gBACH,YAAY,EAAE,EAAE;aACjB;SACF,CAAC;KACH;IACD,aAAa,EAAE;QACb,KAAK,EAAE,SAAS;KACjB;CACF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Platform, StatusBar, StyleSheet, Text, View, Image } from 'react-native';\nimport { SafeAreaView } from 'react-native-safe-area-context';\n\nimport { createEntryFileAsync } from './createEntryFile';\nimport { Link } from '../exports';\nimport { Pressable } from '../views/Pressable';\n\nconst canAutoTouchFile = process.env.EXPO_ROUTER_APP_ROOT != null;\n\nexport function Tutorial() {\n React.useEffect(() => {\n if (Platform.OS === 'web') {\n // Reset the route on web so the initial route isn't a 404 after\n // the user has created the entry file.\n // This is useful for cases where you are testing the tutorial.\n // To test: touch the new file, then navigate to a missing route `/foobar`, then delete the app folder.\n // you should see the tutorial again and be able to create the entry file once more.\n if (typeof location !== 'undefined' && location.pathname !== '/') {\n location.replace('/');\n }\n if (typeof window !== 'undefined' && typeof window.document !== 'undefined') {\n window.document.title = 'Welcome to Expo';\n }\n }\n }, []);\n\n return (\n <SafeAreaView style={styles.background}>\n <StatusBar barStyle=\"light-content\" />\n <View style={styles.container}>\n <View style={styles.logotypeWrapper}>\n <Image style={styles.logotype} source={require('expo-router/assets/logotype.png')} />\n </View>\n <Text role=\"heading\" aria-level={1} style={styles.title}>\n Welcome to Expo\n </Text>\n <Text role=\"heading\" aria-level={2} style={[styles.subtitle, styles.textSecondary]}>\n Start by creating a file{Platform.OS !== 'web' ? '\\n' : ' '}in the{' '}\n <Text style={{ fontWeight: '600' }}>{getRootDir()}</Text> directory.\n </Text>\n <Text>\n <Link\n href=\"https://docs.expo.dev/router/introduction/\"\n {...Platform.select({ web: { target: '_blank' }, native: { asChild: true } })}>\n <Pressable>\n {({ hovered, pressed }) => (\n <Text\n style={[\n styles.link,\n Platform.select({\n web: {\n transitionDuration: '200ms',\n marginBottom: 12,\n },\n }),\n hovered && {\n opacity: 0.8,\n textDecorationLine: 'underline',\n },\n pressed && {\n opacity: 0.8,\n },\n ]}>\n Learn more about Expo Router in the documentation.\n </Text>\n )}\n </Pressable>\n </Link>\n </Text>\n {canAutoTouchFile && <Button />}\n </View>\n </SafeAreaView>\n );\n}\n\nfunction getRootDir() {\n const dir = process.env.EXPO_ROUTER_ABS_APP_ROOT!;\n if (dir.match(/\\/src\\/app$/)) {\n return 'src/app';\n } else if (dir.match(/\\/app$/)) {\n return 'app';\n }\n return dir.split('/').pop() ?? dir;\n}\n\nfunction Button() {\n return (\n <Pressable\n onPress={() => {\n createEntryFileAsync();\n }}\n style={styles.button}>\n {({ pressed, hovered }) => (\n <View\n style={[\n styles.buttonContainer,\n hovered && {\n backgroundColor: '#fff',\n },\n pressed &&\n Platform.select({\n web: {\n transform: 'scale(0.98)',\n transitionDuration: '200ms',\n },\n default: {\n backgroundColor: '#fff',\n },\n }),\n ]}>\n <Text\n style={[\n styles.code,\n hovered && { color: '#000' },\n pressed &&\n Platform.select({\n native: { color: '#000' },\n }),\n ]}>\n <Text style={styles.textSecondary}>$</Text> touch {getRootDir()}\n /index.tsx\n </Text>\n </View>\n )}\n </Pressable>\n );\n}\n\nconst styles = StyleSheet.create({\n background: {\n backgroundColor: '#000',\n flex: 1,\n },\n container: {\n flex: 1,\n padding: 24,\n paddingBottom: 64,\n alignItems: 'center',\n justifyContent: 'center',\n marginHorizontal: 'auto',\n gap: 16,\n ...Platform.select({\n web: {\n maxWidth: 960,\n },\n native: {\n width: '100%',\n },\n }),\n },\n logotypeWrapper: {\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: '#151718',\n borderRadius: 12,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '#313538',\n width: 78,\n height: 78,\n marginBottom: 8,\n },\n logotype: {\n width: 48,\n height: 44,\n },\n title: {\n ...Platform.select({\n web: {\n fontSize: 64,\n lineHeight: 64,\n },\n default: {\n fontSize: 56,\n lineHeight: 56,\n },\n }),\n color: '#fff',\n fontWeight: '800',\n textAlign: 'center',\n },\n buttonContainer: {\n ...Platform.select({\n web: {\n transitionDuration: '200ms',\n },\n }),\n backgroundColor: 'transparent',\n borderColor: '#fff',\n borderWidth: 2,\n paddingVertical: 12,\n paddingHorizontal: 24,\n borderRadius: 8,\n },\n button: {\n ...Platform.select({\n web: {\n marginTop: 12,\n },\n native: {\n position: 'absolute',\n bottom: 24,\n left: 32,\n right: 32,\n overflow: 'hidden',\n },\n }),\n },\n code: {\n ...Platform.select({\n web: {\n transitionDuration: '200ms',\n fontFamily: 'Courier, monospace',\n },\n default: {\n fontFamily: Platform.select({\n ios: 'Courier New',\n android: 'monospace',\n }),\n },\n }),\n color: '#fff',\n textAlign: 'center',\n userSelect: 'none',\n fontSize: 18,\n fontWeight: 'bold',\n },\n subtitle: {\n fontSize: 34,\n fontWeight: '200',\n textAlign: 'center',\n },\n link: {\n fontSize: 20,\n lineHeight: 26,\n textAlign: 'center',\n color: '#52a9ff',\n marginTop: 12,\n ...Platform.select({\n web: {\n marginBottom: 24,\n },\n }),\n },\n textSecondary: {\n color: '#9ba1a6',\n },\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Unmatched.d.ts","sourceRoot":"","sources":["../../src/views/Unmatched.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"Unmatched.d.ts","sourceRoot":"","sources":["../../src/views/Unmatched.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B;;;;GAIG;AACH,wBAAgB,SAAS,sBAqHxB"}
|
package/build/views/Unmatched.js
CHANGED
|
@@ -12,86 +12,176 @@ const react_native_1 = require("react-native");
|
|
|
12
12
|
const hooks_1 = require("../hooks");
|
|
13
13
|
const Link_1 = require("../link/Link");
|
|
14
14
|
const useNavigation_1 = require("../useNavigation");
|
|
15
|
+
const Pressable_1 = require("../views/Pressable");
|
|
15
16
|
const useLayoutEffect = typeof window !== 'undefined' ? react_1.default.useLayoutEffect : function () { };
|
|
16
|
-
function NoSSR({ children }) {
|
|
17
|
-
const [render, setRender] = react_1.default.useState(false);
|
|
18
|
-
react_1.default.useEffect(() => {
|
|
19
|
-
setRender(true);
|
|
20
|
-
}, []);
|
|
21
|
-
if (!render) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
return <>{children}</>;
|
|
25
|
-
}
|
|
26
17
|
/**
|
|
27
18
|
* Default screen for unmatched routes.
|
|
28
19
|
*
|
|
29
20
|
* @hidden
|
|
30
21
|
*/
|
|
31
22
|
function Unmatched() {
|
|
23
|
+
const [render, setRender] = react_1.default.useState(false);
|
|
32
24
|
const router = (0, hooks_1.useRouter)();
|
|
33
25
|
const navigation = (0, useNavigation_1.useNavigation)();
|
|
34
26
|
const pathname = (0, hooks_1.usePathname)();
|
|
35
27
|
const url = (0, expo_linking_1.createURL)(pathname);
|
|
28
|
+
react_1.default.useEffect(() => {
|
|
29
|
+
setRender(true);
|
|
30
|
+
}, []);
|
|
36
31
|
useLayoutEffect(() => {
|
|
37
32
|
navigation.setOptions({
|
|
38
33
|
title: 'Not Found',
|
|
39
34
|
});
|
|
40
35
|
}, [navigation]);
|
|
41
36
|
return (<react_native_1.View style={styles.container}>
|
|
37
|
+
<NotFoundAsset />
|
|
42
38
|
<react_native_1.Text role="heading" aria-level={1} style={styles.title}>
|
|
43
39
|
Unmatched Route
|
|
44
40
|
</react_native_1.Text>
|
|
45
|
-
<react_native_1.Text role="heading" aria-level={2} style={styles.subtitle}>
|
|
46
|
-
Page could not be found.
|
|
47
|
-
<react_native_1.Text onPress={() => {
|
|
48
|
-
if (router.canGoBack()) {
|
|
49
|
-
router.back();
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
router.replace('/');
|
|
53
|
-
}
|
|
54
|
-
}} style={styles.link}>
|
|
55
|
-
Go back.
|
|
56
|
-
</react_native_1.Text>
|
|
41
|
+
<react_native_1.Text role="heading" aria-level={2} style={[styles.subtitle, styles.secondaryText]}>
|
|
42
|
+
Page could not be found.
|
|
57
43
|
</react_native_1.Text>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
44
|
+
{render ? (<Link_1.Link href={pathname} replace {...react_native_1.Platform.select({ native: { asChild: true } })}>
|
|
45
|
+
<Pressable_1.Pressable>
|
|
46
|
+
{({ hovered, pressed }) => (<react_native_1.Text style={[
|
|
47
|
+
styles.pageLink,
|
|
48
|
+
styles.secondaryText,
|
|
49
|
+
react_native_1.Platform.select({
|
|
50
|
+
web: {
|
|
51
|
+
transitionDuration: '200ms',
|
|
52
|
+
opacity: 1,
|
|
53
|
+
},
|
|
54
|
+
}),
|
|
55
|
+
hovered && {
|
|
56
|
+
opacity: 0.8,
|
|
57
|
+
textDecorationLine: 'underline',
|
|
58
|
+
},
|
|
59
|
+
pressed && {
|
|
60
|
+
opacity: 0.8,
|
|
61
|
+
},
|
|
62
|
+
]}>
|
|
63
|
+
{url}
|
|
64
|
+
</react_native_1.Text>)}
|
|
65
|
+
</Pressable_1.Pressable>
|
|
66
|
+
</Link_1.Link>) : (<react_native_1.View style={[styles.pageLink, styles.placeholder]}/>)}
|
|
67
|
+
<react_native_1.View style={styles.linkContainer}>
|
|
68
|
+
<Pressable_1.Pressable>
|
|
69
|
+
{({ hovered, pressed }) => (<react_native_1.Text onPress={() => {
|
|
70
|
+
if (router.canGoBack()) {
|
|
71
|
+
router.back();
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
router.replace('/');
|
|
75
|
+
}
|
|
76
|
+
}} style={[
|
|
77
|
+
styles.link,
|
|
78
|
+
react_native_1.Platform.select({
|
|
79
|
+
web: {
|
|
80
|
+
transitionDuration: '200ms',
|
|
81
|
+
opacity: 1,
|
|
82
|
+
},
|
|
83
|
+
}),
|
|
84
|
+
hovered && {
|
|
85
|
+
opacity: 0.8,
|
|
86
|
+
textDecorationLine: 'underline',
|
|
87
|
+
},
|
|
88
|
+
pressed && {
|
|
89
|
+
opacity: 0.8,
|
|
90
|
+
},
|
|
91
|
+
]}>
|
|
92
|
+
Go back
|
|
93
|
+
</react_native_1.Text>)}
|
|
94
|
+
</Pressable_1.Pressable>
|
|
95
|
+
<react_native_1.Text style={[styles.linkSeparator, styles.secondaryText]}>•</react_native_1.Text>
|
|
96
|
+
<Link_1.Link href="/_sitemap" replace {...react_native_1.Platform.select({ native: { asChild: true } })}>
|
|
97
|
+
<Pressable_1.Pressable>
|
|
98
|
+
{({ hovered, pressed }) => (<react_native_1.Text style={[
|
|
99
|
+
styles.link,
|
|
100
|
+
react_native_1.Platform.select({
|
|
101
|
+
web: {
|
|
102
|
+
transitionDuration: '200ms',
|
|
103
|
+
opacity: 1,
|
|
104
|
+
},
|
|
105
|
+
}),
|
|
106
|
+
hovered && {
|
|
107
|
+
opacity: 0.8,
|
|
108
|
+
textDecorationLine: 'underline',
|
|
109
|
+
},
|
|
110
|
+
pressed && {
|
|
111
|
+
opacity: 0.8,
|
|
112
|
+
},
|
|
113
|
+
]}>
|
|
114
|
+
Sitemap
|
|
115
|
+
</react_native_1.Text>)}
|
|
116
|
+
</Pressable_1.Pressable>
|
|
62
117
|
</Link_1.Link>
|
|
63
|
-
</
|
|
64
|
-
|
|
65
|
-
<Link_1.Link href="/_sitemap" replace style={[styles.link, { marginTop: 8 }]}>
|
|
66
|
-
Sitemap
|
|
67
|
-
</Link_1.Link>
|
|
118
|
+
</react_native_1.View>
|
|
68
119
|
</react_native_1.View>);
|
|
69
120
|
}
|
|
70
121
|
exports.Unmatched = Unmatched;
|
|
122
|
+
function NotFoundAsset() {
|
|
123
|
+
return <react_native_1.Image source={require('expo-router/assets/unmatched.png')} style={styles.image}/>;
|
|
124
|
+
}
|
|
71
125
|
const styles = react_native_1.StyleSheet.create({
|
|
72
126
|
container: {
|
|
73
127
|
flex: 1,
|
|
74
128
|
backgroundColor: 'black',
|
|
75
129
|
padding: 24,
|
|
130
|
+
paddingBottom: 64,
|
|
76
131
|
alignItems: 'center',
|
|
77
132
|
justifyContent: 'center',
|
|
78
133
|
},
|
|
134
|
+
image: {
|
|
135
|
+
width: 270,
|
|
136
|
+
height: 168,
|
|
137
|
+
resizeMode: 'contain',
|
|
138
|
+
marginBottom: 28,
|
|
139
|
+
},
|
|
79
140
|
title: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
141
|
+
...react_native_1.Platform.select({
|
|
142
|
+
web: {
|
|
143
|
+
fontSize: 64,
|
|
144
|
+
lineHeight: 64,
|
|
145
|
+
},
|
|
146
|
+
default: {
|
|
147
|
+
fontSize: 56,
|
|
148
|
+
lineHeight: 56,
|
|
149
|
+
},
|
|
150
|
+
}),
|
|
151
|
+
color: '#fff',
|
|
152
|
+
fontWeight: '800',
|
|
86
153
|
textAlign: 'center',
|
|
87
|
-
fontWeight: 'bold',
|
|
88
154
|
},
|
|
89
155
|
subtitle: {
|
|
90
|
-
|
|
91
|
-
|
|
156
|
+
fontSize: 34,
|
|
157
|
+
marginTop: 4,
|
|
92
158
|
marginBottom: 12,
|
|
159
|
+
fontWeight: '200',
|
|
93
160
|
textAlign: 'center',
|
|
94
161
|
},
|
|
95
|
-
|
|
162
|
+
pageLink: {
|
|
163
|
+
minHeight: 20,
|
|
164
|
+
},
|
|
165
|
+
secondaryText: {
|
|
166
|
+
color: '#9ba1a6',
|
|
167
|
+
},
|
|
168
|
+
placeholder: {
|
|
169
|
+
backgroundColor: '#9ba1a644',
|
|
170
|
+
minWidth: 180,
|
|
171
|
+
borderRadius: 5,
|
|
172
|
+
},
|
|
173
|
+
linkContainer: {
|
|
174
|
+
marginTop: 28,
|
|
175
|
+
flexDirection: 'row',
|
|
176
|
+
gap: 12,
|
|
177
|
+
},
|
|
178
|
+
link: {
|
|
179
|
+
fontSize: 20,
|
|
180
|
+
textAlign: 'center',
|
|
181
|
+
color: '#52a9ff',
|
|
182
|
+
},
|
|
183
|
+
linkSeparator: {
|
|
184
|
+
fontSize: 20,
|
|
185
|
+
},
|
|
96
186
|
});
|
|
97
187
|
//# sourceMappingURL=Unmatched.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Unmatched.js","sourceRoot":"","sources":["../../src/views/Unmatched.tsx"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,YAAY,CAAC;;;;;;;AAEb,+CAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"Unmatched.js","sourceRoot":"","sources":["../../src/views/Unmatched.tsx"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,YAAY,CAAC;;;;;;;AAEb,+CAAyC;AACzC,kDAA0B;AAC1B,+CAAuE;AAEvE,oCAAkD;AAClD,uCAAoC;AACpC,oDAAiD;AACjD,kDAA+C;AAE/C,MAAM,eAAe,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,eAAK,CAAC,eAAe,CAAC,CAAC,CAAC,cAAa,CAAC,CAAC;AAE/F;;;;GAIG;AACH,SAAgB,SAAS;IACvB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElD,MAAM,MAAM,GAAG,IAAA,iBAAS,GAAE,CAAC;IAC3B,MAAM,UAAU,GAAG,IAAA,6BAAa,GAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,IAAA,mBAAW,GAAE,CAAC;IAC/B,MAAM,GAAG,GAAG,IAAA,wBAAS,EAAC,QAAQ,CAAC,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AE;QACL,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,UAAU,EAAE,SAAS;QACrB,YAAY,EAAE,EAAE;KACjB;IACD,KAAK,EAAE;QACL,GAAG,uBAAQ,CAAC,MAAM,CAAC;YACjB,GAAG,EAAE;gBACH,QAAQ,EAAE,EAAE;gBACZ,UAAU,EAAE,EAAE;aACf;YACD,OAAO,EAAE;gBACP,QAAQ,EAAE,EAAE;gBACZ,UAAU,EAAE,EAAE;aACf;SACF,CAAC;QACF,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,QAAQ;KACpB;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,QAAQ;KACpB;IACD,QAAQ,EAAE;QACR,SAAS,EAAE,EAAE;KACd;IACD,aAAa,EAAE;QACb,KAAK,EAAE,SAAS;KACjB;IACD,WAAW,EAAE;QACX,eAAe,EAAE,WAAW;QAC5B,QAAQ,EAAE,GAAG;QACb,YAAY,EAAE,CAAC;KAChB;IACD,aAAa,EAAE;QACb,SAAS,EAAE,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,GAAG,EAAE,EAAE;KACR;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,SAAS;KACjB;IACD,aAAa,EAAE;QACb,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC","sourcesContent":["// Copyright © 2024 650 Industries.\n'use client';\n\nimport { createURL } from 'expo-linking';\nimport React from 'react';\nimport { StyleSheet, Text, View, Platform, Image } from 'react-native';\n\nimport { usePathname, useRouter } from '../hooks';\nimport { Link } from '../link/Link';\nimport { useNavigation } from '../useNavigation';\nimport { Pressable } from '../views/Pressable';\n\nconst useLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : function () {};\n\n/**\n * Default screen for unmatched routes.\n *\n * @hidden\n */\nexport function Unmatched() {\n const [render, setRender] = React.useState(false);\n\n const router = useRouter();\n const navigation = useNavigation();\n const pathname = usePathname();\n const url = createURL(pathname);\n\n React.useEffect(() => {\n setRender(true);\n }, []);\n\n useLayoutEffect(() => {\n navigation.setOptions({\n title: 'Not Found',\n });\n }, [navigation]);\n\n return (\n <View style={styles.container}>\n <NotFoundAsset />\n <Text role=\"heading\" aria-level={1} style={styles.title}>\n Unmatched Route\n </Text>\n <Text role=\"heading\" aria-level={2} style={[styles.subtitle, styles.secondaryText]}>\n Page could not be found.\n </Text>\n {render ? (\n <Link href={pathname} replace {...Platform.select({ native: { asChild: true } })}>\n <Pressable>\n {({ hovered, pressed }) => (\n <Text\n style={[\n styles.pageLink,\n styles.secondaryText,\n Platform.select({\n web: {\n transitionDuration: '200ms',\n opacity: 1,\n },\n }),\n hovered && {\n opacity: 0.8,\n textDecorationLine: 'underline',\n },\n pressed && {\n opacity: 0.8,\n },\n ]}>\n {url}\n </Text>\n )}\n </Pressable>\n </Link>\n ) : (\n <View style={[styles.pageLink, styles.placeholder]} />\n )}\n <View style={styles.linkContainer}>\n <Pressable>\n {({ hovered, pressed }) => (\n <Text\n onPress={() => {\n if (router.canGoBack()) {\n router.back();\n } else {\n router.replace('/');\n }\n }}\n style={[\n styles.link,\n Platform.select({\n web: {\n transitionDuration: '200ms',\n opacity: 1,\n },\n }),\n hovered && {\n opacity: 0.8,\n textDecorationLine: 'underline',\n },\n pressed && {\n opacity: 0.8,\n },\n ]}>\n Go back\n </Text>\n )}\n </Pressable>\n <Text style={[styles.linkSeparator, styles.secondaryText]}>•</Text>\n <Link href=\"/_sitemap\" replace {...Platform.select({ native: { asChild: true } })}>\n <Pressable>\n {({ hovered, pressed }) => (\n <Text\n style={[\n styles.link,\n Platform.select({\n web: {\n transitionDuration: '200ms',\n opacity: 1,\n },\n }),\n hovered && {\n opacity: 0.8,\n textDecorationLine: 'underline',\n },\n pressed && {\n opacity: 0.8,\n },\n ]}>\n Sitemap\n </Text>\n )}\n </Pressable>\n </Link>\n </View>\n </View>\n );\n}\n\nfunction NotFoundAsset() {\n return <Image source={require('expo-router/assets/unmatched.png')} style={styles.image} />;\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: 'black',\n padding: 24,\n paddingBottom: 64,\n alignItems: 'center',\n justifyContent: 'center',\n },\n image: {\n width: 270,\n height: 168,\n resizeMode: 'contain',\n marginBottom: 28,\n },\n title: {\n ...Platform.select({\n web: {\n fontSize: 64,\n lineHeight: 64,\n },\n default: {\n fontSize: 56,\n lineHeight: 56,\n },\n }),\n color: '#fff',\n fontWeight: '800',\n textAlign: 'center',\n },\n subtitle: {\n fontSize: 34,\n marginTop: 4,\n marginBottom: 12,\n fontWeight: '200',\n textAlign: 'center',\n },\n pageLink: {\n minHeight: 20,\n },\n secondaryText: {\n color: '#9ba1a6',\n },\n placeholder: {\n backgroundColor: '#9ba1a644',\n minWidth: 180,\n borderRadius: 5,\n },\n linkContainer: {\n marginTop: 28,\n flexDirection: 'row',\n gap: 12,\n },\n link: {\n fontSize: 20,\n textAlign: 'center',\n color: '#52a9ff',\n },\n linkSeparator: {\n fontSize: 20,\n },\n});\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-router",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "Expo Router is a file-based router for React Native and web applications.",
|
|
5
5
|
"author": "650 Industries, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"semver": "~7.6.3",
|
|
117
117
|
"server-only": "^0.0.1"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "c4999f5aa407155a170830a0fa17e3e3ca1fcbee"
|
|
120
120
|
}
|