expo-router 58.0.4 → 58.0.6
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/ExpoRoot.d.ts +1 -1
- package/build/LocaleProvider.d.ts +1 -1
- package/build/Route.d.ts +1 -1
- package/build/exports.d.ts +1 -1
- package/build/exports.js.map +1 -1
- package/build/fork/native-stack/NativeStackView.d.ts +1 -1
- package/build/fork/native-stack/usePreviewTransition.js +12 -21
- package/build/fork/native-stack/usePreviewTransition.js.map +1 -1
- package/build/fork/useComponent.d.ts +1 -1
- package/build/fork/useLinking.d.ts +1 -1
- package/build/fork/useLinking.js +1 -261
- package/build/fork/useLinking.js.map +1 -1
- package/build/global-state/BrowserHistorySync.d.ts +4 -0
- package/build/global-state/BrowserHistorySync.js +34 -0
- package/build/global-state/BrowserHistorySync.js.map +1 -0
- package/build/global-state/RoutingQueueDrainer.js +0 -4
- package/build/global-state/RoutingQueueDrainer.js.map +1 -1
- package/build/global-state/browserHistory.d.ts +20 -0
- package/build/global-state/browserHistory.js +267 -0
- package/build/global-state/browserHistory.js.map +1 -0
- package/build/global-state/browserHistory.native.d.ts +8 -0
- package/build/global-state/browserHistory.native.js +57 -0
- package/build/global-state/browserHistory.native.js.map +1 -0
- package/build/global-state/browserHistory.types.d.ts +56 -0
- package/build/global-state/browserHistory.types.js +6 -0
- package/build/global-state/browserHistory.types.js.map +1 -0
- package/build/global-state/browserHistoryAdapter.d.ts +6 -0
- package/build/global-state/browserHistoryAdapter.js +115 -0
- package/build/global-state/browserHistoryAdapter.js.map +1 -0
- package/build/global-state/browserHistoryAdapter.native.d.ts +2 -0
- package/build/global-state/browserHistoryAdapter.native.js +18 -0
- package/build/global-state/browserHistoryAdapter.native.js.map +1 -0
- package/build/global-state/getNavigationAction.d.ts +1 -1
- package/build/global-state/getNavigationAction.js +8 -6
- package/build/global-state/getNavigationAction.js.map +1 -1
- package/build/global-state/getPathForState.d.ts +12 -0
- package/build/global-state/getPathForState.js +63 -0
- package/build/global-state/getPathForState.js.map +1 -0
- package/build/global-state/reduceNavigationTree.d.ts +3 -1
- package/build/global-state/reduceNavigationTree.js +15 -3
- package/build/global-state/reduceNavigationTree.js.map +1 -1
- package/build/global-state/removalPrevention.d.ts +2 -2
- package/build/global-state/resolveNavigationDestination.d.ts +1 -0
- package/build/global-state/resolveNavigationDestination.js +6 -3
- package/build/global-state/resolveNavigationDestination.js.map +1 -1
- package/build/global-state/routerRegistry.d.ts +2 -1
- package/build/global-state/routerRegistry.js.map +1 -1
- package/build/global-state/routing.d.ts +0 -1
- package/build/global-state/routing.js +0 -5
- package/build/global-state/routing.js.map +1 -1
- package/build/global-state/routingQueue.d.ts +6 -7
- package/build/global-state/routingQueueContext.d.ts +1 -1
- package/build/global-state/routingQueueContext.js +14 -4
- package/build/global-state/routingQueueContext.js.map +1 -1
- package/build/global-state/stateUtils.d.ts +1 -37
- package/build/global-state/stateUtils.js +0 -48
- package/build/global-state/stateUtils.js.map +1 -1
- package/build/global-state/types.d.ts +1 -0
- package/build/global-state/useNavigationTreeReducer.d.ts +7 -15
- package/build/global-state/useNavigationTreeReducer.js +85 -10
- package/build/global-state/useNavigationTreeReducer.js.map +1 -1
- package/build/global-state/useNavigationTreeReportEvents.d.ts +2 -1
- package/build/global-state/useNavigationTreeReportEvents.js +11 -1
- package/build/global-state/useNavigationTreeReportEvents.js.map +1 -1
- package/build/layouts/GuardContext.d.ts +1 -1
- package/build/layouts/StackClient.d.ts +3 -3
- package/build/layouts/experimental-stack/ExperimentalStackView.d.ts +2 -1
- package/build/layouts/experimental-stack/ExperimentalStackView.js +4 -10
- package/build/layouts/experimental-stack/ExperimentalStackView.js.map +1 -1
- package/build/layouts/experimental-stack/index.d.ts +2 -2
- package/build/layouts/experimental-stack/index.web.d.ts +2 -2
- package/build/layouts/stack-router.js +40 -26
- package/build/layouts/stack-router.js.map +1 -1
- package/build/layouts/stack-utils/StackScreen.d.ts +1 -1
- package/build/layouts/stack-utils/toolbar/StackToolbarClient.d.ts +1 -1
- package/build/layouts/withLayoutContext.d.ts +2 -0
- package/build/layouts/withLayoutContext.js.map +1 -1
- package/build/link/BaseExpoRouterLink.d.ts +2 -1
- package/build/link/ExpoLink.d.ts +2 -1
- package/build/link/Link.d.ts +2 -2
- package/build/link/LinkWithPreview.d.ts +2 -1
- package/build/link/LinkWithPreview.js +17 -11
- package/build/link/LinkWithPreview.js.map +1 -1
- package/build/link/elements.d.ts +4 -4
- package/build/link/preview/HrefPreview.d.ts +1 -1
- package/build/link/preview/LinkPreviewContext.d.ts +2 -1
- package/build/link/preview/LinkPreviewContext.js +43 -1
- package/build/link/preview/LinkPreviewContext.js.map +1 -1
- package/build/link/preview/native.d.ts +15 -13
- package/build/link/preview/native.js.map +1 -1
- package/build/link/preview/usePreviewActivationPath.d.ts +7 -0
- package/build/link/preview/usePreviewActivationPath.js +64 -0
- package/build/link/preview/usePreviewActivationPath.js.map +1 -0
- package/build/link/preview/utils.d.ts +3 -13
- package/build/link/preview/utils.js +44 -102
- package/build/link/preview/utils.js.map +1 -1
- package/build/link/zoom/ZoomTransitionEnabler.ios.d.ts +1 -1
- package/build/link/zoom/link-apple-zoom-target.d.ts +1 -1
- package/build/link/zoom/link-apple-zoom.d.ts +1 -1
- package/build/link/zoom/zoom-transition-context-providers.ios.d.ts +2 -2
- package/build/native-tabs/NativeBottomTabsNavigator.d.ts +1 -1
- package/build/native-tabs/NativeBottomTabsNavigator.js +5 -1
- package/build/native-tabs/NativeBottomTabsNavigator.js.map +1 -1
- package/build/native-tabs/NativeTabs.d.ts +1 -1
- package/build/native-tabs/NativeTabsView.android.d.ts +1 -1
- package/build/native-tabs/NativeTabsView.ios.d.ts +1 -1
- package/build/native-tabs/NativeTabsView.ios.js +2 -0
- package/build/native-tabs/NativeTabsView.ios.js.map +1 -1
- package/build/native-tabs/NativeTabsView.shared.d.ts +1 -1
- package/build/native-tabs/NativeTabsView.web.d.ts +1 -1
- package/build/native-tabs/types.d.ts +2 -0
- package/build/native-tabs/types.js.map +1 -1
- package/build/navigationEvents/index.d.ts +3 -3
- package/build/navigationEvents/index.js +2 -1
- package/build/navigationEvents/index.js.map +1 -1
- package/build/navigationEvents/types.d.ts +7 -1
- package/build/navigationParams.d.ts +3 -1
- package/build/navigationParams.js +7 -1
- package/build/navigationParams.js.map +1 -1
- package/build/onboard/Tutorial.d.ts +2 -1
- package/build/optional-libraries/react-native-screens.d.ts +12 -0
- package/build/optional-libraries/react-native-screens.js +84 -0
- package/build/optional-libraries/react-native-screens.js.map +1 -0
- package/build/qualified-entry.d.ts +1 -1
- package/build/react-navigation/bottom-tabs/navigators/createBottomTabNavigator.js +4 -1
- package/build/react-navigation/bottom-tabs/navigators/createBottomTabNavigator.js.map +1 -1
- package/build/react-navigation/bottom-tabs/views/BottomTabBar.d.ts +2 -1
- package/build/react-navigation/bottom-tabs/views/BottomTabItem.d.ts +1 -1
- package/build/react-navigation/bottom-tabs/views/BottomTabView.d.ts +2 -1
- package/build/react-navigation/bottom-tabs/views/ScreenFallback.d.ts +2 -2
- package/build/react-navigation/bottom-tabs/views/TabBarIcon.d.ts +1 -1
- package/build/react-navigation/core/BaseNavigationContainer.d.ts +1 -1
- package/build/react-navigation/core/BaseNavigationContainer.js +7 -1
- package/build/react-navigation/core/BaseNavigationContainer.js.map +1 -1
- package/build/react-navigation/core/EnsureSingleNavigator.d.ts +1 -1
- package/build/react-navigation/core/NavigationProvider.d.ts +1 -1
- package/build/react-navigation/core/SceneView.d.ts +2 -1
- package/build/react-navigation/core/theming/ThemeProvider.d.ts +1 -1
- package/build/react-navigation/core/useNavigationBuilder.d.ts +1 -1
- package/build/react-navigation/core/useNavigationBuilder.js +1 -0
- package/build/react-navigation/core/useNavigationBuilder.js.map +1 -1
- package/build/react-navigation/core/usePreventBeforeUnload.d.ts +1 -0
- package/build/react-navigation/core/usePreventBeforeUnload.js +16 -0
- package/build/react-navigation/core/usePreventBeforeUnload.js.map +1 -0
- package/build/react-navigation/core/usePreventBeforeUnload.web.d.ts +1 -0
- package/build/react-navigation/core/usePreventBeforeUnload.web.js +42 -0
- package/build/react-navigation/core/usePreventBeforeUnload.web.js.map +1 -0
- package/build/react-navigation/core/usePreventRemove.d.ts +3 -0
- package/build/react-navigation/core/usePreventRemove.js +6 -0
- package/build/react-navigation/core/usePreventRemove.js.map +1 -1
- package/build/react-navigation/drawer/navigators/createDrawerNavigator.js +4 -1
- package/build/react-navigation/drawer/navigators/createDrawerNavigator.js.map +1 -1
- package/build/react-navigation/drawer/views/DrawerContent.d.ts +1 -1
- package/build/react-navigation/drawer/views/DrawerContentScrollView.d.ts +1 -1
- package/build/react-navigation/drawer/views/DrawerItem.d.ts +1 -1
- package/build/react-navigation/drawer/views/DrawerToggleButton.d.ts +1 -1
- package/build/react-navigation/drawer/views/DrawerView.d.ts +2 -1
- package/build/react-navigation/drawer/views/ScreenFallback.d.ts +2 -2
- package/build/react-navigation/elements/Background.d.ts +1 -1
- package/build/react-navigation/elements/Badge.d.ts +2 -1
- package/build/react-navigation/elements/Button.d.ts +1 -1
- package/build/react-navigation/elements/Header/Header.d.ts +2 -1
- package/build/react-navigation/elements/Header/HeaderBackButton.d.ts +2 -1
- package/build/react-navigation/elements/Header/HeaderBackground.d.ts +1 -1
- package/build/react-navigation/elements/Header/HeaderButton.d.ts +1 -1
- package/build/react-navigation/elements/Header/HeaderIcon.d.ts +1 -1
- package/build/react-navigation/elements/Header/HeaderSearchBar.d.ts +1 -1
- package/build/react-navigation/elements/Header/HeaderTitle.d.ts +1 -1
- package/build/react-navigation/elements/Label/Label.d.ts +1 -1
- package/build/react-navigation/elements/MaskedViewNative.d.ts +1 -1
- package/build/react-navigation/elements/MissingIcon.d.ts +1 -1
- package/build/react-navigation/elements/PlatformPressable.d.ts +1 -1
- package/build/react-navigation/elements/ResourceSavingView.d.ts +1 -1
- package/build/react-navigation/elements/SafeAreaProviderCompat.d.ts +1 -1
- package/build/react-navigation/elements/Screen.d.ts +1 -1
- package/build/react-navigation/elements/Text.d.ts +1 -1
- package/build/react-navigation/elements/useFrameSize.d.ts +1 -1
- package/build/react-navigation/material-top-tabs/navigators/createMaterialTopTabNavigator.js +4 -1
- package/build/react-navigation/material-top-tabs/navigators/createMaterialTopTabNavigator.js.map +1 -1
- package/build/react-navigation/material-top-tabs/views/MaterialTopTabBar.d.ts +1 -1
- package/build/react-navigation/material-top-tabs/views/MaterialTopTabView.d.ts +1 -1
- package/build/react-navigation/native/ServerContainer.d.ts +1 -1
- package/build/react-navigation/native-stack/navigators/createNativeStackNavigator.d.ts +2 -1
- package/build/react-navigation/native-stack/views/FooterComponent.d.ts +1 -1
- package/build/react-navigation/native-stack/views/NativeStackView.d.ts +2 -1
- package/build/react-navigation/native-stack/views/NativeStackView.native.d.ts +2 -1
- package/build/react-navigation/routers/DrawerRouter.js +27 -0
- package/build/react-navigation/routers/DrawerRouter.js.map +1 -1
- package/build/react-navigation/routers/StackRouter.d.ts +3 -1
- package/build/react-navigation/routers/StackRouter.js +43 -0
- package/build/react-navigation/routers/StackRouter.js.map +1 -1
- package/build/react-navigation/routers/TabRouter.js +27 -0
- package/build/react-navigation/routers/TabRouter.js.map +1 -1
- package/build/react-navigation/routers/extendRouter.js +10 -0
- package/build/react-navigation/routers/extendRouter.js.map +1 -1
- package/build/react-navigation/routers/getBrowserHistoryForHistoryChange.d.ts +7 -0
- package/build/react-navigation/routers/getBrowserHistoryForHistoryChange.js +31 -0
- package/build/react-navigation/routers/getBrowserHistoryForHistoryChange.js.map +1 -0
- package/build/react-navigation/routers/types.d.ts +35 -0
- package/build/react-navigation/stack/views/GestureHandlerNative.d.ts +2 -1
- package/build/react-navigation/stack/views/Header/Header.d.ts +1 -1
- package/build/react-navigation/stack/views/Header/HeaderContainer.d.ts +1 -1
- package/build/react-navigation/stack/views/Header/HeaderSegment.d.ts +2 -1
- package/build/react-navigation/stack/views/Screens.d.ts +2 -2
- package/build/react-navigation/stack/views/Stack/Card.d.ts +1 -1
- package/build/react-navigation/stack/views/Stack/CardA11yWrapper.d.ts +1 -1
- package/build/react-navigation/stack/views/Stack/CardContainer.d.ts +1 -1
- package/build/react-navigation/stack/views/Stack/CardContent.d.ts +1 -1
- package/build/react-navigation/stack/views/Stack/CardStack.d.ts +1 -1
- package/build/react-navigation/stack/views/Stack/StackView.d.ts +1 -1
- package/build/rsc/entry.d.ts +2 -1
- package/build/rsc/exports.d.ts +3 -3
- package/build/server/ServerDocument.d.ts +1 -1
- package/build/split-view/elements.d.ts +2 -2
- package/build/split-view/elements.js +3 -9
- package/build/split-view/elements.js.map +1 -1
- package/build/split-view/index.d.ts +1 -1
- package/build/split-view/split-view.d.ts +3 -3
- package/build/split-view/split-view.js +3 -9
- package/build/split-view/split-view.js.map +1 -1
- package/build/standard-navigation/useVisibleTabsWithRedirect.d.ts +1 -0
- package/build/standard-navigation/useVisibleTabsWithRedirect.js +6 -2
- package/build/standard-navigation/useVisibleTabsWithRedirect.js.map +1 -1
- package/build/static/html.d.ts +1 -1
- package/build/toolbar/AnimatedItemContainer.android.d.ts +1 -1
- package/build/toolbar/AnimatedItemContainer.d.ts +1 -1
- package/build/toolbar/native.android.d.ts +1 -1
- package/build/toolbar/native.ios.d.ts +2 -2
- package/build/ui/TabList.d.ts +1 -1
- package/build/ui/TabSlot.d.ts +3 -3
- package/build/ui/TabTrigger.d.ts +1 -1
- package/build/ui/Tabs.d.ts +2 -2
- package/build/useScreens.d.ts +2 -2
- package/build/views/ActivityContents.d.ts +1 -1
- package/build/views/ActivityContents.web.d.ts +1 -1
- package/build/views/EmptyRoute.d.ts +1 -1
- package/build/views/ErrorBoundary.d.ts +1 -1
- package/build/views/NavigationActivityContext.d.ts +1 -1
- package/build/views/NavigationAwareActivity.d.ts +1 -1
- package/build/views/Navigator.d.ts +3 -3
- package/build/views/NoSSR.d.ts +1 -1
- package/build/views/RootUnmatched.d.ts +1 -1
- package/build/views/SuspenseFallback.d.ts +1 -1
- package/build/views/Toast.d.ts +2 -2
- package/build/views/Try.d.ts +1 -1
- package/build/views/Unmatched.d.ts +2 -1
- package/expo-module.config.json +1 -1
- package/ios/LinkPreview/LinkPreviewNativeModule.swift +7 -11
- package/ios/LinkPreview/LinkPreviewNativeNavigation.swift +75 -161
- package/ios/LinkPreview/LinkPreviewNativeView.swift +14 -13
- package/ios/LinkPreview/LinkPreviewPathWalker.swift +211 -0
- package/ios/LinkPreview/RNScreensTabCompat.swift +10 -0
- package/ios/Tests/LinkPreviewActivationTests.swift +71 -0
- package/ios/Tests/LinkPreviewPathWalkerTests.swift +342 -0
- package/ios/Tests/RNScreensTabCompatTests.swift +24 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.4/expo.modules.router-58.0.4.module → 58.0.6/expo.modules.router-58.0.6.module} +7 -7
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.6/expo.modules.router-58.0.6.module.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.6/expo.modules.router-58.0.6.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.6/expo.modules.router-58.0.6.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.6/expo.modules.router-58.0.6.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.4/expo.modules.router-58.0.4.pom → 58.0.6/expo.modules.router-58.0.6.pom} +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.6/expo.modules.router-58.0.6.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.6/expo.modules.router-58.0.6.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.6/expo.modules.router-58.0.6.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.6/expo.modules.router-58.0.6.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 +20 -20
- package/plugin/build/withRouter.d.ts +2 -2
- package/plugin/build/withRouter.js +26 -4
- package/plugin/build/withRouter.js.map +1 -1
- package/plugin/options.json +1 -1
- package/plugin/src/__tests__/withRouter.test.ts +66 -0
- package/plugin/src/withRouter.ts +28 -6
- package/build/fork/createMemoryHistory.d.ts +0 -24
- package/build/fork/createMemoryHistory.js +0 -214
- package/build/fork/createMemoryHistory.js.map +0 -1
- package/build/link/preview/useNextScreenId.d.ts +0 -9
- package/build/link/preview/useNextScreenId.js +0 -76
- package/build/link/preview/useNextScreenId.js.map +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.4/expo.modules.router-58.0.4.module.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.4/expo.modules.router-58.0.4.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.4/expo.modules.router-58.0.4.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.4/expo.modules.router-58.0.4.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.4/expo.modules.router-58.0.4.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.4/expo.modules.router-58.0.4.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.4/expo.modules.router-58.0.4.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.4/expo.modules.router-58.0.4.pom.sha512 +0 -1
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.4/expo.modules.router-58.0.4-sources.jar → 58.0.6/expo.modules.router-58.0.6-sources.jar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.4/expo.modules.router-58.0.4-sources.jar.md5 → 58.0.6/expo.modules.router-58.0.6-sources.jar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.4/expo.modules.router-58.0.4-sources.jar.sha1 → 58.0.6/expo.modules.router-58.0.6-sources.jar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.4/expo.modules.router-58.0.4-sources.jar.sha256 → 58.0.6/expo.modules.router-58.0.6-sources.jar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.4/expo.modules.router-58.0.4-sources.jar.sha512 → 58.0.6/expo.modules.router-58.0.6-sources.jar.sha512} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.4/expo.modules.router-58.0.4.aar → 58.0.6/expo.modules.router-58.0.6.aar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.4/expo.modules.router-58.0.4.aar.md5 → 58.0.6/expo.modules.router-58.0.6.aar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.4/expo.modules.router-58.0.4.aar.sha1 → 58.0.6/expo.modules.router-58.0.6.aar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.4/expo.modules.router-58.0.4.aar.sha256 → 58.0.6/expo.modules.router-58.0.6.aar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.4/expo.modules.router-58.0.4.aar.sha512 → 58.0.6/expo.modules.router-58.0.6.aar.sha512} +0 -0
package/android/build.gradle
CHANGED
|
@@ -4,13 +4,13 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
group = 'expo.modules.router'
|
|
7
|
-
version = '58.0.
|
|
7
|
+
version = '58.0.6'
|
|
8
8
|
|
|
9
9
|
android {
|
|
10
10
|
namespace "expo.modules.router"
|
|
11
11
|
defaultConfig {
|
|
12
12
|
versionCode 1
|
|
13
|
-
versionName "58.0.
|
|
13
|
+
versionName "58.0.6"
|
|
14
14
|
}
|
|
15
15
|
lintOptions {
|
|
16
16
|
abortOnError false
|
package/build/ExpoRoot.d.ts
CHANGED
|
@@ -16,4 +16,4 @@ export type NativeIntent = {
|
|
|
16
16
|
/**
|
|
17
17
|
* @hidden
|
|
18
18
|
*/
|
|
19
|
-
export declare function ExpoRoot({ wrapper: ParentWrapper, ...props }: ExpoRootProps): import("react
|
|
19
|
+
export declare function ExpoRoot({ wrapper: ParentWrapper, ...props }: ExpoRootProps): import("react").JSX.Element;
|
|
@@ -3,4 +3,4 @@ import type { LocaleDirection } from './react-navigation/native/types';
|
|
|
3
3
|
export type LocaleProviderProps = PropsWithChildren<{
|
|
4
4
|
direction: LocaleDirection;
|
|
5
5
|
}>;
|
|
6
|
-
export declare function LocaleProvider({ direction, children }: LocaleProviderProps): import("react
|
|
6
|
+
export declare function LocaleProvider({ direction, children }: LocaleProviderProps): import("react").JSX.Element;
|
package/build/Route.d.ts
CHANGED
|
@@ -81,5 +81,5 @@ export type RouteProps = PropsWithChildren<{
|
|
|
81
81
|
params: object | undefined;
|
|
82
82
|
}>;
|
|
83
83
|
/** Provides the matching routes and filename to the children. */
|
|
84
|
-
export declare function Route({ children, node, params }: RouteProps): import("react
|
|
84
|
+
export declare function Route({ children, node, params }: RouteProps): import("react").JSX.Element;
|
|
85
85
|
export { sortRoutesWithInitial, sortRoutes };
|
package/build/exports.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export { NativeStackView } from './react-navigation/native-stack';
|
|
|
46
46
|
export type { NativeStackDescriptorMap, NativeStackViewState, } from './react-navigation/native-stack';
|
|
47
47
|
export type { CommonNavigationAction, DefaultRouterOptions, NavigationAction, NavigationState, Router, RouterActionContext, RouterActionReducer, RouterActionResult, RouterConfigOptions, RouterExtension, RouterExtensionContext, RouterExtensionOptions, RouterFactory, StackActionType, StackNavigationState, StackRouterOptions, TabActionType, TabNavigationState, TabRouterOptions, } from './react-navigation/routers';
|
|
48
48
|
export { unstable_navigationEvents } from './navigationEvents';
|
|
49
|
-
export type { PagePreloadedEvent, PageFocusedEvent, PageBlurredEvent, PageRemoved, ActionDispatchedEvent, AnalyticsEvent, } from './navigationEvents';
|
|
49
|
+
export type { PagePreloadedEvent, PageFocusedEvent, PageBlurredEvent, PageRemoved, ActionDispatchedEvent, RoutePreloadedEvent, AnalyticsEvent, } from './navigationEvents';
|
|
50
50
|
/**
|
|
51
51
|
* @deprecated Use `import { Tabs } from 'expo-router/js-tabs'` instead.
|
|
52
52
|
*/
|
package/build/exports.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["exports.ts"],"sourcesContent":[null],"names":["Badge","DarkTheme","DefaultTheme","ErrorBoundary","ExperimentalStack","ExpoRoot","Icon","IsWithinNativeNavigator","Label","LocaleProvider","NativeStackView","NavigationAwareActivity","Navigator","Sitemap","Slot","SplashScreen","StackRouter","SuspenseFallback","TabRouter","Tabs","ThemeProvider","Unmatched","VectorIcon","attachRouteState","createBaseStackProps","createBaseTabProps","createNativeStackProps","createStandardRouterNavigator","extendRouter","extendRouterActions","integrateWithRouter","router","unstable_createStandardRouterNavigator","unstable_integrateWithRouter","unstable_navigationEvents","unstable_useIsNavigating","useIsNavigating","useCurrentRouteInfo","useFocusEffect","useGlobalSearchParams","useIsFocused","useLoaderData","useLocalSearchParams","useNavigation","useNavigationContainerRef","usePathname","usePreventRemove","useRootNavigation","useRootNavigationState","useRoute","useRoutePath","useRouter","useScrollToTop","useSegments","useSitemap","useTheme","useUnstableGlobalHref","withLayoutContext"],"mappings":"AAAA,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAkEhBA;eAAAA,iBAAK;;QApBEC;eAAAA,oBAAS;;QACTC;eAAAA,0BAAY;;QAlBZC;eAAAA,4BAAa;;
|
|
1
|
+
{"version":3,"sources":["exports.ts"],"sourcesContent":[null],"names":["Badge","DarkTheme","DefaultTheme","ErrorBoundary","ExperimentalStack","ExpoRoot","Icon","IsWithinNativeNavigator","Label","LocaleProvider","NativeStackView","NavigationAwareActivity","Navigator","Sitemap","Slot","SplashScreen","StackRouter","SuspenseFallback","TabRouter","Tabs","ThemeProvider","Unmatched","VectorIcon","attachRouteState","createBaseStackProps","createBaseTabProps","createNativeStackProps","createStandardRouterNavigator","extendRouter","extendRouterActions","integrateWithRouter","router","unstable_createStandardRouterNavigator","unstable_integrateWithRouter","unstable_navigationEvents","unstable_useIsNavigating","useIsNavigating","useCurrentRouteInfo","useFocusEffect","useGlobalSearchParams","useIsFocused","useLoaderData","useLocalSearchParams","useNavigation","useNavigationContainerRef","usePathname","usePreventRemove","useRootNavigation","useRootNavigationState","useRoute","useRoutePath","useRouter","useScrollToTop","useSegments","useSitemap","useTheme","useUnstableGlobalHref","withLayoutContext"],"mappings":"AAAA,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAkEhBA;eAAAA,iBAAK;;QApBEC;eAAAA,oBAAS;;QACTC;eAAAA,0BAAY;;QAlBZC;eAAAA,4BAAa;;QAwHbC;eAAAA,oCAAiB;;QA7HjBC;eAAAA,kBAAQ;;QA4CfC;eAAAA,gBAAI;;QASJC;eAAAA,2CAAuB;;QAPvBC;eAAAA,iBAAK;;QApBEC;eAAAA,8BAAc;;QAwDdC;eAAAA,4BAAe;;QA3EfC;eAAAA,gDAAuB;;QAVvBC;eAAAA,oBAAS;;QAKTC;eAAAA,gBAAO;;QALIC;eAAAA,eAAI;;QAiBZC;;;QAiEVC;eAAAA,oBAAW;;QAzEJC;eAAAA,kCAAgB;;QA0EvBC;eAAAA,kBAAS;;QA2CFC;eAAAA,UAAI;;QAnGJC;eAAAA,4BAAa;;QAvBbC;eAAAA,oBAAS;;QA+ChBC;eAAAA,sBAAU;;QA4BVC;eAAAA,yBAAgB;;QATTC;eAAAA,0CAAoB;;QACpBC;eAAAA,sCAAkB;;QAClBC;eAAAA,8CAAsB;;QAf7BC;eAAAA,iDAA6B;;QAuB7BC;eAAAA,qBAAY;;QACZC;eAAAA,4BAAmB;;QAvBnBC;eAAAA,uCAAmB;;QA9DZC;eAAAA,qBAAM;;QA+DbC;eAAAA,0DAAsC;;QACtCC;eAAAA,gDAA4B;;QAoDrBC;eAAAA,2CAAyB;;QAnHNC;eAAnBC,gCAAe;;QAJtBC;eAAAA,0BAAmB;;QA4BZC;eAAAA,8BAAc;;QAlCrBC;eAAAA,4BAAqB;;QAmCdC;eAAAA,0BAAY;;QA9BnBC;eAAAA,oBAAa;;QAJbC;eAAAA,2BAAoB;;QAgCbC;eAAAA,4BAAa;;QAlCpBC;eAAAA,gCAAyB;;QADzBC;eAAAA,kBAAW;;QAmDXC;eAAAA,kCAAgB;;QA9ChBC;eAAAA,wBAAiB;;QACjBC;eAAAA,6BAAsB;;QA0CfC;eAAAA,kBAAQ;;QAFRC;eAAAA,0BAAY;;QAhDnBC;eAAAA,gBAAS;;QAiDFC;eAAAA,8BAAc;;QA3CrBC;eAAAA,kBAAW;;QAiBJC;eAAAA,sBAAU;;QAsBVC;eAAAA,kBAAQ;;QA5CfC;eAAAA,4BAAqB;;QAedC;eAAAA,oCAAiB;;;2BAnBM;uBAczB;+BAEsE;iCACjB;mCAE1B;0BAIT;2BACC;yBACF;4BACqB;+BAEf;kCAC+B;yCACrB;gEAOV;+BAGA;gCACsB;8BACvB;2BAGH;8BACG;+BACC;0BACL;gCACgC;8BAE5B;gCACE;0BACN;kCAIlB;4BAgBA;oCAQA;sCAS8B;oCACF;wCACI;yBAYhC;6BACyB;kCA2BU;sBAcrB;mCAEa"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
2
|
import { NativeStackView as RNNativeStackView } from '../../react-navigation/native-stack';
|
|
3
|
-
export declare function NativeStackView(props: ComponentProps<typeof RNNativeStackView>): import("react
|
|
3
|
+
export declare function NativeStackView(props: ComponentProps<typeof RNNativeStackView>): import("react").JSX.Element;
|
|
@@ -58,7 +58,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
58
58
|
return newObj;
|
|
59
59
|
}
|
|
60
60
|
function usePreviewTransition(state, originalEmit, isPreloaded) {
|
|
61
|
-
const {
|
|
61
|
+
const { getOpenPreviewKey, setOpenPreviewKey } = (0, _LinkPreviewContext.useLinkPreviewContext)();
|
|
62
62
|
// Track the preview screen currently transitioning on the native side
|
|
63
63
|
const [previewTransitioningScreenId, setPreviewTransitioningScreenId] = _react().useState();
|
|
64
64
|
_react().useEffect(()=>{
|
|
@@ -74,28 +74,19 @@ function usePreviewTransition(state, originalEmit, isPreloaded) {
|
|
|
74
74
|
state,
|
|
75
75
|
previewTransitioningScreenId
|
|
76
76
|
]);
|
|
77
|
-
const emit = _react().
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
} else if (type === 'transitionEnd') {
|
|
87
|
-
// The screen from preview appeared.
|
|
88
|
-
// We can now restore the stack animation
|
|
89
|
-
setOpenPreviewKey(undefined);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return originalEmit(event);
|
|
93
|
-
};
|
|
94
|
-
return emit;
|
|
77
|
+
const emit = _react().useCallback((event)=>{
|
|
78
|
+
const { target, type, data } = event;
|
|
79
|
+
const key = getOpenPreviewKey();
|
|
80
|
+
if (key !== undefined && target === key && data && 'closing' in data && !data.closing) {
|
|
81
|
+
if (type === 'transitionStart') {
|
|
82
|
+
setPreviewTransitioningScreenId(key);
|
|
83
|
+
} else if (type === 'transitionEnd') {
|
|
84
|
+
setOpenPreviewKey(undefined);
|
|
85
|
+
}
|
|
95
86
|
}
|
|
96
|
-
return originalEmit;
|
|
87
|
+
return originalEmit(event);
|
|
97
88
|
}, [
|
|
98
|
-
|
|
89
|
+
getOpenPreviewKey,
|
|
99
90
|
originalEmit,
|
|
100
91
|
setOpenPreviewKey
|
|
101
92
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["fork/native-stack/usePreviewTransition.ts"],"sourcesContent":[null],"names":["usePreviewTransition","state","originalEmit","isPreloaded","
|
|
1
|
+
{"version":3,"sources":["fork/native-stack/usePreviewTransition.ts"],"sourcesContent":[null],"names":["usePreviewTransition","state","originalEmit","isPreloaded","getOpenPreviewKey","setOpenPreviewKey","useLinkPreviewContext","previewTransitioningScreenId","setPreviewTransitioningScreenId","React","useState","useEffect","position","routes","findIndex","route","key","index","undefined","emit","useCallback","event","target","type","data","closing","computedState","useMemo","previewRoute","filter","splice","isComputedRoutePreloaded"],"mappings":";;;;+BAgBgBA;;;eAAAA;;;;iEAhBO;;;;;;oCAEe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAc/B,SAASA,qBACdC,KAA2B,EAC3BC,YAAiC,EACjCC,WAAqC;IAErC,MAAM,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAE,GAAGC,IAAAA,yCAAqB;IAEtE,sEAAsE;IACtE,MAAM,CAACC,8BAA8BC,gCAAgC,GAAGC,SAAMC,QAAQ;IAItFD,SAAME,SAAS,CAAC;QACd,IAAIJ,8BAA8B;YAChC,iDAAiD;YACjD,MAAMK,WAAWX,MAAMY,MAAM,CAACC,SAAS,CACrC,CAACC,QAAUA,MAAMC,GAAG,KAAKT;YAE3B,IAAIK,YAAY,KAAKA,YAAYX,MAAMgB,KAAK,EAAE;gBAC5C,2DAA2D;gBAC3DT,gCAAgCU;YAClC;QACF;IACF,GAAG;QAACjB;QAAOM;KAA6B;IAExC,MAAMY,OAAOV,SAAMW,WAAW,CAC5B,CAACC;QACC,MAAM,EAAEC,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAE,GAAGH;QAC/B,MAAML,MAAMZ;QACZ,IAAIY,QAAQE,aAAaI,WAAWN,OAAOQ,QAAQ,aAAaA,QAAQ,CAACA,KAAKC,OAAO,EAAE;YACrF,IAAIF,SAAS,mBAAmB;gBAC9Bf,gCAAgCQ;YAClC,OAAO,IAAIO,SAAS,iBAAiB;gBACnClB,kBAAkBa;YACpB;QACF;QACA,OAAOhB,aAAamB;IACtB,GACA;QAACjB;QAAmBF;QAAcG;KAAkB;IAGtD,MAAMqB,gBAAsCjB,SAAMkB,OAAO,CAAC;QACxD,mGAAmG;QACnG,IAAIpB,8BAA8B;YAChC,MAAMK,WAAWX,MAAMY,MAAM,CAACC,SAAS,CACrC,CAACC,QAAUA,MAAMC,GAAG,KAAKT;YAE3B,4EAA4E;YAC5E,IAAIK,WAAWX,MAAMgB,KAAK,EAAE;gBAC1B,MAAMW,eAAe3B,MAAMY,MAAM,CAACD,SAAS;gBAC3C,IAAIA,aAAaX,MAAMgB,KAAK,GAAG,GAAG;oBAChC,mFAAmF;oBACnF,qFAAqF;oBACrF,OAAO;wBACL,GAAGhB,KAAK;wBACRgB,OAAOhB,MAAMgB,KAAK,GAAG;oBACvB;gBACF;gBACA,4FAA4F;gBAC5F,MAAMJ,SAASZ,MAAMY,MAAM,CAACgB,MAAM,CAAC,CAACd,QAAUA,MAAMC,GAAG,KAAKT;gBAC5DM,OAAOiB,MAAM,CAAC7B,MAAMgB,KAAK,GAAG,GAAG,GAAGW;gBAClC,OAAO;oBACL,GAAG3B,KAAK;oBACRY;oBACAI,OAAOhB,MAAMgB,KAAK,GAAG;gBACvB;YACF;QACF;QAEA,OAAOhB;IACT,GAAG;QAACA;QAAOM;KAA6B;IAExC,MAAMwB,2BAA2BtB,SAAMW,WAAW,CAChD,CAACJ,MAAgBU,cAAcb,MAAM,CAACa,cAAcT,KAAK,CAAC,EAAED,QAAQA,OAAOb,YAAYa,MACvF;QAACU;QAAevB;KAAY;IAG9B,OAAO;QAAEuB;QAAeP;QAAMhB,aAAa4B;IAAyB;AACtE"}
|
|
@@ -2,5 +2,5 @@ import type { JSX } from 'react';
|
|
|
2
2
|
type Render = (children: React.ReactNode) => JSX.Element;
|
|
3
3
|
export declare function useComponent(render: Render): ({ children }: {
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
-
}) =>
|
|
5
|
+
}) => JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type RefObject } from 'react';
|
|
2
2
|
import { type LinkingOptions, type NavigationContainerRef, type ParamListBase } from '../react-navigation/native';
|
|
3
3
|
type Options = LinkingOptions<ParamListBase>;
|
|
4
|
-
export declare function useLinking(
|
|
4
|
+
export declare function useLinking(_ref: RefObject<NavigationContainerRef<ParamListBase> | null>, { prefixes, config, getInitialURL, getStateFromPath, }: Options): {
|
|
5
5
|
getInitialState: () => PromiseLike<Readonly<{
|
|
6
6
|
key: string;
|
|
7
7
|
routeKeySeq: number;
|
package/build/fork/useLinking.js
CHANGED
|
@@ -27,31 +27,13 @@ function _react() {
|
|
|
27
27
|
};
|
|
28
28
|
return data;
|
|
29
29
|
}
|
|
30
|
-
function _reactfastcompare() {
|
|
31
|
-
const data = /*#__PURE__*/ _interop_require_default(require("react-fast-compare"));
|
|
32
|
-
_reactfastcompare = function() {
|
|
33
|
-
return data;
|
|
34
|
-
};
|
|
35
|
-
return data;
|
|
36
|
-
}
|
|
37
30
|
const _createSeededNavigationState = require("../global-state/createSeededNavigationState");
|
|
38
|
-
const _getRouteInfoFromState = require("../global-state/getRouteInfoFromState");
|
|
39
31
|
const _routerConfigContext = require("../global-state/routerConfigContext");
|
|
40
|
-
const _routingQueueContext = require("../global-state/routingQueueContext");
|
|
41
|
-
const _utils = require("../global-state/utils");
|
|
42
32
|
const _native = require("../react-navigation/native");
|
|
43
33
|
const _stateKeys = require("../react-navigation/routers/stateKeys");
|
|
44
|
-
const _stack = require("../utils/stack");
|
|
45
|
-
const _createMemoryHistory = require("./createMemoryHistory");
|
|
46
34
|
const _extractPathFromURL = require("./extractPathFromURL");
|
|
47
|
-
const _getPathFromState = require("./getPathFromState");
|
|
48
|
-
function _interop_require_default(obj) {
|
|
49
|
-
return obj && obj.__esModule ? obj : {
|
|
50
|
-
default: obj
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
35
|
const linkingHandlers = [];
|
|
54
|
-
function useLinking(
|
|
36
|
+
function useLinking(_ref, { prefixes, config, getInitialURL = getInitialURLWithTimeout, getStateFromPath = _native.getStateFromPath }) {
|
|
55
37
|
const routerConfig = (0, _react().use)(_routerConfigContext.RouterConfigContext);
|
|
56
38
|
(0, _react().useEffect)(()=>{
|
|
57
39
|
if (process.env.NODE_ENV === 'production') {
|
|
@@ -100,12 +82,6 @@ function useLinking(ref, { prefixes, config, getInitialURL = getInitialURLWithTi
|
|
|
100
82
|
};
|
|
101
83
|
return thenable;
|
|
102
84
|
};
|
|
103
|
-
useBrowserHistorySync({
|
|
104
|
-
ref,
|
|
105
|
-
config,
|
|
106
|
-
getStateFromPath,
|
|
107
|
-
getPathFromState
|
|
108
|
-
});
|
|
109
85
|
return {
|
|
110
86
|
getInitialState
|
|
111
87
|
};
|
|
@@ -113,241 +89,5 @@ function useLinking(ref, { prefixes, config, getInitialURL = getInitialURLWithTi
|
|
|
113
89
|
function getInitialURLWithTimeout() {
|
|
114
90
|
return typeof window === 'undefined' ? '' : window.location.href;
|
|
115
91
|
}
|
|
116
|
-
/** Find the matching navigation state that changed between two navigation states. */ const findMatchingState = (a, b)=>{
|
|
117
|
-
if (a === undefined || b === undefined || a.key !== b.key) {
|
|
118
|
-
return [
|
|
119
|
-
undefined,
|
|
120
|
-
undefined
|
|
121
|
-
];
|
|
122
|
-
}
|
|
123
|
-
const aHistoryLength = (0, _stack.getHistoryLength)(a);
|
|
124
|
-
const bHistoryLength = (0, _stack.getHistoryLength)(b);
|
|
125
|
-
const aRoute = a.routes[a.index];
|
|
126
|
-
const bRoute = b.routes[b.index];
|
|
127
|
-
const aChildState = aRoute.state;
|
|
128
|
-
const bChildState = bRoute.state;
|
|
129
|
-
if (aHistoryLength !== bHistoryLength || aRoute.key !== bRoute.key || aChildState === undefined || bChildState === undefined || aChildState.key !== bChildState.key) {
|
|
130
|
-
return [
|
|
131
|
-
a,
|
|
132
|
-
b
|
|
133
|
-
];
|
|
134
|
-
}
|
|
135
|
-
return findMatchingState(aChildState, bChildState);
|
|
136
|
-
};
|
|
137
|
-
const series = (cb)=>{
|
|
138
|
-
let queue = Promise.resolve();
|
|
139
|
-
return ()=>{
|
|
140
|
-
queue = queue.then(cb);
|
|
141
|
-
};
|
|
142
|
-
};
|
|
143
|
-
function useBrowserHistorySync({ ref, config, getStateFromPath, getPathFromState }) {
|
|
144
|
-
const routerConfig = (0, _react().use)(_routerConfigContext.RouterConfigContext);
|
|
145
|
-
const enqueue = (0, _routingQueueContext.useEnqueueRoutingIntent)();
|
|
146
|
-
const [history] = (0, _react().useState)(_createMemoryHistory.createMemoryHistory);
|
|
147
|
-
const previousIndexRef = (0, _react().useRef)(undefined);
|
|
148
|
-
const previousStateRef = (0, _react().useRef)(undefined);
|
|
149
|
-
// TODO(@ubax): buffer history intent metadata in the reducer and flush it immediately before
|
|
150
|
-
// the matching state event so each operation is correlated with its commit.
|
|
151
|
-
// https://linear.app/expo/issue/ENG-22046
|
|
152
|
-
const pendingHistoryOperationsRef = (0, _react().useRef)([]);
|
|
153
|
-
const parseStateFromPath = (0, _react().useEffectEvent)((path, segments)=>getStateFromPath(path, config, segments));
|
|
154
|
-
const getPathForRoute = (0, _react().useEffectEvent)((route, state)=>{
|
|
155
|
-
let path;
|
|
156
|
-
// Preserve the original URL for wildcard routes while the route and params still match.
|
|
157
|
-
if (route?.path) {
|
|
158
|
-
const stateForPath = parseStateFromPath(route.path, // TODO(@Ubax): Check if there is a way to do it in a more performant way
|
|
159
|
-
(0, _getRouteInfoFromState.getRouteInfoFromState)(state).segments);
|
|
160
|
-
if (stateForPath) {
|
|
161
|
-
const focusedRoute = (0, _native.findFocusedRoute)(stateForPath);
|
|
162
|
-
if (focusedRoute && focusedRoute.name === route.name && (0, _reactfastcompare().default)({
|
|
163
|
-
...focusedRoute.params
|
|
164
|
-
}, {
|
|
165
|
-
...route.params
|
|
166
|
-
})) {
|
|
167
|
-
path = (0, _getPathFromState.appendBaseUrl)(route.path);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
return path ?? getPathFromState(state, config);
|
|
172
|
-
});
|
|
173
|
-
(0, _react().useEffect)(()=>{
|
|
174
|
-
previousIndexRef.current = history.index;
|
|
175
|
-
const unsubscribe = history.listen(()=>{
|
|
176
|
-
const navigation = ref.current;
|
|
177
|
-
if (!navigation) {
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
const { location } = window;
|
|
181
|
-
const path = location.pathname + location.search + location.hash;
|
|
182
|
-
const index = history.index;
|
|
183
|
-
const previousIndex = previousIndexRef.current ?? 0;
|
|
184
|
-
previousIndexRef.current = index;
|
|
185
|
-
const operation = {
|
|
186
|
-
path
|
|
187
|
-
};
|
|
188
|
-
const queueHistoryIntent = (intent)=>{
|
|
189
|
-
intent.metadata = {
|
|
190
|
-
history: operation
|
|
191
|
-
};
|
|
192
|
-
intent.onDispatch = (metadata)=>{
|
|
193
|
-
if (metadata?.history) {
|
|
194
|
-
pendingHistoryOperationsRef.current.push(metadata.history);
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
enqueue(intent);
|
|
198
|
-
};
|
|
199
|
-
const reset = (state)=>({
|
|
200
|
-
type: 'RESET',
|
|
201
|
-
payload: state,
|
|
202
|
-
target: ('key' in state ? state.key : undefined) ?? navigation.getRootState()?.key
|
|
203
|
-
});
|
|
204
|
-
// Saved state is authoritative: parsing its URL again would lose route keys and nested history.
|
|
205
|
-
const record = history.get(index);
|
|
206
|
-
if (record?.path === path && record?.state) {
|
|
207
|
-
queueHistoryIntent({
|
|
208
|
-
type: 'ACTION',
|
|
209
|
-
payload: {
|
|
210
|
-
action: reset(record.state)
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
// TODO(@ubax): check if navigation.getRootState() can be replaced with the context read
|
|
216
|
-
const segments = (0, _getRouteInfoFromState.getRouteInfoFromState)(navigation.getRootState()).segments;
|
|
217
|
-
const parsedState = parseStateFromPath(path, segments);
|
|
218
|
-
if (parsedState) {
|
|
219
|
-
const routeNames = (0, _utils.getRootStackRouteNames)();
|
|
220
|
-
if (parsedState.routes.some((route)=>!routeNames.includes(route.name))) {
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
const state = routerConfig?.routeNode ? (0, _createSeededNavigationState.createSeededRootState)(parsedState, routerConfig.routeNode) : (0, _createSeededNavigationState.completeParsedState)(parsedState, _stateKeys.ROOT_CHAIN);
|
|
224
|
-
if (!state) {
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
if (index > previousIndex || // Hash links emit popstate without changing the memory-history index.
|
|
228
|
-
index === previousIndex && (!record || `${record?.path}${location.hash}` === path)) {
|
|
229
|
-
queueHistoryIntent({
|
|
230
|
-
type: 'NAVIGATE_TO_HREF',
|
|
231
|
-
payload: {
|
|
232
|
-
href: path,
|
|
233
|
-
options: {
|
|
234
|
-
event: 'NAVIGATE'
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
} else {
|
|
239
|
-
queueHistoryIntent({
|
|
240
|
-
type: 'ACTION',
|
|
241
|
-
payload: {
|
|
242
|
-
action: reset(state)
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
} else {
|
|
247
|
-
const initialState = history.get(0)?.state;
|
|
248
|
-
if (initialState) {
|
|
249
|
-
queueHistoryIntent({
|
|
250
|
-
type: 'ACTION',
|
|
251
|
-
payload: {
|
|
252
|
-
action: reset(initialState)
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
} else {
|
|
256
|
-
pendingHistoryOperationsRef.current = [];
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
return ()=>{
|
|
261
|
-
unsubscribe();
|
|
262
|
-
pendingHistoryOperationsRef.current = [];
|
|
263
|
-
};
|
|
264
|
-
}, [
|
|
265
|
-
enqueue,
|
|
266
|
-
history,
|
|
267
|
-
ref
|
|
268
|
-
]);
|
|
269
|
-
(0, _react().useEffect)(()=>{
|
|
270
|
-
if (ref.current) {
|
|
271
|
-
// TODO(@ubax): check if navigation.getRootState() can be replaced with the context read
|
|
272
|
-
const rootState = ref.current.getRootState();
|
|
273
|
-
if (rootState) {
|
|
274
|
-
const path = getPathForRoute((0, _native.findFocusedRoute)(rootState), rootState);
|
|
275
|
-
previousStateRef.current ??= rootState;
|
|
276
|
-
history.replace({
|
|
277
|
-
path,
|
|
278
|
-
state: rootState
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
const onStateChange = async ()=>{
|
|
283
|
-
const navigation = ref.current;
|
|
284
|
-
if (!navigation) {
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
|
-
const previousState = previousStateRef.current;
|
|
288
|
-
// TODO(@ubax): check if navigation.getRootState() can be replaced with the context read
|
|
289
|
-
const rootState = navigation.getRootState();
|
|
290
|
-
if (!rootState) {
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
const path = getPathForRoute((0, _native.findFocusedRoute)(rootState), rootState);
|
|
294
|
-
let pendingOperation;
|
|
295
|
-
// React may batch multiple queued actions into one state event, so use the latest match.
|
|
296
|
-
const pendingOperationIndex = pendingHistoryOperationsRef.current.findLastIndex((operation)=>operation.path === path);
|
|
297
|
-
if (pendingOperationIndex !== -1) {
|
|
298
|
-
pendingOperation = pendingHistoryOperationsRef.current[pendingOperationIndex];
|
|
299
|
-
pendingHistoryOperationsRef.current.splice(0, pendingOperationIndex + 1);
|
|
300
|
-
}
|
|
301
|
-
if (!pendingOperation) {
|
|
302
|
-
// A failed or redirected operation must not affect later navigation.
|
|
303
|
-
pendingHistoryOperationsRef.current.shift();
|
|
304
|
-
}
|
|
305
|
-
previousStateRef.current = rootState;
|
|
306
|
-
const [previousFocusedState, focusedState] = findMatchingState(previousState, rootState);
|
|
307
|
-
if (previousFocusedState && focusedState && !pendingOperation) {
|
|
308
|
-
const historyDelta = (0, _stack.getHistoryLength)(focusedState) - (0, _stack.getHistoryLength)(previousFocusedState);
|
|
309
|
-
if (historyDelta > 0) {
|
|
310
|
-
history.push({
|
|
311
|
-
path,
|
|
312
|
-
state: rootState
|
|
313
|
-
});
|
|
314
|
-
} else if (historyDelta < 0) {
|
|
315
|
-
const nextIndex = history.backIndex({
|
|
316
|
-
path
|
|
317
|
-
});
|
|
318
|
-
const currentIndex = history.index;
|
|
319
|
-
try {
|
|
320
|
-
if (nextIndex !== -1 && nextIndex < currentIndex && history.get(nextIndex - currentIndex)) {
|
|
321
|
-
await history.go(nextIndex - currentIndex);
|
|
322
|
-
} else {
|
|
323
|
-
await history.go(historyDelta);
|
|
324
|
-
}
|
|
325
|
-
history.replace({
|
|
326
|
-
path,
|
|
327
|
-
state: rootState
|
|
328
|
-
});
|
|
329
|
-
} catch {
|
|
330
|
-
// The navigation was interrupted.
|
|
331
|
-
}
|
|
332
|
-
} else {
|
|
333
|
-
history.replace({
|
|
334
|
-
path,
|
|
335
|
-
state: rootState
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
} else {
|
|
339
|
-
history.replace({
|
|
340
|
-
path,
|
|
341
|
-
state: rootState
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
};
|
|
345
|
-
// Serialize writes because `history.go` is asynchronous and can be interrupted by another write.
|
|
346
|
-
return ref.current?.addListener('state', series(onStateChange));
|
|
347
|
-
}, [
|
|
348
|
-
history,
|
|
349
|
-
ref
|
|
350
|
-
]);
|
|
351
|
-
}
|
|
352
92
|
|
|
353
93
|
//# sourceMappingURL=useLinking.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["fork/useLinking.ts"],"sourcesContent":[null],"names":["getInitialURLWithTimeout","useLinking","linkingHandlers","
|
|
1
|
+
{"version":3,"sources":["fork/useLinking.ts"],"sourcesContent":[null],"names":["getInitialURLWithTimeout","useLinking","linkingHandlers","_ref","prefixes","config","getInitialURL","getStateFromPath","getStateFromPathDefault","routerConfig","use","RouterConfigContext","useEffect","process","env","NODE_ENV","undefined","length","console","error","join","trim","handler","Symbol","push","index","indexOf","splice","getInitialState","getStateFromURL","url","path","extractExpoPathFromURL","startsWith","parsedState","routeNode","state","createSeededRootState","completeParsedState","ROOT_CHAIN","then","thenable","onfulfilled","Promise","resolve","catch","window","location","href"],"mappings":";;;;;;;;;;;;;;;QAuGgBA;eAAAA;;QAlFAC;eAAAA;;;;yBArB+B;;;;;;6CAKxC;qCAC6B;wBAO7B;2BACoB;oCACY;AAEvC,MAAMC,kBAA4B,EAAE;AAI7B,SAASD,WACdE,IAA6D,EAC7D,EACEC,QAAQ,EACRC,MAAM,EACNC,gBAAgBN,wBAAwB,EACxCO,mBAAmBC,wBAAuB,EAClC;IAEV,MAAMC,eAAeC,IAAAA,YAAG,EAACC,wCAAmB;IAE5CC,IAAAA,kBAAS,EAAC;QACR,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;YACzC,OAAOC;QACT;QAEA,IAAId,gBAAgBe,MAAM,EAAE;YAC1BC,QAAQC,KAAK,CACX;gBACE;gBACA;gBACA;aACD,CACEC,IAAI,CAAC,MACLC,IAAI;QAEX;QAEA,MAAMC,UAAUC;QAEhBrB,gBAAgBsB,IAAI,CAACF;QAErB,OAAO;YACL,MAAMG,QAAQvB,gBAAgBwB,OAAO,CAACJ;YAEtC,IAAIG,QAAQ,CAAC,GAAG;gBACdvB,gBAAgByB,MAAM,CAACF,OAAO;YAChC;QACF;IACF,GAAG,EAAE;IAEL,8GAA8G;IAC9G,MAAMG,kBAAkB;QACtB,MAAMC,kBAAkB,CAACC;YACvB,IAAIC,OAAOD,MAAME,IAAAA,0CAAsB,EAAC5B,UAAU0B,OAAOd;YACzD,IAAIe,SAASf,aAAa,CAACe,KAAKE,UAAU,CAAC,MAAM;gBAC/CF,OAAO,CAAC,CAAC,EAAEA,MAAM;YACnB;YAEA,MAAMG,cAAcH,OAAOxB,iBAAiBwB,MAAM1B,UAAUW;YAC5D,MAAMmB,YAAY1B,cAAc0B;YAChC,MAAMC,QAAQD,YACVE,IAAAA,kDAAqB,EAACH,aAAaC,aACnCG,IAAAA,gDAAmB,EAACJ,aAAaK,qBAAU;YAE/C,OAAOH;QACT;QACA,MAAMN,MAAMxB;QAEZ,IAAI,OAAOwB,QAAQ,YAAYA,OAAO,MAAM;YAC1C,OAAOA,IAAIU,IAAI,CAACX;QAClB;QAEA,MAAMO,QAAQP,gBAAgBC;QAE9B,MAAMW,WAAW;YACfD,MAAKE,WAA0D;gBAC7D,OAAOC,QAAQC,OAAO,CAACF,cAAcA,YAAYN,SAASA;YAC5D;YACAS;gBACE,OAAOJ;YACT;QACF;QAEA,OAAOA;IACT;IAEA,OAAO;QACLb;IACF;AACF;AAEO,SAAS5B;IACd,OAAO,OAAO8C,WAAW,cAAc,KAAKA,OAAOC,QAAQ,CAACC,IAAI;AAClE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "BrowserHistorySync", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return BrowserHistorySync;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
function _react() {
|
|
13
|
+
const data = require("react");
|
|
14
|
+
_react = function() {
|
|
15
|
+
return data;
|
|
16
|
+
};
|
|
17
|
+
return data;
|
|
18
|
+
}
|
|
19
|
+
const _routingQueueContext = require("./routingQueueContext");
|
|
20
|
+
function BrowserHistorySync({ adapter }) {
|
|
21
|
+
const enqueue = (0, _routingQueueContext.useEnqueueRoutingIntent)();
|
|
22
|
+
(0, _react().useEffect)(()=>adapter.listen((change)=>{
|
|
23
|
+
enqueue({
|
|
24
|
+
type: 'BROWSER_HISTORY_CHANGED',
|
|
25
|
+
payload: change
|
|
26
|
+
});
|
|
27
|
+
}), [
|
|
28
|
+
adapter,
|
|
29
|
+
enqueue
|
|
30
|
+
]);
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=BrowserHistorySync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["global-state/BrowserHistorySync.tsx"],"sourcesContent":[null],"names":["BrowserHistorySync","adapter","enqueue","useEnqueueRoutingIntent","useEffect","listen","change","type","payload"],"mappings":"AAAA;;;;;+BAQgBA;;;eAAAA;;;;yBANU;;;;;;qCAGc;AAGjC,SAASA,mBAAmB,EAAEC,OAAO,EAAsC;IAChF,MAAMC,UAAUC,IAAAA,4CAAuB;IAEvCC,IAAAA,kBAAS,EACP,IACEH,QAAQI,MAAM,CAAC,CAACC;YACdJ,QAAQ;gBAAEK,MAAM;gBAA2BC,SAASF;YAAO;QAC7D,IACF;QAACL;QAASC;KAAQ;IAGpB,OAAO;AACT"}
|
|
@@ -100,10 +100,6 @@ function RoutingQueueDrainer({ processIntent }) {
|
|
|
100
100
|
// Only catches errors thrown while dispatching. The navigation reducer runs
|
|
101
101
|
// during the next render, so errors from it surface there, not here.
|
|
102
102
|
try {
|
|
103
|
-
// TODO(@ubax): `onDispatch` records the web history operation now, but the commit that
|
|
104
|
-
// consumes it is deferred by the transition and an urgent `dispatchSync` can land in between.
|
|
105
|
-
// https://linear.app/expo/issue/ENG-22046
|
|
106
|
-
intent.onDispatch?.(intent.metadata);
|
|
107
103
|
processIntent(intent);
|
|
108
104
|
} catch (error) {
|
|
109
105
|
const message = typeof error === 'object' && error != null && 'message' in error ? error.message : error;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["global-state/RoutingQueueDrainer.tsx"],"sourcesContent":[null],"names":["RoutingQueueDrainer","shouldUseTransition","intents","mode","some","intent","inTransition","every","isPreloadIntent","type","payload","options","event","processIntent","React","use","PendingIntentsContext","dequeue","startTransition","transitionMode","RoutingQueueApiContext","lastProcessed","useRef","undefined","useEffect","length","current","process","
|
|
1
|
+
{"version":3,"sources":["global-state/RoutingQueueDrainer.tsx"],"sourcesContent":[null],"names":["RoutingQueueDrainer","shouldUseTransition","intents","mode","some","intent","inTransition","every","isPreloadIntent","type","payload","options","event","processIntent","React","use","PendingIntentsContext","dequeue","startTransition","transitionMode","RoutingQueueApiContext","lastProcessed","useRef","undefined","useEffect","length","current","process","error","message","console","warn","JSON","stringify"],"mappings":"AAAA;;;;;;;;;;;;;;;;QA8BgBA;eAAAA;;QAlBAC;eAAAA;;;;iEAVO;;;;;;qCAGuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOvD,SAASA,oBACdC,OAAwB,EACxBC,IAA8B;IAE9B,IAAIA,SAAS,SAAS,OAAO;IAC7B,IAAID,QAAQE,IAAI,CAAC,CAACC,SAAWA,OAAOC,YAAY,KAAK,QAAQ,OAAO;IAEpE,IAAIH,SAAS,UAAU,OAAO;IAE9BA;IAEA,OAAOD,QAAQK,KAAK,CAAC,CAACF,SAAWA,OAAOC,YAAY,KAAK,QAAQE,gBAAgBH;AACnF;AAEA,SAASG,gBAAgBH,MAAqB;IAC5C,OAAOA,OAAOI,IAAI,KAAK,sBAAsBJ,OAAOK,OAAO,CAACC,OAAO,CAACC,KAAK,KAAK;AAChF;AAEO,SAASZ,oBAAoB,EAAEa,aAAa,EAAS;IAC1D,MAAMX,UAAUY,SAAMC,GAAG,CAACC,0CAAqB;IAC/C,MAAM,EAAEC,OAAO,EAAEC,eAAe,EAAEC,cAAc,EAAE,GAAGL,SAAMC,GAAG,CAACK,2CAAsB;IACrF,MAAMC,gBAAgBP,SAAMQ,MAAM,CAA8BC;IAEhET,SAAMU,SAAS,CAAC;QACd,IAAItB,QAAQuB,MAAM,KAAK,KAAKJ,cAAcK,OAAO,KAAKxB,SAAS;YAC7D;QACF;QACA,2FAA2F;QAC3FmB,cAAcK,OAAO,GAAGxB;QACxB,yFAAyF;QACzF,qFAAqF;QACrF,sFAAsF;QACtF,uEAAuE;QACvEe,QAAQf;QACR,MAAMyB,UAAU;YACd,KAAK,MAAMtB,UAAUH,QAAS;gBAC5B,4EAA4E;gBAC5E,qEAAqE;gBACrE,IAAI;oBACFW,cAAcR;gBAChB,EAAE,OAAOuB,OAAO;oBACd,MAAMC,UACJ,OAAOD,UAAU,YAAYA,SAAS,QAAQ,aAAaA,QACvDA,MAAMC,OAAO,GACbD;oBACNE,QAAQC,IAAI,CACV,CAAC,0DAA0D,EAAEC,KAAKC,SAAS,CAAC5B,QAAQ,EAAE,EAAEwB,SAAS;gBAErG;YACF;QACF;QAEA,IAAI5B,oBAAoBC,SAASiB,iBAAiB;YAChDD,gBAAgBS;QAClB,OAAO;YACLA;QACF;IACF,GAAG;QAACV;QAASf;QAASW;QAAeK;QAAiBC;KAAe;IAErE,OAAO;AACT"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { NavigationState, RouterBrowserHistoryAction } from '../react-navigation/routers';
|
|
2
|
+
import type { BrowserHistory, BrowserHistoryChange, BrowserHistoryConfig, BrowserHistoryProjection, BrowserHistoryRestore, ReducibleIntent } from './browserHistory.types';
|
|
3
|
+
type Reduce<Result> = (result: Result, intent: ReducibleIntent) => Result;
|
|
4
|
+
/** Starts tracking the browser entry that is current when the app loads. */
|
|
5
|
+
export declare function createBrowserHistory(state: NavigationState, config: BrowserHistoryConfig): BrowserHistoryProjection;
|
|
6
|
+
/** Updates tracked entries and queues browser commands for an accepted router action. */
|
|
7
|
+
export declare function applyRouterHistoryAction(history: BrowserHistory, nextState: NavigationState, config: BrowserHistoryConfig, action?: RouterBrowserHistoryAction): BrowserHistoryProjection;
|
|
8
|
+
/**
|
|
9
|
+
* Refreshes the current entry after `NAVIGATOR_CHANGED` or `NAVIGATOR_UNMOUNTED`, for example when
|
|
10
|
+
* a navigator registers its routes or is removed from the tree.
|
|
11
|
+
*/
|
|
12
|
+
export declare function updateCurrentHistoryEntry(history: BrowserHistory, nextState: NavigationState, config: BrowserHistoryConfig): BrowserHistoryProjection;
|
|
13
|
+
/**
|
|
14
|
+
* Restores navigation after browser back or forward. Known entries reuse their saved state;
|
|
15
|
+
* unknown entries are rebuilt from the URL and added to the tracked history.
|
|
16
|
+
*/
|
|
17
|
+
export declare function restoreNavigationFromBrowser<Result extends {
|
|
18
|
+
state: NavigationState;
|
|
19
|
+
}>(history: BrowserHistory, result: Result, change: BrowserHistoryChange, config: BrowserHistoryConfig, reduce: Reduce<Result>): BrowserHistoryRestore<Result>;
|
|
20
|
+
export {};
|