@react-navigation/core 7.0.0-rc.9 → 7.0.0
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/lib/commonjs/BaseNavigationContainer.js +356 -0
- package/lib/commonjs/BaseNavigationContainer.js.map +1 -0
- package/lib/commonjs/CurrentRenderContext.js +15 -0
- package/lib/commonjs/DeprecatedNavigationInChildContext.js +14 -0
- package/lib/commonjs/EnsureSingleNavigator.js +43 -0
- package/lib/commonjs/Group.js +14 -0
- package/lib/commonjs/NavigationBuilderContext.js +17 -0
- package/lib/commonjs/NavigationContainerRefContext.js +14 -0
- package/lib/commonjs/NavigationContext.js +14 -0
- package/lib/commonjs/NavigationHelpersContext.js +15 -0
- package/lib/commonjs/NavigationIndependentTree.js +35 -0
- package/lib/commonjs/NavigationIndependentTreeContext.js +14 -0
- package/lib/commonjs/NavigationRouteContext.js +14 -0
- package/lib/commonjs/NavigationStateContext.js +29 -0
- package/lib/commonjs/PreventRemoveContext.js +16 -0
- package/lib/commonjs/PreventRemoveProvider.js +91 -0
- package/lib/commonjs/SceneView.js +96 -0
- package/lib/commonjs/Screen.js +14 -0
- package/lib/commonjs/StaticContainer.js +31 -0
- package/lib/commonjs/StaticNavigation.js +256 -0
- package/lib/commonjs/StaticNavigation.js.map +1 -0
- package/lib/commonjs/UnhandledActionContext.js +11 -0
- package/lib/commonjs/checkDuplicateRouteNames.js +25 -0
- package/lib/commonjs/checkSerializable.js +50 -0
- package/lib/commonjs/createNavigationContainerRef.js +69 -0
- package/lib/commonjs/createNavigatorFactory.js +34 -0
- package/lib/commonjs/deepFreeze.js +37 -0
- package/lib/commonjs/findFocusedRoute.js +15 -0
- package/lib/commonjs/getActionFromState.js +86 -0
- package/lib/commonjs/getFocusedRouteNameFromRoute.js +22 -0
- package/lib/commonjs/getPathFromState.js +218 -0
- package/lib/commonjs/getPathFromState.js.map +1 -0
- package/lib/commonjs/getStateFromPath.js +475 -0
- package/lib/commonjs/getStateFromPath.js.map +1 -0
- package/lib/commonjs/index.js +287 -0
- package/lib/commonjs/isArrayEqual.js +20 -0
- package/lib/commonjs/isRecordEqual.js +21 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/theming/ThemeContext.js +12 -0
- package/lib/commonjs/theming/ThemeProvider.js +21 -0
- package/lib/commonjs/theming/useTheme.js +18 -0
- package/lib/commonjs/types.js +27 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/useChildListeners.js +36 -0
- package/lib/commonjs/useComponent.js +40 -0
- package/lib/commonjs/useCurrentRender.js +25 -0
- package/lib/commonjs/useDescriptors.js +188 -0
- package/lib/commonjs/useEventEmitter.js +105 -0
- package/lib/commonjs/useFocusEffect.js +80 -0
- package/lib/commonjs/useFocusEvents.js +70 -0
- package/lib/commonjs/useFocusedListenersChildrenAdapter.js +48 -0
- package/lib/commonjs/useIsFocused.js +28 -0
- package/lib/commonjs/useIsomorphicLayoutEffect.js +12 -0
- package/lib/commonjs/useIsomorphicLayoutEffect.native.js +9 -0
- package/lib/commonjs/useKeyedChildListeners.js +33 -0
- package/lib/commonjs/useLazyValue.js +17 -0
- package/lib/commonjs/useNavigation.js +27 -0
- package/lib/commonjs/useNavigationBuilder.js +478 -0
- package/lib/commonjs/useNavigationCache.js +162 -0
- package/lib/commonjs/useNavigationContainerRef.js +18 -0
- package/lib/commonjs/useNavigationHelpers.js +76 -0
- package/lib/commonjs/useNavigationIndependentTree.js +14 -0
- package/lib/commonjs/useNavigationState.js +26 -0
- package/lib/commonjs/useOnAction.js +106 -0
- package/lib/commonjs/useOnGetState.js +48 -0
- package/lib/commonjs/useOnPreventRemove.js +72 -0
- package/lib/commonjs/useOnRouteFocus.js +36 -0
- package/lib/commonjs/useOptionsGetters.js +78 -0
- package/lib/commonjs/usePreventRemove.js +48 -0
- package/lib/commonjs/usePreventRemoveContext.js +18 -0
- package/lib/commonjs/useRegisterNavigator.js +32 -0
- package/lib/commonjs/useRoute.js +23 -0
- package/lib/commonjs/useRouteCache.js +69 -0
- package/lib/commonjs/useSyncState.js +48 -0
- package/lib/commonjs/validatePathConfig.js +49 -0
- package/lib/commonjs/validatePathConfig.js.map +1 -0
- package/lib/module/BaseNavigationContainer.js +349 -0
- package/lib/module/BaseNavigationContainer.js.map +1 -0
- package/lib/module/CurrentRenderContext.js +10 -0
- package/lib/module/CurrentRenderContext.js.map +1 -0
- package/lib/module/DeprecatedNavigationInChildContext.js +9 -0
- package/lib/module/DeprecatedNavigationInChildContext.js.map +1 -0
- package/lib/module/EnsureSingleNavigator.js +36 -0
- package/lib/module/EnsureSingleNavigator.js.map +1 -0
- package/lib/module/Group.js +10 -0
- package/lib/module/Group.js.map +1 -0
- package/lib/module/NavigationBuilderContext.js +11 -0
- package/lib/module/NavigationBuilderContext.js.map +1 -0
- package/lib/module/NavigationContainerRefContext.js +8 -0
- package/lib/module/NavigationContainerRefContext.js.map +1 -0
- package/lib/module/NavigationContext.js +8 -0
- package/lib/module/NavigationContext.js.map +1 -0
- package/lib/module/NavigationHelpersContext.js +9 -0
- package/lib/module/NavigationHelpersContext.js.map +1 -0
- package/lib/module/NavigationIndependentTree.js +30 -0
- package/lib/module/NavigationIndependentTree.js.map +1 -0
- package/lib/module/NavigationIndependentTreeContext.js +9 -0
- package/lib/module/NavigationIndependentTreeContext.js.map +1 -0
- package/lib/module/NavigationRouteContext.js +9 -0
- package/lib/module/NavigationRouteContext.js.map +1 -0
- package/lib/module/NavigationStateContext.js +23 -0
- package/lib/module/NavigationStateContext.js.map +1 -0
- package/lib/module/PreventRemoveContext.js +11 -0
- package/lib/module/PreventRemoveContext.js.map +1 -0
- package/lib/module/PreventRemoveProvider.js +84 -0
- package/lib/module/PreventRemoveProvider.js.map +1 -0
- package/lib/module/SceneView.js +90 -0
- package/lib/module/SceneView.js.map +1 -0
- package/lib/module/Screen.js +10 -0
- package/lib/module/Screen.js.map +1 -0
- package/lib/module/StaticContainer.js +26 -0
- package/lib/module/StaticContainer.js.map +1 -0
- package/lib/module/StaticNavigation.js +249 -0
- package/lib/module/StaticNavigation.js.map +1 -0
- package/lib/module/UnhandledActionContext.js +5 -0
- package/lib/module/UnhandledActionContext.js.map +1 -0
- package/lib/module/checkDuplicateRouteNames.js +21 -0
- package/lib/module/checkDuplicateRouteNames.js.map +1 -0
- package/lib/module/checkSerializable.js +46 -0
- package/lib/module/checkSerializable.js.map +1 -0
- package/lib/module/createNavigationContainerRef.js +64 -0
- package/lib/module/createNavigationContainerRef.js.map +1 -0
- package/lib/module/createNavigatorFactory.js +31 -0
- package/lib/module/createNavigatorFactory.js.map +1 -0
- package/lib/module/deepFreeze.js +31 -0
- package/lib/module/deepFreeze.js.map +1 -0
- package/lib/module/findFocusedRoute.js +11 -0
- package/lib/module/findFocusedRoute.js.map +1 -0
- package/lib/module/getActionFromState.js +82 -0
- package/lib/module/getActionFromState.js.map +1 -0
- package/lib/module/getFocusedRouteNameFromRoute.js +18 -0
- package/lib/module/getFocusedRouteNameFromRoute.js.map +1 -0
- package/lib/module/getPathFromState.js +212 -0
- package/lib/module/getPathFromState.js.map +1 -0
- package/lib/module/getStateFromPath.js +468 -0
- package/lib/module/getStateFromPath.js.map +1 -0
- package/lib/module/index.js +36 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/isArrayEqual.js +16 -0
- package/lib/module/isArrayEqual.js.map +1 -0
- package/lib/module/isRecordEqual.js +17 -0
- package/lib/module/isRecordEqual.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/theming/ThemeContext.js +6 -0
- package/lib/module/theming/ThemeContext.js.map +1 -0
- package/lib/module/theming/ThemeProvider.js +15 -0
- package/lib/module/theming/ThemeProvider.js.map +1 -0
- package/lib/module/theming/useTheme.js +12 -0
- package/lib/module/theming/useTheme.js.map +1 -0
- package/lib/module/types.js +23 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/useChildListeners.js +30 -0
- package/lib/module/useChildListeners.js.map +1 -0
- package/lib/module/useComponent.js +34 -0
- package/lib/module/useComponent.js.map +1 -0
- package/lib/module/useCurrentRender.js +19 -0
- package/lib/module/useCurrentRender.js.map +1 -0
- package/lib/module/useDescriptors.js +182 -0
- package/lib/module/useDescriptors.js.map +1 -0
- package/lib/module/useEventEmitter.js +99 -0
- package/lib/module/useEventEmitter.js.map +1 -0
- package/lib/module/useFocusEffect.js +74 -0
- package/lib/module/useFocusEffect.js.map +1 -0
- package/lib/module/useFocusEvents.js +64 -0
- package/lib/module/useFocusEvents.js.map +1 -0
- package/lib/module/useFocusedListenersChildrenAdapter.js +42 -0
- package/lib/module/useFocusedListenersChildrenAdapter.js.map +1 -0
- package/lib/module/useIsFocused.js +23 -0
- package/lib/module/useIsFocused.js.map +1 -0
- package/lib/module/useIsomorphicLayoutEffect.js +9 -0
- package/lib/module/useIsomorphicLayoutEffect.js.map +1 -0
- package/lib/module/useIsomorphicLayoutEffect.native.js +5 -0
- package/lib/module/useIsomorphicLayoutEffect.native.js.map +1 -0
- package/lib/module/useKeyedChildListeners.js +27 -0
- package/lib/module/useKeyedChildListeners.js.map +1 -0
- package/lib/module/useLazyValue.js +11 -0
- package/lib/module/useLazyValue.js.map +1 -0
- package/lib/module/useNavigation.js +21 -0
- package/lib/module/useNavigation.js.map +1 -0
- package/lib/module/useNavigationBuilder.js +472 -0
- package/lib/module/useNavigationBuilder.js.map +1 -0
- package/lib/module/useNavigationCache.js +156 -0
- package/lib/module/useNavigationCache.js.map +1 -0
- package/lib/module/useNavigationContainerRef.js +12 -0
- package/lib/module/useNavigationContainerRef.js.map +1 -0
- package/lib/module/useNavigationHelpers.js +70 -0
- package/lib/module/useNavigationHelpers.js.map +1 -0
- package/lib/module/useNavigationIndependentTree.js +8 -0
- package/lib/module/useNavigationIndependentTree.js.map +1 -0
- package/lib/module/useNavigationState.js +20 -0
- package/lib/module/useNavigationState.js.map +1 -0
- package/lib/module/useOnAction.js +100 -0
- package/lib/module/useOnAction.js.map +1 -0
- package/lib/module/useOnGetState.js +42 -0
- package/lib/module/useOnGetState.js.map +1 -0
- package/lib/module/useOnPreventRemove.js +64 -0
- package/lib/module/useOnPreventRemove.js.map +1 -0
- package/lib/module/useOnRouteFocus.js +30 -0
- package/lib/module/useOnRouteFocus.js.map +1 -0
- package/lib/module/useOptionsGetters.js +72 -0
- package/lib/module/useOptionsGetters.js.map +1 -0
- package/lib/module/usePreventRemove.js +42 -0
- package/lib/module/usePreventRemove.js.map +1 -0
- package/lib/module/usePreventRemoveContext.js +12 -0
- package/lib/module/usePreventRemoveContext.js.map +1 -0
- package/lib/module/useRegisterNavigator.js +27 -0
- package/lib/module/useRegisterNavigator.js.map +1 -0
- package/lib/module/useRoute.js +17 -0
- package/lib/module/useRoute.js.map +1 -0
- package/lib/module/useRouteCache.js +62 -0
- package/lib/module/useRouteCache.js.map +1 -0
- package/lib/module/useSyncState.js +42 -0
- package/lib/module/useSyncState.js.map +1 -0
- package/lib/module/validatePathConfig.js +45 -0
- package/lib/module/validatePathConfig.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/BaseNavigationContainer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/CurrentRenderContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/DeprecatedNavigationInChildContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/EnsureSingleNavigator.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Group.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationBuilderContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationContainerRefContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationHelpersContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationIndependentTree.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationIndependentTreeContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationRouteContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationStateContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/PreventRemoveContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/PreventRemoveProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/SceneView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Screen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/StaticContainer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/StaticNavigation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/UnhandledActionContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/checkDuplicateRouteNames.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/checkSerializable.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/createNavigationContainerRef.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/createNavigatorFactory.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/deepFreeze.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/findFocusedRoute.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/getActionFromState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/getFocusedRouteNameFromRoute.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/getPathFromState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/getStateFromPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/isArrayEqual.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/isRecordEqual.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theming/ThemeContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theming/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theming/useTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types.d.ts +702 -0
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useChildListeners.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useCurrentRender.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useDescriptors.d.ts +133 -0
- package/lib/typescript/commonjs/src/useDescriptors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useEventEmitter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useFocusEffect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useFocusEvents.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useFocusedListenersChildrenAdapter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useIsFocused.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useIsomorphicLayoutEffect.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useKeyedChildListeners.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useLazyValue.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useNavigation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useNavigationBuilder.d.ts +181 -0
- package/lib/typescript/commonjs/src/useNavigationBuilder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useNavigationCache.d.ts +65 -0
- package/lib/typescript/commonjs/src/useNavigationCache.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useNavigationContainerRef.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useNavigationHelpers.d.ts +96 -0
- package/lib/typescript/commonjs/src/useNavigationHelpers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useNavigationIndependentTree.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useNavigationState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useOnAction.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useOnGetState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useOnPreventRemove.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useOnRouteFocus.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useOptionsGetters.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/usePreventRemove.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/usePreventRemoveContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useRegisterNavigator.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useRoute.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useRouteCache.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useSyncState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/validatePathConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/tsconfig.build.tsbuildinfo +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/BaseNavigationContainer.d.ts +17 -0
- package/lib/typescript/module/src/BaseNavigationContainer.d.ts.map +1 -0
- package/lib/typescript/module/src/CurrentRenderContext.d.ts +9 -0
- package/lib/typescript/module/src/CurrentRenderContext.d.ts.map +1 -0
- package/lib/typescript/module/src/DeprecatedNavigationInChildContext.d.ts +6 -0
- package/lib/typescript/module/src/DeprecatedNavigationInChildContext.d.ts.map +1 -0
- package/lib/typescript/module/src/EnsureSingleNavigator.d.ts +14 -0
- package/lib/typescript/module/src/EnsureSingleNavigator.d.ts.map +1 -0
- package/lib/typescript/module/src/Group.d.ts +7 -0
- package/lib/typescript/module/src/Group.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationBuilderContext.d.ts +34 -0
- package/lib/typescript/module/src/NavigationBuilderContext.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationContainerRefContext.d.ts +8 -0
- package/lib/typescript/module/src/NavigationContainerRefContext.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationContext.d.ts +8 -0
- package/lib/typescript/module/src/NavigationContext.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationHelpersContext.d.ts +9 -0
- package/lib/typescript/module/src/NavigationHelpersContext.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationIndependentTree.d.ts +8 -0
- package/lib/typescript/module/src/NavigationIndependentTree.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationIndependentTreeContext.d.ts +6 -0
- package/lib/typescript/module/src/NavigationIndependentTreeContext.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationRouteContext.d.ts +7 -0
- package/lib/typescript/module/src/NavigationRouteContext.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationStateContext.d.ts +13 -0
- package/lib/typescript/module/src/NavigationStateContext.d.ts.map +1 -0
- package/lib/typescript/module/src/PreventRemoveContext.d.ts +13 -0
- package/lib/typescript/module/src/PreventRemoveContext.d.ts.map +1 -0
- package/lib/typescript/module/src/PreventRemoveProvider.d.ts +10 -0
- package/lib/typescript/module/src/PreventRemoveProvider.d.ts.map +1 -0
- package/lib/typescript/module/src/SceneView.d.ts +21 -0
- package/lib/typescript/module/src/SceneView.d.ts.map +1 -0
- package/lib/typescript/module/src/Screen.d.ts +7 -0
- package/lib/typescript/module/src/Screen.d.ts.map +1 -0
- package/lib/typescript/module/src/StaticContainer.d.ts +6 -0
- package/lib/typescript/module/src/StaticContainer.d.ts.map +1 -0
- package/lib/typescript/module/src/StaticNavigation.d.ts +188 -0
- package/lib/typescript/module/src/StaticNavigation.d.ts.map +1 -0
- package/lib/typescript/module/src/UnhandledActionContext.d.ts +4 -0
- package/lib/typescript/module/src/UnhandledActionContext.d.ts.map +1 -0
- package/lib/typescript/module/src/checkDuplicateRouteNames.d.ts +3 -0
- package/lib/typescript/module/src/checkDuplicateRouteNames.d.ts.map +1 -0
- package/lib/typescript/module/src/checkSerializable.d.ts +10 -0
- package/lib/typescript/module/src/checkSerializable.d.ts.map +1 -0
- package/lib/typescript/module/src/createNavigationContainerRef.d.ts +4 -0
- package/lib/typescript/module/src/createNavigationContainerRef.d.ts.map +1 -0
- package/lib/typescript/module/src/createNavigatorFactory.d.ts +10 -0
- package/lib/typescript/module/src/createNavigatorFactory.d.ts.map +1 -0
- package/lib/typescript/module/src/deepFreeze.d.ts +3 -0
- package/lib/typescript/module/src/deepFreeze.d.ts.map +1 -0
- package/lib/typescript/module/src/findFocusedRoute.d.ts +5 -0
- package/lib/typescript/module/src/findFocusedRoute.d.ts.map +1 -0
- package/lib/typescript/module/src/getActionFromState.d.ts +17 -0
- package/lib/typescript/module/src/getActionFromState.d.ts.map +1 -0
- package/lib/typescript/module/src/getFocusedRouteNameFromRoute.d.ts +3 -0
- package/lib/typescript/module/src/getFocusedRouteNameFromRoute.d.ts.map +1 -0
- package/lib/typescript/module/src/getPathFromState.d.ts +40 -0
- package/lib/typescript/module/src/getPathFromState.d.ts.map +1 -0
- package/lib/typescript/module/src/getStateFromPath.d.ts +34 -0
- package/lib/typescript/module/src/getStateFromPath.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +34 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/isArrayEqual.d.ts +6 -0
- package/lib/typescript/module/src/isArrayEqual.d.ts.map +1 -0
- package/lib/typescript/module/src/isRecordEqual.d.ts +5 -0
- package/lib/typescript/module/src/isRecordEqual.d.ts.map +1 -0
- package/lib/typescript/module/src/theming/ThemeContext.d.ts +3 -0
- package/lib/typescript/module/src/theming/ThemeContext.d.ts.map +1 -0
- package/lib/typescript/module/src/theming/ThemeProvider.d.ts +8 -0
- package/lib/typescript/module/src/theming/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/module/src/theming/useTheme.d.ts +2 -0
- package/lib/typescript/module/src/theming/useTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/types.d.ts +702 -0
- package/lib/typescript/module/src/types.d.ts.map +1 -0
- package/lib/typescript/module/src/useChildListeners.d.ts +12 -0
- package/lib/typescript/module/src/useChildListeners.d.ts.map +1 -0
- package/lib/typescript/module/src/useComponent.d.ts +7 -0
- package/lib/typescript/module/src/useComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/useCurrentRender.d.ts +14 -0
- package/lib/typescript/module/src/useCurrentRender.d.ts.map +1 -0
- package/lib/typescript/module/src/useDescriptors.d.ts +133 -0
- package/lib/typescript/module/src/useDescriptors.d.ts.map +1 -0
- package/lib/typescript/module/src/useEventEmitter.d.ts +9 -0
- package/lib/typescript/module/src/useEventEmitter.d.ts.map +1 -0
- package/lib/typescript/module/src/useFocusEffect.d.ts +11 -0
- package/lib/typescript/module/src/useFocusEffect.d.ts.map +1 -0
- package/lib/typescript/module/src/useFocusEvents.d.ts +13 -0
- package/lib/typescript/module/src/useFocusEvents.d.ts.map +1 -0
- package/lib/typescript/module/src/useFocusedListenersChildrenAdapter.d.ts +13 -0
- package/lib/typescript/module/src/useFocusedListenersChildrenAdapter.d.ts.map +1 -0
- package/lib/typescript/module/src/useIsFocused.d.ts +6 -0
- package/lib/typescript/module/src/useIsFocused.d.ts.map +1 -0
- package/lib/typescript/module/src/useIsomorphicLayoutEffect.d.ts +6 -0
- package/lib/typescript/module/src/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/lib/typescript/module/src/useIsomorphicLayoutEffect.native.d.ts +3 -0
- package/lib/typescript/module/src/useIsomorphicLayoutEffect.native.d.ts.map +1 -0
- package/lib/typescript/module/src/useKeyedChildListeners.d.ts +12 -0
- package/lib/typescript/module/src/useKeyedChildListeners.d.ts.map +1 -0
- package/lib/typescript/module/src/useLazyValue.d.ts +2 -0
- package/lib/typescript/module/src/useLazyValue.d.ts.map +1 -0
- package/lib/typescript/module/src/useNavigation.d.ts +11 -0
- package/lib/typescript/module/src/useNavigation.d.ts.map +1 -0
- package/lib/typescript/module/src/useNavigationBuilder.d.ts +181 -0
- package/lib/typescript/module/src/useNavigationBuilder.d.ts.map +1 -0
- package/lib/typescript/module/src/useNavigationCache.d.ts +65 -0
- package/lib/typescript/module/src/useNavigationCache.d.ts.map +1 -0
- package/lib/typescript/module/src/useNavigationContainerRef.d.ts +3 -0
- package/lib/typescript/module/src/useNavigationContainerRef.d.ts.map +1 -0
- package/lib/typescript/module/src/useNavigationHelpers.d.ts +96 -0
- package/lib/typescript/module/src/useNavigationHelpers.d.ts.map +1 -0
- package/lib/typescript/module/src/useNavigationIndependentTree.d.ts +2 -0
- package/lib/typescript/module/src/useNavigationIndependentTree.d.ts.map +1 -0
- package/lib/typescript/module/src/useNavigationState.d.ts +10 -0
- package/lib/typescript/module/src/useNavigationState.d.ts.map +1 -0
- package/lib/typescript/module/src/useOnAction.d.ts +26 -0
- package/lib/typescript/module/src/useOnAction.d.ts.map +1 -0
- package/lib/typescript/module/src/useOnGetState.d.ts +9 -0
- package/lib/typescript/module/src/useOnGetState.d.ts.map +1 -0
- package/lib/typescript/module/src/useOnPreventRemove.d.ts +17 -0
- package/lib/typescript/module/src/useOnPreventRemove.d.ts.map +1 -0
- package/lib/typescript/module/src/useOnRouteFocus.d.ts +15 -0
- package/lib/typescript/module/src/useOnRouteFocus.d.ts.map +1 -0
- package/lib/typescript/module/src/useOptionsGetters.d.ts +13 -0
- package/lib/typescript/module/src/useOptionsGetters.d.ts.map +1 -0
- package/lib/typescript/module/src/usePreventRemove.d.ts +13 -0
- package/lib/typescript/module/src/usePreventRemove.d.ts.map +1 -0
- package/lib/typescript/module/src/usePreventRemoveContext.d.ts +5 -0
- package/lib/typescript/module/src/usePreventRemoveContext.d.ts.map +1 -0
- package/lib/typescript/module/src/useRegisterNavigator.d.ts +6 -0
- package/lib/typescript/module/src/useRegisterNavigator.d.ts.map +1 -0
- package/lib/typescript/module/src/useRoute.d.ts +9 -0
- package/lib/typescript/module/src/useRoute.d.ts.map +1 -0
- package/lib/typescript/module/src/useRouteCache.d.ts +14 -0
- package/lib/typescript/module/src/useRouteCache.d.ts.map +1 -0
- package/lib/typescript/module/src/useSyncState.d.ts +2 -0
- package/lib/typescript/module/src/useSyncState.d.ts.map +1 -0
- package/lib/typescript/module/src/validatePathConfig.d.ts +2 -0
- package/lib/typescript/module/src/validatePathConfig.d.ts.map +1 -0
- package/lib/typescript/module/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +18 -11
- package/src/BaseNavigationContainer.tsx +1 -1
- package/src/StaticNavigation.tsx +2 -0
- package/src/getPathFromState.tsx +20 -4
- package/src/getStateFromPath.tsx +124 -63
- package/src/types.tsx +33 -46
- package/src/useNavigationBuilder.tsx +1 -1
- package/src/validatePathConfig.tsx +1 -1
- package/lib/commonjs/BaseNavigationContainer.cjs +0 -356
- package/lib/commonjs/BaseNavigationContainer.cjs.map +0 -1
- package/lib/commonjs/CurrentRenderContext.cjs +0 -15
- package/lib/commonjs/DeprecatedNavigationInChildContext.cjs +0 -14
- package/lib/commonjs/EnsureSingleNavigator.cjs +0 -43
- package/lib/commonjs/Group.cjs +0 -14
- package/lib/commonjs/NavigationBuilderContext.cjs +0 -17
- package/lib/commonjs/NavigationContainerRefContext.cjs +0 -14
- package/lib/commonjs/NavigationContext.cjs +0 -14
- package/lib/commonjs/NavigationHelpersContext.cjs +0 -15
- package/lib/commonjs/NavigationIndependentTree.cjs +0 -35
- package/lib/commonjs/NavigationIndependentTreeContext.cjs +0 -14
- package/lib/commonjs/NavigationRouteContext.cjs +0 -14
- package/lib/commonjs/NavigationStateContext.cjs +0 -29
- package/lib/commonjs/PreventRemoveContext.cjs +0 -16
- package/lib/commonjs/PreventRemoveProvider.cjs +0 -91
- package/lib/commonjs/SceneView.cjs +0 -96
- package/lib/commonjs/Screen.cjs +0 -14
- package/lib/commonjs/StaticContainer.cjs +0 -31
- package/lib/commonjs/StaticNavigation.cjs +0 -255
- package/lib/commonjs/StaticNavigation.cjs.map +0 -1
- package/lib/commonjs/UnhandledActionContext.cjs +0 -11
- package/lib/commonjs/checkDuplicateRouteNames.cjs +0 -25
- package/lib/commonjs/checkSerializable.cjs +0 -50
- package/lib/commonjs/createNavigationContainerRef.cjs +0 -69
- package/lib/commonjs/createNavigatorFactory.cjs +0 -34
- package/lib/commonjs/deepFreeze.cjs +0 -37
- package/lib/commonjs/findFocusedRoute.cjs +0 -15
- package/lib/commonjs/getActionFromState.cjs +0 -86
- package/lib/commonjs/getFocusedRouteNameFromRoute.cjs +0 -22
- package/lib/commonjs/getPathFromState.cjs +0 -211
- package/lib/commonjs/getPathFromState.cjs.map +0 -1
- package/lib/commonjs/getStateFromPath.cjs +0 -438
- package/lib/commonjs/getStateFromPath.cjs.map +0 -1
- package/lib/commonjs/index.cjs +0 -287
- package/lib/commonjs/isArrayEqual.cjs +0 -20
- package/lib/commonjs/isRecordEqual.cjs +0 -21
- package/lib/commonjs/theming/ThemeContext.cjs +0 -12
- package/lib/commonjs/theming/ThemeProvider.cjs +0 -21
- package/lib/commonjs/theming/useTheme.cjs +0 -18
- package/lib/commonjs/types.cjs +0 -9
- package/lib/commonjs/types.cjs.map +0 -1
- package/lib/commonjs/useChildListeners.cjs +0 -36
- package/lib/commonjs/useComponent.cjs +0 -40
- package/lib/commonjs/useCurrentRender.cjs +0 -25
- package/lib/commonjs/useDescriptors.cjs +0 -188
- package/lib/commonjs/useEventEmitter.cjs +0 -105
- package/lib/commonjs/useFocusEffect.cjs +0 -80
- package/lib/commonjs/useFocusEvents.cjs +0 -70
- package/lib/commonjs/useFocusedListenersChildrenAdapter.cjs +0 -48
- package/lib/commonjs/useIsFocused.cjs +0 -28
- package/lib/commonjs/useIsomorphicLayoutEffect.cjs +0 -12
- package/lib/commonjs/useIsomorphicLayoutEffect.native.cjs +0 -9
- package/lib/commonjs/useKeyedChildListeners.cjs +0 -33
- package/lib/commonjs/useLazyValue.cjs +0 -17
- package/lib/commonjs/useNavigation.cjs +0 -27
- package/lib/commonjs/useNavigationBuilder.cjs +0 -478
- package/lib/commonjs/useNavigationCache.cjs +0 -162
- package/lib/commonjs/useNavigationContainerRef.cjs +0 -18
- package/lib/commonjs/useNavigationHelpers.cjs +0 -76
- package/lib/commonjs/useNavigationIndependentTree.cjs +0 -14
- package/lib/commonjs/useNavigationState.cjs +0 -26
- package/lib/commonjs/useOnAction.cjs +0 -106
- package/lib/commonjs/useOnGetState.cjs +0 -48
- package/lib/commonjs/useOnPreventRemove.cjs +0 -72
- package/lib/commonjs/useOnRouteFocus.cjs +0 -36
- package/lib/commonjs/useOptionsGetters.cjs +0 -78
- package/lib/commonjs/usePreventRemove.cjs +0 -48
- package/lib/commonjs/usePreventRemoveContext.cjs +0 -18
- package/lib/commonjs/useRegisterNavigator.cjs +0 -32
- package/lib/commonjs/useRoute.cjs +0 -23
- package/lib/commonjs/useRouteCache.cjs +0 -69
- package/lib/commonjs/useSyncState.cjs +0 -48
- package/lib/commonjs/validatePathConfig.cjs +0 -49
- package/lib/commonjs/validatePathConfig.cjs.map +0 -1
- package/lib/module/BaseNavigationContainer.mjs +0 -347
- package/lib/module/BaseNavigationContainer.mjs.map +0 -1
- package/lib/module/CurrentRenderContext.mjs +0 -8
- package/lib/module/CurrentRenderContext.mjs.map +0 -1
- package/lib/module/DeprecatedNavigationInChildContext.mjs +0 -7
- package/lib/module/DeprecatedNavigationInChildContext.mjs.map +0 -1
- package/lib/module/EnsureSingleNavigator.mjs +0 -34
- package/lib/module/EnsureSingleNavigator.mjs.map +0 -1
- package/lib/module/Group.mjs +0 -8
- package/lib/module/Group.mjs.map +0 -1
- package/lib/module/NavigationBuilderContext.mjs +0 -9
- package/lib/module/NavigationBuilderContext.mjs.map +0 -1
- package/lib/module/NavigationContainerRefContext.mjs +0 -6
- package/lib/module/NavigationContainerRefContext.mjs.map +0 -1
- package/lib/module/NavigationContext.mjs +0 -6
- package/lib/module/NavigationContext.mjs.map +0 -1
- package/lib/module/NavigationHelpersContext.mjs +0 -7
- package/lib/module/NavigationHelpersContext.mjs.map +0 -1
- package/lib/module/NavigationIndependentTree.mjs +0 -28
- package/lib/module/NavigationIndependentTree.mjs.map +0 -1
- package/lib/module/NavigationIndependentTreeContext.mjs +0 -7
- package/lib/module/NavigationIndependentTreeContext.mjs.map +0 -1
- package/lib/module/NavigationRouteContext.mjs +0 -7
- package/lib/module/NavigationRouteContext.mjs.map +0 -1
- package/lib/module/NavigationStateContext.mjs +0 -21
- package/lib/module/NavigationStateContext.mjs.map +0 -1
- package/lib/module/PreventRemoveContext.mjs +0 -9
- package/lib/module/PreventRemoveContext.mjs.map +0 -1
- package/lib/module/PreventRemoveProvider.mjs +0 -82
- package/lib/module/PreventRemoveProvider.mjs.map +0 -1
- package/lib/module/SceneView.mjs +0 -88
- package/lib/module/SceneView.mjs.map +0 -1
- package/lib/module/Screen.mjs +0 -8
- package/lib/module/Screen.mjs.map +0 -1
- package/lib/module/StaticContainer.mjs +0 -24
- package/lib/module/StaticContainer.mjs.map +0 -1
- package/lib/module/StaticNavigation.mjs +0 -246
- package/lib/module/StaticNavigation.mjs.map +0 -1
- package/lib/module/UnhandledActionContext.mjs +0 -3
- package/lib/module/UnhandledActionContext.mjs.map +0 -1
- package/lib/module/checkDuplicateRouteNames.mjs +0 -19
- package/lib/module/checkDuplicateRouteNames.mjs.map +0 -1
- package/lib/module/checkSerializable.mjs +0 -44
- package/lib/module/checkSerializable.mjs.map +0 -1
- package/lib/module/createNavigationContainerRef.mjs +0 -62
- package/lib/module/createNavigationContainerRef.mjs.map +0 -1
- package/lib/module/createNavigatorFactory.mjs +0 -29
- package/lib/module/createNavigatorFactory.mjs.map +0 -1
- package/lib/module/deepFreeze.mjs +0 -29
- package/lib/module/deepFreeze.mjs.map +0 -1
- package/lib/module/findFocusedRoute.mjs +0 -9
- package/lib/module/findFocusedRoute.mjs.map +0 -1
- package/lib/module/getActionFromState.mjs +0 -80
- package/lib/module/getActionFromState.mjs.map +0 -1
- package/lib/module/getFocusedRouteNameFromRoute.mjs +0 -16
- package/lib/module/getFocusedRouteNameFromRoute.mjs.map +0 -1
- package/lib/module/getPathFromState.mjs +0 -203
- package/lib/module/getPathFromState.mjs.map +0 -1
- package/lib/module/getStateFromPath.mjs +0 -429
- package/lib/module/getStateFromPath.mjs.map +0 -1
- package/lib/module/index.mjs +0 -34
- package/lib/module/index.mjs.map +0 -1
- package/lib/module/isArrayEqual.mjs +0 -14
- package/lib/module/isArrayEqual.mjs.map +0 -1
- package/lib/module/isRecordEqual.mjs +0 -15
- package/lib/module/isRecordEqual.mjs.map +0 -1
- package/lib/module/theming/ThemeContext.mjs +0 -4
- package/lib/module/theming/ThemeContext.mjs.map +0 -1
- package/lib/module/theming/ThemeProvider.mjs +0 -13
- package/lib/module/theming/ThemeProvider.mjs.map +0 -1
- package/lib/module/theming/useTheme.mjs +0 -10
- package/lib/module/theming/useTheme.mjs.map +0 -1
- package/lib/module/types.mjs +0 -2
- package/lib/module/types.mjs.map +0 -1
- package/lib/module/useChildListeners.mjs +0 -28
- package/lib/module/useChildListeners.mjs.map +0 -1
- package/lib/module/useComponent.mjs +0 -32
- package/lib/module/useComponent.mjs.map +0 -1
- package/lib/module/useCurrentRender.mjs +0 -17
- package/lib/module/useCurrentRender.mjs.map +0 -1
- package/lib/module/useDescriptors.mjs +0 -180
- package/lib/module/useDescriptors.mjs.map +0 -1
- package/lib/module/useEventEmitter.mjs +0 -97
- package/lib/module/useEventEmitter.mjs.map +0 -1
- package/lib/module/useFocusEffect.mjs +0 -72
- package/lib/module/useFocusEffect.mjs.map +0 -1
- package/lib/module/useFocusEvents.mjs +0 -62
- package/lib/module/useFocusEvents.mjs.map +0 -1
- package/lib/module/useFocusedListenersChildrenAdapter.mjs +0 -40
- package/lib/module/useFocusedListenersChildrenAdapter.mjs.map +0 -1
- package/lib/module/useIsFocused.mjs +0 -21
- package/lib/module/useIsFocused.mjs.map +0 -1
- package/lib/module/useIsomorphicLayoutEffect.mjs +0 -7
- package/lib/module/useIsomorphicLayoutEffect.mjs.map +0 -1
- package/lib/module/useIsomorphicLayoutEffect.native.mjs +0 -3
- package/lib/module/useIsomorphicLayoutEffect.native.mjs.map +0 -1
- package/lib/module/useKeyedChildListeners.mjs +0 -25
- package/lib/module/useKeyedChildListeners.mjs.map +0 -1
- package/lib/module/useLazyValue.mjs +0 -9
- package/lib/module/useLazyValue.mjs.map +0 -1
- package/lib/module/useNavigation.mjs +0 -19
- package/lib/module/useNavigation.mjs.map +0 -1
- package/lib/module/useNavigationBuilder.mjs +0 -470
- package/lib/module/useNavigationBuilder.mjs.map +0 -1
- package/lib/module/useNavigationCache.mjs +0 -154
- package/lib/module/useNavigationCache.mjs.map +0 -1
- package/lib/module/useNavigationContainerRef.mjs +0 -10
- package/lib/module/useNavigationContainerRef.mjs.map +0 -1
- package/lib/module/useNavigationHelpers.mjs +0 -68
- package/lib/module/useNavigationHelpers.mjs.map +0 -1
- package/lib/module/useNavigationIndependentTree.mjs +0 -6
- package/lib/module/useNavigationIndependentTree.mjs.map +0 -1
- package/lib/module/useNavigationState.mjs +0 -18
- package/lib/module/useNavigationState.mjs.map +0 -1
- package/lib/module/useOnAction.mjs +0 -98
- package/lib/module/useOnAction.mjs.map +0 -1
- package/lib/module/useOnGetState.mjs +0 -40
- package/lib/module/useOnGetState.mjs.map +0 -1
- package/lib/module/useOnPreventRemove.mjs +0 -62
- package/lib/module/useOnPreventRemove.mjs.map +0 -1
- package/lib/module/useOnRouteFocus.mjs +0 -28
- package/lib/module/useOnRouteFocus.mjs.map +0 -1
- package/lib/module/useOptionsGetters.mjs +0 -70
- package/lib/module/useOptionsGetters.mjs.map +0 -1
- package/lib/module/usePreventRemove.mjs +0 -40
- package/lib/module/usePreventRemove.mjs.map +0 -1
- package/lib/module/usePreventRemoveContext.mjs +0 -10
- package/lib/module/usePreventRemoveContext.mjs.map +0 -1
- package/lib/module/useRegisterNavigator.mjs +0 -25
- package/lib/module/useRegisterNavigator.mjs.map +0 -1
- package/lib/module/useRoute.mjs +0 -15
- package/lib/module/useRoute.mjs.map +0 -1
- package/lib/module/useRouteCache.mjs +0 -60
- package/lib/module/useRouteCache.mjs.map +0 -1
- package/lib/module/useSyncState.mjs +0 -40
- package/lib/module/useSyncState.mjs.map +0 -1
- package/lib/module/validatePathConfig.mjs +0 -43
- package/lib/module/validatePathConfig.mjs.map +0 -1
- package/lib/typescript/src/BaseNavigationContainer.d.ts.map +0 -1
- package/lib/typescript/src/CurrentRenderContext.d.ts.map +0 -1
- package/lib/typescript/src/DeprecatedNavigationInChildContext.d.ts.map +0 -1
- package/lib/typescript/src/EnsureSingleNavigator.d.ts.map +0 -1
- package/lib/typescript/src/Group.d.ts.map +0 -1
- package/lib/typescript/src/NavigationBuilderContext.d.ts.map +0 -1
- package/lib/typescript/src/NavigationContainerRefContext.d.ts.map +0 -1
- package/lib/typescript/src/NavigationContext.d.ts.map +0 -1
- package/lib/typescript/src/NavigationHelpersContext.d.ts.map +0 -1
- package/lib/typescript/src/NavigationIndependentTree.d.ts.map +0 -1
- package/lib/typescript/src/NavigationIndependentTreeContext.d.ts.map +0 -1
- package/lib/typescript/src/NavigationRouteContext.d.ts.map +0 -1
- package/lib/typescript/src/NavigationStateContext.d.ts.map +0 -1
- package/lib/typescript/src/PreventRemoveContext.d.ts.map +0 -1
- package/lib/typescript/src/PreventRemoveProvider.d.ts.map +0 -1
- package/lib/typescript/src/SceneView.d.ts.map +0 -1
- package/lib/typescript/src/Screen.d.ts.map +0 -1
- package/lib/typescript/src/StaticContainer.d.ts.map +0 -1
- package/lib/typescript/src/StaticNavigation.d.ts.map +0 -1
- package/lib/typescript/src/UnhandledActionContext.d.ts.map +0 -1
- package/lib/typescript/src/checkDuplicateRouteNames.d.ts.map +0 -1
- package/lib/typescript/src/checkSerializable.d.ts.map +0 -1
- package/lib/typescript/src/createNavigationContainerRef.d.ts.map +0 -1
- package/lib/typescript/src/createNavigatorFactory.d.ts.map +0 -1
- package/lib/typescript/src/deepFreeze.d.ts.map +0 -1
- package/lib/typescript/src/findFocusedRoute.d.ts.map +0 -1
- package/lib/typescript/src/getActionFromState.d.ts.map +0 -1
- package/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts.map +0 -1
- package/lib/typescript/src/getPathFromState.d.ts.map +0 -1
- package/lib/typescript/src/getStateFromPath.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/isArrayEqual.d.ts.map +0 -1
- package/lib/typescript/src/isRecordEqual.d.ts.map +0 -1
- package/lib/typescript/src/theming/ThemeContext.d.ts.map +0 -1
- package/lib/typescript/src/theming/ThemeProvider.d.ts.map +0 -1
- package/lib/typescript/src/theming/useTheme.d.ts.map +0 -1
- package/lib/typescript/src/types.d.ts +0 -695
- package/lib/typescript/src/types.d.ts.map +0 -1
- package/lib/typescript/src/useChildListeners.d.ts.map +0 -1
- package/lib/typescript/src/useComponent.d.ts.map +0 -1
- package/lib/typescript/src/useCurrentRender.d.ts.map +0 -1
- package/lib/typescript/src/useDescriptors.d.ts +0 -133
- package/lib/typescript/src/useDescriptors.d.ts.map +0 -1
- package/lib/typescript/src/useEventEmitter.d.ts.map +0 -1
- package/lib/typescript/src/useFocusEffect.d.ts.map +0 -1
- package/lib/typescript/src/useFocusEvents.d.ts.map +0 -1
- package/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts.map +0 -1
- package/lib/typescript/src/useIsFocused.d.ts.map +0 -1
- package/lib/typescript/src/useIsomorphicLayoutEffect.d.ts.map +0 -1
- package/lib/typescript/src/useIsomorphicLayoutEffect.native.d.ts.map +0 -1
- package/lib/typescript/src/useKeyedChildListeners.d.ts.map +0 -1
- package/lib/typescript/src/useLazyValue.d.ts.map +0 -1
- package/lib/typescript/src/useNavigation.d.ts.map +0 -1
- package/lib/typescript/src/useNavigationBuilder.d.ts +0 -181
- package/lib/typescript/src/useNavigationBuilder.d.ts.map +0 -1
- package/lib/typescript/src/useNavigationCache.d.ts +0 -65
- package/lib/typescript/src/useNavigationCache.d.ts.map +0 -1
- package/lib/typescript/src/useNavigationContainerRef.d.ts.map +0 -1
- package/lib/typescript/src/useNavigationHelpers.d.ts +0 -96
- package/lib/typescript/src/useNavigationHelpers.d.ts.map +0 -1
- package/lib/typescript/src/useNavigationIndependentTree.d.ts.map +0 -1
- package/lib/typescript/src/useNavigationState.d.ts.map +0 -1
- package/lib/typescript/src/useOnAction.d.ts.map +0 -1
- package/lib/typescript/src/useOnGetState.d.ts.map +0 -1
- package/lib/typescript/src/useOnPreventRemove.d.ts.map +0 -1
- package/lib/typescript/src/useOnRouteFocus.d.ts.map +0 -1
- package/lib/typescript/src/useOptionsGetters.d.ts.map +0 -1
- package/lib/typescript/src/usePreventRemove.d.ts.map +0 -1
- package/lib/typescript/src/usePreventRemoveContext.d.ts.map +0 -1
- package/lib/typescript/src/useRegisterNavigator.d.ts.map +0 -1
- package/lib/typescript/src/useRoute.d.ts.map +0 -1
- package/lib/typescript/src/useRouteCache.d.ts.map +0 -1
- package/lib/typescript/src/useSyncState.d.ts.map +0 -1
- package/lib/typescript/src/validatePathConfig.d.ts.map +0 -1
- package/lib/typescript/utils/usePrevious.d.ts +0 -6
- package/lib/typescript/utils/usePrevious.d.ts.map +0 -1
- /package/lib/commonjs/{CurrentRenderContext.cjs.map → CurrentRenderContext.js.map} +0 -0
- /package/lib/commonjs/{DeprecatedNavigationInChildContext.cjs.map → DeprecatedNavigationInChildContext.js.map} +0 -0
- /package/lib/commonjs/{EnsureSingleNavigator.cjs.map → EnsureSingleNavigator.js.map} +0 -0
- /package/lib/commonjs/{Group.cjs.map → Group.js.map} +0 -0
- /package/lib/commonjs/{NavigationBuilderContext.cjs.map → NavigationBuilderContext.js.map} +0 -0
- /package/lib/commonjs/{NavigationContainerRefContext.cjs.map → NavigationContainerRefContext.js.map} +0 -0
- /package/lib/commonjs/{NavigationContext.cjs.map → NavigationContext.js.map} +0 -0
- /package/lib/commonjs/{NavigationHelpersContext.cjs.map → NavigationHelpersContext.js.map} +0 -0
- /package/lib/commonjs/{NavigationIndependentTree.cjs.map → NavigationIndependentTree.js.map} +0 -0
- /package/lib/commonjs/{NavigationIndependentTreeContext.cjs.map → NavigationIndependentTreeContext.js.map} +0 -0
- /package/lib/commonjs/{NavigationRouteContext.cjs.map → NavigationRouteContext.js.map} +0 -0
- /package/lib/commonjs/{NavigationStateContext.cjs.map → NavigationStateContext.js.map} +0 -0
- /package/lib/commonjs/{PreventRemoveContext.cjs.map → PreventRemoveContext.js.map} +0 -0
- /package/lib/commonjs/{PreventRemoveProvider.cjs.map → PreventRemoveProvider.js.map} +0 -0
- /package/lib/commonjs/{SceneView.cjs.map → SceneView.js.map} +0 -0
- /package/lib/commonjs/{Screen.cjs.map → Screen.js.map} +0 -0
- /package/lib/commonjs/{StaticContainer.cjs.map → StaticContainer.js.map} +0 -0
- /package/lib/commonjs/{UnhandledActionContext.cjs.map → UnhandledActionContext.js.map} +0 -0
- /package/lib/commonjs/{checkDuplicateRouteNames.cjs.map → checkDuplicateRouteNames.js.map} +0 -0
- /package/lib/commonjs/{checkSerializable.cjs.map → checkSerializable.js.map} +0 -0
- /package/lib/commonjs/{createNavigationContainerRef.cjs.map → createNavigationContainerRef.js.map} +0 -0
- /package/lib/commonjs/{createNavigatorFactory.cjs.map → createNavigatorFactory.js.map} +0 -0
- /package/lib/commonjs/{deepFreeze.cjs.map → deepFreeze.js.map} +0 -0
- /package/lib/commonjs/{findFocusedRoute.cjs.map → findFocusedRoute.js.map} +0 -0
- /package/lib/commonjs/{getActionFromState.cjs.map → getActionFromState.js.map} +0 -0
- /package/lib/commonjs/{getFocusedRouteNameFromRoute.cjs.map → getFocusedRouteNameFromRoute.js.map} +0 -0
- /package/lib/commonjs/{index.cjs.map → index.js.map} +0 -0
- /package/lib/commonjs/{isArrayEqual.cjs.map → isArrayEqual.js.map} +0 -0
- /package/lib/commonjs/{isRecordEqual.cjs.map → isRecordEqual.js.map} +0 -0
- /package/lib/commonjs/theming/{ThemeContext.cjs.map → ThemeContext.js.map} +0 -0
- /package/lib/commonjs/theming/{ThemeProvider.cjs.map → ThemeProvider.js.map} +0 -0
- /package/lib/commonjs/theming/{useTheme.cjs.map → useTheme.js.map} +0 -0
- /package/lib/commonjs/{useChildListeners.cjs.map → useChildListeners.js.map} +0 -0
- /package/lib/commonjs/{useComponent.cjs.map → useComponent.js.map} +0 -0
- /package/lib/commonjs/{useCurrentRender.cjs.map → useCurrentRender.js.map} +0 -0
- /package/lib/commonjs/{useDescriptors.cjs.map → useDescriptors.js.map} +0 -0
- /package/lib/commonjs/{useEventEmitter.cjs.map → useEventEmitter.js.map} +0 -0
- /package/lib/commonjs/{useFocusEffect.cjs.map → useFocusEffect.js.map} +0 -0
- /package/lib/commonjs/{useFocusEvents.cjs.map → useFocusEvents.js.map} +0 -0
- /package/lib/commonjs/{useFocusedListenersChildrenAdapter.cjs.map → useFocusedListenersChildrenAdapter.js.map} +0 -0
- /package/lib/commonjs/{useIsFocused.cjs.map → useIsFocused.js.map} +0 -0
- /package/lib/commonjs/{useIsomorphicLayoutEffect.cjs.map → useIsomorphicLayoutEffect.js.map} +0 -0
- /package/lib/commonjs/{useIsomorphicLayoutEffect.native.cjs.map → useIsomorphicLayoutEffect.native.js.map} +0 -0
- /package/lib/commonjs/{useKeyedChildListeners.cjs.map → useKeyedChildListeners.js.map} +0 -0
- /package/lib/commonjs/{useLazyValue.cjs.map → useLazyValue.js.map} +0 -0
- /package/lib/commonjs/{useNavigation.cjs.map → useNavigation.js.map} +0 -0
- /package/lib/commonjs/{useNavigationBuilder.cjs.map → useNavigationBuilder.js.map} +0 -0
- /package/lib/commonjs/{useNavigationCache.cjs.map → useNavigationCache.js.map} +0 -0
- /package/lib/commonjs/{useNavigationContainerRef.cjs.map → useNavigationContainerRef.js.map} +0 -0
- /package/lib/commonjs/{useNavigationHelpers.cjs.map → useNavigationHelpers.js.map} +0 -0
- /package/lib/commonjs/{useNavigationIndependentTree.cjs.map → useNavigationIndependentTree.js.map} +0 -0
- /package/lib/commonjs/{useNavigationState.cjs.map → useNavigationState.js.map} +0 -0
- /package/lib/commonjs/{useOnAction.cjs.map → useOnAction.js.map} +0 -0
- /package/lib/commonjs/{useOnGetState.cjs.map → useOnGetState.js.map} +0 -0
- /package/lib/commonjs/{useOnPreventRemove.cjs.map → useOnPreventRemove.js.map} +0 -0
- /package/lib/commonjs/{useOnRouteFocus.cjs.map → useOnRouteFocus.js.map} +0 -0
- /package/lib/commonjs/{useOptionsGetters.cjs.map → useOptionsGetters.js.map} +0 -0
- /package/lib/commonjs/{usePreventRemove.cjs.map → usePreventRemove.js.map} +0 -0
- /package/lib/commonjs/{usePreventRemoveContext.cjs.map → usePreventRemoveContext.js.map} +0 -0
- /package/lib/commonjs/{useRegisterNavigator.cjs.map → useRegisterNavigator.js.map} +0 -0
- /package/lib/commonjs/{useRoute.cjs.map → useRoute.js.map} +0 -0
- /package/lib/commonjs/{useRouteCache.cjs.map → useRouteCache.js.map} +0 -0
- /package/lib/commonjs/{useSyncState.cjs.map → useSyncState.js.map} +0 -0
- /package/lib/typescript/{src → commonjs/src}/BaseNavigationContainer.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/CurrentRenderContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/DeprecatedNavigationInChildContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/EnsureSingleNavigator.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/Group.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationBuilderContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationContainerRefContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationHelpersContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationIndependentTree.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationIndependentTreeContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationRouteContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationStateContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/PreventRemoveContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/PreventRemoveProvider.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/SceneView.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/Screen.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/StaticContainer.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/StaticNavigation.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/UnhandledActionContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/checkDuplicateRouteNames.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/checkSerializable.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/createNavigationContainerRef.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/createNavigatorFactory.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/deepFreeze.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/findFocusedRoute.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/getActionFromState.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/getFocusedRouteNameFromRoute.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/getPathFromState.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/getStateFromPath.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/isArrayEqual.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/isRecordEqual.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/theming/ThemeContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/theming/ThemeProvider.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/theming/useTheme.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useChildListeners.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useComponent.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useCurrentRender.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useEventEmitter.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useFocusEffect.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useFocusEvents.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useFocusedListenersChildrenAdapter.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useIsFocused.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useIsomorphicLayoutEffect.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useIsomorphicLayoutEffect.native.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useKeyedChildListeners.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useLazyValue.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useNavigation.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useNavigationContainerRef.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useNavigationIndependentTree.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useNavigationState.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useOnAction.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useOnGetState.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useOnPreventRemove.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useOnRouteFocus.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useOptionsGetters.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/usePreventRemove.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/usePreventRemoveContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useRegisterNavigator.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useRoute.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useRouteCache.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useSyncState.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/validatePathConfig.d.ts +0 -0
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BaseNavigationContainer = void 0;
|
|
7
|
+
var _routers = require("@react-navigation/routers");
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _useLatestCallback = _interopRequireDefault(require("use-latest-callback"));
|
|
10
|
+
var _checkDuplicateRouteNames = require("./checkDuplicateRouteNames.js");
|
|
11
|
+
var _checkSerializable = require("./checkSerializable.js");
|
|
12
|
+
var _createNavigationContainerRef = require("./createNavigationContainerRef.js");
|
|
13
|
+
var _DeprecatedNavigationInChildContext = require("./DeprecatedNavigationInChildContext.js");
|
|
14
|
+
var _EnsureSingleNavigator = require("./EnsureSingleNavigator.js");
|
|
15
|
+
var _findFocusedRoute = require("./findFocusedRoute.js");
|
|
16
|
+
var _NavigationBuilderContext = require("./NavigationBuilderContext.js");
|
|
17
|
+
var _NavigationContainerRefContext = require("./NavigationContainerRefContext.js");
|
|
18
|
+
var _NavigationIndependentTreeContext = require("./NavigationIndependentTreeContext.js");
|
|
19
|
+
var _NavigationStateContext = require("./NavigationStateContext.js");
|
|
20
|
+
var _ThemeProvider = require("./theming/ThemeProvider.js");
|
|
21
|
+
var _UnhandledActionContext = require("./UnhandledActionContext.js");
|
|
22
|
+
var _useChildListeners = require("./useChildListeners.js");
|
|
23
|
+
var _useEventEmitter = require("./useEventEmitter.js");
|
|
24
|
+
var _useKeyedChildListeners = require("./useKeyedChildListeners.js");
|
|
25
|
+
var _useNavigationIndependentTree = require("./useNavigationIndependentTree.js");
|
|
26
|
+
var _useOptionsGetters = require("./useOptionsGetters.js");
|
|
27
|
+
var _useSyncState = require("./useSyncState.js");
|
|
28
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
30
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
31
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
32
|
+
const serializableWarnings = [];
|
|
33
|
+
const duplicateNameWarnings = [];
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Remove `key` and `routeNames` from the state objects recursively to get partial state.
|
|
37
|
+
*
|
|
38
|
+
* @param state Initial state object.
|
|
39
|
+
*/
|
|
40
|
+
const getPartialState = state => {
|
|
41
|
+
if (state === undefined) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
46
|
+
const {
|
|
47
|
+
key,
|
|
48
|
+
routeNames,
|
|
49
|
+
...partialState
|
|
50
|
+
} = state;
|
|
51
|
+
return {
|
|
52
|
+
...partialState,
|
|
53
|
+
stale: true,
|
|
54
|
+
routes: state.routes.map(route => {
|
|
55
|
+
if (route.state === undefined) {
|
|
56
|
+
return route;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
...route,
|
|
60
|
+
state: getPartialState(route.state)
|
|
61
|
+
};
|
|
62
|
+
})
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Container component which holds the navigation state.
|
|
68
|
+
* This should be rendered at the root wrapping the whole app.
|
|
69
|
+
*
|
|
70
|
+
* @param props.initialState Initial state object for the navigation tree.
|
|
71
|
+
* @param props.onReady Callback which is called after the navigation tree mounts.
|
|
72
|
+
* @param props.onStateChange Callback which is called with the latest navigation state when it changes.
|
|
73
|
+
* @param props.onUnhandledAction Callback which is called when an action is not handled.
|
|
74
|
+
* @param props.theme Theme object for the UI elements.
|
|
75
|
+
* @param props.children Child elements to render the content.
|
|
76
|
+
* @param props.ref Ref object which refers to the navigation object containing helper methods.
|
|
77
|
+
*/
|
|
78
|
+
const BaseNavigationContainer = exports.BaseNavigationContainer = /*#__PURE__*/React.forwardRef(function BaseNavigationContainer({
|
|
79
|
+
initialState,
|
|
80
|
+
onStateChange,
|
|
81
|
+
onReady,
|
|
82
|
+
onUnhandledAction,
|
|
83
|
+
navigationInChildEnabled = false,
|
|
84
|
+
theme,
|
|
85
|
+
children
|
|
86
|
+
}, ref) {
|
|
87
|
+
const parent = React.useContext(_NavigationStateContext.NavigationStateContext);
|
|
88
|
+
const independent = (0, _useNavigationIndependentTree.useNavigationIndependentTree)();
|
|
89
|
+
if (!parent.isDefault && !independent) {
|
|
90
|
+
throw new Error("Looks like you have nested a 'NavigationContainer' inside another. Normally you need only one container at the root of the app, so this was probably an error. If this was intentional, wrap the container in 'NavigationIndependentTree' explicitly. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them.");
|
|
91
|
+
}
|
|
92
|
+
const [state, getState, setState] = (0, _useSyncState.useSyncState)(() => getPartialState(initialState == null ? undefined : initialState));
|
|
93
|
+
const isFirstMountRef = React.useRef(true);
|
|
94
|
+
const navigatorKeyRef = React.useRef();
|
|
95
|
+
const getKey = React.useCallback(() => navigatorKeyRef.current, []);
|
|
96
|
+
const setKey = React.useCallback(key => {
|
|
97
|
+
navigatorKeyRef.current = key;
|
|
98
|
+
}, []);
|
|
99
|
+
const {
|
|
100
|
+
listeners,
|
|
101
|
+
addListener
|
|
102
|
+
} = (0, _useChildListeners.useChildListeners)();
|
|
103
|
+
const {
|
|
104
|
+
keyedListeners,
|
|
105
|
+
addKeyedListener
|
|
106
|
+
} = (0, _useKeyedChildListeners.useKeyedChildListeners)();
|
|
107
|
+
const dispatch = (0, _useLatestCallback.default)(action => {
|
|
108
|
+
if (listeners.focus[0] == null) {
|
|
109
|
+
console.error(_createNavigationContainerRef.NOT_INITIALIZED_ERROR);
|
|
110
|
+
} else {
|
|
111
|
+
listeners.focus[0](navigation => navigation.dispatch(action));
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
const canGoBack = (0, _useLatestCallback.default)(() => {
|
|
115
|
+
if (listeners.focus[0] == null) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
const {
|
|
119
|
+
result,
|
|
120
|
+
handled
|
|
121
|
+
} = listeners.focus[0](navigation => navigation.canGoBack());
|
|
122
|
+
if (handled) {
|
|
123
|
+
return result;
|
|
124
|
+
} else {
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
const resetRoot = (0, _useLatestCallback.default)(state => {
|
|
129
|
+
const target = state?.key ?? keyedListeners.getState.root?.().key;
|
|
130
|
+
if (target == null) {
|
|
131
|
+
console.error(_createNavigationContainerRef.NOT_INITIALIZED_ERROR);
|
|
132
|
+
} else {
|
|
133
|
+
listeners.focus[0](navigation => navigation.dispatch({
|
|
134
|
+
..._routers.CommonActions.reset(state),
|
|
135
|
+
target
|
|
136
|
+
}));
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
const getRootState = (0, _useLatestCallback.default)(() => {
|
|
140
|
+
return keyedListeners.getState.root?.();
|
|
141
|
+
});
|
|
142
|
+
const getCurrentRoute = (0, _useLatestCallback.default)(() => {
|
|
143
|
+
const state = getRootState();
|
|
144
|
+
if (state == null) {
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
const route = (0, _findFocusedRoute.findFocusedRoute)(state);
|
|
148
|
+
return route;
|
|
149
|
+
});
|
|
150
|
+
const isReady = (0, _useLatestCallback.default)(() => listeners.focus[0] != null);
|
|
151
|
+
const emitter = (0, _useEventEmitter.useEventEmitter)();
|
|
152
|
+
const {
|
|
153
|
+
addOptionsGetter,
|
|
154
|
+
getCurrentOptions
|
|
155
|
+
} = (0, _useOptionsGetters.useOptionsGetters)({});
|
|
156
|
+
const navigation = React.useMemo(() => ({
|
|
157
|
+
...Object.keys(_routers.CommonActions).reduce((acc, name) => {
|
|
158
|
+
acc[name] = (...args) =>
|
|
159
|
+
// @ts-expect-error: this is ok
|
|
160
|
+
dispatch(_routers.CommonActions[name](...args));
|
|
161
|
+
return acc;
|
|
162
|
+
}, {}),
|
|
163
|
+
...emitter.create('root'),
|
|
164
|
+
dispatch,
|
|
165
|
+
resetRoot,
|
|
166
|
+
isFocused: () => true,
|
|
167
|
+
canGoBack,
|
|
168
|
+
getParent: () => undefined,
|
|
169
|
+
getState,
|
|
170
|
+
getRootState,
|
|
171
|
+
getCurrentRoute,
|
|
172
|
+
getCurrentOptions,
|
|
173
|
+
isReady,
|
|
174
|
+
setOptions: () => {
|
|
175
|
+
throw new Error('Cannot call setOptions outside a screen');
|
|
176
|
+
}
|
|
177
|
+
}), [canGoBack, dispatch, emitter, getCurrentOptions, getCurrentRoute, getRootState, getState, isReady, resetRoot]);
|
|
178
|
+
React.useImperativeHandle(ref, () => navigation, [navigation]);
|
|
179
|
+
const onDispatchAction = (0, _useLatestCallback.default)((action, noop) => {
|
|
180
|
+
emitter.emit({
|
|
181
|
+
type: '__unsafe_action__',
|
|
182
|
+
data: {
|
|
183
|
+
action,
|
|
184
|
+
noop,
|
|
185
|
+
stack: stackRef.current
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
const lastEmittedOptionsRef = React.useRef();
|
|
190
|
+
const onOptionsChange = (0, _useLatestCallback.default)(options => {
|
|
191
|
+
if (lastEmittedOptionsRef.current === options) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
lastEmittedOptionsRef.current = options;
|
|
195
|
+
emitter.emit({
|
|
196
|
+
type: 'options',
|
|
197
|
+
data: {
|
|
198
|
+
options
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
const stackRef = React.useRef();
|
|
203
|
+
const builderContext = React.useMemo(() => ({
|
|
204
|
+
addListener,
|
|
205
|
+
addKeyedListener,
|
|
206
|
+
onDispatchAction,
|
|
207
|
+
onOptionsChange,
|
|
208
|
+
stackRef
|
|
209
|
+
}), [addListener, addKeyedListener, onDispatchAction, onOptionsChange]);
|
|
210
|
+
const isInitialRef = React.useRef(true);
|
|
211
|
+
const getIsInitial = React.useCallback(() => isInitialRef.current, []);
|
|
212
|
+
const context = React.useMemo(() => ({
|
|
213
|
+
state,
|
|
214
|
+
getState,
|
|
215
|
+
setState,
|
|
216
|
+
getKey,
|
|
217
|
+
setKey,
|
|
218
|
+
getIsInitial,
|
|
219
|
+
addOptionsGetter
|
|
220
|
+
}), [state, getState, setState, getKey, setKey, getIsInitial, addOptionsGetter]);
|
|
221
|
+
const onReadyRef = React.useRef(onReady);
|
|
222
|
+
const onStateChangeRef = React.useRef(onStateChange);
|
|
223
|
+
React.useEffect(() => {
|
|
224
|
+
isInitialRef.current = false;
|
|
225
|
+
onStateChangeRef.current = onStateChange;
|
|
226
|
+
onReadyRef.current = onReady;
|
|
227
|
+
});
|
|
228
|
+
const onReadyCalledRef = React.useRef(false);
|
|
229
|
+
React.useEffect(() => {
|
|
230
|
+
if (!onReadyCalledRef.current && isReady()) {
|
|
231
|
+
onReadyCalledRef.current = true;
|
|
232
|
+
onReadyRef.current?.();
|
|
233
|
+
}
|
|
234
|
+
}, [state, isReady]);
|
|
235
|
+
React.useEffect(() => {
|
|
236
|
+
const hydratedState = getRootState();
|
|
237
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
238
|
+
if (hydratedState !== undefined) {
|
|
239
|
+
const serializableResult = (0, _checkSerializable.checkSerializable)(hydratedState);
|
|
240
|
+
if (!serializableResult.serializable) {
|
|
241
|
+
const {
|
|
242
|
+
location,
|
|
243
|
+
reason
|
|
244
|
+
} = serializableResult;
|
|
245
|
+
let path = '';
|
|
246
|
+
let pointer = hydratedState;
|
|
247
|
+
let params = false;
|
|
248
|
+
for (let i = 0; i < location.length; i++) {
|
|
249
|
+
const curr = location[i];
|
|
250
|
+
const prev = location[i - 1];
|
|
251
|
+
pointer = pointer[curr];
|
|
252
|
+
if (!params && curr === 'state') {
|
|
253
|
+
continue;
|
|
254
|
+
} else if (!params && curr === 'routes') {
|
|
255
|
+
if (path) {
|
|
256
|
+
path += ' > ';
|
|
257
|
+
}
|
|
258
|
+
} else if (!params && typeof curr === 'number' && prev === 'routes') {
|
|
259
|
+
path += pointer?.name;
|
|
260
|
+
} else if (!params) {
|
|
261
|
+
path += ` > ${curr}`;
|
|
262
|
+
params = true;
|
|
263
|
+
} else {
|
|
264
|
+
if (typeof curr === 'number' || /^[0-9]+$/.test(curr)) {
|
|
265
|
+
path += `[${curr}]`;
|
|
266
|
+
} else if (/^[a-z$_]+$/i.test(curr)) {
|
|
267
|
+
path += `.${curr}`;
|
|
268
|
+
} else {
|
|
269
|
+
path += `[${JSON.stringify(curr)}]`;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
const message = `Non-serializable values were found in the navigation state. Check:\n\n${path} (${reason})\n\nThis can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.`;
|
|
274
|
+
if (!serializableWarnings.includes(message)) {
|
|
275
|
+
serializableWarnings.push(message);
|
|
276
|
+
console.warn(message);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
const duplicateRouteNamesResult = (0, _checkDuplicateRouteNames.checkDuplicateRouteNames)(hydratedState);
|
|
280
|
+
if (duplicateRouteNamesResult.length) {
|
|
281
|
+
const message = `Found screens with the same name nested inside one another. Check:\n${duplicateRouteNamesResult.map(locations => `\n${locations.join(', ')}`)}\n\nThis can cause confusing behavior during navigation. Consider using unique names for each screen instead.`;
|
|
282
|
+
if (!duplicateNameWarnings.includes(message)) {
|
|
283
|
+
duplicateNameWarnings.push(message);
|
|
284
|
+
console.warn(message);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
emitter.emit({
|
|
290
|
+
type: 'state',
|
|
291
|
+
data: {
|
|
292
|
+
state
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
if (!isFirstMountRef.current && onStateChangeRef.current) {
|
|
296
|
+
onStateChangeRef.current(hydratedState);
|
|
297
|
+
}
|
|
298
|
+
isFirstMountRef.current = false;
|
|
299
|
+
}, [getRootState, emitter, state]);
|
|
300
|
+
const defaultOnUnhandledAction = (0, _useLatestCallback.default)(action => {
|
|
301
|
+
if (process.env.NODE_ENV === 'production') {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
const payload = action.payload;
|
|
305
|
+
let message = `The action '${action.type}'${payload ? ` with payload ${JSON.stringify(action.payload)}` : ''} was not handled by any navigator.`;
|
|
306
|
+
switch (action.type) {
|
|
307
|
+
case 'NAVIGATE':
|
|
308
|
+
case 'PUSH':
|
|
309
|
+
case 'REPLACE':
|
|
310
|
+
case 'JUMP_TO':
|
|
311
|
+
if (payload?.name) {
|
|
312
|
+
message += `\n\nDo you have a screen named '${payload.name}'?\n\nIf you're trying to navigate to a screen in a nested navigator, see https://reactnavigation.org/docs/nesting-navigators#navigating-to-a-screen-in-a-nested-navigator.\n\nIf you're using conditional rendering, navigation will happen automatically and you shouldn't navigate manually.`;
|
|
313
|
+
} else {
|
|
314
|
+
message += `\n\nYou need to pass the name of the screen to navigate to.\n\nSee https://reactnavigation.org/docs/navigation-actions for usage.`;
|
|
315
|
+
}
|
|
316
|
+
break;
|
|
317
|
+
case 'GO_BACK':
|
|
318
|
+
case 'POP':
|
|
319
|
+
case 'POP_TO_TOP':
|
|
320
|
+
message += `\n\nIs there any screen to go back to?`;
|
|
321
|
+
break;
|
|
322
|
+
case 'OPEN_DRAWER':
|
|
323
|
+
case 'CLOSE_DRAWER':
|
|
324
|
+
case 'TOGGLE_DRAWER':
|
|
325
|
+
message += `\n\nIs your screen inside a Drawer navigator?`;
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
message += `\n\nThis is a development-only warning and won't be shown in production.`;
|
|
329
|
+
console.error(message);
|
|
330
|
+
});
|
|
331
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavigationIndependentTreeContext.NavigationIndependentTreeContext.Provider, {
|
|
332
|
+
value: false,
|
|
333
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavigationContainerRefContext.NavigationContainerRefContext.Provider, {
|
|
334
|
+
value: navigation,
|
|
335
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavigationBuilderContext.NavigationBuilderContext.Provider, {
|
|
336
|
+
value: builderContext,
|
|
337
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavigationStateContext.NavigationStateContext.Provider, {
|
|
338
|
+
value: context,
|
|
339
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_UnhandledActionContext.UnhandledActionContext.Provider, {
|
|
340
|
+
value: onUnhandledAction ?? defaultOnUnhandledAction,
|
|
341
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DeprecatedNavigationInChildContext.DeprecatedNavigationInChildContext.Provider, {
|
|
342
|
+
value: navigationInChildEnabled,
|
|
343
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_EnsureSingleNavigator.EnsureSingleNavigator, {
|
|
344
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ThemeProvider.ThemeProvider, {
|
|
345
|
+
value: theme,
|
|
346
|
+
children: children
|
|
347
|
+
})
|
|
348
|
+
})
|
|
349
|
+
})
|
|
350
|
+
})
|
|
351
|
+
})
|
|
352
|
+
})
|
|
353
|
+
})
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
//# sourceMappingURL=BaseNavigationContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_routers","require","React","_interopRequireWildcard","_useLatestCallback","_interopRequireDefault","_checkDuplicateRouteNames","_checkSerializable","_createNavigationContainerRef","_DeprecatedNavigationInChildContext","_EnsureSingleNavigator","_findFocusedRoute","_NavigationBuilderContext","_NavigationContainerRefContext","_NavigationIndependentTreeContext","_NavigationStateContext","_ThemeProvider","_UnhandledActionContext","_useChildListeners","_useEventEmitter","_useKeyedChildListeners","_useNavigationIndependentTree","_useOptionsGetters","_useSyncState","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","serializableWarnings","duplicateNameWarnings","getPartialState","state","undefined","key","routeNames","partialState","stale","routes","map","route","BaseNavigationContainer","exports","forwardRef","initialState","onStateChange","onReady","onUnhandledAction","navigationInChildEnabled","theme","children","ref","parent","useContext","NavigationStateContext","independent","useNavigationIndependentTree","isDefault","Error","getState","setState","useSyncState","isFirstMountRef","useRef","navigatorKeyRef","getKey","useCallback","current","setKey","listeners","addListener","useChildListeners","keyedListeners","addKeyedListener","useKeyedChildListeners","dispatch","useLatestCallback","action","focus","console","error","NOT_INITIALIZED_ERROR","navigation","canGoBack","result","handled","resetRoot","target","root","CommonActions","reset","getRootState","getCurrentRoute","findFocusedRoute","isReady","emitter","useEventEmitter","addOptionsGetter","getCurrentOptions","useOptionsGetters","useMemo","keys","reduce","acc","name","args","create","isFocused","getParent","setOptions","useImperativeHandle","onDispatchAction","noop","emit","type","data","stack","stackRef","lastEmittedOptionsRef","onOptionsChange","options","builderContext","isInitialRef","getIsInitial","context","onReadyRef","onStateChangeRef","useEffect","onReadyCalledRef","hydratedState","process","env","NODE_ENV","serializableResult","checkSerializable","serializable","location","reason","path","pointer","params","length","curr","prev","test","JSON","stringify","message","includes","push","warn","duplicateRouteNamesResult","checkDuplicateRouteNames","locations","join","defaultOnUnhandledAction","payload","jsx","NavigationIndependentTreeContext","Provider","value","NavigationContainerRefContext","NavigationBuilderContext","UnhandledActionContext","DeprecatedNavigationInChildContext","EnsureSingleNavigator","ThemeProvider"],"sourceRoot":"../../src","sources":["BaseNavigationContainer.tsx"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;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,EAAC9J,uBAAA,CAAAuD,sBAAsB,CAACyG,QAAQ;UAACC,KAAK,EAAEpC,OAAQ;UAAA1E,QAAA,eAC9C,IAAA1C,WAAA,CAAAqJ,GAAA,EAAC5J,uBAAA,CAAAkK,sBAAsB,CAACJ,QAAQ;YAC9BC,KAAK,EAAEjH,iBAAiB,IAAI4G,wBAAyB;YAAAzG,QAAA,eAErD,IAAA1C,WAAA,CAAAqJ,GAAA,EAACpK,mCAAA,CAAA2K,kCAAkC,CAACL,QAAQ;cAC1CC,KAAK,EAAEhH,wBAAyB;cAAAE,QAAA,eAEhC,IAAA1C,WAAA,CAAAqJ,GAAA,EAACnK,sBAAA,CAAA2K,qBAAqB;gBAAAnH,QAAA,eACpB,IAAA1C,WAAA,CAAAqJ,GAAA,EAAC7J,cAAA,CAAAsK,aAAa;kBAACN,KAAK,EAAE/G,KAAM;kBAAAC,QAAA,EAAEA;gBAAQ,CAAgB;cAAC,CAClC;YAAC,CACmB;UAAC,CACf;QAAC,CACH;MAAC,CACD;IAAC,CACE;EAAC,CACA,CAAC;AAEhD,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CurrentRenderContext = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
+
/**
|
|
11
|
+
* Context which holds the values for the current navigation tree.
|
|
12
|
+
* Intended for use in SSR. This is not safe to use on the client.
|
|
13
|
+
*/
|
|
14
|
+
const CurrentRenderContext = exports.CurrentRenderContext = /*#__PURE__*/React.createContext(undefined);
|
|
15
|
+
//# sourceMappingURL=CurrentRenderContext.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DeprecatedNavigationInChildContext = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
+
/**
|
|
11
|
+
* Context which enables deprecated bubbling to child navigators.
|
|
12
|
+
*/
|
|
13
|
+
const DeprecatedNavigationInChildContext = exports.DeprecatedNavigationInChildContext = /*#__PURE__*/React.createContext(false);
|
|
14
|
+
//# sourceMappingURL=DeprecatedNavigationInChildContext.js.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EnsureSingleNavigator = EnsureSingleNavigator;
|
|
7
|
+
exports.SingleNavigatorContext = void 0;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
const MULTIPLE_NAVIGATOR_ERROR = `Another navigator is already registered for this container. You likely have multiple navigators under a single "NavigationContainer" or "Screen". Make sure each navigator is under a separate "Screen" container. See https://reactnavigation.org/docs/nesting-navigators for a guide on nesting.`;
|
|
13
|
+
const SingleNavigatorContext = exports.SingleNavigatorContext = /*#__PURE__*/React.createContext(undefined);
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Component which ensures that there's only one navigator nested under it.
|
|
17
|
+
*/
|
|
18
|
+
function EnsureSingleNavigator({
|
|
19
|
+
children
|
|
20
|
+
}) {
|
|
21
|
+
const navigatorKeyRef = React.useRef();
|
|
22
|
+
const value = React.useMemo(() => ({
|
|
23
|
+
register(key) {
|
|
24
|
+
const currentKey = navigatorKeyRef.current;
|
|
25
|
+
if (currentKey !== undefined && key !== currentKey) {
|
|
26
|
+
throw new Error(MULTIPLE_NAVIGATOR_ERROR);
|
|
27
|
+
}
|
|
28
|
+
navigatorKeyRef.current = key;
|
|
29
|
+
},
|
|
30
|
+
unregister(key) {
|
|
31
|
+
const currentKey = navigatorKeyRef.current;
|
|
32
|
+
if (key !== currentKey) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
navigatorKeyRef.current = undefined;
|
|
36
|
+
}
|
|
37
|
+
}), []);
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(SingleNavigatorContext.Provider, {
|
|
39
|
+
value: value,
|
|
40
|
+
children: children
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=EnsureSingleNavigator.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Group = Group;
|
|
7
|
+
/**
|
|
8
|
+
* Empty component used for grouping screen configs.
|
|
9
|
+
*/
|
|
10
|
+
function Group(_) {
|
|
11
|
+
/* istanbul ignore next */
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=Group.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NavigationBuilderContext = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
+
/**
|
|
11
|
+
* Context which holds the required helpers needed to build nested navigators.
|
|
12
|
+
*/
|
|
13
|
+
const NavigationBuilderContext = exports.NavigationBuilderContext = /*#__PURE__*/React.createContext({
|
|
14
|
+
onDispatchAction: () => undefined,
|
|
15
|
+
onOptionsChange: () => undefined
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=NavigationBuilderContext.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NavigationContainerRefContext = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
+
/**
|
|
11
|
+
* Context which holds the route prop for a screen.
|
|
12
|
+
*/
|
|
13
|
+
const NavigationContainerRefContext = exports.NavigationContainerRefContext = /*#__PURE__*/React.createContext(undefined);
|
|
14
|
+
//# sourceMappingURL=NavigationContainerRefContext.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NavigationContext = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
+
/**
|
|
11
|
+
* Context which holds the navigation prop for a screen.
|
|
12
|
+
*/
|
|
13
|
+
const NavigationContext = exports.NavigationContext = /*#__PURE__*/React.createContext(undefined);
|
|
14
|
+
//# sourceMappingURL=NavigationContext.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NavigationHelpersContext = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
+
/**
|
|
11
|
+
* Context which holds the navigation helpers of the parent navigator.
|
|
12
|
+
* Navigators should use this context in their view component.
|
|
13
|
+
*/
|
|
14
|
+
const NavigationHelpersContext = exports.NavigationHelpersContext = /*#__PURE__*/React.createContext(undefined);
|
|
15
|
+
//# sourceMappingURL=NavigationHelpersContext.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NavigationIndependentTree = NavigationIndependentTree;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _NavigationContext = require("./NavigationContext.js");
|
|
9
|
+
var _NavigationIndependentTreeContext = require("./NavigationIndependentTreeContext.js");
|
|
10
|
+
var _NavigationRouteContext = require("./NavigationRouteContext.js");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
/**
|
|
15
|
+
* Component to make the child navigation container independent of parent containers.
|
|
16
|
+
*/
|
|
17
|
+
function NavigationIndependentTree({
|
|
18
|
+
children
|
|
19
|
+
}) {
|
|
20
|
+
return (
|
|
21
|
+
/*#__PURE__*/
|
|
22
|
+
// We need to clear any existing contexts for nested independent container to work correctly
|
|
23
|
+
(0, _jsxRuntime.jsx)(_NavigationRouteContext.NavigationRouteContext.Provider, {
|
|
24
|
+
value: undefined,
|
|
25
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavigationContext.NavigationContext.Provider, {
|
|
26
|
+
value: undefined,
|
|
27
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavigationIndependentTreeContext.NavigationIndependentTreeContext.Provider, {
|
|
28
|
+
value: true,
|
|
29
|
+
children: children
|
|
30
|
+
})
|
|
31
|
+
})
|
|
32
|
+
})
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=NavigationIndependentTree.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NavigationIndependentTreeContext = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
+
/**
|
|
11
|
+
* Context which marks the navigation tree as independent.
|
|
12
|
+
*/
|
|
13
|
+
const NavigationIndependentTreeContext = exports.NavigationIndependentTreeContext = /*#__PURE__*/React.createContext(false);
|
|
14
|
+
//# sourceMappingURL=NavigationIndependentTreeContext.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NavigationRouteContext = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
+
/**
|
|
11
|
+
* Context which holds the route prop for a screen.
|
|
12
|
+
*/
|
|
13
|
+
const NavigationRouteContext = exports.NavigationRouteContext = /*#__PURE__*/React.createContext(undefined);
|
|
14
|
+
//# sourceMappingURL=NavigationRouteContext.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NavigationStateContext = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
+
const MISSING_CONTEXT_ERROR = "Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'? See https://reactnavigation.org/docs/getting-started for setup instructions.";
|
|
11
|
+
const NavigationStateContext = exports.NavigationStateContext = /*#__PURE__*/React.createContext({
|
|
12
|
+
isDefault: true,
|
|
13
|
+
get getKey() {
|
|
14
|
+
throw new Error(MISSING_CONTEXT_ERROR);
|
|
15
|
+
},
|
|
16
|
+
get setKey() {
|
|
17
|
+
throw new Error(MISSING_CONTEXT_ERROR);
|
|
18
|
+
},
|
|
19
|
+
get getState() {
|
|
20
|
+
throw new Error(MISSING_CONTEXT_ERROR);
|
|
21
|
+
},
|
|
22
|
+
get setState() {
|
|
23
|
+
throw new Error(MISSING_CONTEXT_ERROR);
|
|
24
|
+
},
|
|
25
|
+
get getIsInitial() {
|
|
26
|
+
throw new Error(MISSING_CONTEXT_ERROR);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=NavigationStateContext.js.map
|