expo-router 5.1.7 → 5.1.9
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/build/onboard/Tutorial.d.ts.map +1 -1
- package/build/onboard/Tutorial.js +19 -8
- package/build/onboard/Tutorial.js.map +1 -1
- package/build/typed-routes/types.d.ts +4 -1
- package/build/typed-routes/types.d.ts.map +1 -1
- package/build/typed-routes/types.js.map +1 -1
- package/package.json +8 -4
- package/build/onboard/createEntryFile.d.ts +0 -4
- package/build/onboard/createEntryFile.d.ts.map +0 -1
- package/build/onboard/createEntryFile.js +0 -63
- package/build/onboard/createEntryFile.js.map +0 -1
- package/plugin/tsconfig.tsbuildinfo +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tutorial.d.ts","sourceRoot":"","sources":["../../src/onboard/Tutorial.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Tutorial.d.ts","sourceRoot":"","sources":["../../src/onboard/Tutorial.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAwB1B,wBAAgB,QAAQ,sBAgEvB"}
|
|
@@ -7,10 +7,22 @@ exports.Tutorial = Tutorial;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const react_native_1 = require("react-native");
|
|
9
9
|
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
|
|
10
|
-
const createEntryFile_1 = require("./createEntryFile");
|
|
11
10
|
const exports_1 = require("../exports");
|
|
11
|
+
const getDevServer_1 = require("../getDevServer");
|
|
12
12
|
const Pressable_1 = require("../views/Pressable");
|
|
13
13
|
const canAutoTouchFile = process.env.EXPO_ROUTER_APP_ROOT != null;
|
|
14
|
+
function createEntryFileAsync() {
|
|
15
|
+
if (process.env.NODE_ENV === 'production') {
|
|
16
|
+
// No dev server
|
|
17
|
+
console.warn('createEntryFile() cannot be used in production');
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
// Pings middleware in the Expo CLI dev server.
|
|
21
|
+
return fetch((0, getDevServer_1.getDevServer)().url + '_expo/touch', {
|
|
22
|
+
method: 'POST',
|
|
23
|
+
body: JSON.stringify({ type: 'router_index' }),
|
|
24
|
+
});
|
|
25
|
+
}
|
|
14
26
|
function Tutorial() {
|
|
15
27
|
react_1.default.useEffect(() => {
|
|
16
28
|
if (react_native_1.Platform.OS === 'web') {
|
|
@@ -69,18 +81,18 @@ function Tutorial() {
|
|
|
69
81
|
</react_native_safe_area_context_1.SafeAreaView>);
|
|
70
82
|
}
|
|
71
83
|
function getRootDir() {
|
|
72
|
-
const dir = process.env.
|
|
73
|
-
if (
|
|
84
|
+
const dir = process.env.EXPO_ROUTER_APP_ROOT ?? '';
|
|
85
|
+
if (/[\\/]src[\\/]app$/.test(dir)) {
|
|
74
86
|
return 'src/app';
|
|
75
87
|
}
|
|
76
|
-
else if (dir
|
|
88
|
+
else if (/[\\/]app$/.test(dir)) {
|
|
77
89
|
return 'app';
|
|
78
90
|
}
|
|
79
|
-
return dir.split(
|
|
91
|
+
return dir.split(/[\\/]/).pop() ?? '';
|
|
80
92
|
}
|
|
81
93
|
function Button() {
|
|
82
94
|
return (<Pressable_1.Pressable onPress={() => {
|
|
83
|
-
|
|
95
|
+
createEntryFileAsync();
|
|
84
96
|
}} style={styles.button}>
|
|
85
97
|
{({ pressed, hovered }) => (<react_native_1.View style={[
|
|
86
98
|
styles.buttonContainer,
|
|
@@ -106,8 +118,7 @@ function Button() {
|
|
|
106
118
|
native: { color: '#000' },
|
|
107
119
|
}),
|
|
108
120
|
]}>
|
|
109
|
-
<react_native_1.Text style={styles.textSecondary}>$</react_native_1.Text> touch {getRootDir()}
|
|
110
|
-
/index.tsx
|
|
121
|
+
<react_native_1.Text style={styles.textSecondary}>$</react_native_1.Text> touch {`${getRootDir()}/index.tsx`}
|
|
111
122
|
</react_native_1.Text>
|
|
112
123
|
</react_native_1.View>)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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
|
+
{"version":3,"file":"Tutorial.js","sourceRoot":"","sources":["../../src/onboard/Tutorial.tsx"],"names":[],"mappings":";;;;;AAwBA,4BAgEC;AAxFD,kDAA0B;AAC1B,+CAAkF;AAClF,mFAA8D;AAE9D,wCAAkC;AAClC,kDAA+C;AAC/C,kDAA+C;AAE/C,MAAM,gBAAgB,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,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 { Link } from '../exports';\nimport { getDevServer } from '../getDevServer';\nimport { Pressable } from '../views/Pressable';\n\nconst canAutoTouchFile = process.env.EXPO_ROUTER_APP_ROOT != null;\n\nfunction createEntryFileAsync() {\n if (process.env.NODE_ENV === 'production') {\n // No dev server\n console.warn('createEntryFile() cannot be used in production');\n return;\n }\n\n // Pings middleware in the Expo CLI dev server.\n return fetch(getDevServer().url + '_expo/touch', {\n method: 'POST',\n body: JSON.stringify({ type: 'router_index' }),\n });\n}\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_APP_ROOT ?? '';\n if (/[\\\\/]src[\\\\/]app$/.test(dir)) {\n return 'src/app';\n } else if (/[\\\\/]app$/.test(dir)) {\n return 'app';\n }\n return dir.split(/[\\\\/]/).pop() ?? '';\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()}/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"]}
|
|
@@ -70,7 +70,10 @@ export type RouteInputParams<T extends Route> = Extract<Href, {
|
|
|
70
70
|
*/
|
|
71
71
|
export type RouteOutputParams<T extends Route> = Extract<HrefOutputParams, {
|
|
72
72
|
pathname: T;
|
|
73
|
-
}> extends never ? HrefOutputParams extends infer H ? H extends
|
|
73
|
+
}> extends never ? HrefOutputParams extends infer H ? H extends {
|
|
74
|
+
pathname: any;
|
|
75
|
+
params?: any;
|
|
76
|
+
} ? T extends H['pathname'] ? H['params'] : never : never : never : Extract<HrefOutputParams, {
|
|
74
77
|
pathname: T;
|
|
75
78
|
}>['params'];
|
|
76
79
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/typed-routes/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,yBAAiB,UAAU,CAAC;IAE1B,UAAiB,QAAQ;KAAG;CAC7B;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,KAAK,MAAM,EAAE,GAAG,MAAM,MA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M,GAAG,GACrB,KAAK,GACL,CAAC,SAAS,IAAI,MAAM,GAAG,GACrB,KAAK,GACL,CAAC,CAAC;AAEhB;;;;GAIG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,KAAK,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,aAAa,CAAC,cAAc,SAAS,KAAK,GAAG,MAAM,EAAE,IAAI,cAAc,SAAS,MAAM,EAAE,GAChG,cAAc,GACd,cAAc,SAAS,IAAI,MAAM,EAAE,GACjC,KAAK,GACL,cAAc,SAAS,EAAE,GACvB,KAAK,GACL,cAAc,SAAS,IAAI,MAAM,KAAK,EAAE,GACtC,aAAa,CAAC,KAAK,CAAC,GACpB,cAAc,SAAS,GAAG,MAAM,KAAK,IAAI,MAAM,EAAE,GAC/C,aAAa,CAAC,KAAK,CAAC,GACpB,cAAc,SAAS,GAAG,MAAM,KAAK,IAAI,MAAM,EAAE,GAC/C,aAAa,CAAC,KAAK,CAAC,GACpB,cAAc,SAAS,GAAG,MAAM,KAAK,IAAI,MAAM,KAAK,EAAE,GACpD,CAAC,KAAK,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,GAChC,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/typed-routes/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * The main routing type for Expo Router.\n *\n * @internal\n * @hidden\n */\nexport namespace ExpoRouter {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-object-type\n export interface __routes {}\n}\n\nexport type HrefObject = {\n /** The path of the route. */\n pathname: string;\n /** Optional parameters for the route. */\n params?: UnknownInputParams;\n};\n\n/**\n * @hidden\n */\nexport type HrefInputParamsObject = {\n /** The path of the route. */\n pathname: string;\n /** Optional input parameters for the route. */\n params?: UnknownInputParams;\n};\n\n/**\n * @hidden\n */\nexport type HrefOutputParamsObject = {\n /** The path of the route */\n pathname: string;\n /** Optional output parameters for the route */\n params?: UnknownOutputParams;\n};\n\nexport type RelativePathString = `./${string}` | `../${string}` | '..';\nexport type SearchOrHash = `?${string}` | `#${string}`;\nexport type ExternalPathString = `${string}:${string}` | `//${string}`;\nexport type Route = Exclude<\n Extract<Href, object>['pathname'], // Use the HrefObject, as it doesn't have query params\n RelativePathString | ExternalPathString\n>;\n\n/**\n * The main routing type for Expo Router. It includes all available routes with strongly\n * typed parameters. It can either be:\n * - **string**: A full path like `/profile/settings` or a relative path like `../settings`.\n * - **object**: An object with a `pathname` and optional `params`. The `pathname` can be\n * a full path like `/profile/settings` or a relative path like `../settings`.\n * The params can be an object of key-value pairs.\n *\n * An Href can either be a string or an object.\n */\nexport type Href<T extends ExpoRouter.__routes = ExpoRouter.__routes> = T extends { href: any }\n ? T['href']\n : string | HrefObject;\n\n/*\n * @hidden\n */\nexport type HrefInputParams<T extends ExpoRouter.__routes = ExpoRouter.__routes> = T extends {\n hrefInputParams: any;\n}\n ? T['hrefInputParams']\n : HrefInputParamsObject;\n\n/*\n * @hidden\n */\nexport type HrefOutputParams<T extends ExpoRouter.__routes = ExpoRouter.__routes> = T extends {\n hrefOutputParams: any;\n}\n ? T['hrefOutputParams']\n : HrefOutputParamsObject;\n\n/**\n * @hidden\n */\nexport type RouteInputParams<T extends Route> =\n Extract<Href, { pathname: T }> extends never\n ? HrefInputParams extends infer H\n ? H extends Record<'pathname' | 'params', any>\n ? T extends H['pathname']\n ? H['params']\n : never\n : never\n : never\n : Extract<HrefInputParams, { pathname: T }>['params'];\n\n/**\n * @hidden\n */\nexport type RouteOutputParams<T extends Route> =\n Extract<HrefOutputParams, { pathname: T }> extends never\n ? HrefOutputParams extends infer H\n ? H extends
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/typed-routes/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * The main routing type for Expo Router.\n *\n * @internal\n * @hidden\n */\nexport namespace ExpoRouter {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-object-type\n export interface __routes {}\n}\n\nexport type HrefObject = {\n /** The path of the route. */\n pathname: string;\n /** Optional parameters for the route. */\n params?: UnknownInputParams;\n};\n\n/**\n * @hidden\n */\nexport type HrefInputParamsObject = {\n /** The path of the route. */\n pathname: string;\n /** Optional input parameters for the route. */\n params?: UnknownInputParams;\n};\n\n/**\n * @hidden\n */\nexport type HrefOutputParamsObject = {\n /** The path of the route */\n pathname: string;\n /** Optional output parameters for the route */\n params?: UnknownOutputParams;\n};\n\nexport type RelativePathString = `./${string}` | `../${string}` | '..';\nexport type SearchOrHash = `?${string}` | `#${string}`;\nexport type ExternalPathString = `${string}:${string}` | `//${string}`;\nexport type Route = Exclude<\n Extract<Href, object>['pathname'], // Use the HrefObject, as it doesn't have query params\n RelativePathString | ExternalPathString\n>;\n\n/**\n * The main routing type for Expo Router. It includes all available routes with strongly\n * typed parameters. It can either be:\n * - **string**: A full path like `/profile/settings` or a relative path like `../settings`.\n * - **object**: An object with a `pathname` and optional `params`. The `pathname` can be\n * a full path like `/profile/settings` or a relative path like `../settings`.\n * The params can be an object of key-value pairs.\n *\n * An Href can either be a string or an object.\n */\nexport type Href<T extends ExpoRouter.__routes = ExpoRouter.__routes> = T extends { href: any }\n ? T['href']\n : string | HrefObject;\n\n/*\n * @hidden\n */\nexport type HrefInputParams<T extends ExpoRouter.__routes = ExpoRouter.__routes> = T extends {\n hrefInputParams: any;\n}\n ? T['hrefInputParams']\n : HrefInputParamsObject;\n\n/*\n * @hidden\n */\nexport type HrefOutputParams<T extends ExpoRouter.__routes = ExpoRouter.__routes> = T extends {\n hrefOutputParams: any;\n}\n ? T['hrefOutputParams']\n : HrefOutputParamsObject;\n\n/**\n * @hidden\n */\nexport type RouteInputParams<T extends Route> =\n Extract<Href, { pathname: T }> extends never\n ? HrefInputParams extends infer H\n ? H extends Record<'pathname' | 'params', any>\n ? T extends H['pathname']\n ? H['params']\n : never\n : never\n : never\n : Extract<HrefInputParams, { pathname: T }>['params'];\n\n/**\n * @hidden\n */\nexport type RouteOutputParams<T extends Route> =\n Extract<HrefOutputParams, { pathname: T }> extends never\n ? HrefOutputParams extends infer H\n ? H extends { pathname: any; params?: any }\n ? T extends H['pathname']\n ? H['params']\n : never\n : never\n : never\n : Extract<HrefOutputParams, { pathname: T }>['params'];\n\n/**\n * @hidden\n */\nexport type RouteParams<T extends Route> = RouteOutputParams<T>;\n\n/**\n * Routes can have known inputs (e.g query params).\n * Unlike outputs, inputs can be `undefined` or `null`.\n *\n * @hidden\n */\nexport type UnknownInputParams = Record<\n string,\n string | number | undefined | null | (string | number)[]\n>;\n\n/**\n * Routes can have unknown outputs (e.g query params).\n * Unlike inputs, outputs can't be undefined or null.\n *\n * @hidden\n */\nexport type UnknownOutputParams = Record<string, string | string[]>;\n\n/**\n * Return only the RoutePart of a string. If the string has multiple parts return never\n *\n * string | type\n *| ---------|------|\n *| 123 | 123 |\n *| /123/abc | never |\n *| 123?abc | never |\n *| ./123 | never |\n *| /123 | never |\n *| 123/../ | never |\n *\n * @hidden\n */\nexport type SingleRoutePart<S extends string | object> = S extends object\n ? never\n : S extends `${string}/${string}`\n ? never\n : S extends `${string}${SearchOrHash}`\n ? never\n : S extends ''\n ? never\n : S extends `(${string})`\n ? never\n : S extends `[${string}]`\n ? never\n : S;\n\n/**\n * @deprecated Use `RouteParams` or `StrictRouteParams` instead.\n *\n * @hidden\n */\nexport type SearchParams<T extends string = never> = RouteParams<T>;\n\n/**\n * @hidden\n */\nexport type RouteSegments<HrefOrSegments extends Route | string[]> = HrefOrSegments extends string[]\n ? HrefOrSegments\n : HrefOrSegments extends `.${string}`\n ? never\n : HrefOrSegments extends ``\n ? never\n : HrefOrSegments extends `/${infer PartA}`\n ? RouteSegments<PartA>\n : HrefOrSegments extends `${infer PartA}?${string}`\n ? RouteSegments<PartA>\n : HrefOrSegments extends `${infer PartA}#${string}`\n ? RouteSegments<PartA>\n : HrefOrSegments extends `${infer PartA}/${infer PartB}`\n ? [PartA, ...RouteSegments<PartB>]\n : [HrefOrSegments];\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-router",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.9",
|
|
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",
|
|
@@ -81,7 +81,8 @@
|
|
|
81
81
|
"expo-linking": "*",
|
|
82
82
|
"react-native-reanimated": "*",
|
|
83
83
|
"react-native-safe-area-context": "*",
|
|
84
|
-
"react-native-screens": "*"
|
|
84
|
+
"react-native-screens": "*",
|
|
85
|
+
"react-server-dom-webpack": "~19.0.2 || ~19.1.3 || ~19.2.2"
|
|
85
86
|
},
|
|
86
87
|
"peerDependenciesMeta": {
|
|
87
88
|
"react-native-reanimated": {
|
|
@@ -92,6 +93,9 @@
|
|
|
92
93
|
},
|
|
93
94
|
"@testing-library/jest-native": {
|
|
94
95
|
"optional": true
|
|
96
|
+
},
|
|
97
|
+
"react-server-dom-webpack": {
|
|
98
|
+
"optional": true
|
|
95
99
|
}
|
|
96
100
|
},
|
|
97
101
|
"devDependencies": {
|
|
@@ -101,7 +105,7 @@
|
|
|
101
105
|
"@testing-library/react-native": "^13.1.0",
|
|
102
106
|
"@types/semver": "^7.7.0",
|
|
103
107
|
"immer": "^10.1.1",
|
|
104
|
-
"react-server-dom-webpack": "~19.0.
|
|
108
|
+
"react-server-dom-webpack": "~19.0.2",
|
|
105
109
|
"tsd": "^0.28.1"
|
|
106
110
|
},
|
|
107
111
|
"dependencies": {
|
|
@@ -120,5 +124,5 @@
|
|
|
120
124
|
"server-only": "^0.0.1",
|
|
121
125
|
"shallowequal": "^1.1.0"
|
|
122
126
|
},
|
|
123
|
-
"gitHead": "
|
|
127
|
+
"gitHead": "2af1b39b88b98bed911587ea66adca046296e8c6"
|
|
124
128
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createEntryFile.d.ts","sourceRoot":"","sources":["../../src/onboard/createEntryFile.ts"],"names":[],"mappings":"AAEA,4DAA4D;AAC5D,wBAAgB,oBAAoB,kCAkBnC;AAED,wBAAgB,eAAe,WAE9B"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createEntryFileAsync = createEntryFileAsync;
|
|
4
|
-
exports.getAbsolutePath = getAbsolutePath;
|
|
5
|
-
const getDevServer_1 = require("../getDevServer");
|
|
6
|
-
/** Middleware for creating an entry file in the project. */
|
|
7
|
-
function createEntryFileAsync() {
|
|
8
|
-
if (process.env.NODE_ENV === 'production') {
|
|
9
|
-
// No dev server
|
|
10
|
-
console.warn('createEntryFile() cannot be used in production');
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
// Pings middleware in the Expo CLI dev server.
|
|
14
|
-
return fetch((0, getDevServer_1.getDevServer)().url + '_expo/touch', {
|
|
15
|
-
method: 'POST',
|
|
16
|
-
body: JSON.stringify({
|
|
17
|
-
contents: TEMPLATE,
|
|
18
|
-
// Legacy
|
|
19
|
-
path: './app/index.js',
|
|
20
|
-
// New
|
|
21
|
-
absolutePath: getAbsolutePath(),
|
|
22
|
-
}),
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
function getAbsolutePath() {
|
|
26
|
-
return process.env.EXPO_ROUTER_ABS_APP_ROOT + '/index.js';
|
|
27
|
-
}
|
|
28
|
-
const TEMPLATE = `import { StyleSheet, Text, View } from "react-native";
|
|
29
|
-
|
|
30
|
-
export default function Page() {
|
|
31
|
-
return (
|
|
32
|
-
<View style={styles.container}>
|
|
33
|
-
<View style={styles.main}>
|
|
34
|
-
<Text style={styles.title}>Hello World</Text>
|
|
35
|
-
<Text style={styles.subtitle}>This is the first page of your app.</Text>
|
|
36
|
-
</View>
|
|
37
|
-
</View>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const styles = StyleSheet.create({
|
|
42
|
-
container: {
|
|
43
|
-
flex: 1,
|
|
44
|
-
alignItems: "center",
|
|
45
|
-
padding: 24,
|
|
46
|
-
},
|
|
47
|
-
main: {
|
|
48
|
-
flex: 1,
|
|
49
|
-
justifyContent: "center",
|
|
50
|
-
maxWidth: 960,
|
|
51
|
-
marginHorizontal: "auto",
|
|
52
|
-
},
|
|
53
|
-
title: {
|
|
54
|
-
fontSize: 64,
|
|
55
|
-
fontWeight: "bold",
|
|
56
|
-
},
|
|
57
|
-
subtitle: {
|
|
58
|
-
fontSize: 36,
|
|
59
|
-
color: "#38434D",
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
`;
|
|
63
|
-
//# sourceMappingURL=createEntryFile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createEntryFile.js","sourceRoot":"","sources":["../../src/onboard/createEntryFile.ts"],"names":[],"mappings":";;AAGA,oDAkBC;AAED,0CAEC;AAzBD,kDAA+C;AAE/C,4DAA4D;AAC5D,SAAgB,oBAAoB;IAClC,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC1C,gBAAgB;QAChB,OAAO,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;QAC/D,OAAO;IACT,CAAC;IAED,+CAA+C;IAC/C,OAAO,KAAK,CAAC,IAAA,2BAAY,GAAE,CAAC,GAAG,GAAG,aAAa,EAAE;QAC/C,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;YACnB,QAAQ,EAAE,QAAQ;YAClB,SAAS;YACT,IAAI,EAAE,gBAAgB;YACtB,MAAM;YACN,YAAY,EAAE,eAAe,EAAE;SAChC,CAAC;KACH,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,eAAe;IAC7B,OAAO,OAAO,CAAC,GAAG,CAAC,wBAAwB,GAAG,WAAW,CAAC;AAC5D,CAAC;AAED,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkChB,CAAC","sourcesContent":["import { getDevServer } from '../getDevServer';\n\n/** Middleware for creating an entry file in the project. */\nexport function createEntryFileAsync() {\n if (process.env.NODE_ENV === 'production') {\n // No dev server\n console.warn('createEntryFile() cannot be used in production');\n return;\n }\n\n // Pings middleware in the Expo CLI dev server.\n return fetch(getDevServer().url + '_expo/touch', {\n method: 'POST',\n body: JSON.stringify({\n contents: TEMPLATE,\n // Legacy\n path: './app/index.js',\n // New\n absolutePath: getAbsolutePath(),\n }),\n });\n}\n\nexport function getAbsolutePath() {\n return process.env.EXPO_ROUTER_ABS_APP_ROOT + '/index.js';\n}\n\nconst TEMPLATE = `import { StyleSheet, Text, View } from \"react-native\";\n\nexport default function Page() {\n return (\n <View style={styles.container}>\n <View style={styles.main}>\n <Text style={styles.title}>Hello World</Text>\n <Text style={styles.subtitle}>This is the first page of your app.</Text>\n </View>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n alignItems: \"center\",\n padding: 24,\n },\n main: {\n flex: 1,\n justifyContent: \"center\",\n maxWidth: 960,\n marginHorizontal: \"auto\",\n },\n title: {\n fontSize: 64,\n fontWeight: \"bold\",\n },\n subtitle: {\n fontSize: 36,\n color: \"#38434D\",\n },\n});\n`;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["./src/index.ts"],"version":"5.8.3"}
|