@react-navigation/core 7.0.0-rc.1 → 7.0.0-rc.11
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 +43 -33
- package/lib/commonjs/BaseNavigationContainer.js.map +1 -1
- package/lib/commonjs/EnsureSingleNavigator.js +5 -3
- package/lib/commonjs/EnsureSingleNavigator.js.map +1 -1
- package/lib/commonjs/NavigationIndependentTree.js +14 -10
- package/lib/commonjs/NavigationIndependentTree.js.map +1 -1
- package/lib/commonjs/PreventRemoveProvider.js +8 -6
- package/lib/commonjs/PreventRemoveProvider.js.map +1 -1
- package/lib/commonjs/SceneView.js +23 -18
- package/lib/commonjs/SceneView.js.map +1 -1
- package/lib/commonjs/StaticNavigation.js +57 -35
- package/lib/commonjs/StaticNavigation.js.map +1 -1
- package/lib/commonjs/createNavigatorFactory.js +2 -2
- package/lib/commonjs/getFocusedRouteNameFromRoute.js +1 -1
- package/lib/commonjs/getPathFromState.js +1 -1
- package/lib/commonjs/getStateFromPath.js +2 -2
- package/lib/commonjs/index.js +32 -32
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/theming/ThemeProvider.js +6 -4
- package/lib/commonjs/theming/ThemeProvider.js.map +1 -1
- package/lib/commonjs/theming/useTheme.js +1 -1
- package/lib/commonjs/types.js +20 -2
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/useComponent.js +5 -3
- package/lib/commonjs/useComponent.js.map +1 -1
- package/lib/commonjs/useCurrentRender.js +1 -1
- package/lib/commonjs/useDescriptors.js +19 -16
- package/lib/commonjs/useDescriptors.js.map +1 -1
- package/lib/commonjs/useFocusEffect.js +1 -1
- package/lib/commonjs/useFocusEvents.js +1 -1
- package/lib/commonjs/useFocusedListenersChildrenAdapter.js +1 -1
- package/lib/commonjs/useIsFocused.js +7 -18
- package/lib/commonjs/useIsFocused.js.map +1 -1
- package/lib/commonjs/useNavigation.js +2 -2
- package/lib/commonjs/useNavigationBuilder.js +32 -28
- package/lib/commonjs/useNavigationBuilder.js.map +1 -1
- package/lib/commonjs/useNavigationCache.js +1 -1
- package/lib/commonjs/useNavigationContainerRef.js +1 -1
- package/lib/commonjs/useNavigationHelpers.js +3 -3
- package/lib/commonjs/useNavigationIndependentTree.js +1 -1
- package/lib/commonjs/useNavigationState.js +6 -16
- package/lib/commonjs/useNavigationState.js.map +1 -1
- package/lib/commonjs/useOnAction.js +3 -3
- package/lib/commonjs/useOnGetState.js +3 -3
- package/lib/commonjs/useOnPreventRemove.js +2 -2
- package/lib/commonjs/useOnRouteFocus.js +1 -1
- package/lib/commonjs/useOptionsGetters.js +2 -2
- package/lib/commonjs/usePreventRemove.js +3 -3
- package/lib/commonjs/usePreventRemoveContext.js +1 -1
- package/lib/commonjs/useRegisterNavigator.js +1 -1
- package/lib/commonjs/useRoute.js +1 -1
- package/lib/commonjs/useRouteCache.js +1 -1
- package/lib/commonjs/useSyncState.js +1 -1
- package/lib/module/BaseNavigationContainer.js +45 -33
- package/lib/module/BaseNavigationContainer.js.map +1 -1
- package/lib/module/CurrentRenderContext.js +2 -0
- package/lib/module/CurrentRenderContext.js.map +1 -1
- package/lib/module/DeprecatedNavigationInChildContext.js +2 -0
- package/lib/module/DeprecatedNavigationInChildContext.js.map +1 -1
- package/lib/module/EnsureSingleNavigator.js +7 -3
- package/lib/module/EnsureSingleNavigator.js.map +1 -1
- package/lib/module/Group.js +2 -0
- package/lib/module/Group.js.map +1 -1
- package/lib/module/NavigationBuilderContext.js +2 -0
- package/lib/module/NavigationBuilderContext.js.map +1 -1
- package/lib/module/NavigationContainerRefContext.js +2 -0
- package/lib/module/NavigationContainerRefContext.js.map +1 -1
- package/lib/module/NavigationContext.js +2 -0
- package/lib/module/NavigationContext.js.map +1 -1
- package/lib/module/NavigationHelpersContext.js +2 -0
- package/lib/module/NavigationHelpersContext.js.map +1 -1
- package/lib/module/NavigationIndependentTree.js +16 -10
- package/lib/module/NavigationIndependentTree.js.map +1 -1
- package/lib/module/NavigationIndependentTreeContext.js +2 -0
- package/lib/module/NavigationIndependentTreeContext.js.map +1 -1
- package/lib/module/NavigationRouteContext.js +2 -0
- package/lib/module/NavigationRouteContext.js.map +1 -1
- package/lib/module/NavigationStateContext.js +2 -0
- package/lib/module/NavigationStateContext.js.map +1 -1
- package/lib/module/PreventRemoveContext.js +2 -0
- package/lib/module/PreventRemoveContext.js.map +1 -1
- package/lib/module/PreventRemoveProvider.js +10 -6
- package/lib/module/PreventRemoveProvider.js.map +1 -1
- package/lib/module/SceneView.js +25 -18
- package/lib/module/SceneView.js.map +1 -1
- package/lib/module/Screen.js +2 -0
- package/lib/module/Screen.js.map +1 -1
- package/lib/module/StaticContainer.js +2 -0
- package/lib/module/StaticContainer.js.map +1 -1
- package/lib/module/StaticNavigation.js +58 -35
- package/lib/module/StaticNavigation.js.map +1 -1
- package/lib/module/UnhandledActionContext.js +2 -0
- package/lib/module/UnhandledActionContext.js.map +1 -1
- package/lib/module/checkDuplicateRouteNames.js +2 -0
- package/lib/module/checkDuplicateRouteNames.js.map +1 -1
- package/lib/module/checkSerializable.js +2 -0
- package/lib/module/checkSerializable.js.map +1 -1
- package/lib/module/createNavigationContainerRef.js +2 -0
- package/lib/module/createNavigationContainerRef.js.map +1 -1
- package/lib/module/createNavigatorFactory.js +4 -2
- package/lib/module/createNavigatorFactory.js.map +1 -1
- package/lib/module/deepFreeze.js +2 -0
- package/lib/module/deepFreeze.js.map +1 -1
- package/lib/module/findFocusedRoute.js +2 -0
- package/lib/module/findFocusedRoute.js.map +1 -1
- package/lib/module/getActionFromState.js +2 -0
- package/lib/module/getActionFromState.js.map +1 -1
- package/lib/module/getFocusedRouteNameFromRoute.js +3 -1
- package/lib/module/getFocusedRouteNameFromRoute.js.map +1 -1
- package/lib/module/getPathFromState.js +3 -1
- package/lib/module/getPathFromState.js.map +1 -1
- package/lib/module/getStateFromPath.js +4 -2
- package/lib/module/getStateFromPath.js.map +1 -1
- package/lib/module/index.js +34 -32
- package/lib/module/index.js.map +1 -1
- package/lib/module/isArrayEqual.js +2 -0
- package/lib/module/isArrayEqual.js.map +1 -1
- package/lib/module/isRecordEqual.js +2 -0
- package/lib/module/isRecordEqual.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/theming/ThemeContext.js +2 -0
- package/lib/module/theming/ThemeContext.js.map +1 -1
- package/lib/module/theming/ThemeProvider.js +8 -4
- package/lib/module/theming/ThemeProvider.js.map +1 -1
- package/lib/module/theming/useTheme.js +3 -1
- package/lib/module/theming/useTheme.js.map +1 -1
- package/lib/module/types.js +22 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/useChildListeners.js +2 -0
- package/lib/module/useChildListeners.js.map +1 -1
- package/lib/module/useComponent.js +7 -3
- package/lib/module/useComponent.js.map +1 -1
- package/lib/module/useCurrentRender.js +3 -1
- package/lib/module/useCurrentRender.js.map +1 -1
- package/lib/module/useDescriptors.js +21 -16
- package/lib/module/useDescriptors.js.map +1 -1
- package/lib/module/useEventEmitter.js +2 -0
- package/lib/module/useEventEmitter.js.map +1 -1
- package/lib/module/useFocusEffect.js +3 -1
- package/lib/module/useFocusEffect.js.map +1 -1
- package/lib/module/useFocusEvents.js +3 -1
- package/lib/module/useFocusEvents.js.map +1 -1
- package/lib/module/useFocusedListenersChildrenAdapter.js +3 -1
- package/lib/module/useFocusedListenersChildrenAdapter.js.map +1 -1
- package/lib/module/useIsFocused.js +8 -17
- package/lib/module/useIsFocused.js.map +1 -1
- package/lib/module/useIsomorphicLayoutEffect.js +2 -0
- package/lib/module/useIsomorphicLayoutEffect.js.map +1 -1
- package/lib/module/useIsomorphicLayoutEffect.native.js +2 -0
- package/lib/module/useIsomorphicLayoutEffect.native.js.map +1 -1
- package/lib/module/useKeyedChildListeners.js +2 -0
- package/lib/module/useKeyedChildListeners.js.map +1 -1
- package/lib/module/useLazyValue.js +2 -0
- package/lib/module/useLazyValue.js.map +1 -1
- package/lib/module/useNavigation.js +4 -2
- package/lib/module/useNavigation.js.map +1 -1
- package/lib/module/useNavigationBuilder.js +34 -28
- package/lib/module/useNavigationBuilder.js.map +1 -1
- package/lib/module/useNavigationCache.js +3 -1
- package/lib/module/useNavigationCache.js.map +1 -1
- package/lib/module/useNavigationContainerRef.js +3 -1
- package/lib/module/useNavigationContainerRef.js.map +1 -1
- package/lib/module/useNavigationHelpers.js +5 -3
- package/lib/module/useNavigationHelpers.js.map +1 -1
- package/lib/module/useNavigationIndependentTree.js +3 -1
- package/lib/module/useNavigationIndependentTree.js.map +1 -1
- package/lib/module/useNavigationState.js +8 -16
- package/lib/module/useNavigationState.js.map +1 -1
- package/lib/module/useOnAction.js +5 -3
- package/lib/module/useOnAction.js.map +1 -1
- package/lib/module/useOnGetState.js +5 -3
- package/lib/module/useOnGetState.js.map +1 -1
- package/lib/module/useOnPreventRemove.js +4 -2
- package/lib/module/useOnPreventRemove.js.map +1 -1
- package/lib/module/useOnRouteFocus.js +3 -1
- package/lib/module/useOnRouteFocus.js.map +1 -1
- package/lib/module/useOptionsGetters.js +4 -2
- package/lib/module/useOptionsGetters.js.map +1 -1
- package/lib/module/usePreventRemove.js +5 -3
- package/lib/module/usePreventRemove.js.map +1 -1
- package/lib/module/usePreventRemoveContext.js +3 -1
- package/lib/module/usePreventRemoveContext.js.map +1 -1
- package/lib/module/useRegisterNavigator.js +3 -1
- package/lib/module/useRegisterNavigator.js.map +1 -1
- package/lib/module/useRoute.js +3 -1
- package/lib/module/useRoute.js.map +1 -1
- package/lib/module/useRouteCache.js +3 -1
- package/lib/module/useRouteCache.js.map +1 -1
- package/lib/module/useSyncState.js +3 -1
- package/lib/module/useSyncState.js.map +1 -1
- package/lib/module/validatePathConfig.js +2 -0
- package/lib/module/validatePathConfig.js.map +1 -1
- 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/{src → commonjs/src}/EnsureSingleNavigator.d.ts +1 -1
- 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/{src → commonjs/src}/NavigationIndependentTree.d.ts +1 -1
- 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/{src → commonjs/src}/PreventRemoveProvider.d.ts +1 -1
- package/lib/typescript/commonjs/src/PreventRemoveProvider.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/SceneView.d.ts +1 -2
- 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/{src → commonjs/src}/StaticNavigation.d.ts +2 -4
- 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/{src → commonjs/src}/theming/ThemeProvider.d.ts +1 -1
- 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/{src → commonjs/src}/types.d.ts +6 -6
- 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/{src → commonjs/src}/useComponent.d.ts +1 -1
- 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.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/{src → commonjs/src}/useNavigationBuilder.d.ts +1 -1
- package/lib/typescript/commonjs/src/useNavigationBuilder.d.ts.map +1 -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.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 +695 -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 +38 -13
- package/src/StaticNavigation.tsx +50 -34
- package/src/types.tsx +18 -11
- package/src/useIsFocused.tsx +20 -31
- package/src/useNavigationBuilder.tsx +3 -1
- package/src/useNavigationState.tsx +15 -17
- 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.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.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.map +0 -1
- 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.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/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}/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}/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}/Screen.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/StaticContainer.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/useTheme.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useChildListeners.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useCurrentRender.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useDescriptors.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}/useNavigationCache.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useNavigationContainerRef.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useNavigationHelpers.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,65 @@
|
|
|
1
|
+
import { type NavigationAction, type NavigationState, type ParamListBase, type Router } from '@react-navigation/routers';
|
|
2
|
+
import type { NavigationHelpers, NavigationProp } from './types';
|
|
3
|
+
import type { NavigationEventEmitter } from './useEventEmitter';
|
|
4
|
+
type Options<State extends NavigationState, ScreenOptions extends {}, EventMap extends Record<string, any>> = {
|
|
5
|
+
state: State;
|
|
6
|
+
getState: () => State;
|
|
7
|
+
navigation: NavigationHelpers<ParamListBase> & Partial<NavigationProp<ParamListBase, string, any, any, any>>;
|
|
8
|
+
setOptions: (cb: (options: Record<string, ScreenOptions>) => Record<string, ScreenOptions>) => void;
|
|
9
|
+
router: Router<State, NavigationAction>;
|
|
10
|
+
emitter: NavigationEventEmitter<EventMap>;
|
|
11
|
+
};
|
|
12
|
+
type NavigationItem<State extends NavigationState, ScreenOptions extends {}, EventMap extends Record<string, any>> = NavigationProp<ParamListBase, string, string | undefined, State, ScreenOptions, EventMap>;
|
|
13
|
+
type NavigationCache<State extends NavigationState, ScreenOptions extends {}, EventMap extends Record<string, any>> = Record<string, NavigationItem<State, ScreenOptions, EventMap>>;
|
|
14
|
+
/**
|
|
15
|
+
* Hook to cache navigation objects for each screen in the navigator.
|
|
16
|
+
* It's important to cache them to make sure navigation objects don't change between renders.
|
|
17
|
+
* This lets us apply optimizations like `React.memo` to minimize re-rendering screens.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useNavigationCache<State extends NavigationState, ScreenOptions extends {}, EventMap extends Record<string, any>, ActionHelpers extends Record<string, () => void>>({ state, getState, navigation, setOptions, router, emitter, }: Options<State, ScreenOptions, EventMap>): {
|
|
20
|
+
base: Omit<{
|
|
21
|
+
dispatch(action: Readonly<{
|
|
22
|
+
type: string;
|
|
23
|
+
payload?: object;
|
|
24
|
+
source?: string;
|
|
25
|
+
target?: string;
|
|
26
|
+
}> | ((state: Readonly<State>) => NavigationAction)): void;
|
|
27
|
+
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
|
|
28
|
+
navigate<RouteName extends string>(options: RouteName extends unknown ? {
|
|
29
|
+
name: RouteName;
|
|
30
|
+
params: object | undefined;
|
|
31
|
+
path?: string;
|
|
32
|
+
merge?: boolean;
|
|
33
|
+
} : never): void;
|
|
34
|
+
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
|
|
35
|
+
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? {
|
|
36
|
+
name: RouteName;
|
|
37
|
+
params: object | undefined;
|
|
38
|
+
merge?: boolean;
|
|
39
|
+
} : never): void;
|
|
40
|
+
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
|
|
41
|
+
reset(state: State | import("@react-navigation/routers").PartialState<State>): void;
|
|
42
|
+
goBack(): void;
|
|
43
|
+
isFocused(): boolean;
|
|
44
|
+
canGoBack(): boolean;
|
|
45
|
+
getId(): string | undefined;
|
|
46
|
+
getParent<T = NavigationHelpers<ParamListBase, {}> | undefined>(id?: string): T;
|
|
47
|
+
getState(): State;
|
|
48
|
+
setStateForNextRouteNamesChange(state: State | import("@react-navigation/routers").PartialState<State>): void;
|
|
49
|
+
} & import("./types").PrivateValueStore<[ParamListBase, unknown, unknown]>, "getParent"> & {
|
|
50
|
+
getParent<T = NavigationProp<ParamListBase, string, undefined, Readonly<{
|
|
51
|
+
key: string;
|
|
52
|
+
index: number;
|
|
53
|
+
routeNames: string[];
|
|
54
|
+
history?: unknown[];
|
|
55
|
+
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
56
|
+
type: string;
|
|
57
|
+
stale: false;
|
|
58
|
+
}>, {}, {}> | undefined>(id?: string | undefined): T;
|
|
59
|
+
setParams(params: Partial<object | undefined>): void;
|
|
60
|
+
setOptions(options: Partial<ScreenOptions>): void;
|
|
61
|
+
} & import("./types").EventConsumer<EventMap & import("./types").EventMapCore<State>> & import("./types").PrivateValueStore<[ParamListBase, string, EventMap]> & ActionHelpers;
|
|
62
|
+
navigations: NavigationCache<State, ScreenOptions, EventMap>;
|
|
63
|
+
};
|
|
64
|
+
export {};
|
|
65
|
+
//# sourceMappingURL=useNavigationCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNavigationCache.d.ts","sourceRoot":"","sources":["../../../../src/useNavigationCache.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,MAAM,EACZ,MAAM,2BAA2B,CAAC;AAInC,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,KAAK,OAAO,CACV,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAClC;IACF,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,MAAM,KAAK,CAAC;IACtB,UAAU,EAAE,iBAAiB,CAAC,aAAa,CAAC,GAC1C,OAAO,CAAC,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAChE,UAAU,EAAE,CACV,EAAE,EAAE,CACF,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,KACnC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,KAC/B,IAAI,CAAC;IACV,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IACxC,OAAO,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;CAC3C,CAAC;AAEF,KAAK,cAAc,CACjB,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAClC,cAAc,CAChB,aAAa,EACb,MAAM,EACN,MAAM,GAAG,SAAS,EAClB,KAAK,EACL,aAAa,EACb,QAAQ,CACT,CAAC;AAEF,KAAK,eAAe,CAClB,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAClC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEnE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACpC,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,EAChD,EACA,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,EACV,MAAM,EACN,OAAO,GACR,EAAE,OAAO,CAAC,KAAK,EAAE,aAAa,EAAE,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4KzC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { NavigationContainerRefWithCurrent } from './types';
|
|
2
|
+
export declare function useNavigationContainerRef<ParamList extends {} = ReactNavigation.RootParamList>(): NavigationContainerRefWithCurrent<ParamList>;
|
|
3
|
+
//# sourceMappingURL=useNavigationContainerRef.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNavigationContainerRef.d.ts","sourceRoot":"","sources":["../../../../src/useNavigationContainerRef.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAC;AAEjE,wBAAgB,yBAAyB,CACvC,SAAS,SAAS,EAAE,GAAG,eAAe,CAAC,aAAa,KACjD,iCAAiC,CAAC,SAAS,CAAC,CAShD"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { type NavigationAction, type NavigationState, type ParamListBase, type Router } from '@react-navigation/routers';
|
|
2
|
+
import { type NavigationHelpers, PrivateValueStore } from './types';
|
|
3
|
+
import type { NavigationEventEmitter } from './useEventEmitter';
|
|
4
|
+
type Options<State extends NavigationState, Action extends NavigationAction> = {
|
|
5
|
+
id: string | undefined;
|
|
6
|
+
onAction: (action: NavigationAction) => boolean;
|
|
7
|
+
getState: () => State;
|
|
8
|
+
emitter: NavigationEventEmitter<any>;
|
|
9
|
+
router: Router<State, Action>;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Navigation object with helper methods to be used by a navigator.
|
|
13
|
+
* This object includes methods for common actions as well as methods the parent screen's navigation object.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useNavigationHelpers<State extends NavigationState, ActionHelpers extends Record<string, () => void>, Action extends NavigationAction, EventMap extends Record<string, any>>({ id: navigatorId, onAction, getState, emitter, router, }: Options<State, Action>): {
|
|
16
|
+
dispatch(action: Readonly<{
|
|
17
|
+
type: string;
|
|
18
|
+
payload?: object;
|
|
19
|
+
source?: string;
|
|
20
|
+
target?: string;
|
|
21
|
+
}> | ((state: Readonly<Readonly<{
|
|
22
|
+
key: string;
|
|
23
|
+
index: number;
|
|
24
|
+
routeNames: string[];
|
|
25
|
+
history?: unknown[];
|
|
26
|
+
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
27
|
+
type: string;
|
|
28
|
+
stale: false;
|
|
29
|
+
}>>) => NavigationAction)): void;
|
|
30
|
+
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
|
|
31
|
+
navigate<RouteName extends string>(options: RouteName extends unknown ? {
|
|
32
|
+
name: RouteName;
|
|
33
|
+
params: object | undefined;
|
|
34
|
+
path?: string;
|
|
35
|
+
merge?: boolean;
|
|
36
|
+
} : never): void;
|
|
37
|
+
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
|
|
38
|
+
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? {
|
|
39
|
+
name: RouteName;
|
|
40
|
+
params: object | undefined;
|
|
41
|
+
merge?: boolean;
|
|
42
|
+
} : never): void;
|
|
43
|
+
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
|
|
44
|
+
reset(state: Readonly<{
|
|
45
|
+
key: string;
|
|
46
|
+
index: number;
|
|
47
|
+
routeNames: string[];
|
|
48
|
+
history?: unknown[];
|
|
49
|
+
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
50
|
+
type: string;
|
|
51
|
+
stale: false;
|
|
52
|
+
}> | import("@react-navigation/routers").PartialState<Readonly<{
|
|
53
|
+
key: string;
|
|
54
|
+
index: number;
|
|
55
|
+
routeNames: string[];
|
|
56
|
+
history?: unknown[];
|
|
57
|
+
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
58
|
+
type: string;
|
|
59
|
+
stale: false;
|
|
60
|
+
}>>): void;
|
|
61
|
+
goBack(): void;
|
|
62
|
+
isFocused(): boolean;
|
|
63
|
+
canGoBack(): boolean;
|
|
64
|
+
getId(): string | undefined;
|
|
65
|
+
getParent<T = NavigationHelpers<ParamListBase, {}> | undefined>(id?: string): T;
|
|
66
|
+
getState(): Readonly<{
|
|
67
|
+
key: string;
|
|
68
|
+
index: number;
|
|
69
|
+
routeNames: string[];
|
|
70
|
+
history?: unknown[];
|
|
71
|
+
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
72
|
+
type: string;
|
|
73
|
+
stale: false;
|
|
74
|
+
}>;
|
|
75
|
+
setStateForNextRouteNamesChange(state: Readonly<{
|
|
76
|
+
key: string;
|
|
77
|
+
index: number;
|
|
78
|
+
routeNames: string[];
|
|
79
|
+
history?: unknown[];
|
|
80
|
+
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
81
|
+
type: string;
|
|
82
|
+
stale: false;
|
|
83
|
+
}> | import("@react-navigation/routers").PartialState<Readonly<{
|
|
84
|
+
key: string;
|
|
85
|
+
index: number;
|
|
86
|
+
routeNames: string[];
|
|
87
|
+
history?: unknown[];
|
|
88
|
+
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
89
|
+
type: string;
|
|
90
|
+
stale: false;
|
|
91
|
+
}>>): void;
|
|
92
|
+
} & PrivateValueStore<[ParamListBase, unknown, unknown]> & import("./types").EventEmitter<EventMap> & {
|
|
93
|
+
setParams<RouteName extends string>(params: Partial<object | undefined>): void;
|
|
94
|
+
} & ActionHelpers;
|
|
95
|
+
export {};
|
|
96
|
+
//# sourceMappingURL=useNavigationHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNavigationHelpers.d.ts","sourceRoot":"","sources":["../../../../src/useNavigationHelpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,MAAM,EACZ,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,KAAK,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAKhE,KAAK,OAAO,CAAC,KAAK,SAAS,eAAe,EAAE,MAAM,SAAS,gBAAgB,IAAI;IAC7E,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC;IAChD,QAAQ,EAAE,MAAM,KAAK,CAAC;IACtB,OAAO,EAAE,sBAAsB,CAAC,GAAG,CAAC,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;CAC/B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,EAChD,MAAM,SAAS,gBAAgB,EAC/B,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACpC,EACA,EAAE,EAAE,WAAW,EACf,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,MAAM,GACP,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA0ExB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNavigationIndependentTree.d.ts","sourceRoot":"","sources":["../../../../src/useNavigationIndependentTree.tsx"],"names":[],"mappings":"AAIA,wBAAgB,4BAA4B,YAE3C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { NavigationState, ParamListBase } from '@react-navigation/routers';
|
|
2
|
+
type Selector<ParamList extends ParamListBase, T> = (state: NavigationState<ParamList>) => T;
|
|
3
|
+
/**
|
|
4
|
+
* Hook to get a value from the current navigation state using a selector.
|
|
5
|
+
*
|
|
6
|
+
* @param selector Selector function to get a value from the state.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useNavigationState<ParamList extends ParamListBase, T>(selector: Selector<ParamList, T>): T;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=useNavigationState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNavigationState.d.ts","sourceRoot":"","sources":["../../../../src/useNavigationState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAOhF,KAAK,QAAQ,CAAC,SAAS,SAAS,aAAa,EAAE,CAAC,IAAI,CAClD,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,KAC9B,CAAC,CAAC;AAEP;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,SAAS,aAAa,EAAE,CAAC,EACnE,QAAQ,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,GAC/B,CAAC,CAoBH"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { NavigationAction, NavigationState, PartialState, Router, RouterConfigOptions } from '@react-navigation/routers';
|
|
2
|
+
import { type ChildActionListener, type ChildBeforeRemoveListener } from './NavigationBuilderContext';
|
|
3
|
+
import type { EventMapCore } from './types';
|
|
4
|
+
import type { NavigationEventEmitter } from './useEventEmitter';
|
|
5
|
+
type Options = {
|
|
6
|
+
router: Router<NavigationState, NavigationAction>;
|
|
7
|
+
key?: string;
|
|
8
|
+
getState: () => NavigationState;
|
|
9
|
+
setState: (state: NavigationState | PartialState<NavigationState>) => void;
|
|
10
|
+
actionListeners: ChildActionListener[];
|
|
11
|
+
beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>;
|
|
12
|
+
routerConfigOptions: RouterConfigOptions;
|
|
13
|
+
emitter: NavigationEventEmitter<EventMapCore<any>>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Hook to handle actions for a navigator, including state updates and bubbling.
|
|
17
|
+
*
|
|
18
|
+
* Bubbling an action is achieved in 2 ways:
|
|
19
|
+
* 1. To bubble action to parent, we expose the action handler in context and then access the parent context
|
|
20
|
+
* 2. To bubble action to child, child adds event listeners subscribing to actions from parent
|
|
21
|
+
*
|
|
22
|
+
* When the action handler handles as action, it returns `true`, otherwise `false`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useOnAction({ router, getState, setState, key, actionListeners, beforeRemoveListeners, routerConfigOptions, emitter, }: Options): (action: NavigationAction, visitedNavigators?: Set<string>) => boolean;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=useOnAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnAction.d.ts","sourceRoot":"","sources":["../../../../src/useOnAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,MAAM,EACN,mBAAmB,EACpB,MAAM,2BAA2B,CAAC;AAInC,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAE/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAGhE,KAAK,OAAO,GAAG;IACb,MAAM,EAAE,MAAM,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,eAAe,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IAC3E,eAAe,EAAE,mBAAmB,EAAE,CAAC;IACvC,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,SAAS,CAAC,CAAC;IAC7E,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;CACpD,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,GAAG,EACH,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,OAAO,GACR,EAAE,OAAO,YAoBI,gBAAgB,sBACL,GAAG,CAAC,MAAM,CAAC,aA8GnC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NavigationState } from '@react-navigation/routers';
|
|
2
|
+
import { type GetStateListener } from './NavigationBuilderContext';
|
|
3
|
+
type Options = {
|
|
4
|
+
getState: () => NavigationState;
|
|
5
|
+
getStateListeners: Record<string, GetStateListener | undefined>;
|
|
6
|
+
};
|
|
7
|
+
export declare function useOnGetState({ getState, getStateListeners }: Options): void;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=useOnGetState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnGetState.d.ts","sourceRoot":"","sources":["../../../../src/useOnGetState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAIjE,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,4BAA4B,CAAC;AAGpC,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,MAAM,eAAe,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,SAAS,CAAC,CAAC;CACjE,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,EAAE,OAAO,QA6BrE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { NavigationAction, NavigationState } from '@react-navigation/routers';
|
|
2
|
+
import { type ChildBeforeRemoveListener } from './NavigationBuilderContext';
|
|
3
|
+
import type { EventMapCore } from './types';
|
|
4
|
+
import type { NavigationEventEmitter } from './useEventEmitter';
|
|
5
|
+
type Options = {
|
|
6
|
+
getState: () => NavigationState;
|
|
7
|
+
emitter: NavigationEventEmitter<EventMapCore<any>>;
|
|
8
|
+
beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>;
|
|
9
|
+
};
|
|
10
|
+
export declare const shouldPreventRemove: (emitter: NavigationEventEmitter<EventMapCore<any>>, beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>, currentRoutes: {
|
|
11
|
+
key: string;
|
|
12
|
+
}[], nextRoutes: {
|
|
13
|
+
key?: string | undefined;
|
|
14
|
+
}[], action: NavigationAction) => boolean;
|
|
15
|
+
export declare function useOnPreventRemove({ getState, emitter, beforeRemoveListeners, }: Options): void;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=useOnPreventRemove.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnPreventRemove.d.ts","sourceRoot":"","sources":["../../../../src/useOnPreventRemove.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EAChB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,MAAM,eAAe,CAAC;IAChC,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACnD,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,SAAS,CAAC,CAAC;CAC9E,CAAC;AAIF,eAAO,MAAM,mBAAmB,YACrB,sBAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,yBAC3B,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,SAAS,CAAC,iBAC7D;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,cACpB;IAAE,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,EAAE,UAClC,gBAAgB,YA8CzB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,OAAO,EACP,qBAAqB,GACtB,EAAE,OAAO,QAoBT"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { NavigationAction, NavigationState, Router } from '@react-navigation/routers';
|
|
2
|
+
type Options<Action extends NavigationAction> = {
|
|
3
|
+
router: Router<NavigationState, Action>;
|
|
4
|
+
getState: () => NavigationState;
|
|
5
|
+
setState: (state: NavigationState) => void;
|
|
6
|
+
key?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Hook to handle focus actions for a route.
|
|
10
|
+
* Focus action needs to be treated specially, coz when a nested route is focused,
|
|
11
|
+
* the parent navigators also needs to be focused.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useOnRouteFocus<Action extends NavigationAction>({ router, getState, key: sourceRouteKey, setState, }: Options<Action>): (key: string) => void;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=useOnRouteFocus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnRouteFocus.d.ts","sourceRoot":"","sources":["../../../../src/useOnRouteFocus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,MAAM,EACP,MAAM,2BAA2B,CAAC;AAKnC,KAAK,OAAO,CAAC,MAAM,SAAS,gBAAgB,IAAI;IAC9C,MAAM,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IACxC,QAAQ,EAAE,MAAM,eAAe,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,SAAS,gBAAgB,EAAE,EAC/D,MAAM,EACN,QAAQ,EACR,GAAG,EAAE,cAAc,EACnB,QAAQ,GACT,EAAE,OAAO,CAAC,MAAM,CAAC,SAMR,MAAM,UAcf"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ParamListBase } from '@react-navigation/routers';
|
|
2
|
+
import type { NavigationProp } from './types';
|
|
3
|
+
type Options = {
|
|
4
|
+
key?: string;
|
|
5
|
+
navigation?: NavigationProp<ParamListBase>;
|
|
6
|
+
options?: object | undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare function useOptionsGetters({ key, options, navigation }: Options): {
|
|
9
|
+
addOptionsGetter: (key: string, getter: () => object | undefined | null) => () => void;
|
|
10
|
+
getCurrentOptions: () => object | null | undefined;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=useOptionsGetters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOptionsGetters.d.ts","sourceRoot":"","sources":["../../../../src/useOptionsGetters.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAK/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,KAAK,OAAO,GAAG;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,OAAO;4BA+D7D,MAAM,UAAU,MAAM,MAAM,GAAG,SAAS,GAAG,IAAI;;EAiBxD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { NavigationAction } from '@react-navigation/routers';
|
|
2
|
+
/**
|
|
3
|
+
* Hook to prevent screen from being removed. Can be used to prevent users from leaving the screen.
|
|
4
|
+
*
|
|
5
|
+
* @param preventRemove Boolean indicating whether to prevent screen from being removed.
|
|
6
|
+
* @param callback Function which is executed when screen was prevented from being removed.
|
|
7
|
+
*/
|
|
8
|
+
export declare function usePreventRemove(preventRemove: boolean, callback: (options: {
|
|
9
|
+
data: {
|
|
10
|
+
action: NavigationAction;
|
|
11
|
+
};
|
|
12
|
+
}) => void): void;
|
|
13
|
+
//# sourceMappingURL=usePreventRemove.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePreventRemove.d.ts","sourceRoot":"","sources":["../../../../src/usePreventRemove.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAUlE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,aAAa,EAAE,OAAO,EACtB,QAAQ,EAAE,CAAC,OAAO,EAAE;IAAE,IAAI,EAAE;QAAE,MAAM,EAAE,gBAAgB,CAAA;KAAE,CAAA;CAAE,KAAK,IAAI,QAgCpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePreventRemoveContext.d.ts","sourceRoot":"","sources":["../../../../src/usePreventRemoveContext.tsx"],"names":[],"mappings":"AAIA,wBAAgB,uBAAuB;;;EAUtC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register a navigator in the parent context (either a navigation container or a screen).
|
|
3
|
+
* This is used to prevent multiple navigators under a single container or screen.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useRegisterNavigator(): string;
|
|
6
|
+
//# sourceMappingURL=useRegisterNavigator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRegisterNavigator.d.ts","sourceRoot":"","sources":["../../../../src/useRegisterNavigator.tsx"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAgB,oBAAoB,WAmBnC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ParamListBase } from '@react-navigation/routers';
|
|
2
|
+
import type { RouteProp } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Hook to access the route prop of the parent screen anywhere.
|
|
5
|
+
*
|
|
6
|
+
* @returns Route prop of the parent screen.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useRoute<T extends RouteProp<ParamListBase>>(): T;
|
|
9
|
+
//# sourceMappingURL=useRoute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRoute.d.ts","sourceRoot":"","sources":["../../../../src/useRoute.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAI/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,CAUhE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { NavigationState, ParamListBase } from '@react-navigation/routers';
|
|
2
|
+
import type { RouteProp } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Utilities such as `getFocusedRouteNameFromRoute` need to access state.
|
|
5
|
+
* So we need a way to suppress the warning for those use cases.
|
|
6
|
+
* This is fine since they are internal utilities and this is not public API.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CHILD_STATE: unique symbol;
|
|
9
|
+
/**
|
|
10
|
+
* Hook to cache route props for each screen in the navigator.
|
|
11
|
+
* This lets add warnings and modifications to the route object but keep references between renders.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useRouteCache<State extends NavigationState>(routes: State['routes']): RouteProp<ParamListBase>[];
|
|
14
|
+
//# sourceMappingURL=useRouteCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRouteCache.d.ts","sourceRoot":"","sources":["../../../../src/useRouteCache.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAIhF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzC;;;;GAIG;AACH,eAAO,MAAM,WAAW,eAAwB,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,SAAS,eAAe,EACzD,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,8BAmDxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSyncState.d.ts","sourceRoot":"","sources":["../../../../src/useSyncState.tsx"],"names":[],"mappings":"AA8CA,wBAAgB,YAAY,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,gDAYvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validatePathConfig.d.ts","sourceRoot":"","sources":["../../../../src/validatePathConfig.tsx"],"names":[],"mappings":"AAKA,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,UAAO,QAsE9D"}
|