@react-navigation/core 7.8.3 → 7.8.4
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/typescript/src/BaseNavigationContainer.d.ts.map +1 -0
- package/lib/typescript/src/CurrentRenderContext.d.ts.map +1 -0
- package/lib/typescript/src/DeprecatedNavigationInChildContext.d.ts.map +1 -0
- package/lib/typescript/src/EnsureSingleNavigator.d.ts.map +1 -0
- package/lib/typescript/src/Group.d.ts.map +1 -0
- package/lib/typescript/src/NavigationBuilderContext.d.ts.map +1 -0
- package/lib/typescript/src/NavigationContainerRefContext.d.ts.map +1 -0
- package/lib/typescript/src/NavigationContext.d.ts.map +1 -0
- package/lib/typescript/src/NavigationFocusedRouteStateContext.d.ts.map +1 -0
- package/lib/typescript/src/NavigationHelpersContext.d.ts.map +1 -0
- package/lib/typescript/src/NavigationIndependentTree.d.ts.map +1 -0
- package/lib/typescript/src/NavigationIndependentTreeContext.d.ts.map +1 -0
- package/lib/typescript/src/NavigationRouteContext.d.ts.map +1 -0
- package/lib/typescript/src/NavigationStateContext.d.ts.map +1 -0
- package/lib/typescript/src/PreventRemoveContext.d.ts.map +1 -0
- package/lib/typescript/src/PreventRemoveProvider.d.ts.map +1 -0
- package/lib/typescript/src/SceneView.d.ts.map +1 -0
- package/lib/typescript/src/Screen.d.ts.map +1 -0
- package/lib/typescript/src/StaticContainer.d.ts.map +1 -0
- package/lib/typescript/src/StaticNavigation.d.ts.map +1 -0
- package/lib/typescript/src/UnhandledActionContext.d.ts.map +1 -0
- package/lib/typescript/src/arrayStartsWith.d.ts.map +1 -0
- package/lib/typescript/src/checkDuplicateRouteNames.d.ts.map +1 -0
- package/lib/typescript/src/checkSerializable.d.ts.map +1 -0
- package/lib/typescript/src/createNavigationContainerRef.d.ts.map +1 -0
- package/lib/typescript/src/createNavigatorFactory.d.ts.map +1 -0
- package/lib/typescript/src/deepFreeze.d.ts.map +1 -0
- package/lib/typescript/src/findFocusedRoute.d.ts.map +1 -0
- package/lib/typescript/src/getActionFromState.d.ts.map +1 -0
- package/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts.map +1 -0
- package/lib/typescript/src/getPathFromState.d.ts.map +1 -0
- package/lib/typescript/src/getPatternParts.d.ts.map +1 -0
- package/lib/typescript/src/getStateFromPath.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/isArrayEqual.d.ts.map +1 -0
- package/lib/typescript/src/isRecordEqual.d.ts.map +1 -0
- package/lib/typescript/src/theming/ThemeContext.d.ts.map +1 -0
- package/lib/typescript/src/theming/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/src/theming/useTheme.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/useChildListeners.d.ts.map +1 -0
- package/lib/typescript/src/useComponent.d.ts.map +1 -0
- package/lib/typescript/src/useCurrentRender.d.ts.map +1 -0
- package/lib/typescript/src/useDescriptors.d.ts.map +1 -0
- package/lib/typescript/src/useEventEmitter.d.ts.map +1 -0
- package/lib/typescript/src/useFocusEffect.d.ts.map +1 -0
- package/lib/typescript/src/useFocusEvents.d.ts.map +1 -0
- package/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts.map +1 -0
- package/lib/typescript/src/useIsFocused.d.ts.map +1 -0
- package/lib/typescript/src/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/lib/typescript/src/useIsomorphicLayoutEffect.native.d.ts.map +1 -0
- package/lib/typescript/src/useKeyedChildListeners.d.ts.map +1 -0
- package/lib/typescript/src/useLazyValue.d.ts.map +1 -0
- package/lib/typescript/src/useNavigation.d.ts.map +1 -0
- package/lib/typescript/src/useNavigationBuilder.d.ts.map +1 -0
- package/lib/typescript/src/useNavigationCache.d.ts.map +1 -0
- package/lib/typescript/src/useNavigationContainerRef.d.ts.map +1 -0
- package/lib/typescript/src/useNavigationHelpers.d.ts.map +1 -0
- package/lib/typescript/src/useNavigationIndependentTree.d.ts.map +1 -0
- package/lib/typescript/src/useNavigationState.d.ts.map +1 -0
- package/lib/typescript/src/useOnAction.d.ts.map +1 -0
- package/lib/typescript/src/useOnGetState.d.ts.map +1 -0
- package/lib/typescript/src/useOnPreventRemove.d.ts.map +1 -0
- package/lib/typescript/src/useOnRouteFocus.d.ts.map +1 -0
- package/lib/typescript/src/useOptionsGetters.d.ts.map +1 -0
- package/lib/typescript/src/usePreventRemove.d.ts.map +1 -0
- package/lib/typescript/src/usePreventRemoveContext.d.ts.map +1 -0
- package/lib/typescript/src/useRegisterNavigator.d.ts.map +1 -0
- package/lib/typescript/src/useRoute.d.ts.map +1 -0
- package/lib/typescript/src/useRouteCache.d.ts.map +1 -0
- package/lib/typescript/src/useScheduleUpdate.d.ts.map +1 -0
- package/lib/typescript/src/useStateForPath.d.ts.map +1 -0
- package/lib/typescript/src/useSyncState.d.ts.map +1 -0
- package/lib/typescript/src/validatePathConfig.d.ts.map +1 -0
- package/package.json +10 -24
- package/lib/typescript/commonjs/package.json +0 -1
- package/lib/typescript/commonjs/src/BaseNavigationContainer.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/CurrentRenderContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/DeprecatedNavigationInChildContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/EnsureSingleNavigator.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/Group.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/NavigationBuilderContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/NavigationContainerRefContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/NavigationContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/NavigationFocusedRouteStateContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/NavigationHelpersContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/NavigationIndependentTree.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/NavigationIndependentTreeContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/NavigationRouteContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/NavigationStateContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/PreventRemoveContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/PreventRemoveProvider.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/SceneView.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/Screen.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/StaticContainer.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/StaticNavigation.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/UnhandledActionContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/arrayStartsWith.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/checkDuplicateRouteNames.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/checkSerializable.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/createNavigationContainerRef.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/createNavigatorFactory.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/deepFreeze.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/findFocusedRoute.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/getActionFromState.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/getFocusedRouteNameFromRoute.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/getPathFromState.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/getPatternParts.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/getStateFromPath.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/isArrayEqual.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/isRecordEqual.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/theming/ThemeContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/theming/ThemeProvider.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/theming/useTheme.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useChildListeners.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useCurrentRender.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useDescriptors.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useEventEmitter.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useFocusEffect.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useFocusEvents.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useFocusedListenersChildrenAdapter.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useIsFocused.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useIsomorphicLayoutEffect.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useIsomorphicLayoutEffect.native.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useKeyedChildListeners.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useLazyValue.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useNavigation.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useNavigationBuilder.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useNavigationCache.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useNavigationContainerRef.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useNavigationHelpers.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useNavigationIndependentTree.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useNavigationState.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useOnAction.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useOnGetState.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useOnPreventRemove.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useOnRouteFocus.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useOptionsGetters.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/usePreventRemove.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/usePreventRemoveContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useRegisterNavigator.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useRoute.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useRouteCache.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useScheduleUpdate.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useStateForPath.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/useSyncState.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/validatePathConfig.d.ts.map +0 -1
- package/lib/typescript/module/src/BaseNavigationContainer.d.ts +0 -17
- package/lib/typescript/module/src/BaseNavigationContainer.d.ts.map +0 -1
- package/lib/typescript/module/src/CurrentRenderContext.d.ts +0 -9
- package/lib/typescript/module/src/CurrentRenderContext.d.ts.map +0 -1
- package/lib/typescript/module/src/DeprecatedNavigationInChildContext.d.ts +0 -6
- package/lib/typescript/module/src/DeprecatedNavigationInChildContext.d.ts.map +0 -1
- package/lib/typescript/module/src/EnsureSingleNavigator.d.ts +0 -14
- package/lib/typescript/module/src/EnsureSingleNavigator.d.ts.map +0 -1
- package/lib/typescript/module/src/Group.d.ts +0 -7
- package/lib/typescript/module/src/Group.d.ts.map +0 -1
- package/lib/typescript/module/src/NavigationBuilderContext.d.ts +0 -36
- package/lib/typescript/module/src/NavigationBuilderContext.d.ts.map +0 -1
- package/lib/typescript/module/src/NavigationContainerRefContext.d.ts +0 -8
- package/lib/typescript/module/src/NavigationContainerRefContext.d.ts.map +0 -1
- package/lib/typescript/module/src/NavigationContext.d.ts +0 -8
- package/lib/typescript/module/src/NavigationContext.d.ts.map +0 -1
- package/lib/typescript/module/src/NavigationFocusedRouteStateContext.d.ts +0 -17
- package/lib/typescript/module/src/NavigationFocusedRouteStateContext.d.ts.map +0 -1
- package/lib/typescript/module/src/NavigationHelpersContext.d.ts +0 -9
- package/lib/typescript/module/src/NavigationHelpersContext.d.ts.map +0 -1
- package/lib/typescript/module/src/NavigationIndependentTree.d.ts +0 -8
- package/lib/typescript/module/src/NavigationIndependentTree.d.ts.map +0 -1
- package/lib/typescript/module/src/NavigationIndependentTreeContext.d.ts +0 -6
- package/lib/typescript/module/src/NavigationIndependentTreeContext.d.ts.map +0 -1
- package/lib/typescript/module/src/NavigationRouteContext.d.ts +0 -7
- package/lib/typescript/module/src/NavigationRouteContext.d.ts.map +0 -1
- package/lib/typescript/module/src/NavigationStateContext.d.ts +0 -13
- package/lib/typescript/module/src/NavigationStateContext.d.ts.map +0 -1
- package/lib/typescript/module/src/PreventRemoveContext.d.ts +0 -13
- package/lib/typescript/module/src/PreventRemoveContext.d.ts.map +0 -1
- package/lib/typescript/module/src/PreventRemoveProvider.d.ts +0 -10
- package/lib/typescript/module/src/PreventRemoveProvider.d.ts.map +0 -1
- package/lib/typescript/module/src/SceneView.d.ts +0 -21
- package/lib/typescript/module/src/SceneView.d.ts.map +0 -1
- package/lib/typescript/module/src/Screen.d.ts +0 -7
- package/lib/typescript/module/src/Screen.d.ts.map +0 -1
- package/lib/typescript/module/src/StaticContainer.d.ts +0 -6
- package/lib/typescript/module/src/StaticContainer.d.ts.map +0 -1
- package/lib/typescript/module/src/StaticNavigation.d.ts +0 -188
- package/lib/typescript/module/src/StaticNavigation.d.ts.map +0 -1
- package/lib/typescript/module/src/UnhandledActionContext.d.ts +0 -4
- package/lib/typescript/module/src/UnhandledActionContext.d.ts.map +0 -1
- package/lib/typescript/module/src/arrayStartsWith.d.ts +0 -5
- package/lib/typescript/module/src/arrayStartsWith.d.ts.map +0 -1
- package/lib/typescript/module/src/checkDuplicateRouteNames.d.ts +0 -3
- package/lib/typescript/module/src/checkDuplicateRouteNames.d.ts.map +0 -1
- package/lib/typescript/module/src/checkSerializable.d.ts +0 -10
- package/lib/typescript/module/src/checkSerializable.d.ts.map +0 -1
- package/lib/typescript/module/src/createNavigationContainerRef.d.ts +0 -4
- package/lib/typescript/module/src/createNavigationContainerRef.d.ts.map +0 -1
- package/lib/typescript/module/src/createNavigatorFactory.d.ts +0 -10
- package/lib/typescript/module/src/createNavigatorFactory.d.ts.map +0 -1
- package/lib/typescript/module/src/deepFreeze.d.ts +0 -3
- package/lib/typescript/module/src/deepFreeze.d.ts.map +0 -1
- package/lib/typescript/module/src/findFocusedRoute.d.ts +0 -10
- package/lib/typescript/module/src/findFocusedRoute.d.ts.map +0 -1
- package/lib/typescript/module/src/getActionFromState.d.ts +0 -17
- package/lib/typescript/module/src/getActionFromState.d.ts.map +0 -1
- package/lib/typescript/module/src/getFocusedRouteNameFromRoute.d.ts +0 -3
- package/lib/typescript/module/src/getFocusedRouteNameFromRoute.d.ts.map +0 -1
- package/lib/typescript/module/src/getPathFromState.d.ts +0 -40
- package/lib/typescript/module/src/getPathFromState.d.ts.map +0 -1
- package/lib/typescript/module/src/getPatternParts.d.ts +0 -11
- package/lib/typescript/module/src/getPatternParts.d.ts.map +0 -1
- package/lib/typescript/module/src/getStateFromPath.d.ts +0 -34
- package/lib/typescript/module/src/getStateFromPath.d.ts.map +0 -1
- package/lib/typescript/module/src/index.d.ts +0 -35
- package/lib/typescript/module/src/index.d.ts.map +0 -1
- package/lib/typescript/module/src/isArrayEqual.d.ts +0 -6
- package/lib/typescript/module/src/isArrayEqual.d.ts.map +0 -1
- package/lib/typescript/module/src/isRecordEqual.d.ts +0 -5
- package/lib/typescript/module/src/isRecordEqual.d.ts.map +0 -1
- package/lib/typescript/module/src/theming/ThemeContext.d.ts +0 -3
- package/lib/typescript/module/src/theming/ThemeContext.d.ts.map +0 -1
- package/lib/typescript/module/src/theming/ThemeProvider.d.ts +0 -8
- package/lib/typescript/module/src/theming/ThemeProvider.d.ts.map +0 -1
- package/lib/typescript/module/src/theming/useTheme.d.ts +0 -2
- package/lib/typescript/module/src/theming/useTheme.d.ts.map +0 -1
- package/lib/typescript/module/src/types.d.ts +0 -732
- package/lib/typescript/module/src/types.d.ts.map +0 -1
- package/lib/typescript/module/src/useChildListeners.d.ts +0 -12
- package/lib/typescript/module/src/useChildListeners.d.ts.map +0 -1
- package/lib/typescript/module/src/useComponent.d.ts +0 -7
- package/lib/typescript/module/src/useComponent.d.ts.map +0 -1
- package/lib/typescript/module/src/useCurrentRender.d.ts +0 -14
- package/lib/typescript/module/src/useCurrentRender.d.ts.map +0 -1
- package/lib/typescript/module/src/useDescriptors.d.ts +0 -141
- package/lib/typescript/module/src/useDescriptors.d.ts.map +0 -1
- package/lib/typescript/module/src/useEventEmitter.d.ts +0 -9
- package/lib/typescript/module/src/useEventEmitter.d.ts.map +0 -1
- package/lib/typescript/module/src/useFocusEffect.d.ts +0 -11
- package/lib/typescript/module/src/useFocusEffect.d.ts.map +0 -1
- package/lib/typescript/module/src/useFocusEvents.d.ts +0 -13
- package/lib/typescript/module/src/useFocusEvents.d.ts.map +0 -1
- package/lib/typescript/module/src/useFocusedListenersChildrenAdapter.d.ts +0 -13
- package/lib/typescript/module/src/useFocusedListenersChildrenAdapter.d.ts.map +0 -1
- package/lib/typescript/module/src/useIsFocused.d.ts +0 -6
- package/lib/typescript/module/src/useIsFocused.d.ts.map +0 -1
- package/lib/typescript/module/src/useIsomorphicLayoutEffect.d.ts +0 -6
- package/lib/typescript/module/src/useIsomorphicLayoutEffect.d.ts.map +0 -1
- package/lib/typescript/module/src/useIsomorphicLayoutEffect.native.d.ts +0 -3
- package/lib/typescript/module/src/useIsomorphicLayoutEffect.native.d.ts.map +0 -1
- package/lib/typescript/module/src/useKeyedChildListeners.d.ts +0 -12
- package/lib/typescript/module/src/useKeyedChildListeners.d.ts.map +0 -1
- package/lib/typescript/module/src/useLazyValue.d.ts +0 -2
- package/lib/typescript/module/src/useLazyValue.d.ts.map +0 -1
- package/lib/typescript/module/src/useNavigation.d.ts +0 -11
- package/lib/typescript/module/src/useNavigation.d.ts.map +0 -1
- package/lib/typescript/module/src/useNavigationBuilder.d.ts +0 -193
- package/lib/typescript/module/src/useNavigationBuilder.d.ts.map +0 -1
- package/lib/typescript/module/src/useNavigationCache.d.ts +0 -69
- package/lib/typescript/module/src/useNavigationCache.d.ts.map +0 -1
- package/lib/typescript/module/src/useNavigationContainerRef.d.ts +0 -3
- package/lib/typescript/module/src/useNavigationContainerRef.d.ts.map +0 -1
- package/lib/typescript/module/src/useNavigationHelpers.d.ts +0 -102
- package/lib/typescript/module/src/useNavigationHelpers.d.ts.map +0 -1
- package/lib/typescript/module/src/useNavigationIndependentTree.d.ts +0 -2
- package/lib/typescript/module/src/useNavigationIndependentTree.d.ts.map +0 -1
- package/lib/typescript/module/src/useNavigationState.d.ts +0 -10
- package/lib/typescript/module/src/useNavigationState.d.ts.map +0 -1
- package/lib/typescript/module/src/useOnAction.d.ts +0 -26
- package/lib/typescript/module/src/useOnAction.d.ts.map +0 -1
- package/lib/typescript/module/src/useOnGetState.d.ts +0 -9
- package/lib/typescript/module/src/useOnGetState.d.ts.map +0 -1
- package/lib/typescript/module/src/useOnPreventRemove.d.ts +0 -17
- package/lib/typescript/module/src/useOnPreventRemove.d.ts.map +0 -1
- package/lib/typescript/module/src/useOnRouteFocus.d.ts +0 -15
- package/lib/typescript/module/src/useOnRouteFocus.d.ts.map +0 -1
- package/lib/typescript/module/src/useOptionsGetters.d.ts +0 -13
- package/lib/typescript/module/src/useOptionsGetters.d.ts.map +0 -1
- package/lib/typescript/module/src/usePreventRemove.d.ts +0 -13
- package/lib/typescript/module/src/usePreventRemove.d.ts.map +0 -1
- package/lib/typescript/module/src/usePreventRemoveContext.d.ts +0 -5
- package/lib/typescript/module/src/usePreventRemoveContext.d.ts.map +0 -1
- package/lib/typescript/module/src/useRegisterNavigator.d.ts +0 -6
- package/lib/typescript/module/src/useRegisterNavigator.d.ts.map +0 -1
- package/lib/typescript/module/src/useRoute.d.ts +0 -9
- package/lib/typescript/module/src/useRoute.d.ts.map +0 -1
- package/lib/typescript/module/src/useRouteCache.d.ts +0 -14
- package/lib/typescript/module/src/useRouteCache.d.ts.map +0 -1
- package/lib/typescript/module/src/useScheduleUpdate.d.ts +0 -9
- package/lib/typescript/module/src/useScheduleUpdate.d.ts.map +0 -1
- package/lib/typescript/module/src/useStateForPath.d.ts +0 -8
- package/lib/typescript/module/src/useStateForPath.d.ts.map +0 -1
- package/lib/typescript/module/src/useSyncState.d.ts +0 -8
- package/lib/typescript/module/src/useSyncState.d.ts.map +0 -1
- package/lib/typescript/module/src/validatePathConfig.d.ts +0 -2
- package/lib/typescript/module/src/validatePathConfig.d.ts.map +0 -1
- /package/lib/typescript/{module/package.json → package.json} +0 -0
- /package/lib/typescript/{commonjs/src → src}/BaseNavigationContainer.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/CurrentRenderContext.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/DeprecatedNavigationInChildContext.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/EnsureSingleNavigator.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/Group.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/NavigationBuilderContext.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/NavigationContainerRefContext.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/NavigationContext.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/NavigationFocusedRouteStateContext.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/NavigationHelpersContext.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/NavigationIndependentTree.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/NavigationIndependentTreeContext.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/NavigationRouteContext.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/NavigationStateContext.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/PreventRemoveContext.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/PreventRemoveProvider.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/SceneView.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/Screen.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/StaticContainer.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/StaticNavigation.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/UnhandledActionContext.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/arrayStartsWith.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/checkDuplicateRouteNames.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/checkSerializable.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/createNavigationContainerRef.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/createNavigatorFactory.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/deepFreeze.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/findFocusedRoute.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/getActionFromState.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/getFocusedRouteNameFromRoute.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/getPathFromState.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/getPatternParts.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/getStateFromPath.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/index.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/isArrayEqual.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/isRecordEqual.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/theming/ThemeContext.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/theming/ThemeProvider.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/theming/useTheme.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useChildListeners.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useComponent.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useCurrentRender.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useDescriptors.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useEventEmitter.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useFocusEffect.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useFocusEvents.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useFocusedListenersChildrenAdapter.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useIsFocused.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useIsomorphicLayoutEffect.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useIsomorphicLayoutEffect.native.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useKeyedChildListeners.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useLazyValue.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useNavigation.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useNavigationBuilder.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useNavigationCache.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useNavigationContainerRef.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useNavigationHelpers.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useNavigationIndependentTree.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useNavigationState.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useOnAction.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useOnGetState.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useOnPreventRemove.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useOnRouteFocus.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useOptionsGetters.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/usePreventRemove.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/usePreventRemoveContext.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useRegisterNavigator.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useRoute.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useRouteCache.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useScheduleUpdate.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useStateForPath.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/useSyncState.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/validatePathConfig.d.ts +0 -0
|
@@ -1,732 +0,0 @@
|
|
|
1
|
-
import type { DefaultRouterOptions, InitialState, NavigationAction, NavigationState, ParamListBase, PartialState, Route, Router } from '@react-navigation/routers';
|
|
2
|
-
import type * as React from 'react';
|
|
3
|
-
declare global {
|
|
4
|
-
namespace ReactNavigation {
|
|
5
|
-
interface RootParamList {
|
|
6
|
-
}
|
|
7
|
-
interface Theme {
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
type Keyof<T extends {}> = Extract<keyof T, string>;
|
|
12
|
-
export type DefaultNavigatorOptions<ParamList extends ParamListBase, NavigatorID extends string | undefined, State extends NavigationState, ScreenOptions extends {}, EventMap extends EventMapBase, Navigation> = DefaultRouterOptions<Keyof<ParamList>> & {
|
|
13
|
-
/**
|
|
14
|
-
* Children React Elements to extract the route configuration from.
|
|
15
|
-
* Only `Screen`, `Group` and `React.Fragment` are supported as children.
|
|
16
|
-
*/
|
|
17
|
-
children: React.ReactNode;
|
|
18
|
-
/**
|
|
19
|
-
* Layout for the navigator.
|
|
20
|
-
* Useful for wrapping with a component with access to navigator's state and options.
|
|
21
|
-
*/
|
|
22
|
-
layout?: (props: {
|
|
23
|
-
state: State;
|
|
24
|
-
navigation: NavigationHelpers<ParamList>;
|
|
25
|
-
descriptors: Record<string, Descriptor<ScreenOptions, NavigationProp<ParamList, keyof ParamList, string | undefined, State, ScreenOptions, EventMap>, RouteProp<ParamList>>>;
|
|
26
|
-
children: React.ReactNode;
|
|
27
|
-
}) => React.ReactElement;
|
|
28
|
-
/**
|
|
29
|
-
* Event listeners for all the screens in the navigator.
|
|
30
|
-
*/
|
|
31
|
-
screenListeners?: ScreenListeners<State, EventMap> | ((props: {
|
|
32
|
-
route: RouteProp<ParamList>;
|
|
33
|
-
navigation: Navigation;
|
|
34
|
-
}) => ScreenListeners<State, EventMap>);
|
|
35
|
-
/**
|
|
36
|
-
* Default options for all screens under this navigator.
|
|
37
|
-
*/
|
|
38
|
-
screenOptions?: ScreenOptions | ((props: {
|
|
39
|
-
route: RouteProp<ParamList>;
|
|
40
|
-
navigation: Navigation;
|
|
41
|
-
theme: ReactNavigation.Theme;
|
|
42
|
-
}) => ScreenOptions);
|
|
43
|
-
/**
|
|
44
|
-
* Layout for all screens under this navigator.
|
|
45
|
-
*/
|
|
46
|
-
screenLayout?: (props: {
|
|
47
|
-
route: RouteProp<ParamList, keyof ParamList>;
|
|
48
|
-
navigation: Navigation;
|
|
49
|
-
theme: ReactNavigation.Theme;
|
|
50
|
-
children: React.ReactElement;
|
|
51
|
-
}) => React.ReactElement;
|
|
52
|
-
/**
|
|
53
|
-
* A function returning overrides for the underlying router used by the navigator.
|
|
54
|
-
* The overrides will be shallow merged onto the original router.
|
|
55
|
-
* It receives the original router as an argument to the function.
|
|
56
|
-
*
|
|
57
|
-
* This must be a pure function and cannot reference outside dynamic variables.
|
|
58
|
-
*/
|
|
59
|
-
UNSTABLE_router?: <Action extends NavigationAction>(original: Router<State, Action>) => Partial<Router<State, Action>>;
|
|
60
|
-
} & (NavigatorID extends string ? {
|
|
61
|
-
/**
|
|
62
|
-
* Optional ID for the navigator. Can be used with `navigation.getParent(id)` to refer to a parent.
|
|
63
|
-
*/
|
|
64
|
-
id: NavigatorID;
|
|
65
|
-
} : {
|
|
66
|
-
id?: undefined;
|
|
67
|
-
});
|
|
68
|
-
export type EventMapBase = Record<string, {
|
|
69
|
-
data?: any;
|
|
70
|
-
canPreventDefault?: boolean;
|
|
71
|
-
}>;
|
|
72
|
-
export type EventMapCore<State extends NavigationState> = {
|
|
73
|
-
focus: {
|
|
74
|
-
data: undefined;
|
|
75
|
-
};
|
|
76
|
-
blur: {
|
|
77
|
-
data: undefined;
|
|
78
|
-
};
|
|
79
|
-
state: {
|
|
80
|
-
data: {
|
|
81
|
-
state: State;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
beforeRemove: {
|
|
85
|
-
data: {
|
|
86
|
-
action: NavigationAction;
|
|
87
|
-
};
|
|
88
|
-
canPreventDefault: true;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
export type EventArg<EventName, CanPreventDefault extends boolean | undefined = false, Data = undefined> = {
|
|
92
|
-
/**
|
|
93
|
-
* Type of the event (e.g. `focus`, `blur`)
|
|
94
|
-
*/
|
|
95
|
-
readonly type: EventName;
|
|
96
|
-
readonly target?: string;
|
|
97
|
-
} & (CanPreventDefault extends true ? {
|
|
98
|
-
/**
|
|
99
|
-
* Whether `event.preventDefault()` was called on this event object.
|
|
100
|
-
*/
|
|
101
|
-
readonly defaultPrevented: boolean;
|
|
102
|
-
/**
|
|
103
|
-
* Prevent the default action which happens on this event.
|
|
104
|
-
*/
|
|
105
|
-
preventDefault(): void;
|
|
106
|
-
} : {}) & (undefined extends Data ? {
|
|
107
|
-
readonly data?: Readonly<Data>;
|
|
108
|
-
} : {
|
|
109
|
-
readonly data: Readonly<Data>;
|
|
110
|
-
});
|
|
111
|
-
export type EventListenerCallback<EventMap extends EventMapBase, EventName extends keyof EventMap, EventCanPreventDefault extends boolean | undefined = EventMap[EventName]['canPreventDefault']> = (e: EventArg<EventName, undefined extends EventCanPreventDefault ? false : EventCanPreventDefault, EventMap[EventName]['data']>) => void;
|
|
112
|
-
export type EventConsumer<EventMap extends EventMapBase> = {
|
|
113
|
-
/**
|
|
114
|
-
* Subscribe to events from the parent navigator.
|
|
115
|
-
*
|
|
116
|
-
* @param type Type of the event (e.g. `focus`, `blur`)
|
|
117
|
-
* @param callback Callback listener which is executed upon receiving the event.
|
|
118
|
-
*/
|
|
119
|
-
addListener<EventName extends Keyof<EventMap>>(type: EventName, callback: EventListenerCallback<EventMap, EventName>): () => void;
|
|
120
|
-
removeListener<EventName extends Keyof<EventMap>>(type: EventName, callback: EventListenerCallback<EventMap, EventName>): void;
|
|
121
|
-
};
|
|
122
|
-
export type EventEmitter<EventMap extends EventMapBase> = {
|
|
123
|
-
/**
|
|
124
|
-
* Emit an event to child screens.
|
|
125
|
-
*
|
|
126
|
-
* @param options.type Type of the event (e.g. `focus`, `blur`)
|
|
127
|
-
* @param [options.data] Optional information regarding the event.
|
|
128
|
-
* @param [options.target] Key of the target route which should receive the event.
|
|
129
|
-
* If not specified, all routes receive the event.
|
|
130
|
-
*/
|
|
131
|
-
emit<EventName extends Keyof<EventMap>>(options: {
|
|
132
|
-
type: EventName;
|
|
133
|
-
target?: string;
|
|
134
|
-
} & (EventMap[EventName]['canPreventDefault'] extends true ? {
|
|
135
|
-
canPreventDefault: true;
|
|
136
|
-
} : {}) & (undefined extends EventMap[EventName]['data'] ? {
|
|
137
|
-
data?: EventMap[EventName]['data'];
|
|
138
|
-
} : {
|
|
139
|
-
data: EventMap[EventName]['data'];
|
|
140
|
-
})): EventArg<EventName, EventMap[EventName]['canPreventDefault'], EventMap[EventName]['data']>;
|
|
141
|
-
};
|
|
142
|
-
export declare class PrivateValueStore<T extends [any, any, any]> {
|
|
143
|
-
/**
|
|
144
|
-
* UGLY HACK! DO NOT USE THE TYPE!!!
|
|
145
|
-
*
|
|
146
|
-
* TypeScript requires a type to be used to be able to infer it.
|
|
147
|
-
* The type should exist as its own without any operations such as union.
|
|
148
|
-
* So we need to figure out a way to store this type in a property.
|
|
149
|
-
* The problem with a normal property is that it shows up in intelliSense.
|
|
150
|
-
* Adding private keyword works, but the annotation is stripped away in declaration.
|
|
151
|
-
* Turns out if we use an empty string, it doesn't show up in intelliSense.
|
|
152
|
-
*/
|
|
153
|
-
protected ''?: T;
|
|
154
|
-
}
|
|
155
|
-
type NavigationHelpersCommon<ParamList extends ParamListBase, State extends NavigationState = NavigationState> = {
|
|
156
|
-
/**
|
|
157
|
-
* Dispatch an action or an update function to the router.
|
|
158
|
-
* The update function will receive the current state,
|
|
159
|
-
*
|
|
160
|
-
* @param action Action object or update function.
|
|
161
|
-
*/
|
|
162
|
-
dispatch(action: NavigationAction | ((state: Readonly<State>) => NavigationAction)): void;
|
|
163
|
-
/**
|
|
164
|
-
* Navigate to a screen in the current or parent navigator.
|
|
165
|
-
* If we're already on the screen, update the params instead.
|
|
166
|
-
*
|
|
167
|
-
* @param screen Name of the route to navigate to.
|
|
168
|
-
* @param [params] Params object for the route.
|
|
169
|
-
* @param [options.merge] Whether to merge the params onto the route. Defaults to `false`.
|
|
170
|
-
* @param [options.pop] Whether to pop routes in a stack to go back to the matching route. Defaults to `false`.
|
|
171
|
-
*/
|
|
172
|
-
navigate<RouteName extends keyof ParamList>(...args: RouteName extends unknown ? undefined extends ParamList[RouteName] ? [
|
|
173
|
-
screen: RouteName,
|
|
174
|
-
params?: ParamList[RouteName],
|
|
175
|
-
options?: {
|
|
176
|
-
merge?: boolean;
|
|
177
|
-
pop?: boolean;
|
|
178
|
-
}
|
|
179
|
-
] : [
|
|
180
|
-
screen: RouteName,
|
|
181
|
-
params: ParamList[RouteName],
|
|
182
|
-
options?: {
|
|
183
|
-
merge?: boolean;
|
|
184
|
-
pop?: boolean;
|
|
185
|
-
}
|
|
186
|
-
] : never): void;
|
|
187
|
-
/**
|
|
188
|
-
* Navigate to a route in current navigation tree.
|
|
189
|
-
*
|
|
190
|
-
* @param options.name Name of the route to navigate to.
|
|
191
|
-
* @param [options.params] Params object for the route.
|
|
192
|
-
* @param [options.path] Path to associate the route with (e.g. for deep links).
|
|
193
|
-
* @param [options.merge] Whether to merge the params onto the route. Defaults to `false`.
|
|
194
|
-
* @param [options.pop] Whether to pop routes in a stack to go back to the matching route. Defaults to `false`.
|
|
195
|
-
*/
|
|
196
|
-
navigate<RouteName extends keyof ParamList>(options: RouteName extends unknown ? {
|
|
197
|
-
name: RouteName;
|
|
198
|
-
params: ParamList[RouteName];
|
|
199
|
-
path?: string;
|
|
200
|
-
merge?: boolean;
|
|
201
|
-
pop?: boolean;
|
|
202
|
-
} : never): void;
|
|
203
|
-
/**
|
|
204
|
-
* Navigate to a route in current navigation tree.
|
|
205
|
-
*
|
|
206
|
-
* @deprecated Use `navigate` instead.
|
|
207
|
-
*
|
|
208
|
-
* @param screen Name of the route to navigate to.
|
|
209
|
-
* @param [params] Params object for the route.
|
|
210
|
-
*/
|
|
211
|
-
navigateDeprecated<RouteName extends keyof ParamList>(...args: RouteName extends unknown ? undefined extends ParamList[RouteName] ? [screen: RouteName, params?: ParamList[RouteName]] : [screen: RouteName, params: ParamList[RouteName]] : never): void;
|
|
212
|
-
/**
|
|
213
|
-
* Navigate to a route in current navigation tree.
|
|
214
|
-
*
|
|
215
|
-
* @deprecated Use `navigate` instead.
|
|
216
|
-
*
|
|
217
|
-
* @param options Object with `name` for the route to navigate to, and a `params` object.
|
|
218
|
-
*/
|
|
219
|
-
navigateDeprecated<RouteName extends keyof ParamList>(options: RouteName extends unknown ? {
|
|
220
|
-
name: RouteName;
|
|
221
|
-
params: ParamList[RouteName];
|
|
222
|
-
merge?: boolean;
|
|
223
|
-
} : never): void;
|
|
224
|
-
/**
|
|
225
|
-
* Preloads the route in current navigation tree.
|
|
226
|
-
*
|
|
227
|
-
* @param screen Name of the route to preload.
|
|
228
|
-
* @param [params] Params object for the route.
|
|
229
|
-
*/
|
|
230
|
-
preload<RouteName extends keyof ParamList>(...args: RouteName extends unknown ? undefined extends ParamList[RouteName] ? [screen: RouteName, params?: ParamList[RouteName]] : [screen: RouteName, params: ParamList[RouteName]] : never): void;
|
|
231
|
-
/**
|
|
232
|
-
* Reset the navigation state to the provided state.
|
|
233
|
-
*
|
|
234
|
-
* @param state Navigation state object.
|
|
235
|
-
*/
|
|
236
|
-
reset(state: PartialState<State> | State): void;
|
|
237
|
-
/**
|
|
238
|
-
* Go back to the previous route in history.
|
|
239
|
-
*/
|
|
240
|
-
goBack(): void;
|
|
241
|
-
/**
|
|
242
|
-
* Check if the screen is focused. The method returns `true` if focused, `false` otherwise.
|
|
243
|
-
* Note that this method doesn't re-render screen when the focus changes. So don't use it in `render`.
|
|
244
|
-
* To get notified of focus changes, use `addListener('focus', cb)` and `addListener('blur', cb)`.
|
|
245
|
-
* To conditionally render content based on focus state, use the `useIsFocused` hook.
|
|
246
|
-
*/
|
|
247
|
-
isFocused(): boolean;
|
|
248
|
-
/**
|
|
249
|
-
* Check if dispatching back action will be handled by navigation.
|
|
250
|
-
* Note that this method doesn't re-render screen when the result changes. So don't use it in `render`.
|
|
251
|
-
*/
|
|
252
|
-
canGoBack(): boolean;
|
|
253
|
-
/**
|
|
254
|
-
* Returns the name of the navigator specified in the `name` prop.
|
|
255
|
-
* If no name is specified, returns `undefined`.
|
|
256
|
-
*/
|
|
257
|
-
getId(): string | undefined;
|
|
258
|
-
/**
|
|
259
|
-
* Returns the navigation helpers from a parent navigator based on the ID.
|
|
260
|
-
* If an ID is provided, the navigation helper from the parent navigator with matching ID (including current) will be returned.
|
|
261
|
-
* If no ID is provided, the navigation helper from the immediate parent navigator will be returned.
|
|
262
|
-
*
|
|
263
|
-
* @param id Optional ID of a parent navigator.
|
|
264
|
-
*/
|
|
265
|
-
getParent<T = NavigationHelpers<ParamListBase> | undefined>(id?: string): T;
|
|
266
|
-
/**
|
|
267
|
-
* Returns the navigator's state.
|
|
268
|
-
* Note that this method doesn't re-render screen when the result changes. So don't use it in `render`.
|
|
269
|
-
*/
|
|
270
|
-
getState(): State;
|
|
271
|
-
/**
|
|
272
|
-
* Schedules the given state to be used as navigation state when the list of screens defined in the navigator changes
|
|
273
|
-
* instead of automatically calculating the new state, e.g. due to conditional rendering or dynamically defining screens.
|
|
274
|
-
*
|
|
275
|
-
* @param state Navigation state object.
|
|
276
|
-
*/
|
|
277
|
-
setStateForNextRouteNamesChange(state: PartialState<State> | State): void;
|
|
278
|
-
} & PrivateValueStore<[ParamList, unknown, unknown]>;
|
|
279
|
-
export type NavigationHelpers<ParamList extends ParamListBase, EventMap extends EventMapBase = {}> = NavigationHelpersCommon<ParamList> & EventEmitter<EventMap> & {
|
|
280
|
-
/**
|
|
281
|
-
* Update the param object for the route.
|
|
282
|
-
* The new params will be shallow merged with the old one.
|
|
283
|
-
*
|
|
284
|
-
* @param params Params object for the current route.
|
|
285
|
-
*/
|
|
286
|
-
setParams<RouteName extends keyof ParamList>(params: Partial<ParamList[RouteName]>): void;
|
|
287
|
-
};
|
|
288
|
-
export type NavigationContainerProps = {
|
|
289
|
-
/**
|
|
290
|
-
* Initial navigation state for the child navigators.
|
|
291
|
-
*/
|
|
292
|
-
initialState?: InitialState;
|
|
293
|
-
/**
|
|
294
|
-
* Callback which is called with the latest navigation state when it changes.
|
|
295
|
-
*/
|
|
296
|
-
onStateChange?: (state: Readonly<NavigationState> | undefined) => void;
|
|
297
|
-
/**
|
|
298
|
-
* Callback which is called after the navigation tree mounts.
|
|
299
|
-
*/
|
|
300
|
-
onReady?: () => void;
|
|
301
|
-
/**
|
|
302
|
-
* Callback which is called when an action is not handled.
|
|
303
|
-
*/
|
|
304
|
-
onUnhandledAction?: (action: Readonly<NavigationAction>) => void;
|
|
305
|
-
/**
|
|
306
|
-
* Whether child navigator should handle a navigation action.
|
|
307
|
-
* The child navigator needs to be mounted before it can handle the action.
|
|
308
|
-
* Defaults to `false`.
|
|
309
|
-
*
|
|
310
|
-
* This will be removed in the next major release.
|
|
311
|
-
*
|
|
312
|
-
* @deprecated Use nested navigation API instead
|
|
313
|
-
*/
|
|
314
|
-
navigationInChildEnabled?: boolean;
|
|
315
|
-
/**
|
|
316
|
-
* Theme object for the UI elements.
|
|
317
|
-
*/
|
|
318
|
-
theme?: ReactNavigation.Theme;
|
|
319
|
-
/**
|
|
320
|
-
* Children elements to render.
|
|
321
|
-
*/
|
|
322
|
-
children: React.ReactNode;
|
|
323
|
-
};
|
|
324
|
-
export type NavigationProp<ParamList extends {}, RouteName extends keyof ParamList = Keyof<ParamList>, NavigatorID extends string | undefined = undefined, State extends NavigationState = NavigationState<ParamList>, ScreenOptions extends {} = {}, EventMap extends EventMapBase = {}> = Omit<NavigationHelpersCommon<ParamList, State>, 'getParent'> & {
|
|
325
|
-
/**
|
|
326
|
-
* Returns the navigation prop from a parent navigator based on the ID.
|
|
327
|
-
* If an ID is provided, the navigation prop from the parent navigator with matching ID (including current) will be returned.
|
|
328
|
-
* If no ID is provided, the navigation prop from the immediate parent navigator will be returned.
|
|
329
|
-
*
|
|
330
|
-
* @param id Optional ID of a parent navigator.
|
|
331
|
-
*/
|
|
332
|
-
getParent<T = NavigationProp<ParamListBase> | undefined>(id?: NavigatorID): T;
|
|
333
|
-
/**
|
|
334
|
-
* Update the param object for the route.
|
|
335
|
-
* The new params will be shallow merged with the old one.
|
|
336
|
-
*
|
|
337
|
-
* @param params Params object for the current route.
|
|
338
|
-
*/
|
|
339
|
-
setParams(params: ParamList[RouteName] extends undefined ? undefined : Partial<ParamList[RouteName]>): void;
|
|
340
|
-
/**
|
|
341
|
-
* Update the options for the route.
|
|
342
|
-
* The options object will be shallow merged with default options object.
|
|
343
|
-
*
|
|
344
|
-
* @param update Options object or a callback which takes the options from navigator config and returns a new options object.
|
|
345
|
-
*/
|
|
346
|
-
setOptions(options: Partial<ScreenOptions>): void;
|
|
347
|
-
} & EventConsumer<EventMap & EventMapCore<State>> & PrivateValueStore<[ParamList, RouteName, EventMap]>;
|
|
348
|
-
export type RouteProp<ParamList extends ParamListBase, RouteName extends keyof ParamList = Keyof<ParamList>> = Route<Extract<RouteName, string>, ParamList[RouteName]>;
|
|
349
|
-
export type CompositeNavigationProp<A extends NavigationProp<ParamListBase, string, any, any, any>, B extends NavigationHelpersCommon<ParamListBase, any>> = Omit<A & B, keyof NavigationProp<any>> & NavigationProp<
|
|
350
|
-
/**
|
|
351
|
-
* Param list from both navigation objects needs to be combined
|
|
352
|
-
* For example, we should be able to navigate to screens in both A and B
|
|
353
|
-
*/
|
|
354
|
-
(A extends NavigationHelpersCommon<infer T> ? T : never) & (B extends NavigationHelpersCommon<infer U> ? U : never),
|
|
355
|
-
/**
|
|
356
|
-
* The route name should refer to the route name specified in the first type
|
|
357
|
-
* Ideally it should work for any of them, but it's not possible to infer that way
|
|
358
|
-
*/
|
|
359
|
-
A extends NavigationProp<any, infer R> ? R : string,
|
|
360
|
-
/**
|
|
361
|
-
* ID from both navigation objects needs to be combined for `getParent`
|
|
362
|
-
*/
|
|
363
|
-
(A extends NavigationProp<any, any, infer I> ? I : never) | (B extends NavigationProp<any, any, infer J> ? J : never),
|
|
364
|
-
/**
|
|
365
|
-
* The type of state should refer to the state specified in the first type
|
|
366
|
-
*/
|
|
367
|
-
A extends NavigationProp<any, any, any, infer S> ? S : NavigationState,
|
|
368
|
-
/**
|
|
369
|
-
* Screen options should refer to the options specified in the first type
|
|
370
|
-
*/
|
|
371
|
-
A extends NavigationProp<any, any, any, any, infer O> ? O : {},
|
|
372
|
-
/**
|
|
373
|
-
* Event consumer config should refer to the config specified in the first type
|
|
374
|
-
* This allows typechecking `addListener`/`removeListener`
|
|
375
|
-
*/
|
|
376
|
-
A extends NavigationProp<any, any, any, any, any, infer E> ? E : {}>;
|
|
377
|
-
export type CompositeScreenProps<A extends {
|
|
378
|
-
navigation: NavigationProp<ParamListBase, string, string | undefined, any, any, any>;
|
|
379
|
-
route: RouteProp<ParamListBase>;
|
|
380
|
-
}, B extends {
|
|
381
|
-
navigation: NavigationHelpersCommon<any, any>;
|
|
382
|
-
}> = {
|
|
383
|
-
navigation: CompositeNavigationProp<A['navigation'], B['navigation']>;
|
|
384
|
-
route: A['route'];
|
|
385
|
-
};
|
|
386
|
-
export type Descriptor<ScreenOptions extends {}, Navigation extends NavigationProp<any, any, any, any, any, any>, Route extends RouteProp<any, any>> = {
|
|
387
|
-
/**
|
|
388
|
-
* Render the component associated with this route.
|
|
389
|
-
*/
|
|
390
|
-
render(): React.JSX.Element;
|
|
391
|
-
/**
|
|
392
|
-
* Options for the route.
|
|
393
|
-
*/
|
|
394
|
-
options: ScreenOptions;
|
|
395
|
-
/**
|
|
396
|
-
* Route object for the screen
|
|
397
|
-
*/
|
|
398
|
-
route: Route;
|
|
399
|
-
/**
|
|
400
|
-
* Navigation object for the screen
|
|
401
|
-
*/
|
|
402
|
-
navigation: Navigation;
|
|
403
|
-
};
|
|
404
|
-
export type ScreenListeners<State extends NavigationState, EventMap extends EventMapBase> = Partial<{
|
|
405
|
-
[EventName in keyof (EventMap & EventMapCore<State>)]: EventListenerCallback<EventMap & EventMapCore<State>, EventName>;
|
|
406
|
-
}>;
|
|
407
|
-
type ScreenComponentType<ParamList extends ParamListBase, RouteName extends keyof ParamList> = React.ComponentType<{
|
|
408
|
-
route: RouteProp<ParamList, RouteName>;
|
|
409
|
-
navigation: any;
|
|
410
|
-
}> | React.ComponentType<{}>;
|
|
411
|
-
export type RouteConfigComponent<ParamList extends ParamListBase, RouteName extends keyof ParamList> = {
|
|
412
|
-
/**
|
|
413
|
-
* React component to render for this screen.
|
|
414
|
-
*/
|
|
415
|
-
component: ScreenComponentType<ParamList, RouteName>;
|
|
416
|
-
getComponent?: never;
|
|
417
|
-
children?: never;
|
|
418
|
-
} | {
|
|
419
|
-
/**
|
|
420
|
-
* Lazily get a React component to render for this screen.
|
|
421
|
-
*/
|
|
422
|
-
getComponent: () => ScreenComponentType<ParamList, RouteName>;
|
|
423
|
-
component?: never;
|
|
424
|
-
children?: never;
|
|
425
|
-
} | {
|
|
426
|
-
/**
|
|
427
|
-
* Render callback to render content of this screen.
|
|
428
|
-
*/
|
|
429
|
-
children: (props: {
|
|
430
|
-
route: RouteProp<ParamList, RouteName>;
|
|
431
|
-
navigation: any;
|
|
432
|
-
}) => React.ReactNode;
|
|
433
|
-
component?: never;
|
|
434
|
-
getComponent?: never;
|
|
435
|
-
};
|
|
436
|
-
export type RouteConfigProps<ParamList extends ParamListBase, RouteName extends keyof ParamList, State extends NavigationState, ScreenOptions extends {}, EventMap extends EventMapBase, Navigation> = {
|
|
437
|
-
/**
|
|
438
|
-
* Optional key for this screen. This doesn't need to be unique.
|
|
439
|
-
* If the key changes, existing screens with this name will be removed or reset.
|
|
440
|
-
* Useful when we have some common screens and have conditional rendering.
|
|
441
|
-
*/
|
|
442
|
-
navigationKey?: string;
|
|
443
|
-
/**
|
|
444
|
-
* Route name of this screen.
|
|
445
|
-
*/
|
|
446
|
-
name: RouteName;
|
|
447
|
-
/**
|
|
448
|
-
* Navigator options for this screen.
|
|
449
|
-
*/
|
|
450
|
-
options?: ScreenOptions | ((props: {
|
|
451
|
-
route: RouteProp<ParamList, RouteName>;
|
|
452
|
-
navigation: Navigation;
|
|
453
|
-
theme: ReactNavigation.Theme;
|
|
454
|
-
}) => ScreenOptions);
|
|
455
|
-
/**
|
|
456
|
-
* Event listeners for this screen.
|
|
457
|
-
*/
|
|
458
|
-
listeners?: ScreenListeners<State, EventMap> | ((props: {
|
|
459
|
-
route: RouteProp<ParamList, RouteName>;
|
|
460
|
-
navigation: Navigation;
|
|
461
|
-
}) => ScreenListeners<State, EventMap>);
|
|
462
|
-
/**
|
|
463
|
-
* Layout for this screen.
|
|
464
|
-
* Useful for wrapping the screen with custom containers.
|
|
465
|
-
* e.g. for styling, error boundaries, suspense, etc.
|
|
466
|
-
*/
|
|
467
|
-
layout?: (props: {
|
|
468
|
-
route: RouteProp<ParamList, RouteName>;
|
|
469
|
-
navigation: Navigation;
|
|
470
|
-
theme: ReactNavigation.Theme;
|
|
471
|
-
children: React.ReactElement;
|
|
472
|
-
}) => React.ReactElement;
|
|
473
|
-
/**
|
|
474
|
-
* Function to return an unique ID for this screen.
|
|
475
|
-
* Receives an object with the route params.
|
|
476
|
-
* For a given screen name, there will always be only one screen corresponding to an ID.
|
|
477
|
-
* If `undefined` is returned, it acts same as no `getId` being specified.
|
|
478
|
-
*/
|
|
479
|
-
getId?: ({ params, }: {
|
|
480
|
-
params: Readonly<ParamList[RouteName]>;
|
|
481
|
-
}) => string | undefined;
|
|
482
|
-
/**
|
|
483
|
-
* Initial params object for the route.
|
|
484
|
-
*/
|
|
485
|
-
initialParams?: Partial<ParamList[RouteName]>;
|
|
486
|
-
};
|
|
487
|
-
export type RouteConfig<ParamList extends ParamListBase, RouteName extends keyof ParamList, State extends NavigationState, ScreenOptions extends {}, EventMap extends EventMapBase, Navigation> = RouteConfigProps<ParamList, RouteName, State, ScreenOptions, EventMap, Navigation> & RouteConfigComponent<ParamList, RouteName>;
|
|
488
|
-
export type RouteGroupConfig<ParamList extends ParamListBase, ScreenOptions extends {}, Navigation> = {
|
|
489
|
-
/**
|
|
490
|
-
* Optional key for the screens in this group.
|
|
491
|
-
* If the key changes, all existing screens in this group will be removed or reset.
|
|
492
|
-
*/
|
|
493
|
-
navigationKey?: string;
|
|
494
|
-
/**
|
|
495
|
-
* Navigator options for this screen.
|
|
496
|
-
*/
|
|
497
|
-
screenOptions?: ScreenOptions | ((props: {
|
|
498
|
-
route: RouteProp<ParamList, keyof ParamList>;
|
|
499
|
-
navigation: Navigation;
|
|
500
|
-
theme: ReactNavigation.Theme;
|
|
501
|
-
}) => ScreenOptions);
|
|
502
|
-
/**
|
|
503
|
-
* Layout for the screens inside the group.
|
|
504
|
-
* This will override the `screenLayout` of parent group or navigator.
|
|
505
|
-
*/
|
|
506
|
-
screenLayout?: ((props: {
|
|
507
|
-
route: RouteProp<ParamList, keyof ParamList>;
|
|
508
|
-
navigation: Navigation;
|
|
509
|
-
theme: ReactNavigation.Theme;
|
|
510
|
-
children: React.ReactElement;
|
|
511
|
-
}) => React.ReactElement) | {};
|
|
512
|
-
/**
|
|
513
|
-
* Children React Elements to extract the route configuration from.
|
|
514
|
-
* Only `Screen`, `Group` and `React.Fragment` are supported as children.
|
|
515
|
-
*/
|
|
516
|
-
children: React.ReactNode;
|
|
517
|
-
};
|
|
518
|
-
export type NavigationContainerEventMap = {
|
|
519
|
-
/**
|
|
520
|
-
* Event that fires when the navigation container is ready to be used.
|
|
521
|
-
*/
|
|
522
|
-
ready: {
|
|
523
|
-
data: undefined;
|
|
524
|
-
};
|
|
525
|
-
/**
|
|
526
|
-
* Event that fires when the navigation state changes.
|
|
527
|
-
*/
|
|
528
|
-
state: {
|
|
529
|
-
data: {
|
|
530
|
-
/**
|
|
531
|
-
* The updated state object after the state change.
|
|
532
|
-
*/
|
|
533
|
-
state: NavigationState | PartialState<NavigationState> | undefined;
|
|
534
|
-
};
|
|
535
|
-
};
|
|
536
|
-
/**
|
|
537
|
-
* Event that fires when current options changes.
|
|
538
|
-
*/
|
|
539
|
-
options: {
|
|
540
|
-
data: {
|
|
541
|
-
options: object;
|
|
542
|
-
};
|
|
543
|
-
};
|
|
544
|
-
/**
|
|
545
|
-
* Event that fires when an action is dispatched.
|
|
546
|
-
* Only intended for debugging purposes, don't use it for app logic.
|
|
547
|
-
* This event will be emitted before state changes have been applied.
|
|
548
|
-
*/
|
|
549
|
-
__unsafe_action__: {
|
|
550
|
-
data: {
|
|
551
|
-
/**
|
|
552
|
-
* The action object that was dispatched.
|
|
553
|
-
*/
|
|
554
|
-
action: NavigationAction;
|
|
555
|
-
/**
|
|
556
|
-
* Whether the action was a no-op, i.e. resulted any state changes.
|
|
557
|
-
*/
|
|
558
|
-
noop: boolean;
|
|
559
|
-
/**
|
|
560
|
-
* Stack trace of the action, this will only be available during development.
|
|
561
|
-
*/
|
|
562
|
-
stack: string | undefined;
|
|
563
|
-
};
|
|
564
|
-
};
|
|
565
|
-
};
|
|
566
|
-
type NotUndefined<T> = T extends undefined ? never : T;
|
|
567
|
-
export type ParamListRoute<ParamList extends ParamListBase> = {
|
|
568
|
-
[RouteName in keyof ParamList]: NavigatorScreenParams<{}> extends ParamList[RouteName] ? NotUndefined<ParamList[RouteName]> extends NavigatorScreenParams<infer T> ? ParamListRoute<T> : Route<Extract<RouteName, string>, ParamList[RouteName]> : Route<Extract<RouteName, string>, ParamList[RouteName]>;
|
|
569
|
-
}[keyof ParamList];
|
|
570
|
-
type MaybeParamListRoute<ParamList extends {}> = ParamList extends ParamListBase ? ParamListRoute<ParamList> : Route<string>;
|
|
571
|
-
export type NavigationContainerRef<ParamList extends {}> = NavigationHelpers<ParamList> & EventConsumer<NavigationContainerEventMap> & {
|
|
572
|
-
/**
|
|
573
|
-
* Reset the navigation state of the root navigator to the provided state.
|
|
574
|
-
*
|
|
575
|
-
* @param state Navigation state object.
|
|
576
|
-
*/
|
|
577
|
-
resetRoot(state?: PartialState<NavigationState> | NavigationState): void;
|
|
578
|
-
/**
|
|
579
|
-
* Get the rehydrated navigation state of the navigation tree.
|
|
580
|
-
*/
|
|
581
|
-
getRootState(): NavigationState;
|
|
582
|
-
/**
|
|
583
|
-
* Get the currently focused navigation route.
|
|
584
|
-
*/
|
|
585
|
-
getCurrentRoute(): MaybeParamListRoute<ParamList> | undefined;
|
|
586
|
-
/**
|
|
587
|
-
* Get the currently focused route's options.
|
|
588
|
-
*/
|
|
589
|
-
getCurrentOptions(): object | undefined;
|
|
590
|
-
/**
|
|
591
|
-
* Whether the navigation container is ready to handle actions.
|
|
592
|
-
*/
|
|
593
|
-
isReady(): boolean;
|
|
594
|
-
/**
|
|
595
|
-
* Stub function for setOptions on navigation object for use with useNavigation.
|
|
596
|
-
*/
|
|
597
|
-
setOptions(): never;
|
|
598
|
-
/**
|
|
599
|
-
* Stub function for getParent on navigation object for use with useNavigation.
|
|
600
|
-
*/
|
|
601
|
-
getParent(): undefined;
|
|
602
|
-
};
|
|
603
|
-
export type NavigationContainerRefWithCurrent<ParamList extends {}> = NavigationContainerRef<ParamList> & {
|
|
604
|
-
current: NavigationContainerRef<ParamList> | null;
|
|
605
|
-
};
|
|
606
|
-
export type NavigationListBase<ParamList extends ParamListBase> = {
|
|
607
|
-
[RouteName in keyof ParamList]: unknown;
|
|
608
|
-
};
|
|
609
|
-
export type TypeBag<ParamList extends ParamListBase, NavigatorID extends string | undefined, State extends NavigationState, ScreenOptions extends {}, EventMap extends EventMapBase, NavigationList extends NavigationListBase<ParamList>, Navigator extends React.ComponentType<any>> = {
|
|
610
|
-
ParamList: ParamList;
|
|
611
|
-
NavigatorID: NavigatorID;
|
|
612
|
-
State: State;
|
|
613
|
-
ScreenOptions: ScreenOptions;
|
|
614
|
-
EventMap: EventMap;
|
|
615
|
-
NavigationList: NavigationList;
|
|
616
|
-
Navigator: Navigator;
|
|
617
|
-
};
|
|
618
|
-
export type NavigatorTypeBagBase = {
|
|
619
|
-
ParamList: {};
|
|
620
|
-
NavigatorID: string | undefined;
|
|
621
|
-
State: NavigationState;
|
|
622
|
-
ScreenOptions: {};
|
|
623
|
-
EventMap: {};
|
|
624
|
-
NavigationList: NavigationListBase<ParamListBase>;
|
|
625
|
-
Navigator: React.ComponentType<any>;
|
|
626
|
-
};
|
|
627
|
-
export type NavigatorTypeBag<ParamList extends ParamListBase, NavigatorID extends string | undefined, State extends NavigationState, ScreenOptions extends {}, EventMap extends EventMapBase, NavigationList extends NavigationListBase<ParamList>, Navigator extends React.ComponentType<any>> = {
|
|
628
|
-
ParamList: ParamList;
|
|
629
|
-
NavigatorID: NavigatorID;
|
|
630
|
-
State: State;
|
|
631
|
-
ScreenOptions: ScreenOptions;
|
|
632
|
-
EventMap: EventMap;
|
|
633
|
-
NavigationList: NavigationList;
|
|
634
|
-
Navigator: Navigator;
|
|
635
|
-
};
|
|
636
|
-
export type TypedNavigator<Bag extends NavigatorTypeBagBase, Config = unknown> = TypedNavigatorInternal<Bag['ParamList'], Bag['NavigatorID'], Bag['State'], Bag['ScreenOptions'], Bag['EventMap'], Bag['NavigationList'], Bag['Navigator']> & (undefined extends Config ? {} : {
|
|
637
|
-
config: Config;
|
|
638
|
-
});
|
|
639
|
-
type TypedNavigatorInternal<ParamList extends ParamListBase, NavigatorID extends string | undefined, State extends NavigationState, ScreenOptions extends {}, EventMap extends EventMapBase, NavigationList extends NavigationListBase<ParamList>, Navigator extends React.ComponentType<any>> = {
|
|
640
|
-
/**
|
|
641
|
-
* Navigator component which manages the child screens.
|
|
642
|
-
*/
|
|
643
|
-
Navigator: React.ComponentType<Omit<React.ComponentProps<Navigator>, keyof DefaultNavigatorOptions<any, any, any, any, any, any>> & DefaultNavigatorOptions<ParamList, NavigatorID, State, ScreenOptions, EventMap, NavigationList[keyof ParamList]>>;
|
|
644
|
-
/**
|
|
645
|
-
* Component used for grouping multiple route configuration.
|
|
646
|
-
*/
|
|
647
|
-
Group: React.ComponentType<RouteGroupConfig<ParamList, ScreenOptions, NavigationList[keyof ParamList]>>;
|
|
648
|
-
/**
|
|
649
|
-
* Component used for specifying route configuration.
|
|
650
|
-
*/
|
|
651
|
-
Screen: <RouteName extends keyof ParamList>(_: RouteConfig<ParamList, RouteName, State, ScreenOptions, EventMap, NavigationList[RouteName]>) => null;
|
|
652
|
-
};
|
|
653
|
-
export type NavigatorScreenParams<ParamList extends {}> = {
|
|
654
|
-
screen?: never;
|
|
655
|
-
params?: never;
|
|
656
|
-
initial?: never;
|
|
657
|
-
pop?: never;
|
|
658
|
-
path?: string;
|
|
659
|
-
state: PartialState<NavigationState> | NavigationState | undefined;
|
|
660
|
-
} | {
|
|
661
|
-
[RouteName in keyof ParamList]: undefined extends ParamList[RouteName] ? {
|
|
662
|
-
screen: RouteName;
|
|
663
|
-
params?: ParamList[RouteName];
|
|
664
|
-
initial?: boolean;
|
|
665
|
-
path?: string;
|
|
666
|
-
pop?: boolean;
|
|
667
|
-
state?: never;
|
|
668
|
-
} : {
|
|
669
|
-
screen: RouteName;
|
|
670
|
-
params: ParamList[RouteName];
|
|
671
|
-
initial?: boolean;
|
|
672
|
-
path?: string;
|
|
673
|
-
pop?: boolean;
|
|
674
|
-
state?: never;
|
|
675
|
-
};
|
|
676
|
-
}[keyof ParamList];
|
|
677
|
-
type PathConfigAlias = {
|
|
678
|
-
/**
|
|
679
|
-
* Path string to match against.
|
|
680
|
-
* e.g. `/users/:id` will match `/users/1` and extract `id` param as `1`.
|
|
681
|
-
*/
|
|
682
|
-
path: string;
|
|
683
|
-
/**
|
|
684
|
-
* Whether the path should be consider parent paths or use the exact path.
|
|
685
|
-
* By default, paths are relating to the path config on the parent screen.
|
|
686
|
-
* If `exact` is set to `true`, the parent path configuration is not used.
|
|
687
|
-
*/
|
|
688
|
-
exact?: boolean;
|
|
689
|
-
/**
|
|
690
|
-
* An object mapping the param name to a function which parses the param value.
|
|
691
|
-
*
|
|
692
|
-
* @example
|
|
693
|
-
* ```js
|
|
694
|
-
* parse: {
|
|
695
|
-
* id: Number,
|
|
696
|
-
* date: (value) => new Date(value)
|
|
697
|
-
* }
|
|
698
|
-
* ```
|
|
699
|
-
*/
|
|
700
|
-
parse?: Record<string, (value: string) => any>;
|
|
701
|
-
};
|
|
702
|
-
export type PathConfig<ParamList extends {}> = Partial<PathConfigAlias> & {
|
|
703
|
-
/**
|
|
704
|
-
* An object mapping the param name to a function which converts the param value to a string.
|
|
705
|
-
* By default, all params are converted to strings using `String(value)`.
|
|
706
|
-
*
|
|
707
|
-
* @example
|
|
708
|
-
* ```js
|
|
709
|
-
* stringify: {
|
|
710
|
-
* date: (value) => value.toISOString()
|
|
711
|
-
* }
|
|
712
|
-
* ```
|
|
713
|
-
*/
|
|
714
|
-
stringify?: Record<string, (value: any) => string>;
|
|
715
|
-
/**
|
|
716
|
-
* Additional path alias that will be matched to the same screen.
|
|
717
|
-
*/
|
|
718
|
-
alias?: (string | PathConfigAlias)[];
|
|
719
|
-
/**
|
|
720
|
-
* Path configuration for child screens.
|
|
721
|
-
*/
|
|
722
|
-
screens?: PathConfigMap<ParamList>;
|
|
723
|
-
/**
|
|
724
|
-
* Name of the initial route to use for the navigator when the path matches.
|
|
725
|
-
*/
|
|
726
|
-
initialRouteName?: keyof ParamList;
|
|
727
|
-
};
|
|
728
|
-
export type PathConfigMap<ParamList extends {}> = {
|
|
729
|
-
[RouteName in keyof ParamList]?: NonNullable<ParamList[RouteName]> extends NavigatorScreenParams<infer T extends {}> ? string | PathConfig<T> : string | Omit<PathConfig<{}>, 'screens' | 'initialRouteName'>;
|
|
730
|
-
};
|
|
731
|
-
export {};
|
|
732
|
-
//# sourceMappingURL=types.d.ts.map
|