@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
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.createNavigatorFactory = createNavigatorFactory;
|
|
7
|
-
var _Group = require("./Group");
|
|
8
|
-
var _Screen = require("./Screen");
|
|
7
|
+
var _Group = require("./Group.js");
|
|
8
|
+
var _Screen = require("./Screen.js");
|
|
9
9
|
/**
|
|
10
10
|
* Higher order component to create a `Navigator` and `Screen` pair.
|
|
11
11
|
* Custom navigators should wrap the navigator component in `createNavigator` before exporting.
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getFocusedRouteNameFromRoute = getFocusedRouteNameFromRoute;
|
|
7
|
-
var _useRouteCache = require("./useRouteCache");
|
|
7
|
+
var _useRouteCache = require("./useRouteCache.js");
|
|
8
8
|
function getFocusedRouteNameFromRoute(route) {
|
|
9
9
|
// @ts-expect-error: this isn't in type definitions coz we want this private
|
|
10
10
|
const state = route[_useRouteCache.CHILD_STATE] ?? route.state;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getPathFromState = getPathFromState;
|
|
7
7
|
var queryString = _interopRequireWildcard(require("query-string"));
|
|
8
|
-
var _validatePathConfig = require("./validatePathConfig");
|
|
8
|
+
var _validatePathConfig = require("./validatePathConfig.js");
|
|
9
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
10
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
11
|
const getActiveRoute = state => {
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getStateFromPath = getStateFromPath;
|
|
7
7
|
var _escapeStringRegexp = _interopRequireDefault(require("escape-string-regexp"));
|
|
8
8
|
var queryString = _interopRequireWildcard(require("query-string"));
|
|
9
|
-
var _findFocusedRoute = require("./findFocusedRoute");
|
|
10
|
-
var _validatePathConfig = require("./validatePathConfig");
|
|
9
|
+
var _findFocusedRoute = require("./findFocusedRoute.js");
|
|
10
|
+
var _validatePathConfig = require("./validatePathConfig.js");
|
|
11
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
package/lib/commonjs/index.js
CHANGED
|
@@ -229,27 +229,27 @@ Object.defineProperty(exports, "validatePathConfig", {
|
|
|
229
229
|
return _validatePathConfig.validatePathConfig;
|
|
230
230
|
}
|
|
231
231
|
});
|
|
232
|
-
var _BaseNavigationContainer = require("./BaseNavigationContainer");
|
|
233
|
-
var _createNavigationContainerRef = require("./createNavigationContainerRef");
|
|
234
|
-
var _createNavigatorFactory = require("./createNavigatorFactory");
|
|
235
|
-
var _CurrentRenderContext = require("./CurrentRenderContext");
|
|
236
|
-
var _findFocusedRoute = require("./findFocusedRoute");
|
|
237
|
-
var _getActionFromState = require("./getActionFromState");
|
|
238
|
-
var _getFocusedRouteNameFromRoute = require("./getFocusedRouteNameFromRoute");
|
|
239
|
-
var _getPathFromState = require("./getPathFromState");
|
|
240
|
-
var _getStateFromPath = require("./getStateFromPath");
|
|
241
|
-
var _NavigationContainerRefContext = require("./NavigationContainerRefContext");
|
|
242
|
-
var _NavigationContext = require("./NavigationContext");
|
|
243
|
-
var _NavigationHelpersContext = require("./NavigationHelpersContext");
|
|
244
|
-
var _NavigationIndependentTree = require("./NavigationIndependentTree");
|
|
245
|
-
var _NavigationRouteContext = require("./NavigationRouteContext");
|
|
246
|
-
var _PreventRemoveContext = require("./PreventRemoveContext");
|
|
247
|
-
var _PreventRemoveProvider = require("./PreventRemoveProvider");
|
|
248
|
-
var _StaticNavigation = require("./StaticNavigation");
|
|
249
|
-
var _ThemeContext = require("./theming/ThemeContext");
|
|
250
|
-
var _ThemeProvider = require("./theming/ThemeProvider");
|
|
251
|
-
var _useTheme = require("./theming/useTheme");
|
|
252
|
-
var _types = require("./types");
|
|
232
|
+
var _BaseNavigationContainer = require("./BaseNavigationContainer.js");
|
|
233
|
+
var _createNavigationContainerRef = require("./createNavigationContainerRef.js");
|
|
234
|
+
var _createNavigatorFactory = require("./createNavigatorFactory.js");
|
|
235
|
+
var _CurrentRenderContext = require("./CurrentRenderContext.js");
|
|
236
|
+
var _findFocusedRoute = require("./findFocusedRoute.js");
|
|
237
|
+
var _getActionFromState = require("./getActionFromState.js");
|
|
238
|
+
var _getFocusedRouteNameFromRoute = require("./getFocusedRouteNameFromRoute.js");
|
|
239
|
+
var _getPathFromState = require("./getPathFromState.js");
|
|
240
|
+
var _getStateFromPath = require("./getStateFromPath.js");
|
|
241
|
+
var _NavigationContainerRefContext = require("./NavigationContainerRefContext.js");
|
|
242
|
+
var _NavigationContext = require("./NavigationContext.js");
|
|
243
|
+
var _NavigationHelpersContext = require("./NavigationHelpersContext.js");
|
|
244
|
+
var _NavigationIndependentTree = require("./NavigationIndependentTree.js");
|
|
245
|
+
var _NavigationRouteContext = require("./NavigationRouteContext.js");
|
|
246
|
+
var _PreventRemoveContext = require("./PreventRemoveContext.js");
|
|
247
|
+
var _PreventRemoveProvider = require("./PreventRemoveProvider.js");
|
|
248
|
+
var _StaticNavigation = require("./StaticNavigation.js");
|
|
249
|
+
var _ThemeContext = require("./theming/ThemeContext.js");
|
|
250
|
+
var _ThemeProvider = require("./theming/ThemeProvider.js");
|
|
251
|
+
var _useTheme = require("./theming/useTheme.js");
|
|
252
|
+
var _types = require("./types.js");
|
|
253
253
|
Object.keys(_types).forEach(function (key) {
|
|
254
254
|
if (key === "default" || key === "__esModule") return;
|
|
255
255
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -261,17 +261,17 @@ Object.keys(_types).forEach(function (key) {
|
|
|
261
261
|
}
|
|
262
262
|
});
|
|
263
263
|
});
|
|
264
|
-
var _useFocusEffect = require("./useFocusEffect");
|
|
265
|
-
var _useIsFocused = require("./useIsFocused");
|
|
266
|
-
var _useNavigation = require("./useNavigation");
|
|
267
|
-
var _useNavigationBuilder = require("./useNavigationBuilder");
|
|
268
|
-
var _useNavigationContainerRef = require("./useNavigationContainerRef");
|
|
269
|
-
var _useNavigationIndependentTree = require("./useNavigationIndependentTree");
|
|
270
|
-
var _useNavigationState = require("./useNavigationState");
|
|
271
|
-
var _usePreventRemove = require("./usePreventRemove");
|
|
272
|
-
var _usePreventRemoveContext = require("./usePreventRemoveContext");
|
|
273
|
-
var _useRoute = require("./useRoute");
|
|
274
|
-
var _validatePathConfig = require("./validatePathConfig");
|
|
264
|
+
var _useFocusEffect = require("./useFocusEffect.js");
|
|
265
|
+
var _useIsFocused = require("./useIsFocused.js");
|
|
266
|
+
var _useNavigation = require("./useNavigation.js");
|
|
267
|
+
var _useNavigationBuilder = require("./useNavigationBuilder.js");
|
|
268
|
+
var _useNavigationContainerRef = require("./useNavigationContainerRef.js");
|
|
269
|
+
var _useNavigationIndependentTree = require("./useNavigationIndependentTree.js");
|
|
270
|
+
var _useNavigationState = require("./useNavigationState.js");
|
|
271
|
+
var _usePreventRemove = require("./usePreventRemove.js");
|
|
272
|
+
var _usePreventRemoveContext = require("./usePreventRemoveContext.js");
|
|
273
|
+
var _useRoute = require("./useRoute.js");
|
|
274
|
+
var _validatePathConfig = require("./validatePathConfig.js");
|
|
275
275
|
var _routers = require("@react-navigation/routers");
|
|
276
276
|
Object.keys(_routers).forEach(function (key) {
|
|
277
277
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
|
@@ -5,15 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ThemeProvider = ThemeProvider;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _ThemeContext = require("./ThemeContext");
|
|
8
|
+
var _ThemeContext = require("./ThemeContext.js");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
12
|
function ThemeProvider({
|
|
12
13
|
value,
|
|
13
14
|
children
|
|
14
15
|
}) {
|
|
15
|
-
return /*#__PURE__*/
|
|
16
|
-
value: value
|
|
17
|
-
|
|
16
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ThemeContext.ThemeContext.Provider, {
|
|
17
|
+
value: value,
|
|
18
|
+
children: children
|
|
19
|
+
});
|
|
18
20
|
}
|
|
19
21
|
//# sourceMappingURL=ThemeProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","_interopRequireWildcard","require","_ThemeContext","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ThemeProvider","value","children","
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_ThemeContext","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ThemeProvider","value","children","jsx","ThemeContext","Provider"],"sourceRoot":"../../../src","sources":["theming/ThemeProvider.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAA8C,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA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Q,CAAwB,CAAC;AAE3E","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useTheme = useTheme;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _ThemeContext = require("./ThemeContext");
|
|
8
|
+
var _ThemeContext = require("./ThemeContext.js");
|
|
9
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
10
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
11
|
function useTheme() {
|
package/lib/commonjs/types.js
CHANGED
|
@@ -4,6 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.PrivateValueStore = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
8
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
9
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
|
+
let PrivateValueStore = exports.PrivateValueStore = /*#__PURE__*/_createClass(function PrivateValueStore() {
|
|
14
|
+
_classCallCheck(this, PrivateValueStore);
|
|
15
|
+
/**
|
|
16
|
+
* UGLY HACK! DO NOT USE THE TYPE!!!
|
|
17
|
+
*
|
|
18
|
+
* TypeScript requires a type to be used to be able to infer it.
|
|
19
|
+
* The type should exist as its own without any operations such as union.
|
|
20
|
+
* So we need to figure out a way to store this type in a property.
|
|
21
|
+
* The problem with a normal property is that it shows up in intelliSense.
|
|
22
|
+
* Adding private keyword works, but the annotation is stripped away in declaration.
|
|
23
|
+
* Turns out if we use an empty string, it doesn't show up in intelliSense.
|
|
24
|
+
*/
|
|
25
|
+
_defineProperty(this, '', void 0);
|
|
26
|
+
});
|
|
9
27
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PrivateValueStore","exports"],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"names":["PrivateValueStore","exports","_createClass","_classCallCheck","_defineProperty"],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":";;;;;;;;;;;;IA8MaA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,gBAAAE,YAAA,UAAAF,kBAAA;EAAAG,eAAA,OAAAH,iBAAA;EAC5B;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EATEI,eAAA,OAUU,EAAE;AAAA","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useComponent = useComponent;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
10
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
11
|
const NavigationContent = ({
|
|
@@ -30,9 +31,10 @@ function useComponent(render) {
|
|
|
30
31
|
if (render === null) {
|
|
31
32
|
throw new Error('The returned component must be rendered in the same render phase as the hook.');
|
|
32
33
|
}
|
|
33
|
-
return /*#__PURE__*/
|
|
34
|
-
render: render
|
|
35
|
-
|
|
34
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(NavigationContent, {
|
|
35
|
+
render: render,
|
|
36
|
+
children: children
|
|
37
|
+
});
|
|
36
38
|
}).current;
|
|
37
39
|
}
|
|
38
40
|
//# sourceMappingURL=useComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","NavigationContent","render","children","useComponent","renderRef","useRef","current","useEffect","Error","
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","NavigationContent","render","children","useComponent","renderRef","useRef","current","useEffect","Error","jsx"],"sourceRoot":"../../src","sources":["useComponent.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+B,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAE,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAS/B,MAAMW,iBAAiB,GAAGA,CAAC;EAAEC,MAAM;EAAEC;AAAgB,CAAC,KAAK;EACzD,OAAOD,MAAM,CAACC,QAAQ,CAAC;AACzB,CAAC;AAEM,SAASC,YAAYA,CAACF,MAAc,EAAE;EAC3C,MAAMG,SAAS,GAAG5B,KAAK,CAAC6B,MAAM,CAAgBJ,MAAM,CAAC;;EAErD;EACA;EACA;EACAG,SAAS,CAACE,OAAO,GAAGL,MAAM;EAE1BzB,KAAK,CAAC+B,SAAS,CAAC,MAAM;IACpBH,SAAS,CAACE,OAAO,GAAG,IAAI;EAC1B,CAAC,CAAC;EAEF,OAAO9B,KAAK,CAAC6B,MAAM,CAAC,CAAC;IAAEH;EAAwC,CAAC,KAAK;IACnE,MAAMD,MAAM,GAAGG,SAAS,CAACE,OAAO;IAEhC,IAAIL,MAAM,KAAK,IAAI,EAAE;MACnB,MAAM,IAAIO,KAAK,CACb,+EACF,CAAC;IACH;IAEA,oBAAO,IAAA7B,WAAA,CAAA8B,GAAA,EAACT,iBAAiB;MAACC,MAAM,EAAEA,MAAO;MAAAC,QAAA,EAAEA;IAAQ,CAAoB,CAAC;EAC1E,CAAC,CAAC,CAACI,OAAO;AACZ","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useCurrentRender = useCurrentRender;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _CurrentRenderContext = require("./CurrentRenderContext");
|
|
8
|
+
var _CurrentRenderContext = require("./CurrentRenderContext.js");
|
|
9
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
10
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
11
|
/**
|
|
@@ -5,13 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useDescriptors = useDescriptors;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _NavigationBuilderContext = require("./NavigationBuilderContext");
|
|
9
|
-
var _NavigationContext = require("./NavigationContext");
|
|
10
|
-
var _NavigationRouteContext = require("./NavigationRouteContext");
|
|
11
|
-
var _SceneView = require("./SceneView");
|
|
12
|
-
var _ThemeContext = require("./theming/ThemeContext");
|
|
13
|
-
var _useNavigationCache = require("./useNavigationCache");
|
|
14
|
-
var _useRouteCache = require("./useRouteCache");
|
|
8
|
+
var _NavigationBuilderContext = require("./NavigationBuilderContext.js");
|
|
9
|
+
var _NavigationContext = require("./NavigationContext.js");
|
|
10
|
+
var _NavigationRouteContext = require("./NavigationRouteContext.js");
|
|
11
|
+
var _SceneView = require("./SceneView.js");
|
|
12
|
+
var _ThemeContext = require("./theming/ThemeContext.js");
|
|
13
|
+
var _useNavigationCache = require("./useNavigationCache.js");
|
|
14
|
+
var _useRouteCache = require("./useRouteCache.js");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
18
|
/**
|
|
@@ -107,7 +108,7 @@ function useDescriptors({
|
|
|
107
108
|
config.layout ??
|
|
108
109
|
// The default `screenLayout` passed to the navigator
|
|
109
110
|
screenLayout;
|
|
110
|
-
let element = /*#__PURE__*/
|
|
111
|
+
let element = /*#__PURE__*/(0, _jsxRuntime.jsx)(_SceneView.SceneView, {
|
|
111
112
|
navigation: navigation,
|
|
112
113
|
route: route,
|
|
113
114
|
screen: screen,
|
|
@@ -126,14 +127,16 @@ function useDescriptors({
|
|
|
126
127
|
children: element
|
|
127
128
|
});
|
|
128
129
|
}
|
|
129
|
-
return /*#__PURE__*/
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
130
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavigationBuilderContext.NavigationBuilderContext.Provider, {
|
|
131
|
+
value: context,
|
|
132
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavigationContext.NavigationContext.Provider, {
|
|
133
|
+
value: navigation,
|
|
134
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavigationRouteContext.NavigationRouteContext.Provider, {
|
|
135
|
+
value: route,
|
|
136
|
+
children: element
|
|
137
|
+
})
|
|
138
|
+
})
|
|
139
|
+
}, route.key);
|
|
137
140
|
};
|
|
138
141
|
const descriptors = routes.reduce((acc, route, i) => {
|
|
139
142
|
const navigation = navigations[route.key];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","_interopRequireWildcard","require","_NavigationBuilderContext","_NavigationContext","_NavigationRouteContext","_SceneView","_ThemeContext","_useNavigationCache","_useRouteCache","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useDescriptors","state","screens","navigation","screenOptions","screenLayout","onAction","getState","setState","addListener","addKeyedListener","onRouteFocus","router","emitter","theme","useContext","ThemeContext","options","setOptions","useState","onDispatchAction","onOptionsChange","stackRef","NavigationBuilderContext","context","useMemo","base","navigations","useNavigationCache","routes","useRouteCache","getOptions","route","overrides","config","name","screen","props","optionsList","filter","Boolean","reduce","acc","curr","assign","render","customOptions","routeState","clearOptions","o","key","_","rest","layout","element","
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_NavigationBuilderContext","_NavigationContext","_NavigationRouteContext","_SceneView","_ThemeContext","_useNavigationCache","_useRouteCache","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useDescriptors","state","screens","navigation","screenOptions","screenLayout","onAction","getState","setState","addListener","addKeyedListener","onRouteFocus","router","emitter","theme","useContext","ThemeContext","options","setOptions","useState","onDispatchAction","onOptionsChange","stackRef","NavigationBuilderContext","context","useMemo","base","navigations","useNavigationCache","routes","useRouteCache","getOptions","route","overrides","config","name","screen","props","optionsList","filter","Boolean","reduce","acc","curr","assign","render","customOptions","routeState","clearOptions","o","key","_","rest","layout","element","jsx","SceneView","children","Provider","value","NavigationContext","NavigationRouteContext","descriptors","describe","placeholder","Error","undefined"],"sourceRoot":"../../src","sources":["useDescriptors.tsx"],"mappings":";;;;;;AAOA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,yBAAA,GAAAD,OAAA;AAKA,IAAAE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GAAG,CAACV,KAAK,CAACkB,GAAG,CAAC,GAAG;MACflB,KAAK;MACL;MACA7B,UAAU;MACV0C,MAAMA,CAAA,EAAG;QACP,OAAOS,OAAO;MAChB,CAAC;MACDrC,OAAO,EAAE6B;IACX,CAAC;IAED,OAAOJ,GAAG;EACZ,CAAC,EAAE,CAAC,CAAC,CAAC;;EAEN;AACF;AACA;AACA;AACA;AACA;AACA;EACE,MAAMqB,QAAQ,GAAGA,CAAC/B,KAA+B,EAAEgC,WAAoB,KAAK;IAC1E,IAAI,CAACA,WAAW,EAAE;MAChB,IAAI,EAAEhC,KAAK,CAACkB,GAAG,IAAIY,WAAW,CAAC,EAAE;QAC/B,MAAM,IAAIG,KAAK,CAAC,sCAAsCjC,KAAK,CAACkB,GAAG,GAAG,CAAC;MACrE;MAEA,OAAOY,WAAW,CAAC9B,KAAK,CAACkB,GAAG,CAAC;IAC/B;IAEA,MAAM/C,UAAU,GAAGuB,IAAI;IACvB,MAAMoB,aAAa,GAAGf,UAAU,CAACC,KAAK,EAAE7B,UAAU,EAAE,CAAC,CAAC,CAAC;IACvD,MAAMmD,OAAO,GAAGT,MAAM,CAACb,KAAK,EAAE7B,UAAU,EAAE2C,aAAa,EAAEoB,SAAS,CAAC;IAEnE,OAAO;MACLlC,KAAK;MACL7B,UAAU;MACV0C,MAAMA,CAAA,EAAG;QACP,OAAOS,OAAO;MAChB,CAAC;MACDrC,OAAO,EAAE6B;IACX,CAAC;EACH,CAAC;EAED,OAAO;IACLiB,QAAQ;IACRD;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useFocusEffect = useFocusEffect;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _useNavigation = require("./useNavigation");
|
|
8
|
+
var _useNavigation = require("./useNavigation.js");
|
|
9
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
10
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
11
|
/**
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useFocusEvents = useFocusEvents;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _NavigationContext = require("./NavigationContext");
|
|
8
|
+
var _NavigationContext = require("./NavigationContext.js");
|
|
9
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
10
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
11
|
/**
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useFocusedListenersChildrenAdapter = useFocusedListenersChildrenAdapter;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _NavigationBuilderContext = require("./NavigationBuilderContext");
|
|
8
|
+
var _NavigationBuilderContext = require("./NavigationBuilderContext.js");
|
|
9
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
10
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
11
|
/**
|
|
@@ -4,9 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useIsFocused = useIsFocused;
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var _useNavigation = require("./useNavigation");
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _useNavigation = require("./useNavigation.js");
|
|
10
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
10
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
11
|
/**
|
|
@@ -15,25 +14,15 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
15
14
|
*/
|
|
16
15
|
function useIsFocused() {
|
|
17
16
|
const navigation = (0, _useNavigation.useNavigation)();
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
// If the value has changed since the last render, we need to update it.
|
|
22
|
-
// This could happen if we missed an update from the event listeners during re-render.
|
|
23
|
-
// React will process this update immediately, so the old subscription value won't be committed.
|
|
24
|
-
// It is still nice to avoid returning a mismatched value though, so let's override the return value.
|
|
25
|
-
// This is the same logic as in https://github.com/facebook/react/tree/master/packages/use-subscription
|
|
26
|
-
setIsFocused(valueToReturn);
|
|
27
|
-
}
|
|
28
|
-
React.useEffect(() => {
|
|
29
|
-
const unsubscribeFocus = navigation.addListener('focus', () => setIsFocused(true));
|
|
30
|
-
const unsubscribeBlur = navigation.addListener('blur', () => setIsFocused(false));
|
|
17
|
+
const subscribe = React.useCallback(callback => {
|
|
18
|
+
const unsubscribeFocus = navigation.addListener('focus', callback);
|
|
19
|
+
const unsubscribeBlur = navigation.addListener('blur', callback);
|
|
31
20
|
return () => {
|
|
32
21
|
unsubscribeFocus();
|
|
33
22
|
unsubscribeBlur();
|
|
34
23
|
};
|
|
35
24
|
}, [navigation]);
|
|
36
|
-
React.
|
|
37
|
-
return
|
|
25
|
+
const value = React.useSyncExternalStore(subscribe, navigation.isFocused, navigation.isFocused);
|
|
26
|
+
return value;
|
|
38
27
|
}
|
|
39
28
|
//# sourceMappingURL=useIsFocused.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_useNavigation","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useIsFocused","navigation","useNavigation","subscribe","useCallback","callback","unsubscribeFocus","addListener","unsubscribeBlur","value","useSyncExternalStore","isFocused"],"sourceRoot":"../../src","sources":["useIsFocused.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAAgD,SAAAE,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAEhD;AACA;AACA;AACA;AACO,SAASW,YAAYA,CAAA,EAAY;EACtC,MAAMC,UAAU,GAAG,IAAAC,4BAAa,EAAC,CAAC;EAElC,MAAMC,SAAS,GAAG3B,KAAK,CAAC4B,WAAW,CAChCC,QAAoB,IAAK;IACxB,MAAMC,gBAAgB,GAAGL,UAAU,CAACM,WAAW,CAAC,OAAO,EAAEF,QAAQ,CAAC;IAClE,MAAMG,eAAe,GAAGP,UAAU,CAACM,WAAW,CAAC,MAAM,EAAEF,QAAQ,CAAC;IAEhE,OAAO,MAAM;MACXC,gBAAgB,CAAC,CAAC;MAClBE,eAAe,CAAC,CAAC;IACnB,CAAC;EACH,CAAC,EACD,CAACP,UAAU,CACb,CAAC;EAED,MAAMQ,KAAK,GAAGjC,KAAK,CAACkC,oBAAoB,CACtCP,SAAS,EACTF,UAAU,CAACU,SAAS,EACpBV,UAAU,CAACU,SACb,CAAC;EAED,OAAOF,KAAK;AACd","ignoreList":[]}
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useNavigation = useNavigation;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _NavigationContainerRefContext = require("./NavigationContainerRefContext");
|
|
9
|
-
var _NavigationContext = require("./NavigationContext");
|
|
8
|
+
var _NavigationContainerRefContext = require("./NavigationContainerRefContext.js");
|
|
9
|
+
var _NavigationContext = require("./NavigationContext.js");
|
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
12
|
/**
|
|
@@ -8,31 +8,32 @@ var _routers = require("@react-navigation/routers");
|
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _reactIs = require("react-is");
|
|
10
10
|
var _useLatestCallback = _interopRequireDefault(require("use-latest-callback"));
|
|
11
|
-
var _deepFreeze = require("./deepFreeze");
|
|
12
|
-
var _Group = require("./Group");
|
|
13
|
-
var _isArrayEqual = require("./isArrayEqual");
|
|
14
|
-
var _isRecordEqual = require("./isRecordEqual");
|
|
15
|
-
var _NavigationHelpersContext = require("./NavigationHelpersContext");
|
|
16
|
-
var _NavigationRouteContext = require("./NavigationRouteContext");
|
|
17
|
-
var _NavigationStateContext = require("./NavigationStateContext");
|
|
18
|
-
var _PreventRemoveProvider = require("./PreventRemoveProvider");
|
|
19
|
-
var _Screen = require("./Screen");
|
|
20
|
-
var _types = require("./types");
|
|
21
|
-
var _useChildListeners = require("./useChildListeners");
|
|
22
|
-
var _useComponent = require("./useComponent");
|
|
23
|
-
var _useCurrentRender = require("./useCurrentRender");
|
|
24
|
-
var _useDescriptors = require("./useDescriptors");
|
|
25
|
-
var _useEventEmitter = require("./useEventEmitter");
|
|
26
|
-
var _useFocusedListenersChildrenAdapter = require("./useFocusedListenersChildrenAdapter");
|
|
27
|
-
var _useFocusEvents = require("./useFocusEvents");
|
|
11
|
+
var _deepFreeze = require("./deepFreeze.js");
|
|
12
|
+
var _Group = require("./Group.js");
|
|
13
|
+
var _isArrayEqual = require("./isArrayEqual.js");
|
|
14
|
+
var _isRecordEqual = require("./isRecordEqual.js");
|
|
15
|
+
var _NavigationHelpersContext = require("./NavigationHelpersContext.js");
|
|
16
|
+
var _NavigationRouteContext = require("./NavigationRouteContext.js");
|
|
17
|
+
var _NavigationStateContext = require("./NavigationStateContext.js");
|
|
18
|
+
var _PreventRemoveProvider = require("./PreventRemoveProvider.js");
|
|
19
|
+
var _Screen = require("./Screen.js");
|
|
20
|
+
var _types = require("./types.js");
|
|
21
|
+
var _useChildListeners = require("./useChildListeners.js");
|
|
22
|
+
var _useComponent = require("./useComponent.js");
|
|
23
|
+
var _useCurrentRender = require("./useCurrentRender.js");
|
|
24
|
+
var _useDescriptors = require("./useDescriptors.js");
|
|
25
|
+
var _useEventEmitter = require("./useEventEmitter.js");
|
|
26
|
+
var _useFocusedListenersChildrenAdapter = require("./useFocusedListenersChildrenAdapter.js");
|
|
27
|
+
var _useFocusEvents = require("./useFocusEvents.js");
|
|
28
28
|
var _useIsomorphicLayoutEffect = require("./useIsomorphicLayoutEffect");
|
|
29
|
-
var _useKeyedChildListeners = require("./useKeyedChildListeners");
|
|
30
|
-
var _useLazyValue = require("./useLazyValue");
|
|
31
|
-
var _useNavigationHelpers = require("./useNavigationHelpers");
|
|
32
|
-
var _useOnAction = require("./useOnAction");
|
|
33
|
-
var _useOnGetState = require("./useOnGetState");
|
|
34
|
-
var _useOnRouteFocus = require("./useOnRouteFocus");
|
|
35
|
-
var _useRegisterNavigator = require("./useRegisterNavigator");
|
|
29
|
+
var _useKeyedChildListeners = require("./useKeyedChildListeners.js");
|
|
30
|
+
var _useLazyValue = require("./useLazyValue.js");
|
|
31
|
+
var _useNavigationHelpers = require("./useNavigationHelpers.js");
|
|
32
|
+
var _useOnAction = require("./useOnAction.js");
|
|
33
|
+
var _useOnGetState = require("./useOnGetState.js");
|
|
34
|
+
var _useOnRouteFocus = require("./useOnRouteFocus.js");
|
|
35
|
+
var _useRegisterNavigator = require("./useRegisterNavigator.js");
|
|
36
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
36
37
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
37
38
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
38
39
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -70,7 +71,7 @@ const getRouteConfigsFromChildren = (children, groupKey, groupOptions, groupLayo
|
|
|
70
71
|
|
|
71
72
|
// When we encounter a fragment or group, we need to dive into its children to extract the configs
|
|
72
73
|
// This is handy to conditionally define a group of screens
|
|
73
|
-
acc.push(...getRouteConfigsFromChildren(child.props.children, child.props.navigationKey, child.type !== _Group.Group ? groupOptions : groupOptions != null ? [...groupOptions, child.props.screenOptions] : [child.props.screenOptions], child.props.screenLayout
|
|
74
|
+
acc.push(...getRouteConfigsFromChildren(child.props.children, child.props.navigationKey, child.type !== _Group.Group ? groupOptions : groupOptions != null ? [...groupOptions, child.props.screenOptions] : [child.props.screenOptions], typeof child.props.screenLayout === 'function' ? child.props.screenLayout : groupLayout));
|
|
74
75
|
return acc;
|
|
75
76
|
}
|
|
76
77
|
}
|
|
@@ -459,9 +460,12 @@ function useNavigationBuilder(createRouter, options) {
|
|
|
459
460
|
navigation,
|
|
460
461
|
children
|
|
461
462
|
}) : children;
|
|
462
|
-
return /*#__PURE__*/
|
|
463
|
-
value: navigation
|
|
464
|
-
|
|
463
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavigationHelpersContext.NavigationHelpersContext.Provider, {
|
|
464
|
+
value: navigation,
|
|
465
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PreventRemoveProvider.PreventRemoveProvider, {
|
|
466
|
+
children: element
|
|
467
|
+
})
|
|
468
|
+
});
|
|
465
469
|
});
|
|
466
470
|
return {
|
|
467
471
|
state,
|