expo-router 0.0.15 → 0.0.17
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tutorial.d.ts","sourceRoot":"","sources":["../../src/onboard/Tutorial.tsx"],"names":[],"mappings":";AAmCA,wBAAgB,QAAQ,
|
|
1
|
+
{"version":3,"file":"Tutorial.d.ts","sourceRoot":"","sources":["../../src/onboard/Tutorial.tsx"],"names":[],"mappings":";AAmCA,wBAAgB,QAAQ,gBAwDvB"}
|
|
@@ -49,14 +49,12 @@ export function Tutorial() {
|
|
|
49
49
|
React.createElement(View, { style: styles.container },
|
|
50
50
|
React.createElement(Header, null),
|
|
51
51
|
React.createElement(Text, { accessibilityRole: "header", accessibilityLevel: 2, style: styles.subtitle },
|
|
52
|
-
"
|
|
52
|
+
"Start by creating a file",
|
|
53
53
|
"\n",
|
|
54
54
|
"in the",
|
|
55
55
|
" ",
|
|
56
56
|
React.createElement(Text, { style: { fontWeight: "bold" } }, "app"),
|
|
57
|
-
" directory",
|
|
58
|
-
"\n",
|
|
59
|
-
"that exports a React component."),
|
|
57
|
+
" directory."),
|
|
60
58
|
canAutoTouchFile && React.createElement(Button, null)))));
|
|
61
59
|
}
|
|
62
60
|
function Button() {
|
|
@@ -111,7 +109,7 @@ const styles = StyleSheet.create({
|
|
|
111
109
|
container: {
|
|
112
110
|
flex: 1,
|
|
113
111
|
padding: 24,
|
|
114
|
-
alignItems: "start",
|
|
112
|
+
alignItems: "flex-start",
|
|
115
113
|
justifyContent: "center",
|
|
116
114
|
},
|
|
117
115
|
title: {
|
|
@@ -133,7 +131,7 @@ const styles = StyleSheet.create({
|
|
|
133
131
|
subtitle: {
|
|
134
132
|
color: "#BCC3CD",
|
|
135
133
|
fontSize: 36,
|
|
136
|
-
fontWeight: "
|
|
134
|
+
fontWeight: "100",
|
|
137
135
|
paddingBottom: 36,
|
|
138
136
|
maxWidth: 960,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} from \"react-native\";\nimport { View, Text, Pressable, StyleSheet } from \"@bacons/react-views\";\nimport { createEntryFileAsync } from \"./createEntryFile\";\n\n// TODO: Use openLinkFromBrowser thing\nfunction Header() {\n return (\n <Pressable>\n {({ hovered }) => (\n <Text\n accessibilityRole=\"header\"\n accessibilityLevel={1}\n style={[styles.title, Platform.OS !== \"web\" && { textAlign: \"left\" }]}\n >\n Welcome to{\" \"}\n <Text\n href=\"https://github.com/expo/expo-router/\"\n style={[\n hovered && {\n textDecorationColor: \"white\",\n textDecorationLine: \"underline\",\n },\n ]}\n >\n Expo\n </Text>\n </Text>\n )}\n </Pressable>\n );\n}\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 (\n typeof window !== \"undefined\" &&\n typeof window.document !== \"undefined\"\n ) {\n window.document.title = \"npx expo start\";\n }\n }\n }, []);\n\n return (\n <View\n style={{\n backgroundColor: \"black\",\n flex: 1,\n backgroundImage:\n \"radial-gradient(circle at 1px 1px, rgba(255,255,255,0.15) 1px, transparent 0)\",\n backgroundPosition: \"-3px -3px\",\n backgroundSize: \"40px 40px\",\n }}\n >\n <StatusBar barStyle=\"light-content\" />\n\n <SafeAreaView\n style={{\n flex: 1,\n maxWidth: 960,\n marginHorizontal: \"auto\",\n alignItems: \"stretch\",\n }}\n >\n <View style={styles.container}>\n <Header />\n <Text\n accessibilityRole=\"header\"\n accessibilityLevel={2}\n style={styles.subtitle}\n >\n Start by creating a file{\"\\n\"}in the{\" \"}\n <Text style={{ fontWeight: \"bold\" }}>app</Text> directory.\n </Text>\n {canAutoTouchFile && <Button />}\n </View>\n </SafeAreaView>\n </View>\n );\n}\n\nfunction Button() {\n return (\n <Pressable\n onPress={() => {\n createEntryFileAsync();\n }}\n style={{\n ...Platform.select({\n native: {\n position: \"absolute\",\n bottom: 24,\n left: 24,\n right: 24,\n overflow: \"hidden\",\n },\n }),\n }}\n >\n {({ pressed, hovered }) => (\n <View\n style={[\n {\n transitionDuration: \"200ms\",\n backgroundColor: Platform.select({\n web: \"transparent\",\n default: \"white\",\n }),\n\n borderColor: \"white\",\n borderWidth: 2,\n paddingVertical: 12,\n paddingHorizontal: 24,\n },\n hovered && {\n backgroundColor: \"white\",\n },\n pressed && {\n backgroundColor: \"rgba(255,255,255,0.7)\",\n },\n ]}\n >\n <Text\n selectable={false}\n style={[\n {\n fontSize: 18,\n transitionDuration: \"200ms\",\n fontWeight: \"bold\",\n color: Platform.select({\n web: \"white\",\n default: \"black\",\n }),\n },\n styles.code,\n hovered && { color: \"black\" },\n ]}\n >\n <Text style={{ color: \"#BCC3CD\" }}>$</Text> touch app/index.js\n </Text>\n </View>\n )}\n </Pressable>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n padding: 24,\n alignItems: \"flex-start\",\n justifyContent: \"center\",\n },\n title: {\n color: \"white\",\n fontSize: 64,\n paddingBottom: 24,\n fontWeight: \"bold\",\n },\n buttonText: {\n color: \"black\",\n },\n code: {\n fontFamily: Platform.select({\n default: \"Courier\",\n ios: \"Courier New\",\n android: \"monospace\",\n }),\n },\n subtitle: {\n color: \"#BCC3CD\",\n fontSize: 36,\n fontWeight: \"100\",\n paddingBottom: 36,\n maxWidth: 960,\n },\n});\n"]}
|