expo-router 7.0.0-canary-20251210-1f163e3 → 7.0.0-canary-20251212-acb11f2
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/android/build.gradle +2 -2
- package/build/link/ExpoLink.d.ts.map +1 -1
- package/build/link/ExpoLink.js +10 -9
- package/build/link/ExpoLink.js.map +1 -1
- package/build/link/useLinkHooks.d.ts +1 -1
- package/build/link/zoom/ZoomTransitionEnabler.ios.d.ts.map +1 -1
- package/build/link/zoom/ZoomTransitionEnabler.ios.js +4 -2
- package/build/link/zoom/ZoomTransitionEnabler.ios.js.map +1 -1
- package/build/link/zoom/link-apple-zoom.js +7 -2
- package/build/link/zoom/link-apple-zoom.js.map +1 -1
- package/build/link/zoom/useZoomHref.d.ts +3 -0
- package/build/link/zoom/useZoomHref.d.ts.map +1 -0
- package/build/link/zoom/useZoomHref.ios.d.ts +3 -0
- package/build/link/zoom/useZoomHref.ios.d.ts.map +1 -0
- package/build/link/zoom/useZoomHref.ios.js +38 -0
- package/build/link/zoom/useZoomHref.ios.js.map +1 -0
- package/build/link/zoom/useZoomHref.js +8 -0
- package/build/link/zoom/useZoomHref.js.map +1 -0
- package/build/link/zoom/zoom-transition-context-providers.d.ts +4 -0
- package/build/link/zoom/zoom-transition-context-providers.d.ts.map +1 -0
- package/build/link/zoom/zoom-transition-context-providers.ios.d.ts +4 -0
- package/build/link/zoom/zoom-transition-context-providers.ios.d.ts.map +1 -0
- package/build/link/zoom/zoom-transition-context-providers.ios.js +71 -0
- package/build/link/zoom/zoom-transition-context-providers.ios.js.map +1 -0
- package/build/link/zoom/zoom-transition-context-providers.js +11 -0
- package/build/link/zoom/zoom-transition-context-providers.js.map +1 -0
- package/build/link/zoom/zoom-transition-context-providers.types.d.ts +9 -0
- package/build/link/zoom/zoom-transition-context-providers.types.d.ts.map +1 -0
- package/build/link/zoom/zoom-transition-context-providers.types.js +3 -0
- package/build/link/zoom/zoom-transition-context-providers.types.js.map +1 -0
- package/build/link/zoom/zoom-transition-context.d.ts +4 -6
- package/build/link/zoom/zoom-transition-context.d.ts.map +1 -1
- package/build/link/zoom/zoom-transition-context.js +0 -27
- package/build/link/zoom/zoom-transition-context.js.map +1 -1
- 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/useScreens.js +3 -3
- package/build/useScreens.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.module → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.module} +7 -7
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.module.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.pom → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.pom} +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.pom.sha512 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml +4 -4
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha512 +1 -1
- package/package.json +12 -12
- package/build/link/zoom/useZoomTransitionPrimitives.d.ts +0 -6
- package/build/link/zoom/useZoomTransitionPrimitives.d.ts.map +0 -1
- package/build/link/zoom/useZoomTransitionPrimitives.ios.d.ts +0 -11
- package/build/link/zoom/useZoomTransitionPrimitives.ios.d.ts.map +0 -1
- package/build/link/zoom/useZoomTransitionPrimitives.ios.js +0 -69
- package/build/link/zoom/useZoomTransitionPrimitives.ios.js.map +0 -1
- package/build/link/zoom/useZoomTransitionPrimitives.js +0 -9
- package/build/link/zoom/useZoomTransitionPrimitives.js.map +0 -1
- 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/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.module.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.pom.sha512 +0 -1
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3-sources.jar → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2-sources.jar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3-sources.jar.md5 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2-sources.jar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3-sources.jar.sha1 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2-sources.jar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3-sources.jar.sha256 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2-sources.jar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3-sources.jar.sha512 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2-sources.jar.sha512} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.aar → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.aar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.aar.md5 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.aar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.aar.sha1 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.aar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.aar.sha256 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.aar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.aar.sha512 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.aar.sha512} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tutorial.js","sourceRoot":"","sources":["../../src/onboard/Tutorial.tsx"],"names":[],"mappings":";;;;;AAUA,4BAgEC;AA1ED,kDAA0B;AAC1B,+CAAkF;AAClF,mFAA8D;AAE9D,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AAE;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,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,IAAI,CAAC;AAElE,SAAS,oBAAoB;IAC3B,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC1C,gBAAgB;QAChB,OAAO,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;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M;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"]}
|
package/build/useScreens.js
CHANGED
|
@@ -48,7 +48,7 @@ const Route_1 = require("./Route");
|
|
|
48
48
|
const storeContext_1 = require("./global-state/storeContext");
|
|
49
49
|
const import_mode_1 = __importDefault(require("./import-mode"));
|
|
50
50
|
const ZoomTransitionEnabler_1 = require("./link/zoom/ZoomTransitionEnabler");
|
|
51
|
-
const
|
|
51
|
+
const zoom_transition_context_providers_1 = require("./link/zoom/zoom-transition-context-providers");
|
|
52
52
|
const navigationParams_1 = require("./navigationParams");
|
|
53
53
|
const primitives_1 = require("./primitives");
|
|
54
54
|
const EmptyRoute_1 = require("./views/EmptyRoute");
|
|
@@ -224,14 +224,14 @@ function getQualifiedRouteComponent(value) {
|
|
|
224
224
|
}, [navigation]);
|
|
225
225
|
return (<Route_1.Route node={value} route={route}>
|
|
226
226
|
<ZoomTransitionEnabler_1.ZoomTransitionEnabler route={route}/>
|
|
227
|
-
<
|
|
227
|
+
<zoom_transition_context_providers_1.ZoomTransitionTargetContextProvider route={route}>
|
|
228
228
|
<react_1.default.Suspense fallback={<SuspenseFallback_1.SuspenseFallback route={value}/>}>
|
|
229
229
|
<ScreenComponent {...props}
|
|
230
230
|
// Expose the template segment path, e.g. `(home)`, `[foo]`, `index`
|
|
231
231
|
// the intention is to make it possible to deduce shared routes.
|
|
232
232
|
segment={value.route}/>
|
|
233
233
|
</react_1.default.Suspense>
|
|
234
|
-
</
|
|
234
|
+
</zoom_transition_context_providers_1.ZoomTransitionTargetContextProvider>
|
|
235
235
|
</Route_1.Route>);
|
|
236
236
|
}
|
|
237
237
|
if (__DEV__) {
|
package/build/useScreens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScreens.js","sourceRoot":"","sources":["../src/useScreens.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0Jb,4CAwBC;AAmDD,gEAkGC;AAED,oDAwBC;AAED,sCAcC;AAED,sCAaC;AA9XD,qDAOkC;AAElC,+CAAyC;AAEzC,mCAA6F;AAC7F,8DAAiE;AACjE,gEAAoD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AK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC;QACtE,CAAC;aAAM,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5D,OAAO,OAAO,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC;QAC3D,CAAC;aAAM,CAAC;YACN,OAAO,OAAO,CAAC;QACjB,CAAC;IACH,CAAC,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC","sourcesContent":["'use client';\n\nimport {\n useStateForPath,\n type EventMapBase,\n type NavigationState,\n type ParamListBase,\n type RouteProp,\n type ScreenListeners,\n} from '@react-navigation/native';\nimport type { NativeStackNavigationEventMap } from '@react-navigation/native-stack';\nimport React, { useEffect } from 'react';\n\nimport { LoadedRoute, Route, RouteNode, sortRoutesWithInitial, useRouteNode } from './Route';\nimport { useExpoRouterStore } from './global-state/storeContext';\nimport EXPO_ROUTER_IMPORT_MODE from './import-mode';\nimport { ZoomTransitionEnabler } from './link/zoom/ZoomTransitionEnabler';\nimport { ZoomTransitionTargetContextProvider } from './link/zoom/zoom-transition-context';\nimport {\n hasParam,\n INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME,\n removeParams,\n} from './navigationParams';\nimport { Screen } from './primitives';\nimport { UnknownOutputParams } from './types';\nimport { EmptyRoute } from './views/EmptyRoute';\nimport { SuspenseFallback } from './views/SuspenseFallback';\nimport { Try } from './views/Try';\n\nexport type ScreenProps<\n TOptions extends Record<string, any> = Record<string, any>,\n TState extends NavigationState = NavigationState,\n TEventMap extends EventMapBase = EventMapBase,\n> = {\n /** Name is required when used inside a Layout component. */\n name?: string;\n /**\n * Redirect to the nearest sibling route.\n * If all children are `redirect={true}`, the layout will render `null` as there are no children to render.\n */\n redirect?: boolean;\n initialParams?: Record<string, any>;\n options?:\n | TOptions\n | ((prop: { route: RouteProp<ParamListBase, string>; navigation: any }) => TOptions);\n\n listeners?:\n | ScreenListeners<TState, TEventMap>\n | ((prop: {\n route: RouteProp<ParamListBase, string>;\n navigation: any;\n }) => ScreenListeners<TState, TEventMap>);\n\n getId?: ({ params }: { params?: Record<string, any> }) => string | undefined;\n\n dangerouslySingular?: SingularOptions;\n};\n\nexport type SingularOptions =\n | boolean\n | ((name: string, params: UnknownOutputParams) => string | undefined);\n\nfunction getSortedChildren(\n children: RouteNode[],\n order: ScreenProps[] = [],\n initialRouteName?: string\n): { route: RouteNode; props: Partial<ScreenProps> }[] {\n if (!order?.length) {\n return children\n .sort(sortRoutesWithInitial(initialRouteName))\n .map((route) => ({ route, props: {} }));\n }\n const entries = [...children];\n\n const ordered = order\n .map(\n ({\n name,\n redirect,\n initialParams,\n listeners,\n options,\n getId,\n dangerouslySingular: singular,\n }) => {\n if (!entries.length) {\n console.warn(\n `[Layout children]: Too many screens defined. Route \"${name}\" is extraneous.`\n );\n return null;\n }\n const matchIndex = entries.findIndex((child) => child.route === name);\n if (matchIndex === -1) {\n console.warn(\n `[Layout children]: No route named \"${name}\" exists in nested children:`,\n children.map(({ route }) => route)\n );\n return null;\n } else {\n // Get match and remove from entries\n const match = entries[matchIndex];\n entries.splice(matchIndex, 1);\n\n // Ensure to return null after removing from entries.\n if (redirect) {\n if (typeof redirect === 'string') {\n throw new Error(`Redirecting to a specific route is not supported yet.`);\n }\n return null;\n }\n\n if (getId) {\n console.warn(\n `Deprecated: prop 'getId' on screen ${name} is deprecated. Please rename the prop to 'dangerouslySingular'`\n );\n if (singular) {\n console.warn(\n `Screen ${name} cannot use both getId and dangerouslySingular together.`\n );\n }\n } else if (singular) {\n // If singular is set, use it as the getId function.\n if (typeof singular === 'string') {\n getId = () => singular;\n } else if (typeof singular === 'function' && name) {\n getId = (options) => singular(name, options.params || {});\n } else if (singular === true && name) {\n getId = (options) => getSingularId(name, options);\n }\n }\n\n return {\n route: match,\n props: { initialParams, listeners, options, getId },\n };\n }\n }\n )\n .filter(Boolean) as {\n route: RouteNode;\n props: Partial<ScreenProps>;\n }[];\n\n // Add any remaining children\n ordered.push(\n ...entries.sort(sortRoutesWithInitial(initialRouteName)).map((route) => ({ route, props: {} }))\n );\n\n return ordered;\n}\n\n/**\n * @returns React Navigation screens sorted by the `route` property.\n */\nexport function useSortedScreens(\n order: ScreenProps[],\n protectedScreens: Set<string>,\n useOnlyUserDefinedScreens: boolean = false\n): React.ReactNode[] {\n const node = useRouteNode();\n\n const nodeChildren = node?.children ?? [];\n const children = useOnlyUserDefinedScreens\n ? nodeChildren.filter((child) =>\n order.some((userDefinedScreen) => userDefinedScreen.name === child.route)\n )\n : nodeChildren;\n\n const sorted = children.length ? getSortedChildren(children, order, node?.initialRouteName) : [];\n return React.useMemo(\n () =>\n sorted\n .filter((item) => !protectedScreens.has(item.route.route))\n .map((value) => {\n return routeToScreen(value.route, value.props);\n }),\n [sorted, protectedScreens]\n );\n}\n\nfunction fromImport(value: RouteNode, { ErrorBoundary, ...component }: LoadedRoute) {\n // If possible, add a more helpful display name for the component stack to improve debugging of React errors such as `Text strings must be rendered within a <Text> component.`.\n if (component?.default && __DEV__) {\n component.default.displayName ??= `${component.default.name ?? 'Route'}(${value.contextKey})`;\n }\n\n if (ErrorBoundary) {\n const Wrapped = React.forwardRef((props: any, ref: any) => {\n const children = React.createElement(component.default || EmptyRoute, {\n ...props,\n ref,\n });\n return <Try catch={ErrorBoundary}>{children}</Try>;\n });\n\n if (__DEV__) {\n Wrapped.displayName = `ErrorBoundary(${value.contextKey})`;\n }\n\n return {\n default: Wrapped,\n };\n }\n if (process.env.NODE_ENV !== 'production') {\n if (\n typeof component.default === 'object' &&\n component.default &&\n Object.keys(component.default).length === 0\n ) {\n return { default: EmptyRoute };\n }\n }\n\n return { default: component.default };\n}\n\nfunction fromLoadedRoute(value: RouteNode, res: LoadedRoute) {\n if (!(res instanceof Promise)) {\n return fromImport(value, res);\n }\n\n return res.then(fromImport.bind(null, value));\n}\n\n// TODO: Maybe there's a more React-y way to do this?\n// Without this store, the process enters a recursive loop.\nconst qualifiedStore = new WeakMap<RouteNode, React.ComponentType<any>>();\n\n/** Wrap the component with various enhancements and add access to child routes. */\nexport function getQualifiedRouteComponent(value: RouteNode) {\n if (qualifiedStore.has(value)) {\n return qualifiedStore.get(value)!;\n }\n\n let ScreenComponent:\n | React.ForwardRefExoticComponent<React.RefAttributes<unknown>>\n | React.ComponentType<any>;\n\n // TODO: This ensures sync doesn't use React.lazy, but it's not ideal.\n if (EXPO_ROUTER_IMPORT_MODE === 'lazy') {\n ScreenComponent = React.lazy(async () => {\n const res = value.loadRoute();\n return fromLoadedRoute(value, res) as Promise<{\n default: React.ComponentType<any>;\n }>;\n });\n\n if (__DEV__) {\n ScreenComponent.displayName = `AsyncRoute(${value.route})`;\n }\n } else {\n const res = value.loadRoute();\n ScreenComponent = fromImport(value, res).default!;\n }\n function BaseRoute({\n // Remove these React Navigation props to\n // enforce usage of expo-router hooks (where the query params are correct).\n route,\n navigation,\n\n // Pass all other props to the component\n ...props\n }: any) {\n const stateForPath = useStateForPath();\n const isFocused = navigation.isFocused();\n const store = useExpoRouterStore();\n\n if (isFocused) {\n const state = navigation.getState();\n const isLeaf = !('state' in state.routes[state.index]);\n if (isLeaf && stateForPath) store.setFocusedState(stateForPath);\n }\n\n useEffect(\n () =>\n navigation.addListener('focus', () => {\n const state = navigation.getState();\n const isLeaf = !('state' in state.routes[state.index]);\n // Because setFocusedState caches the route info, this call will only trigger rerenders\n // if the component itself didn’t rerender and the route info changed.\n // Otherwise, the update from the `if` above will handle it,\n // and this won’t cause a redundant second update.\n if (isLeaf && stateForPath) store.setFocusedState(stateForPath);\n }),\n [navigation]\n );\n\n useEffect(() => {\n return navigation.addListener(\n 'transitionEnd',\n (e?: NativeStackNavigationEventMap['transitionEnd']) => {\n if (!e?.data?.closing) {\n // When navigating to a screen, remove the no animation param to re-enable animations\n // Otherwise the navigation back would also have no animation\n if (hasParam(route?.params, INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME)) {\n navigation.replaceParams(\n removeParams(route?.params, [INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME])\n );\n }\n }\n }\n );\n }, [navigation]);\n\n return (\n <Route node={value} route={route}>\n <ZoomTransitionEnabler route={route} />\n <ZoomTransitionTargetContextProvider route={route}>\n <React.Suspense fallback={<SuspenseFallback route={value} />}>\n <ScreenComponent\n {...props}\n // Expose the template segment path, e.g. `(home)`, `[foo]`, `index`\n // the intention is to make it possible to deduce shared routes.\n segment={value.route}\n />\n </React.Suspense>\n </ZoomTransitionTargetContextProvider>\n </Route>\n );\n }\n\n if (__DEV__) {\n BaseRoute.displayName = `Route(${value.route})`;\n }\n\n qualifiedStore.set(value, BaseRoute);\n return BaseRoute;\n}\n\nexport function screenOptionsFactory(\n route: RouteNode,\n options?: ScreenProps['options']\n): ScreenProps['options'] {\n return (args) => {\n // Only eager load generated components\n const staticOptions = route.generated ? route.loadRoute()?.getNavOptions : null;\n const staticResult = typeof staticOptions === 'function' ? staticOptions(args) : staticOptions;\n const dynamicResult = typeof options === 'function' ? options?.(args) : options;\n const output = {\n ...staticResult,\n ...dynamicResult,\n };\n\n // Prevent generated screens from showing up in the tab bar.\n if (route.internal) {\n output.tabBarItemStyle = { display: 'none' };\n output.tabBarButton = () => null;\n // TODO: React Navigation doesn't provide a way to prevent rendering the drawer item.\n output.drawerItemStyle = { height: 0, display: 'none' };\n }\n\n return output;\n };\n}\n\nexport function routeToScreen(\n route: RouteNode,\n { options, getId, ...props }: Partial<ScreenProps> = {}\n) {\n return (\n <Screen\n {...props}\n name={route.route}\n key={route.route}\n getId={getId}\n options={screenOptionsFactory(route, options)}\n getComponent={() => getQualifiedRouteComponent(route)}\n />\n );\n}\n\nexport function getSingularId(name: string, options: Record<string, any> = {}) {\n return name\n .split('/')\n .map((segment) => {\n if (segment.startsWith('[...')) {\n return options.params?.[segment.slice(4, -1)]?.join('/') || segment;\n } else if (segment.startsWith('[') && segment.endsWith(']')) {\n return options.params?.[segment.slice(1, -1)] || segment;\n } else {\n return segment;\n }\n })\n .join('/');\n}\n"]}
|
|
1
|
+
{"version":3,"file":"useScreens.js","sourceRoot":"","sources":["../src/useScreens.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0Jb,4CAwBC;AAmDD,gEAkGC;AAED,oDAwBC;AAED,sCAcC;AAED,sCAaC;AA9XD,qDAOkC;AAElC,+CAAyC;AAEzC,mCAA6F;AAC7F,8DAAiE;AACjE,gEAAoD;AACpD,6EAA0E;AAC1E,qGAAoG;AACpG,yDAI4B;AAC5B,6CAAsC;AAEtC,mDAAgD;AAChD,+DAA4D;AAC5D,qCAAkC;AAmClC,SAAS,iBAAiB,CACxB,QAAqB,EACrB,QAAuB,EAAE,EACzB,gBAAyB;IAEzB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,QAAQ;aACZ,IAAI,CAAC,IAAA,6BAAqB,EAAC,gBAAgB,CAAC,CAAC;aAC7C,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC;IACD,MAAM,OAAO,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC;IAE9B,MAAM,OAAO,GAAG,KAAK;SAClB,GAAG,CACF,CAAC,EACC,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,SAAS,EACT,OAAO,EACP,KAAK,EACL,mBAAmB,EAAE,QAAQ,GAC9B,EAAE,EAAE;QACH,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;YACpB,OAAO,CAAC,IAAI,CACV,uDAAuD,IAAI,kBAAkB,CAC9E,CAAC;YACF,OAAO,IAAI,C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C,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAC9C,YAAY,CAAC,CAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,EACtD,CACH,CAAC;AACJ,CAAC;AAED,SAAgB,aAAa,CAAC,IAAY,EAAE,UAA+B,EAAE;IAC3E,OAAO,IAAI;SACR,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QACf,IAAI,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC/B,OAAO,OAAO,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC;QACtE,CAAC;aAAM,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5D,OAAO,OAAO,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC;QAC3D,CAAC;aAAM,CAAC;YACN,OAAO,OAAO,CAAC;QACjB,CAAC;IACH,CAAC,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC","sourcesContent":["'use client';\n\nimport {\n useStateForPath,\n type EventMapBase,\n type NavigationState,\n type ParamListBase,\n type RouteProp,\n type ScreenListeners,\n} from '@react-navigation/native';\nimport type { NativeStackNavigationEventMap } from '@react-navigation/native-stack';\nimport React, { useEffect } from 'react';\n\nimport { LoadedRoute, Route, RouteNode, sortRoutesWithInitial, useRouteNode } from './Route';\nimport { useExpoRouterStore } from './global-state/storeContext';\nimport EXPO_ROUTER_IMPORT_MODE from './import-mode';\nimport { ZoomTransitionEnabler } from './link/zoom/ZoomTransitionEnabler';\nimport { ZoomTransitionTargetContextProvider } from './link/zoom/zoom-transition-context-providers';\nimport {\n hasParam,\n INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME,\n removeParams,\n} from './navigationParams';\nimport { Screen } from './primitives';\nimport { UnknownOutputParams } from './types';\nimport { EmptyRoute } from './views/EmptyRoute';\nimport { SuspenseFallback } from './views/SuspenseFallback';\nimport { Try } from './views/Try';\n\nexport type ScreenProps<\n TOptions extends Record<string, any> = Record<string, any>,\n TState extends NavigationState = NavigationState,\n TEventMap extends EventMapBase = EventMapBase,\n> = {\n /** Name is required when used inside a Layout component. */\n name?: string;\n /**\n * Redirect to the nearest sibling route.\n * If all children are `redirect={true}`, the layout will render `null` as there are no children to render.\n */\n redirect?: boolean;\n initialParams?: Record<string, any>;\n options?:\n | TOptions\n | ((prop: { route: RouteProp<ParamListBase, string>; navigation: any }) => TOptions);\n\n listeners?:\n | ScreenListeners<TState, TEventMap>\n | ((prop: {\n route: RouteProp<ParamListBase, string>;\n navigation: any;\n }) => ScreenListeners<TState, TEventMap>);\n\n getId?: ({ params }: { params?: Record<string, any> }) => string | undefined;\n\n dangerouslySingular?: SingularOptions;\n};\n\nexport type SingularOptions =\n | boolean\n | ((name: string, params: UnknownOutputParams) => string | undefined);\n\nfunction getSortedChildren(\n children: RouteNode[],\n order: ScreenProps[] = [],\n initialRouteName?: string\n): { route: RouteNode; props: Partial<ScreenProps> }[] {\n if (!order?.length) {\n return children\n .sort(sortRoutesWithInitial(initialRouteName))\n .map((route) => ({ route, props: {} }));\n }\n const entries = [...children];\n\n const ordered = order\n .map(\n ({\n name,\n redirect,\n initialParams,\n listeners,\n options,\n getId,\n dangerouslySingular: singular,\n }) => {\n if (!entries.length) {\n console.warn(\n `[Layout children]: Too many screens defined. Route \"${name}\" is extraneous.`\n );\n return null;\n }\n const matchIndex = entries.findIndex((child) => child.route === name);\n if (matchIndex === -1) {\n console.warn(\n `[Layout children]: No route named \"${name}\" exists in nested children:`,\n children.map(({ route }) => route)\n );\n return null;\n } else {\n // Get match and remove from entries\n const match = entries[matchIndex];\n entries.splice(matchIndex, 1);\n\n // Ensure to return null after removing from entries.\n if (redirect) {\n if (typeof redirect === 'string') {\n throw new Error(`Redirecting to a specific route is not supported yet.`);\n }\n return null;\n }\n\n if (getId) {\n console.warn(\n `Deprecated: prop 'getId' on screen ${name} is deprecated. Please rename the prop to 'dangerouslySingular'`\n );\n if (singular) {\n console.warn(\n `Screen ${name} cannot use both getId and dangerouslySingular together.`\n );\n }\n } else if (singular) {\n // If singular is set, use it as the getId function.\n if (typeof singular === 'string') {\n getId = () => singular;\n } else if (typeof singular === 'function' && name) {\n getId = (options) => singular(name, options.params || {});\n } else if (singular === true && name) {\n getId = (options) => getSingularId(name, options);\n }\n }\n\n return {\n route: match,\n props: { initialParams, listeners, options, getId },\n };\n }\n }\n )\n .filter(Boolean) as {\n route: RouteNode;\n props: Partial<ScreenProps>;\n }[];\n\n // Add any remaining children\n ordered.push(\n ...entries.sort(sortRoutesWithInitial(initialRouteName)).map((route) => ({ route, props: {} }))\n );\n\n return ordered;\n}\n\n/**\n * @returns React Navigation screens sorted by the `route` property.\n */\nexport function useSortedScreens(\n order: ScreenProps[],\n protectedScreens: Set<string>,\n useOnlyUserDefinedScreens: boolean = false\n): React.ReactNode[] {\n const node = useRouteNode();\n\n const nodeChildren = node?.children ?? [];\n const children = useOnlyUserDefinedScreens\n ? nodeChildren.filter((child) =>\n order.some((userDefinedScreen) => userDefinedScreen.name === child.route)\n )\n : nodeChildren;\n\n const sorted = children.length ? getSortedChildren(children, order, node?.initialRouteName) : [];\n return React.useMemo(\n () =>\n sorted\n .filter((item) => !protectedScreens.has(item.route.route))\n .map((value) => {\n return routeToScreen(value.route, value.props);\n }),\n [sorted, protectedScreens]\n );\n}\n\nfunction fromImport(value: RouteNode, { ErrorBoundary, ...component }: LoadedRoute) {\n // If possible, add a more helpful display name for the component stack to improve debugging of React errors such as `Text strings must be rendered within a <Text> component.`.\n if (component?.default && __DEV__) {\n component.default.displayName ??= `${component.default.name ?? 'Route'}(${value.contextKey})`;\n }\n\n if (ErrorBoundary) {\n const Wrapped = React.forwardRef((props: any, ref: any) => {\n const children = React.createElement(component.default || EmptyRoute, {\n ...props,\n ref,\n });\n return <Try catch={ErrorBoundary}>{children}</Try>;\n });\n\n if (__DEV__) {\n Wrapped.displayName = `ErrorBoundary(${value.contextKey})`;\n }\n\n return {\n default: Wrapped,\n };\n }\n if (process.env.NODE_ENV !== 'production') {\n if (\n typeof component.default === 'object' &&\n component.default &&\n Object.keys(component.default).length === 0\n ) {\n return { default: EmptyRoute };\n }\n }\n\n return { default: component.default };\n}\n\nfunction fromLoadedRoute(value: RouteNode, res: LoadedRoute) {\n if (!(res instanceof Promise)) {\n return fromImport(value, res);\n }\n\n return res.then(fromImport.bind(null, value));\n}\n\n// TODO: Maybe there's a more React-y way to do this?\n// Without this store, the process enters a recursive loop.\nconst qualifiedStore = new WeakMap<RouteNode, React.ComponentType<any>>();\n\n/** Wrap the component with various enhancements and add access to child routes. */\nexport function getQualifiedRouteComponent(value: RouteNode) {\n if (qualifiedStore.has(value)) {\n return qualifiedStore.get(value)!;\n }\n\n let ScreenComponent:\n | React.ForwardRefExoticComponent<React.RefAttributes<unknown>>\n | React.ComponentType<any>;\n\n // TODO: This ensures sync doesn't use React.lazy, but it's not ideal.\n if (EXPO_ROUTER_IMPORT_MODE === 'lazy') {\n ScreenComponent = React.lazy(async () => {\n const res = value.loadRoute();\n return fromLoadedRoute(value, res) as Promise<{\n default: React.ComponentType<any>;\n }>;\n });\n\n if (__DEV__) {\n ScreenComponent.displayName = `AsyncRoute(${value.route})`;\n }\n } else {\n const res = value.loadRoute();\n ScreenComponent = fromImport(value, res).default!;\n }\n function BaseRoute({\n // Remove these React Navigation props to\n // enforce usage of expo-router hooks (where the query params are correct).\n route,\n navigation,\n\n // Pass all other props to the component\n ...props\n }: any) {\n const stateForPath = useStateForPath();\n const isFocused = navigation.isFocused();\n const store = useExpoRouterStore();\n\n if (isFocused) {\n const state = navigation.getState();\n const isLeaf = !('state' in state.routes[state.index]);\n if (isLeaf && stateForPath) store.setFocusedState(stateForPath);\n }\n\n useEffect(\n () =>\n navigation.addListener('focus', () => {\n const state = navigation.getState();\n const isLeaf = !('state' in state.routes[state.index]);\n // Because setFocusedState caches the route info, this call will only trigger rerenders\n // if the component itself didn’t rerender and the route info changed.\n // Otherwise, the update from the `if` above will handle it,\n // and this won’t cause a redundant second update.\n if (isLeaf && stateForPath) store.setFocusedState(stateForPath);\n }),\n [navigation]\n );\n\n useEffect(() => {\n return navigation.addListener(\n 'transitionEnd',\n (e?: NativeStackNavigationEventMap['transitionEnd']) => {\n if (!e?.data?.closing) {\n // When navigating to a screen, remove the no animation param to re-enable animations\n // Otherwise the navigation back would also have no animation\n if (hasParam(route?.params, INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME)) {\n navigation.replaceParams(\n removeParams(route?.params, [INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME])\n );\n }\n }\n }\n );\n }, [navigation]);\n\n return (\n <Route node={value} route={route}>\n <ZoomTransitionEnabler route={route} />\n <ZoomTransitionTargetContextProvider route={route}>\n <React.Suspense fallback={<SuspenseFallback route={value} />}>\n <ScreenComponent\n {...props}\n // Expose the template segment path, e.g. `(home)`, `[foo]`, `index`\n // the intention is to make it possible to deduce shared routes.\n segment={value.route}\n />\n </React.Suspense>\n </ZoomTransitionTargetContextProvider>\n </Route>\n );\n }\n\n if (__DEV__) {\n BaseRoute.displayName = `Route(${value.route})`;\n }\n\n qualifiedStore.set(value, BaseRoute);\n return BaseRoute;\n}\n\nexport function screenOptionsFactory(\n route: RouteNode,\n options?: ScreenProps['options']\n): ScreenProps['options'] {\n return (args) => {\n // Only eager load generated components\n const staticOptions = route.generated ? route.loadRoute()?.getNavOptions : null;\n const staticResult = typeof staticOptions === 'function' ? staticOptions(args) : staticOptions;\n const dynamicResult = typeof options === 'function' ? options?.(args) : options;\n const output = {\n ...staticResult,\n ...dynamicResult,\n };\n\n // Prevent generated screens from showing up in the tab bar.\n if (route.internal) {\n output.tabBarItemStyle = { display: 'none' };\n output.tabBarButton = () => null;\n // TODO: React Navigation doesn't provide a way to prevent rendering the drawer item.\n output.drawerItemStyle = { height: 0, display: 'none' };\n }\n\n return output;\n };\n}\n\nexport function routeToScreen(\n route: RouteNode,\n { options, getId, ...props }: Partial<ScreenProps> = {}\n) {\n return (\n <Screen\n {...props}\n name={route.route}\n key={route.route}\n getId={getId}\n options={screenOptionsFactory(route, options)}\n getComponent={() => getQualifiedRouteComponent(route)}\n />\n );\n}\n\nexport function getSingularId(name: string, options: Record<string, any> = {}) {\n return name\n .split('/')\n .map((segment) => {\n if (segment.startsWith('[...')) {\n return options.params?.[segment.slice(4, -1)]?.join('/') || segment;\n } else if (segment.startsWith('[') && segment.endsWith(']')) {\n return options.params?.[segment.slice(1, -1)] || segment;\n } else {\n return segment;\n }\n })\n .join('/');\n}\n"]}
|
package/expo-module.config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "expo.modules.router",
|
|
5
5
|
"module": "expo.modules.router",
|
|
6
|
-
"version": "7.0.0-canary-
|
|
6
|
+
"version": "7.0.0-canary-20251212-acb11f2",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.router-7.0.0-canary-
|
|
28
|
-
"url": "expo.modules.router-7.0.0-canary-
|
|
27
|
+
"name": "expo.modules.router-7.0.0-canary-20251212-acb11f2.aar",
|
|
28
|
+
"url": "expo.modules.router-7.0.0-canary-20251212-acb11f2.aar",
|
|
29
29
|
"size": 13671,
|
|
30
30
|
"sha512": "f51bd2a6d3fcc9075dbf99d66f77162d530586d0793d68e109a55f6edfbe4ff98bc9c9c5d587d0feec99807b6ae94a729232000e89f840278b21f4d423caa520",
|
|
31
31
|
"sha256": "089d182f36875a201ad1b30b44d39812cd5155af987f3d33cd5eef8542103c82",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
],
|
|
61
61
|
"files": [
|
|
62
62
|
{
|
|
63
|
-
"name": "expo.modules.router-7.0.0-canary-
|
|
64
|
-
"url": "expo.modules.router-7.0.0-canary-
|
|
63
|
+
"name": "expo.modules.router-7.0.0-canary-20251212-acb11f2.aar",
|
|
64
|
+
"url": "expo.modules.router-7.0.0-canary-20251212-acb11f2.aar",
|
|
65
65
|
"size": 13671,
|
|
66
66
|
"sha512": "f51bd2a6d3fcc9075dbf99d66f77162d530586d0793d68e109a55f6edfbe4ff98bc9c9c5d587d0feec99807b6ae94a729232000e89f840278b21f4d423caa520",
|
|
67
67
|
"sha256": "089d182f36875a201ad1b30b44d39812cd5155af987f3d33cd5eef8542103c82",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
},
|
|
81
81
|
"files": [
|
|
82
82
|
{
|
|
83
|
-
"name": "expo.modules.router-7.0.0-canary-
|
|
84
|
-
"url": "expo.modules.router-7.0.0-canary-
|
|
83
|
+
"name": "expo.modules.router-7.0.0-canary-20251212-acb11f2-sources.jar",
|
|
84
|
+
"url": "expo.modules.router-7.0.0-canary-20251212-acb11f2-sources.jar",
|
|
85
85
|
"size": 2318,
|
|
86
86
|
"sha512": "9864add8e93e3c0a9a9c930aaed67016b15054c3fafd59a0bd3a5402d7cdc5827be84c22c2c137f3e5acb4e39270d9bfb9ca3fe11234458d4f2e0d4c78747f48",
|
|
87
87
|
"sha256": "d5dff6259e86de721fc0f07fe740a5e18088e19b76738719b0a6f94caef06224",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
63799c2588bcab02f32e7f36d8da2f59
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6e3a50bfc261ac93dbeeaea71385e108dfe28145
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
178b09b7f1ee9b8e76cded79d7e6bc3aebe1e0dc44890c10ea092578aba53a42
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1c51124e4dff9122ca6e2f9841a2ef7c6a5642e874a49fbe127a056b77acf5592ed2dfc49d0edcc6ee36024ac519f37401c72024ea1032e930c6531dce5813dd
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>expo.modules.router</groupId>
|
|
11
11
|
<artifactId>expo.modules.router</artifactId>
|
|
12
|
-
<version>7.0.0-canary-
|
|
12
|
+
<version>7.0.0-canary-20251212-acb11f2</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.router</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1ae40958c4c97d79e497a07caaa9c564
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d5c967ca56caf7af963aeba0b6225a51de2545b5
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9f59a92438de015917762757c73db2320369aa989a0c56bc04d5e3dd505f93af
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
15b6d757c52ad72cabc16dbb12c90ba9071ca71942dcbe0b7521af0fd84380a9591c1f987c75badc416cbebee446aa5ea65e99ca6ff492598d389f56d3c01719
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>expo.modules.router</groupId>
|
|
4
4
|
<artifactId>expo.modules.router</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>7.0.0-canary-
|
|
7
|
-
<release>7.0.0-canary-
|
|
6
|
+
<latest>7.0.0-canary-20251212-acb11f2</latest>
|
|
7
|
+
<release>7.0.0-canary-20251212-acb11f2</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>7.0.0-canary-
|
|
9
|
+
<version>7.0.0-canary-20251212-acb11f2</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20251212085744</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
c95eebefc801b91bbb5ef2d1a05e60cb
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
20d756935a24a0cafc35173ff678bc21ed933bc4
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
9680ebbdc7b5c576e9e5d7c9be67280423918a827180d04401df75717fc28c90
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
f9b4a239b8ee09f92b8add4acebb402edf663a90c4a13f387051c4c407142339d070e62a344baff2b1ccaf8f8a464157798b92c49d4cf64b85ada473846d3465
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-router",
|
|
3
|
-
"version": "7.0.0-canary-
|
|
3
|
+
"version": "7.0.0-canary-20251212-acb11f2",
|
|
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",
|
|
@@ -83,14 +83,14 @@
|
|
|
83
83
|
"expo"
|
|
84
84
|
],
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"@expo/metro-runtime": "6.2.0-canary-
|
|
87
|
-
"@expo/log-box": "0.0.13-canary-
|
|
86
|
+
"@expo/metro-runtime": "6.2.0-canary-20251212-acb11f2",
|
|
87
|
+
"@expo/log-box": "0.0.13-canary-20251212-acb11f2",
|
|
88
88
|
"@react-navigation/drawer": "^7.7.2",
|
|
89
89
|
"@testing-library/react-native": ">= 12.0.0",
|
|
90
|
-
"expo": "55.0.0-canary-
|
|
91
|
-
"expo-constants": "18.1.0-canary-
|
|
92
|
-
"expo-linking": "8.0.11-canary-
|
|
93
|
-
"expo-symbols": "1.1.0-canary-
|
|
90
|
+
"expo": "55.0.0-canary-20251212-acb11f2",
|
|
91
|
+
"expo-constants": "18.1.0-canary-20251212-acb11f2",
|
|
92
|
+
"expo-linking": "8.0.11-canary-20251212-acb11f2",
|
|
93
|
+
"expo-symbols": "1.1.0-canary-20251212-acb11f2",
|
|
94
94
|
"react": "*",
|
|
95
95
|
"react-dom": "*",
|
|
96
96
|
"react-native": "*",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"react-native-safe-area-context": ">= 5.4.0",
|
|
100
100
|
"react-native-screens": "*",
|
|
101
101
|
"react-native-web": "*",
|
|
102
|
-
"react-server-dom-webpack": "~19.0.
|
|
102
|
+
"react-server-dom-webpack": "~19.0.3 || ~19.1.4 || ~19.2.3"
|
|
103
103
|
},
|
|
104
104
|
"peerDependenciesMeta": {
|
|
105
105
|
"@testing-library/react-native": {
|
|
@@ -132,11 +132,11 @@
|
|
|
132
132
|
"@types/react-dom": "^19.1.7",
|
|
133
133
|
"@types/semver": "^7.7.0",
|
|
134
134
|
"immer": "^10.1.1",
|
|
135
|
-
"react-server-dom-webpack": "~19.0.
|
|
135
|
+
"react-server-dom-webpack": "~19.0.3"
|
|
136
136
|
},
|
|
137
137
|
"dependencies": {
|
|
138
|
-
"@expo/metro-runtime": "6.2.0-canary-
|
|
139
|
-
"@expo/schema-utils": "0.1.9-canary-
|
|
138
|
+
"@expo/metro-runtime": "6.2.0-canary-20251212-acb11f2",
|
|
139
|
+
"@expo/schema-utils": "0.1.9-canary-20251212-acb11f2",
|
|
140
140
|
"@radix-ui/react-slot": "1.2.0",
|
|
141
141
|
"@radix-ui/react-tabs": "^1.1.12",
|
|
142
142
|
"@react-navigation/bottom-tabs": "^7.7.3",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"client-only": "^0.0.1",
|
|
146
146
|
"debug": "^4.3.4",
|
|
147
147
|
"escape-string-regexp": "^4.0.0",
|
|
148
|
-
"expo-server": "1.0.6-canary-
|
|
148
|
+
"expo-server": "1.0.6-canary-20251212-acb11f2",
|
|
149
149
|
"fast-deep-equal": "^3.1.3",
|
|
150
150
|
"invariant": "^2.2.4",
|
|
151
151
|
"nanoid": "^3.3.8",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { LinkProps } from '../useLinkHooks';
|
|
2
|
-
export declare function useZoomTransitionPrimitives({ href }: LinkProps): {
|
|
3
|
-
zoomTransitionSourceContextValue: undefined;
|
|
4
|
-
href: string | import("../..").HrefObject;
|
|
5
|
-
};
|
|
6
|
-
//# sourceMappingURL=useZoomTransitionPrimitives.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useZoomTransitionPrimitives.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/useZoomTransitionPrimitives.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,wBAAgB,2BAA2B,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;;;EAG9D"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { LinkProps } from '../useLinkHooks';
|
|
2
|
-
export declare function useZoomTransitionPrimitives({ href, asChild }: LinkProps): {
|
|
3
|
-
zoomTransitionSourceContextValue: {
|
|
4
|
-
identifier: string;
|
|
5
|
-
addSource: () => void;
|
|
6
|
-
removeSource: () => void;
|
|
7
|
-
canAddSource: boolean;
|
|
8
|
-
} | undefined;
|
|
9
|
-
href: string | import("../..").HrefObject;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=useZoomTransitionPrimitives.ios.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useZoomTransitionPrimitives.ios.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/useZoomTransitionPrimitives.ios.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,wBAAgB,2BAA2B,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,SAAS;;;;;;;;EAuEvE"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.useZoomTransitionPrimitives = useZoomTransitionPrimitives;
|
|
5
|
-
const non_secure_1 = require("nanoid/non-secure");
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const ZoomTransitionEnabler_1 = require("./ZoomTransitionEnabler");
|
|
8
|
-
const navigationParams_1 = require("../../navigationParams");
|
|
9
|
-
const url_1 = require("../../utils/url");
|
|
10
|
-
const PreviewRouteContext_1 = require("../preview/PreviewRouteContext");
|
|
11
|
-
function useZoomTransitionPrimitives({ href, asChild }) {
|
|
12
|
-
const isPreview = (0, PreviewRouteContext_1.useIsPreview)();
|
|
13
|
-
const zoomTransitionId = (0, react_1.useMemo)(() => !isPreview && process.env.EXPO_OS === 'ios' && (0, ZoomTransitionEnabler_1.isZoomTransitionEnabled)()
|
|
14
|
-
? (0, non_secure_1.nanoid)()
|
|
15
|
-
: undefined, []);
|
|
16
|
-
const [numberOfSources, setNumberOfSources] = (0, react_1.useState)(0);
|
|
17
|
-
const addSource = (0, react_1.useCallback)(() => {
|
|
18
|
-
setNumberOfSources((prev) => prev + 1);
|
|
19
|
-
}, []);
|
|
20
|
-
const removeSource = (0, react_1.useCallback)(() => {
|
|
21
|
-
setNumberOfSources((prev) => prev - 1);
|
|
22
|
-
}, []);
|
|
23
|
-
const hasZoomSource = numberOfSources > 0;
|
|
24
|
-
(0, react_1.useEffect)(() => {
|
|
25
|
-
if (numberOfSources > 1) {
|
|
26
|
-
throw new Error('[expo-router] Only one Link.ZoomTransitionSource can be used within a single Link component.');
|
|
27
|
-
}
|
|
28
|
-
}, [numberOfSources]);
|
|
29
|
-
(0, react_1.useEffect)(() => {
|
|
30
|
-
if (hasZoomSource && !asChild) {
|
|
31
|
-
console.warn('[expo-router] Using zoom transition links without `asChild` prop may lead to unexpected behavior. Please ensure to set `asChild` when using zoom transitions.');
|
|
32
|
-
}
|
|
33
|
-
}, [hasZoomSource, asChild]);
|
|
34
|
-
const zoomTransitionSourceContextValue = (0, react_1.useMemo)(() => {
|
|
35
|
-
if (!zoomTransitionId) {
|
|
36
|
-
return undefined;
|
|
37
|
-
}
|
|
38
|
-
return {
|
|
39
|
-
identifier: zoomTransitionId,
|
|
40
|
-
addSource,
|
|
41
|
-
removeSource,
|
|
42
|
-
canAddSource: !hasZoomSource,
|
|
43
|
-
};
|
|
44
|
-
}, [zoomTransitionId, addSource, removeSource, hasZoomSource]);
|
|
45
|
-
const computedHref = (0, react_1.useMemo)(() => {
|
|
46
|
-
if (!hasZoomSource || !zoomTransitionId) {
|
|
47
|
-
return href;
|
|
48
|
-
}
|
|
49
|
-
if (typeof href === 'string') {
|
|
50
|
-
const { pathname, searchParams } = (0, url_1.parseUrlUsingCustomBase)(href);
|
|
51
|
-
return {
|
|
52
|
-
pathname,
|
|
53
|
-
params: {
|
|
54
|
-
...Object.fromEntries(searchParams.entries()),
|
|
55
|
-
[navigationParams_1.INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME]: zoomTransitionId,
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
return {
|
|
60
|
-
pathname: href.pathname,
|
|
61
|
-
params: {
|
|
62
|
-
...(href.params ?? {}),
|
|
63
|
-
[navigationParams_1.INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME]: zoomTransitionId,
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
}, [href, zoomTransitionId, hasZoomSource]);
|
|
67
|
-
return { zoomTransitionSourceContextValue, href: computedHref };
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=useZoomTransitionPrimitives.ios.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useZoomTransitionPrimitives.ios.js","sourceRoot":"","sources":["../../../src/link/zoom/useZoomTransitionPrimitives.ios.tsx"],"names":[],"mappings":";AAAA,YAA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client';\n\nimport { nanoid } from 'nanoid/non-secure';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { isZoomTransitionEnabled } from './ZoomTransitionEnabler';\nimport { INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME } from '../../navigationParams';\nimport { parseUrlUsingCustomBase } from '../../utils/url';\nimport { useIsPreview } from '../preview/PreviewRouteContext';\nimport { LinkProps } from '../useLinkHooks';\n\nexport function useZoomTransitionPrimitives({ href, asChild }: LinkProps) {\n const isPreview = useIsPreview();\n const zoomTransitionId = useMemo(\n () =>\n !isPreview && process.env.EXPO_OS === 'ios' && isZoomTransitionEnabled()\n ? nanoid()\n : undefined,\n []\n );\n\n const [numberOfSources, setNumberOfSources] = useState(0);\n const addSource = useCallback(() => {\n setNumberOfSources((prev) => prev + 1);\n }, []);\n const removeSource = useCallback(() => {\n setNumberOfSources((prev) => prev - 1);\n }, []);\n\n const hasZoomSource = numberOfSources > 0;\n\n useEffect(() => {\n if (numberOfSources > 1) {\n throw new Error(\n '[expo-router] Only one Link.ZoomTransitionSource can be used within a single Link component.'\n );\n }\n }, [numberOfSources]);\n\n useEffect(() => {\n if (hasZoomSource && !asChild) {\n console.warn(\n '[expo-router] Using zoom transition links without `asChild` prop may lead to unexpected behavior. Please ensure to set `asChild` when using zoom transitions.'\n );\n }\n }, [hasZoomSource, asChild]);\n\n const zoomTransitionSourceContextValue = useMemo(() => {\n if (!zoomTransitionId) {\n return undefined;\n }\n return {\n identifier: zoomTransitionId,\n addSource,\n removeSource,\n canAddSource: !hasZoomSource,\n };\n }, [zoomTransitionId, addSource, removeSource, hasZoomSource]);\n\n const computedHref = useMemo(() => {\n if (!hasZoomSource || !zoomTransitionId) {\n return href;\n }\n if (typeof href === 'string') {\n const { pathname, searchParams } = parseUrlUsingCustomBase(href);\n return {\n pathname,\n params: {\n ...Object.fromEntries(searchParams.entries()),\n [INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME]: zoomTransitionId,\n },\n };\n }\n return {\n pathname: href.pathname,\n params: {\n ...(href.params ?? {}),\n [INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME]: zoomTransitionId,\n },\n };\n }, [href, zoomTransitionId, hasZoomSource]);\n return { zoomTransitionSourceContextValue, href: computedHref };\n}\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.useZoomTransitionPrimitives = useZoomTransitionPrimitives;
|
|
5
|
-
function useZoomTransitionPrimitives({ href }) {
|
|
6
|
-
const zoomTransitionSourceContextValue = undefined;
|
|
7
|
-
return { zoomTransitionSourceContextValue, href };
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=useZoomTransitionPrimitives.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useZoomTransitionPrimitives.js","sourceRoot":"","sources":["../../../src/link/zoom/useZoomTransitionPrimitives.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAKb,kEAGC;AAHD,SAAgB,2BAA2B,CAAC,EAAE,IAAI,EAAa;IAC7D,MAAM,gCAAgC,GAAyC,SAAS,CAAC;IACzF,OAAO,EAAE,gCAAgC,EAAE,IAAI,EAAE,CAAC;AACpD,CAAC","sourcesContent":["'use client';\n\nimport { LinkProps } from '../useLinkHooks';\nimport type { ZoomTransitionSourceContextValueType } from './zoom-transition-context';\n\nexport function useZoomTransitionPrimitives({ href }: LinkProps) {\n const zoomTransitionSourceContextValue: ZoomTransitionSourceContextValueType = undefined;\n return { zoomTransitionSourceContextValue, href };\n}\n"]}
|
|
@@ -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
|
-
0bb6c53d7bf6c5877348b10e5a12c204
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9f9752ad577e8d537588e0ac11a9787abc660592
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5d3f207f18d97552b98aec6f8d3be4f2d8d79a86d1cf4ce5510846802cab9461
|