@react-navigation/core 7.0.0-rc.9 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/BaseNavigationContainer.js +356 -0
- package/lib/commonjs/BaseNavigationContainer.js.map +1 -0
- package/lib/commonjs/CurrentRenderContext.js +15 -0
- package/lib/commonjs/DeprecatedNavigationInChildContext.js +14 -0
- package/lib/commonjs/EnsureSingleNavigator.js +43 -0
- package/lib/commonjs/Group.js +14 -0
- package/lib/commonjs/NavigationBuilderContext.js +17 -0
- package/lib/commonjs/NavigationContainerRefContext.js +14 -0
- package/lib/commonjs/NavigationContext.js +14 -0
- package/lib/commonjs/NavigationHelpersContext.js +15 -0
- package/lib/commonjs/NavigationIndependentTree.js +35 -0
- package/lib/commonjs/NavigationIndependentTreeContext.js +14 -0
- package/lib/commonjs/NavigationRouteContext.js +14 -0
- package/lib/commonjs/NavigationStateContext.js +29 -0
- package/lib/commonjs/PreventRemoveContext.js +16 -0
- package/lib/commonjs/PreventRemoveProvider.js +91 -0
- package/lib/commonjs/SceneView.js +96 -0
- package/lib/commonjs/Screen.js +14 -0
- package/lib/commonjs/StaticContainer.js +31 -0
- package/lib/commonjs/StaticNavigation.js +256 -0
- package/lib/commonjs/StaticNavigation.js.map +1 -0
- package/lib/commonjs/UnhandledActionContext.js +11 -0
- package/lib/commonjs/checkDuplicateRouteNames.js +25 -0
- package/lib/commonjs/checkSerializable.js +50 -0
- package/lib/commonjs/createNavigationContainerRef.js +69 -0
- package/lib/commonjs/createNavigatorFactory.js +34 -0
- package/lib/commonjs/deepFreeze.js +37 -0
- package/lib/commonjs/findFocusedRoute.js +15 -0
- package/lib/commonjs/getActionFromState.js +86 -0
- package/lib/commonjs/getFocusedRouteNameFromRoute.js +22 -0
- package/lib/commonjs/getPathFromState.js +218 -0
- package/lib/commonjs/getPathFromState.js.map +1 -0
- package/lib/commonjs/getStateFromPath.js +475 -0
- package/lib/commonjs/getStateFromPath.js.map +1 -0
- package/lib/commonjs/index.js +287 -0
- package/lib/commonjs/isArrayEqual.js +20 -0
- package/lib/commonjs/isRecordEqual.js +21 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/theming/ThemeContext.js +12 -0
- package/lib/commonjs/theming/ThemeProvider.js +21 -0
- package/lib/commonjs/theming/useTheme.js +18 -0
- package/lib/commonjs/types.js +27 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/useChildListeners.js +36 -0
- package/lib/commonjs/useComponent.js +40 -0
- package/lib/commonjs/useCurrentRender.js +25 -0
- package/lib/commonjs/useDescriptors.js +188 -0
- package/lib/commonjs/useEventEmitter.js +105 -0
- package/lib/commonjs/useFocusEffect.js +80 -0
- package/lib/commonjs/useFocusEvents.js +70 -0
- package/lib/commonjs/useFocusedListenersChildrenAdapter.js +48 -0
- package/lib/commonjs/useIsFocused.js +28 -0
- package/lib/commonjs/useIsomorphicLayoutEffect.js +12 -0
- package/lib/commonjs/useIsomorphicLayoutEffect.native.js +9 -0
- package/lib/commonjs/useKeyedChildListeners.js +33 -0
- package/lib/commonjs/useLazyValue.js +17 -0
- package/lib/commonjs/useNavigation.js +27 -0
- package/lib/commonjs/useNavigationBuilder.js +478 -0
- package/lib/commonjs/useNavigationCache.js +162 -0
- package/lib/commonjs/useNavigationContainerRef.js +18 -0
- package/lib/commonjs/useNavigationHelpers.js +76 -0
- package/lib/commonjs/useNavigationIndependentTree.js +14 -0
- package/lib/commonjs/useNavigationState.js +26 -0
- package/lib/commonjs/useOnAction.js +106 -0
- package/lib/commonjs/useOnGetState.js +48 -0
- package/lib/commonjs/useOnPreventRemove.js +72 -0
- package/lib/commonjs/useOnRouteFocus.js +36 -0
- package/lib/commonjs/useOptionsGetters.js +78 -0
- package/lib/commonjs/usePreventRemove.js +48 -0
- package/lib/commonjs/usePreventRemoveContext.js +18 -0
- package/lib/commonjs/useRegisterNavigator.js +32 -0
- package/lib/commonjs/useRoute.js +23 -0
- package/lib/commonjs/useRouteCache.js +69 -0
- package/lib/commonjs/useSyncState.js +48 -0
- package/lib/commonjs/validatePathConfig.js +49 -0
- package/lib/commonjs/validatePathConfig.js.map +1 -0
- package/lib/module/BaseNavigationContainer.js +349 -0
- package/lib/module/BaseNavigationContainer.js.map +1 -0
- package/lib/module/CurrentRenderContext.js +10 -0
- package/lib/module/CurrentRenderContext.js.map +1 -0
- package/lib/module/DeprecatedNavigationInChildContext.js +9 -0
- package/lib/module/DeprecatedNavigationInChildContext.js.map +1 -0
- package/lib/module/EnsureSingleNavigator.js +36 -0
- package/lib/module/EnsureSingleNavigator.js.map +1 -0
- package/lib/module/Group.js +10 -0
- package/lib/module/Group.js.map +1 -0
- package/lib/module/NavigationBuilderContext.js +11 -0
- package/lib/module/NavigationBuilderContext.js.map +1 -0
- package/lib/module/NavigationContainerRefContext.js +8 -0
- package/lib/module/NavigationContainerRefContext.js.map +1 -0
- package/lib/module/NavigationContext.js +8 -0
- package/lib/module/NavigationContext.js.map +1 -0
- package/lib/module/NavigationHelpersContext.js +9 -0
- package/lib/module/NavigationHelpersContext.js.map +1 -0
- package/lib/module/NavigationIndependentTree.js +30 -0
- package/lib/module/NavigationIndependentTree.js.map +1 -0
- package/lib/module/NavigationIndependentTreeContext.js +9 -0
- package/lib/module/NavigationIndependentTreeContext.js.map +1 -0
- package/lib/module/NavigationRouteContext.js +9 -0
- package/lib/module/NavigationRouteContext.js.map +1 -0
- package/lib/module/NavigationStateContext.js +23 -0
- package/lib/module/NavigationStateContext.js.map +1 -0
- package/lib/module/PreventRemoveContext.js +11 -0
- package/lib/module/PreventRemoveContext.js.map +1 -0
- package/lib/module/PreventRemoveProvider.js +84 -0
- package/lib/module/PreventRemoveProvider.js.map +1 -0
- package/lib/module/SceneView.js +90 -0
- package/lib/module/SceneView.js.map +1 -0
- package/lib/module/Screen.js +10 -0
- package/lib/module/Screen.js.map +1 -0
- package/lib/module/StaticContainer.js +26 -0
- package/lib/module/StaticContainer.js.map +1 -0
- package/lib/module/StaticNavigation.js +249 -0
- package/lib/module/StaticNavigation.js.map +1 -0
- package/lib/module/UnhandledActionContext.js +5 -0
- package/lib/module/UnhandledActionContext.js.map +1 -0
- package/lib/module/checkDuplicateRouteNames.js +21 -0
- package/lib/module/checkDuplicateRouteNames.js.map +1 -0
- package/lib/module/checkSerializable.js +46 -0
- package/lib/module/checkSerializable.js.map +1 -0
- package/lib/module/createNavigationContainerRef.js +64 -0
- package/lib/module/createNavigationContainerRef.js.map +1 -0
- package/lib/module/createNavigatorFactory.js +31 -0
- package/lib/module/createNavigatorFactory.js.map +1 -0
- package/lib/module/deepFreeze.js +31 -0
- package/lib/module/deepFreeze.js.map +1 -0
- package/lib/module/findFocusedRoute.js +11 -0
- package/lib/module/findFocusedRoute.js.map +1 -0
- package/lib/module/getActionFromState.js +82 -0
- package/lib/module/getActionFromState.js.map +1 -0
- package/lib/module/getFocusedRouteNameFromRoute.js +18 -0
- package/lib/module/getFocusedRouteNameFromRoute.js.map +1 -0
- package/lib/module/getPathFromState.js +212 -0
- package/lib/module/getPathFromState.js.map +1 -0
- package/lib/module/getStateFromPath.js +468 -0
- package/lib/module/getStateFromPath.js.map +1 -0
- package/lib/module/index.js +36 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/isArrayEqual.js +16 -0
- package/lib/module/isArrayEqual.js.map +1 -0
- package/lib/module/isRecordEqual.js +17 -0
- package/lib/module/isRecordEqual.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/theming/ThemeContext.js +6 -0
- package/lib/module/theming/ThemeContext.js.map +1 -0
- package/lib/module/theming/ThemeProvider.js +15 -0
- package/lib/module/theming/ThemeProvider.js.map +1 -0
- package/lib/module/theming/useTheme.js +12 -0
- package/lib/module/theming/useTheme.js.map +1 -0
- package/lib/module/types.js +23 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/useChildListeners.js +30 -0
- package/lib/module/useChildListeners.js.map +1 -0
- package/lib/module/useComponent.js +34 -0
- package/lib/module/useComponent.js.map +1 -0
- package/lib/module/useCurrentRender.js +19 -0
- package/lib/module/useCurrentRender.js.map +1 -0
- package/lib/module/useDescriptors.js +182 -0
- package/lib/module/useDescriptors.js.map +1 -0
- package/lib/module/useEventEmitter.js +99 -0
- package/lib/module/useEventEmitter.js.map +1 -0
- package/lib/module/useFocusEffect.js +74 -0
- package/lib/module/useFocusEffect.js.map +1 -0
- package/lib/module/useFocusEvents.js +64 -0
- package/lib/module/useFocusEvents.js.map +1 -0
- package/lib/module/useFocusedListenersChildrenAdapter.js +42 -0
- package/lib/module/useFocusedListenersChildrenAdapter.js.map +1 -0
- package/lib/module/useIsFocused.js +23 -0
- package/lib/module/useIsFocused.js.map +1 -0
- package/lib/module/useIsomorphicLayoutEffect.js +9 -0
- package/lib/module/useIsomorphicLayoutEffect.js.map +1 -0
- package/lib/module/useIsomorphicLayoutEffect.native.js +5 -0
- package/lib/module/useIsomorphicLayoutEffect.native.js.map +1 -0
- package/lib/module/useKeyedChildListeners.js +27 -0
- package/lib/module/useKeyedChildListeners.js.map +1 -0
- package/lib/module/useLazyValue.js +11 -0
- package/lib/module/useLazyValue.js.map +1 -0
- package/lib/module/useNavigation.js +21 -0
- package/lib/module/useNavigation.js.map +1 -0
- package/lib/module/useNavigationBuilder.js +472 -0
- package/lib/module/useNavigationBuilder.js.map +1 -0
- package/lib/module/useNavigationCache.js +156 -0
- package/lib/module/useNavigationCache.js.map +1 -0
- package/lib/module/useNavigationContainerRef.js +12 -0
- package/lib/module/useNavigationContainerRef.js.map +1 -0
- package/lib/module/useNavigationHelpers.js +70 -0
- package/lib/module/useNavigationHelpers.js.map +1 -0
- package/lib/module/useNavigationIndependentTree.js +8 -0
- package/lib/module/useNavigationIndependentTree.js.map +1 -0
- package/lib/module/useNavigationState.js +20 -0
- package/lib/module/useNavigationState.js.map +1 -0
- package/lib/module/useOnAction.js +100 -0
- package/lib/module/useOnAction.js.map +1 -0
- package/lib/module/useOnGetState.js +42 -0
- package/lib/module/useOnGetState.js.map +1 -0
- package/lib/module/useOnPreventRemove.js +64 -0
- package/lib/module/useOnPreventRemove.js.map +1 -0
- package/lib/module/useOnRouteFocus.js +30 -0
- package/lib/module/useOnRouteFocus.js.map +1 -0
- package/lib/module/useOptionsGetters.js +72 -0
- package/lib/module/useOptionsGetters.js.map +1 -0
- package/lib/module/usePreventRemove.js +42 -0
- package/lib/module/usePreventRemove.js.map +1 -0
- package/lib/module/usePreventRemoveContext.js +12 -0
- package/lib/module/usePreventRemoveContext.js.map +1 -0
- package/lib/module/useRegisterNavigator.js +27 -0
- package/lib/module/useRegisterNavigator.js.map +1 -0
- package/lib/module/useRoute.js +17 -0
- package/lib/module/useRoute.js.map +1 -0
- package/lib/module/useRouteCache.js +62 -0
- package/lib/module/useRouteCache.js.map +1 -0
- package/lib/module/useSyncState.js +42 -0
- package/lib/module/useSyncState.js.map +1 -0
- package/lib/module/validatePathConfig.js +45 -0
- package/lib/module/validatePathConfig.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/BaseNavigationContainer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/CurrentRenderContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/DeprecatedNavigationInChildContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/EnsureSingleNavigator.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Group.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationBuilderContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationContainerRefContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationHelpersContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationIndependentTree.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationIndependentTreeContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationRouteContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NavigationStateContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/PreventRemoveContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/PreventRemoveProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/SceneView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Screen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/StaticContainer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/StaticNavigation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/UnhandledActionContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/checkDuplicateRouteNames.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/checkSerializable.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/createNavigationContainerRef.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/createNavigatorFactory.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/deepFreeze.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/findFocusedRoute.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/getActionFromState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/getFocusedRouteNameFromRoute.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/getPathFromState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/getStateFromPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/isArrayEqual.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/isRecordEqual.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theming/ThemeContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theming/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theming/useTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types.d.ts +702 -0
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useChildListeners.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useCurrentRender.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useDescriptors.d.ts +133 -0
- package/lib/typescript/commonjs/src/useDescriptors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useEventEmitter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useFocusEffect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useFocusEvents.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useFocusedListenersChildrenAdapter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useIsFocused.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useIsomorphicLayoutEffect.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useKeyedChildListeners.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useLazyValue.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useNavigation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useNavigationBuilder.d.ts +181 -0
- package/lib/typescript/commonjs/src/useNavigationBuilder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useNavigationCache.d.ts +65 -0
- package/lib/typescript/commonjs/src/useNavigationCache.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useNavigationContainerRef.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useNavigationHelpers.d.ts +96 -0
- package/lib/typescript/commonjs/src/useNavigationHelpers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useNavigationIndependentTree.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useNavigationState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useOnAction.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useOnGetState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useOnPreventRemove.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useOnRouteFocus.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useOptionsGetters.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/usePreventRemove.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/usePreventRemoveContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useRegisterNavigator.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useRoute.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useRouteCache.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useSyncState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/validatePathConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/tsconfig.build.tsbuildinfo +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/BaseNavigationContainer.d.ts +17 -0
- package/lib/typescript/module/src/BaseNavigationContainer.d.ts.map +1 -0
- package/lib/typescript/module/src/CurrentRenderContext.d.ts +9 -0
- package/lib/typescript/module/src/CurrentRenderContext.d.ts.map +1 -0
- package/lib/typescript/module/src/DeprecatedNavigationInChildContext.d.ts +6 -0
- package/lib/typescript/module/src/DeprecatedNavigationInChildContext.d.ts.map +1 -0
- package/lib/typescript/module/src/EnsureSingleNavigator.d.ts +14 -0
- package/lib/typescript/module/src/EnsureSingleNavigator.d.ts.map +1 -0
- package/lib/typescript/module/src/Group.d.ts +7 -0
- package/lib/typescript/module/src/Group.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationBuilderContext.d.ts +34 -0
- package/lib/typescript/module/src/NavigationBuilderContext.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationContainerRefContext.d.ts +8 -0
- package/lib/typescript/module/src/NavigationContainerRefContext.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationContext.d.ts +8 -0
- package/lib/typescript/module/src/NavigationContext.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationHelpersContext.d.ts +9 -0
- package/lib/typescript/module/src/NavigationHelpersContext.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationIndependentTree.d.ts +8 -0
- package/lib/typescript/module/src/NavigationIndependentTree.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationIndependentTreeContext.d.ts +6 -0
- package/lib/typescript/module/src/NavigationIndependentTreeContext.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationRouteContext.d.ts +7 -0
- package/lib/typescript/module/src/NavigationRouteContext.d.ts.map +1 -0
- package/lib/typescript/module/src/NavigationStateContext.d.ts +13 -0
- package/lib/typescript/module/src/NavigationStateContext.d.ts.map +1 -0
- package/lib/typescript/module/src/PreventRemoveContext.d.ts +13 -0
- package/lib/typescript/module/src/PreventRemoveContext.d.ts.map +1 -0
- package/lib/typescript/module/src/PreventRemoveProvider.d.ts +10 -0
- package/lib/typescript/module/src/PreventRemoveProvider.d.ts.map +1 -0
- package/lib/typescript/module/src/SceneView.d.ts +21 -0
- package/lib/typescript/module/src/SceneView.d.ts.map +1 -0
- package/lib/typescript/module/src/Screen.d.ts +7 -0
- package/lib/typescript/module/src/Screen.d.ts.map +1 -0
- package/lib/typescript/module/src/StaticContainer.d.ts +6 -0
- package/lib/typescript/module/src/StaticContainer.d.ts.map +1 -0
- package/lib/typescript/module/src/StaticNavigation.d.ts +188 -0
- package/lib/typescript/module/src/StaticNavigation.d.ts.map +1 -0
- package/lib/typescript/module/src/UnhandledActionContext.d.ts +4 -0
- package/lib/typescript/module/src/UnhandledActionContext.d.ts.map +1 -0
- package/lib/typescript/module/src/checkDuplicateRouteNames.d.ts +3 -0
- package/lib/typescript/module/src/checkDuplicateRouteNames.d.ts.map +1 -0
- package/lib/typescript/module/src/checkSerializable.d.ts +10 -0
- package/lib/typescript/module/src/checkSerializable.d.ts.map +1 -0
- package/lib/typescript/module/src/createNavigationContainerRef.d.ts +4 -0
- package/lib/typescript/module/src/createNavigationContainerRef.d.ts.map +1 -0
- package/lib/typescript/module/src/createNavigatorFactory.d.ts +10 -0
- package/lib/typescript/module/src/createNavigatorFactory.d.ts.map +1 -0
- package/lib/typescript/module/src/deepFreeze.d.ts +3 -0
- package/lib/typescript/module/src/deepFreeze.d.ts.map +1 -0
- package/lib/typescript/module/src/findFocusedRoute.d.ts +5 -0
- package/lib/typescript/module/src/findFocusedRoute.d.ts.map +1 -0
- package/lib/typescript/module/src/getActionFromState.d.ts +17 -0
- package/lib/typescript/module/src/getActionFromState.d.ts.map +1 -0
- package/lib/typescript/module/src/getFocusedRouteNameFromRoute.d.ts +3 -0
- package/lib/typescript/module/src/getFocusedRouteNameFromRoute.d.ts.map +1 -0
- package/lib/typescript/module/src/getPathFromState.d.ts +40 -0
- package/lib/typescript/module/src/getPathFromState.d.ts.map +1 -0
- package/lib/typescript/module/src/getStateFromPath.d.ts +34 -0
- package/lib/typescript/module/src/getStateFromPath.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +34 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/isArrayEqual.d.ts +6 -0
- package/lib/typescript/module/src/isArrayEqual.d.ts.map +1 -0
- package/lib/typescript/module/src/isRecordEqual.d.ts +5 -0
- package/lib/typescript/module/src/isRecordEqual.d.ts.map +1 -0
- package/lib/typescript/module/src/theming/ThemeContext.d.ts +3 -0
- package/lib/typescript/module/src/theming/ThemeContext.d.ts.map +1 -0
- package/lib/typescript/module/src/theming/ThemeProvider.d.ts +8 -0
- package/lib/typescript/module/src/theming/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/module/src/theming/useTheme.d.ts +2 -0
- package/lib/typescript/module/src/theming/useTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/types.d.ts +702 -0
- package/lib/typescript/module/src/types.d.ts.map +1 -0
- package/lib/typescript/module/src/useChildListeners.d.ts +12 -0
- package/lib/typescript/module/src/useChildListeners.d.ts.map +1 -0
- package/lib/typescript/module/src/useComponent.d.ts +7 -0
- package/lib/typescript/module/src/useComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/useCurrentRender.d.ts +14 -0
- package/lib/typescript/module/src/useCurrentRender.d.ts.map +1 -0
- package/lib/typescript/module/src/useDescriptors.d.ts +133 -0
- package/lib/typescript/module/src/useDescriptors.d.ts.map +1 -0
- package/lib/typescript/module/src/useEventEmitter.d.ts +9 -0
- package/lib/typescript/module/src/useEventEmitter.d.ts.map +1 -0
- package/lib/typescript/module/src/useFocusEffect.d.ts +11 -0
- package/lib/typescript/module/src/useFocusEffect.d.ts.map +1 -0
- package/lib/typescript/module/src/useFocusEvents.d.ts +13 -0
- package/lib/typescript/module/src/useFocusEvents.d.ts.map +1 -0
- package/lib/typescript/module/src/useFocusedListenersChildrenAdapter.d.ts +13 -0
- package/lib/typescript/module/src/useFocusedListenersChildrenAdapter.d.ts.map +1 -0
- package/lib/typescript/module/src/useIsFocused.d.ts +6 -0
- package/lib/typescript/module/src/useIsFocused.d.ts.map +1 -0
- package/lib/typescript/module/src/useIsomorphicLayoutEffect.d.ts +6 -0
- package/lib/typescript/module/src/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/lib/typescript/module/src/useIsomorphicLayoutEffect.native.d.ts +3 -0
- package/lib/typescript/module/src/useIsomorphicLayoutEffect.native.d.ts.map +1 -0
- package/lib/typescript/module/src/useKeyedChildListeners.d.ts +12 -0
- package/lib/typescript/module/src/useKeyedChildListeners.d.ts.map +1 -0
- package/lib/typescript/module/src/useLazyValue.d.ts +2 -0
- package/lib/typescript/module/src/useLazyValue.d.ts.map +1 -0
- package/lib/typescript/module/src/useNavigation.d.ts +11 -0
- package/lib/typescript/module/src/useNavigation.d.ts.map +1 -0
- package/lib/typescript/module/src/useNavigationBuilder.d.ts +181 -0
- package/lib/typescript/module/src/useNavigationBuilder.d.ts.map +1 -0
- package/lib/typescript/module/src/useNavigationCache.d.ts +65 -0
- package/lib/typescript/module/src/useNavigationCache.d.ts.map +1 -0
- package/lib/typescript/module/src/useNavigationContainerRef.d.ts +3 -0
- package/lib/typescript/module/src/useNavigationContainerRef.d.ts.map +1 -0
- package/lib/typescript/module/src/useNavigationHelpers.d.ts +96 -0
- package/lib/typescript/module/src/useNavigationHelpers.d.ts.map +1 -0
- package/lib/typescript/module/src/useNavigationIndependentTree.d.ts +2 -0
- package/lib/typescript/module/src/useNavigationIndependentTree.d.ts.map +1 -0
- package/lib/typescript/module/src/useNavigationState.d.ts +10 -0
- package/lib/typescript/module/src/useNavigationState.d.ts.map +1 -0
- package/lib/typescript/module/src/useOnAction.d.ts +26 -0
- package/lib/typescript/module/src/useOnAction.d.ts.map +1 -0
- package/lib/typescript/module/src/useOnGetState.d.ts +9 -0
- package/lib/typescript/module/src/useOnGetState.d.ts.map +1 -0
- package/lib/typescript/module/src/useOnPreventRemove.d.ts +17 -0
- package/lib/typescript/module/src/useOnPreventRemove.d.ts.map +1 -0
- package/lib/typescript/module/src/useOnRouteFocus.d.ts +15 -0
- package/lib/typescript/module/src/useOnRouteFocus.d.ts.map +1 -0
- package/lib/typescript/module/src/useOptionsGetters.d.ts +13 -0
- package/lib/typescript/module/src/useOptionsGetters.d.ts.map +1 -0
- package/lib/typescript/module/src/usePreventRemove.d.ts +13 -0
- package/lib/typescript/module/src/usePreventRemove.d.ts.map +1 -0
- package/lib/typescript/module/src/usePreventRemoveContext.d.ts +5 -0
- package/lib/typescript/module/src/usePreventRemoveContext.d.ts.map +1 -0
- package/lib/typescript/module/src/useRegisterNavigator.d.ts +6 -0
- package/lib/typescript/module/src/useRegisterNavigator.d.ts.map +1 -0
- package/lib/typescript/module/src/useRoute.d.ts +9 -0
- package/lib/typescript/module/src/useRoute.d.ts.map +1 -0
- package/lib/typescript/module/src/useRouteCache.d.ts +14 -0
- package/lib/typescript/module/src/useRouteCache.d.ts.map +1 -0
- package/lib/typescript/module/src/useSyncState.d.ts +2 -0
- package/lib/typescript/module/src/useSyncState.d.ts.map +1 -0
- package/lib/typescript/module/src/validatePathConfig.d.ts +2 -0
- package/lib/typescript/module/src/validatePathConfig.d.ts.map +1 -0
- package/lib/typescript/module/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +18 -11
- package/src/BaseNavigationContainer.tsx +1 -1
- package/src/StaticNavigation.tsx +2 -0
- package/src/getPathFromState.tsx +20 -4
- package/src/getStateFromPath.tsx +124 -63
- package/src/types.tsx +33 -46
- package/src/useNavigationBuilder.tsx +1 -1
- package/src/validatePathConfig.tsx +1 -1
- package/lib/commonjs/BaseNavigationContainer.cjs +0 -356
- package/lib/commonjs/BaseNavigationContainer.cjs.map +0 -1
- package/lib/commonjs/CurrentRenderContext.cjs +0 -15
- package/lib/commonjs/DeprecatedNavigationInChildContext.cjs +0 -14
- package/lib/commonjs/EnsureSingleNavigator.cjs +0 -43
- package/lib/commonjs/Group.cjs +0 -14
- package/lib/commonjs/NavigationBuilderContext.cjs +0 -17
- package/lib/commonjs/NavigationContainerRefContext.cjs +0 -14
- package/lib/commonjs/NavigationContext.cjs +0 -14
- package/lib/commonjs/NavigationHelpersContext.cjs +0 -15
- package/lib/commonjs/NavigationIndependentTree.cjs +0 -35
- package/lib/commonjs/NavigationIndependentTreeContext.cjs +0 -14
- package/lib/commonjs/NavigationRouteContext.cjs +0 -14
- package/lib/commonjs/NavigationStateContext.cjs +0 -29
- package/lib/commonjs/PreventRemoveContext.cjs +0 -16
- package/lib/commonjs/PreventRemoveProvider.cjs +0 -91
- package/lib/commonjs/SceneView.cjs +0 -96
- package/lib/commonjs/Screen.cjs +0 -14
- package/lib/commonjs/StaticContainer.cjs +0 -31
- package/lib/commonjs/StaticNavigation.cjs +0 -255
- package/lib/commonjs/StaticNavigation.cjs.map +0 -1
- package/lib/commonjs/UnhandledActionContext.cjs +0 -11
- package/lib/commonjs/checkDuplicateRouteNames.cjs +0 -25
- package/lib/commonjs/checkSerializable.cjs +0 -50
- package/lib/commonjs/createNavigationContainerRef.cjs +0 -69
- package/lib/commonjs/createNavigatorFactory.cjs +0 -34
- package/lib/commonjs/deepFreeze.cjs +0 -37
- package/lib/commonjs/findFocusedRoute.cjs +0 -15
- package/lib/commonjs/getActionFromState.cjs +0 -86
- package/lib/commonjs/getFocusedRouteNameFromRoute.cjs +0 -22
- package/lib/commonjs/getPathFromState.cjs +0 -211
- package/lib/commonjs/getPathFromState.cjs.map +0 -1
- package/lib/commonjs/getStateFromPath.cjs +0 -438
- package/lib/commonjs/getStateFromPath.cjs.map +0 -1
- package/lib/commonjs/index.cjs +0 -287
- package/lib/commonjs/isArrayEqual.cjs +0 -20
- package/lib/commonjs/isRecordEqual.cjs +0 -21
- package/lib/commonjs/theming/ThemeContext.cjs +0 -12
- package/lib/commonjs/theming/ThemeProvider.cjs +0 -21
- package/lib/commonjs/theming/useTheme.cjs +0 -18
- package/lib/commonjs/types.cjs +0 -9
- package/lib/commonjs/types.cjs.map +0 -1
- package/lib/commonjs/useChildListeners.cjs +0 -36
- package/lib/commonjs/useComponent.cjs +0 -40
- package/lib/commonjs/useCurrentRender.cjs +0 -25
- package/lib/commonjs/useDescriptors.cjs +0 -188
- package/lib/commonjs/useEventEmitter.cjs +0 -105
- package/lib/commonjs/useFocusEffect.cjs +0 -80
- package/lib/commonjs/useFocusEvents.cjs +0 -70
- package/lib/commonjs/useFocusedListenersChildrenAdapter.cjs +0 -48
- package/lib/commonjs/useIsFocused.cjs +0 -28
- package/lib/commonjs/useIsomorphicLayoutEffect.cjs +0 -12
- package/lib/commonjs/useIsomorphicLayoutEffect.native.cjs +0 -9
- package/lib/commonjs/useKeyedChildListeners.cjs +0 -33
- package/lib/commonjs/useLazyValue.cjs +0 -17
- package/lib/commonjs/useNavigation.cjs +0 -27
- package/lib/commonjs/useNavigationBuilder.cjs +0 -478
- package/lib/commonjs/useNavigationCache.cjs +0 -162
- package/lib/commonjs/useNavigationContainerRef.cjs +0 -18
- package/lib/commonjs/useNavigationHelpers.cjs +0 -76
- package/lib/commonjs/useNavigationIndependentTree.cjs +0 -14
- package/lib/commonjs/useNavigationState.cjs +0 -26
- package/lib/commonjs/useOnAction.cjs +0 -106
- package/lib/commonjs/useOnGetState.cjs +0 -48
- package/lib/commonjs/useOnPreventRemove.cjs +0 -72
- package/lib/commonjs/useOnRouteFocus.cjs +0 -36
- package/lib/commonjs/useOptionsGetters.cjs +0 -78
- package/lib/commonjs/usePreventRemove.cjs +0 -48
- package/lib/commonjs/usePreventRemoveContext.cjs +0 -18
- package/lib/commonjs/useRegisterNavigator.cjs +0 -32
- package/lib/commonjs/useRoute.cjs +0 -23
- package/lib/commonjs/useRouteCache.cjs +0 -69
- package/lib/commonjs/useSyncState.cjs +0 -48
- package/lib/commonjs/validatePathConfig.cjs +0 -49
- package/lib/commonjs/validatePathConfig.cjs.map +0 -1
- package/lib/module/BaseNavigationContainer.mjs +0 -347
- package/lib/module/BaseNavigationContainer.mjs.map +0 -1
- package/lib/module/CurrentRenderContext.mjs +0 -8
- package/lib/module/CurrentRenderContext.mjs.map +0 -1
- package/lib/module/DeprecatedNavigationInChildContext.mjs +0 -7
- package/lib/module/DeprecatedNavigationInChildContext.mjs.map +0 -1
- package/lib/module/EnsureSingleNavigator.mjs +0 -34
- package/lib/module/EnsureSingleNavigator.mjs.map +0 -1
- package/lib/module/Group.mjs +0 -8
- package/lib/module/Group.mjs.map +0 -1
- package/lib/module/NavigationBuilderContext.mjs +0 -9
- package/lib/module/NavigationBuilderContext.mjs.map +0 -1
- package/lib/module/NavigationContainerRefContext.mjs +0 -6
- package/lib/module/NavigationContainerRefContext.mjs.map +0 -1
- package/lib/module/NavigationContext.mjs +0 -6
- package/lib/module/NavigationContext.mjs.map +0 -1
- package/lib/module/NavigationHelpersContext.mjs +0 -7
- package/lib/module/NavigationHelpersContext.mjs.map +0 -1
- package/lib/module/NavigationIndependentTree.mjs +0 -28
- package/lib/module/NavigationIndependentTree.mjs.map +0 -1
- package/lib/module/NavigationIndependentTreeContext.mjs +0 -7
- package/lib/module/NavigationIndependentTreeContext.mjs.map +0 -1
- package/lib/module/NavigationRouteContext.mjs +0 -7
- package/lib/module/NavigationRouteContext.mjs.map +0 -1
- package/lib/module/NavigationStateContext.mjs +0 -21
- package/lib/module/NavigationStateContext.mjs.map +0 -1
- package/lib/module/PreventRemoveContext.mjs +0 -9
- package/lib/module/PreventRemoveContext.mjs.map +0 -1
- package/lib/module/PreventRemoveProvider.mjs +0 -82
- package/lib/module/PreventRemoveProvider.mjs.map +0 -1
- package/lib/module/SceneView.mjs +0 -88
- package/lib/module/SceneView.mjs.map +0 -1
- package/lib/module/Screen.mjs +0 -8
- package/lib/module/Screen.mjs.map +0 -1
- package/lib/module/StaticContainer.mjs +0 -24
- package/lib/module/StaticContainer.mjs.map +0 -1
- package/lib/module/StaticNavigation.mjs +0 -246
- package/lib/module/StaticNavigation.mjs.map +0 -1
- package/lib/module/UnhandledActionContext.mjs +0 -3
- package/lib/module/UnhandledActionContext.mjs.map +0 -1
- package/lib/module/checkDuplicateRouteNames.mjs +0 -19
- package/lib/module/checkDuplicateRouteNames.mjs.map +0 -1
- package/lib/module/checkSerializable.mjs +0 -44
- package/lib/module/checkSerializable.mjs.map +0 -1
- package/lib/module/createNavigationContainerRef.mjs +0 -62
- package/lib/module/createNavigationContainerRef.mjs.map +0 -1
- package/lib/module/createNavigatorFactory.mjs +0 -29
- package/lib/module/createNavigatorFactory.mjs.map +0 -1
- package/lib/module/deepFreeze.mjs +0 -29
- package/lib/module/deepFreeze.mjs.map +0 -1
- package/lib/module/findFocusedRoute.mjs +0 -9
- package/lib/module/findFocusedRoute.mjs.map +0 -1
- package/lib/module/getActionFromState.mjs +0 -80
- package/lib/module/getActionFromState.mjs.map +0 -1
- package/lib/module/getFocusedRouteNameFromRoute.mjs +0 -16
- package/lib/module/getFocusedRouteNameFromRoute.mjs.map +0 -1
- package/lib/module/getPathFromState.mjs +0 -203
- package/lib/module/getPathFromState.mjs.map +0 -1
- package/lib/module/getStateFromPath.mjs +0 -429
- package/lib/module/getStateFromPath.mjs.map +0 -1
- package/lib/module/index.mjs +0 -34
- package/lib/module/index.mjs.map +0 -1
- package/lib/module/isArrayEqual.mjs +0 -14
- package/lib/module/isArrayEqual.mjs.map +0 -1
- package/lib/module/isRecordEqual.mjs +0 -15
- package/lib/module/isRecordEqual.mjs.map +0 -1
- package/lib/module/theming/ThemeContext.mjs +0 -4
- package/lib/module/theming/ThemeContext.mjs.map +0 -1
- package/lib/module/theming/ThemeProvider.mjs +0 -13
- package/lib/module/theming/ThemeProvider.mjs.map +0 -1
- package/lib/module/theming/useTheme.mjs +0 -10
- package/lib/module/theming/useTheme.mjs.map +0 -1
- package/lib/module/types.mjs +0 -2
- package/lib/module/types.mjs.map +0 -1
- package/lib/module/useChildListeners.mjs +0 -28
- package/lib/module/useChildListeners.mjs.map +0 -1
- package/lib/module/useComponent.mjs +0 -32
- package/lib/module/useComponent.mjs.map +0 -1
- package/lib/module/useCurrentRender.mjs +0 -17
- package/lib/module/useCurrentRender.mjs.map +0 -1
- package/lib/module/useDescriptors.mjs +0 -180
- package/lib/module/useDescriptors.mjs.map +0 -1
- package/lib/module/useEventEmitter.mjs +0 -97
- package/lib/module/useEventEmitter.mjs.map +0 -1
- package/lib/module/useFocusEffect.mjs +0 -72
- package/lib/module/useFocusEffect.mjs.map +0 -1
- package/lib/module/useFocusEvents.mjs +0 -62
- package/lib/module/useFocusEvents.mjs.map +0 -1
- package/lib/module/useFocusedListenersChildrenAdapter.mjs +0 -40
- package/lib/module/useFocusedListenersChildrenAdapter.mjs.map +0 -1
- package/lib/module/useIsFocused.mjs +0 -21
- package/lib/module/useIsFocused.mjs.map +0 -1
- package/lib/module/useIsomorphicLayoutEffect.mjs +0 -7
- package/lib/module/useIsomorphicLayoutEffect.mjs.map +0 -1
- package/lib/module/useIsomorphicLayoutEffect.native.mjs +0 -3
- package/lib/module/useIsomorphicLayoutEffect.native.mjs.map +0 -1
- package/lib/module/useKeyedChildListeners.mjs +0 -25
- package/lib/module/useKeyedChildListeners.mjs.map +0 -1
- package/lib/module/useLazyValue.mjs +0 -9
- package/lib/module/useLazyValue.mjs.map +0 -1
- package/lib/module/useNavigation.mjs +0 -19
- package/lib/module/useNavigation.mjs.map +0 -1
- package/lib/module/useNavigationBuilder.mjs +0 -470
- package/lib/module/useNavigationBuilder.mjs.map +0 -1
- package/lib/module/useNavigationCache.mjs +0 -154
- package/lib/module/useNavigationCache.mjs.map +0 -1
- package/lib/module/useNavigationContainerRef.mjs +0 -10
- package/lib/module/useNavigationContainerRef.mjs.map +0 -1
- package/lib/module/useNavigationHelpers.mjs +0 -68
- package/lib/module/useNavigationHelpers.mjs.map +0 -1
- package/lib/module/useNavigationIndependentTree.mjs +0 -6
- package/lib/module/useNavigationIndependentTree.mjs.map +0 -1
- package/lib/module/useNavigationState.mjs +0 -18
- package/lib/module/useNavigationState.mjs.map +0 -1
- package/lib/module/useOnAction.mjs +0 -98
- package/lib/module/useOnAction.mjs.map +0 -1
- package/lib/module/useOnGetState.mjs +0 -40
- package/lib/module/useOnGetState.mjs.map +0 -1
- package/lib/module/useOnPreventRemove.mjs +0 -62
- package/lib/module/useOnPreventRemove.mjs.map +0 -1
- package/lib/module/useOnRouteFocus.mjs +0 -28
- package/lib/module/useOnRouteFocus.mjs.map +0 -1
- package/lib/module/useOptionsGetters.mjs +0 -70
- package/lib/module/useOptionsGetters.mjs.map +0 -1
- package/lib/module/usePreventRemove.mjs +0 -40
- package/lib/module/usePreventRemove.mjs.map +0 -1
- package/lib/module/usePreventRemoveContext.mjs +0 -10
- package/lib/module/usePreventRemoveContext.mjs.map +0 -1
- package/lib/module/useRegisterNavigator.mjs +0 -25
- package/lib/module/useRegisterNavigator.mjs.map +0 -1
- package/lib/module/useRoute.mjs +0 -15
- package/lib/module/useRoute.mjs.map +0 -1
- package/lib/module/useRouteCache.mjs +0 -60
- package/lib/module/useRouteCache.mjs.map +0 -1
- package/lib/module/useSyncState.mjs +0 -40
- package/lib/module/useSyncState.mjs.map +0 -1
- package/lib/module/validatePathConfig.mjs +0 -43
- package/lib/module/validatePathConfig.mjs.map +0 -1
- package/lib/typescript/src/BaseNavigationContainer.d.ts.map +0 -1
- package/lib/typescript/src/CurrentRenderContext.d.ts.map +0 -1
- package/lib/typescript/src/DeprecatedNavigationInChildContext.d.ts.map +0 -1
- package/lib/typescript/src/EnsureSingleNavigator.d.ts.map +0 -1
- package/lib/typescript/src/Group.d.ts.map +0 -1
- package/lib/typescript/src/NavigationBuilderContext.d.ts.map +0 -1
- package/lib/typescript/src/NavigationContainerRefContext.d.ts.map +0 -1
- package/lib/typescript/src/NavigationContext.d.ts.map +0 -1
- package/lib/typescript/src/NavigationHelpersContext.d.ts.map +0 -1
- package/lib/typescript/src/NavigationIndependentTree.d.ts.map +0 -1
- package/lib/typescript/src/NavigationIndependentTreeContext.d.ts.map +0 -1
- package/lib/typescript/src/NavigationRouteContext.d.ts.map +0 -1
- package/lib/typescript/src/NavigationStateContext.d.ts.map +0 -1
- package/lib/typescript/src/PreventRemoveContext.d.ts.map +0 -1
- package/lib/typescript/src/PreventRemoveProvider.d.ts.map +0 -1
- package/lib/typescript/src/SceneView.d.ts.map +0 -1
- package/lib/typescript/src/Screen.d.ts.map +0 -1
- package/lib/typescript/src/StaticContainer.d.ts.map +0 -1
- package/lib/typescript/src/StaticNavigation.d.ts.map +0 -1
- package/lib/typescript/src/UnhandledActionContext.d.ts.map +0 -1
- package/lib/typescript/src/checkDuplicateRouteNames.d.ts.map +0 -1
- package/lib/typescript/src/checkSerializable.d.ts.map +0 -1
- package/lib/typescript/src/createNavigationContainerRef.d.ts.map +0 -1
- package/lib/typescript/src/createNavigatorFactory.d.ts.map +0 -1
- package/lib/typescript/src/deepFreeze.d.ts.map +0 -1
- package/lib/typescript/src/findFocusedRoute.d.ts.map +0 -1
- package/lib/typescript/src/getActionFromState.d.ts.map +0 -1
- package/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts.map +0 -1
- package/lib/typescript/src/getPathFromState.d.ts.map +0 -1
- package/lib/typescript/src/getStateFromPath.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/isArrayEqual.d.ts.map +0 -1
- package/lib/typescript/src/isRecordEqual.d.ts.map +0 -1
- package/lib/typescript/src/theming/ThemeContext.d.ts.map +0 -1
- package/lib/typescript/src/theming/ThemeProvider.d.ts.map +0 -1
- package/lib/typescript/src/theming/useTheme.d.ts.map +0 -1
- package/lib/typescript/src/types.d.ts +0 -695
- package/lib/typescript/src/types.d.ts.map +0 -1
- package/lib/typescript/src/useChildListeners.d.ts.map +0 -1
- package/lib/typescript/src/useComponent.d.ts.map +0 -1
- package/lib/typescript/src/useCurrentRender.d.ts.map +0 -1
- package/lib/typescript/src/useDescriptors.d.ts +0 -133
- package/lib/typescript/src/useDescriptors.d.ts.map +0 -1
- package/lib/typescript/src/useEventEmitter.d.ts.map +0 -1
- package/lib/typescript/src/useFocusEffect.d.ts.map +0 -1
- package/lib/typescript/src/useFocusEvents.d.ts.map +0 -1
- package/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts.map +0 -1
- package/lib/typescript/src/useIsFocused.d.ts.map +0 -1
- package/lib/typescript/src/useIsomorphicLayoutEffect.d.ts.map +0 -1
- package/lib/typescript/src/useIsomorphicLayoutEffect.native.d.ts.map +0 -1
- package/lib/typescript/src/useKeyedChildListeners.d.ts.map +0 -1
- package/lib/typescript/src/useLazyValue.d.ts.map +0 -1
- package/lib/typescript/src/useNavigation.d.ts.map +0 -1
- package/lib/typescript/src/useNavigationBuilder.d.ts +0 -181
- package/lib/typescript/src/useNavigationBuilder.d.ts.map +0 -1
- package/lib/typescript/src/useNavigationCache.d.ts +0 -65
- package/lib/typescript/src/useNavigationCache.d.ts.map +0 -1
- package/lib/typescript/src/useNavigationContainerRef.d.ts.map +0 -1
- package/lib/typescript/src/useNavigationHelpers.d.ts +0 -96
- package/lib/typescript/src/useNavigationHelpers.d.ts.map +0 -1
- package/lib/typescript/src/useNavigationIndependentTree.d.ts.map +0 -1
- package/lib/typescript/src/useNavigationState.d.ts.map +0 -1
- package/lib/typescript/src/useOnAction.d.ts.map +0 -1
- package/lib/typescript/src/useOnGetState.d.ts.map +0 -1
- package/lib/typescript/src/useOnPreventRemove.d.ts.map +0 -1
- package/lib/typescript/src/useOnRouteFocus.d.ts.map +0 -1
- package/lib/typescript/src/useOptionsGetters.d.ts.map +0 -1
- package/lib/typescript/src/usePreventRemove.d.ts.map +0 -1
- package/lib/typescript/src/usePreventRemoveContext.d.ts.map +0 -1
- package/lib/typescript/src/useRegisterNavigator.d.ts.map +0 -1
- package/lib/typescript/src/useRoute.d.ts.map +0 -1
- package/lib/typescript/src/useRouteCache.d.ts.map +0 -1
- package/lib/typescript/src/useSyncState.d.ts.map +0 -1
- package/lib/typescript/src/validatePathConfig.d.ts.map +0 -1
- package/lib/typescript/utils/usePrevious.d.ts +0 -6
- package/lib/typescript/utils/usePrevious.d.ts.map +0 -1
- /package/lib/commonjs/{CurrentRenderContext.cjs.map → CurrentRenderContext.js.map} +0 -0
- /package/lib/commonjs/{DeprecatedNavigationInChildContext.cjs.map → DeprecatedNavigationInChildContext.js.map} +0 -0
- /package/lib/commonjs/{EnsureSingleNavigator.cjs.map → EnsureSingleNavigator.js.map} +0 -0
- /package/lib/commonjs/{Group.cjs.map → Group.js.map} +0 -0
- /package/lib/commonjs/{NavigationBuilderContext.cjs.map → NavigationBuilderContext.js.map} +0 -0
- /package/lib/commonjs/{NavigationContainerRefContext.cjs.map → NavigationContainerRefContext.js.map} +0 -0
- /package/lib/commonjs/{NavigationContext.cjs.map → NavigationContext.js.map} +0 -0
- /package/lib/commonjs/{NavigationHelpersContext.cjs.map → NavigationHelpersContext.js.map} +0 -0
- /package/lib/commonjs/{NavigationIndependentTree.cjs.map → NavigationIndependentTree.js.map} +0 -0
- /package/lib/commonjs/{NavigationIndependentTreeContext.cjs.map → NavigationIndependentTreeContext.js.map} +0 -0
- /package/lib/commonjs/{NavigationRouteContext.cjs.map → NavigationRouteContext.js.map} +0 -0
- /package/lib/commonjs/{NavigationStateContext.cjs.map → NavigationStateContext.js.map} +0 -0
- /package/lib/commonjs/{PreventRemoveContext.cjs.map → PreventRemoveContext.js.map} +0 -0
- /package/lib/commonjs/{PreventRemoveProvider.cjs.map → PreventRemoveProvider.js.map} +0 -0
- /package/lib/commonjs/{SceneView.cjs.map → SceneView.js.map} +0 -0
- /package/lib/commonjs/{Screen.cjs.map → Screen.js.map} +0 -0
- /package/lib/commonjs/{StaticContainer.cjs.map → StaticContainer.js.map} +0 -0
- /package/lib/commonjs/{UnhandledActionContext.cjs.map → UnhandledActionContext.js.map} +0 -0
- /package/lib/commonjs/{checkDuplicateRouteNames.cjs.map → checkDuplicateRouteNames.js.map} +0 -0
- /package/lib/commonjs/{checkSerializable.cjs.map → checkSerializable.js.map} +0 -0
- /package/lib/commonjs/{createNavigationContainerRef.cjs.map → createNavigationContainerRef.js.map} +0 -0
- /package/lib/commonjs/{createNavigatorFactory.cjs.map → createNavigatorFactory.js.map} +0 -0
- /package/lib/commonjs/{deepFreeze.cjs.map → deepFreeze.js.map} +0 -0
- /package/lib/commonjs/{findFocusedRoute.cjs.map → findFocusedRoute.js.map} +0 -0
- /package/lib/commonjs/{getActionFromState.cjs.map → getActionFromState.js.map} +0 -0
- /package/lib/commonjs/{getFocusedRouteNameFromRoute.cjs.map → getFocusedRouteNameFromRoute.js.map} +0 -0
- /package/lib/commonjs/{index.cjs.map → index.js.map} +0 -0
- /package/lib/commonjs/{isArrayEqual.cjs.map → isArrayEqual.js.map} +0 -0
- /package/lib/commonjs/{isRecordEqual.cjs.map → isRecordEqual.js.map} +0 -0
- /package/lib/commonjs/theming/{ThemeContext.cjs.map → ThemeContext.js.map} +0 -0
- /package/lib/commonjs/theming/{ThemeProvider.cjs.map → ThemeProvider.js.map} +0 -0
- /package/lib/commonjs/theming/{useTheme.cjs.map → useTheme.js.map} +0 -0
- /package/lib/commonjs/{useChildListeners.cjs.map → useChildListeners.js.map} +0 -0
- /package/lib/commonjs/{useComponent.cjs.map → useComponent.js.map} +0 -0
- /package/lib/commonjs/{useCurrentRender.cjs.map → useCurrentRender.js.map} +0 -0
- /package/lib/commonjs/{useDescriptors.cjs.map → useDescriptors.js.map} +0 -0
- /package/lib/commonjs/{useEventEmitter.cjs.map → useEventEmitter.js.map} +0 -0
- /package/lib/commonjs/{useFocusEffect.cjs.map → useFocusEffect.js.map} +0 -0
- /package/lib/commonjs/{useFocusEvents.cjs.map → useFocusEvents.js.map} +0 -0
- /package/lib/commonjs/{useFocusedListenersChildrenAdapter.cjs.map → useFocusedListenersChildrenAdapter.js.map} +0 -0
- /package/lib/commonjs/{useIsFocused.cjs.map → useIsFocused.js.map} +0 -0
- /package/lib/commonjs/{useIsomorphicLayoutEffect.cjs.map → useIsomorphicLayoutEffect.js.map} +0 -0
- /package/lib/commonjs/{useIsomorphicLayoutEffect.native.cjs.map → useIsomorphicLayoutEffect.native.js.map} +0 -0
- /package/lib/commonjs/{useKeyedChildListeners.cjs.map → useKeyedChildListeners.js.map} +0 -0
- /package/lib/commonjs/{useLazyValue.cjs.map → useLazyValue.js.map} +0 -0
- /package/lib/commonjs/{useNavigation.cjs.map → useNavigation.js.map} +0 -0
- /package/lib/commonjs/{useNavigationBuilder.cjs.map → useNavigationBuilder.js.map} +0 -0
- /package/lib/commonjs/{useNavigationCache.cjs.map → useNavigationCache.js.map} +0 -0
- /package/lib/commonjs/{useNavigationContainerRef.cjs.map → useNavigationContainerRef.js.map} +0 -0
- /package/lib/commonjs/{useNavigationHelpers.cjs.map → useNavigationHelpers.js.map} +0 -0
- /package/lib/commonjs/{useNavigationIndependentTree.cjs.map → useNavigationIndependentTree.js.map} +0 -0
- /package/lib/commonjs/{useNavigationState.cjs.map → useNavigationState.js.map} +0 -0
- /package/lib/commonjs/{useOnAction.cjs.map → useOnAction.js.map} +0 -0
- /package/lib/commonjs/{useOnGetState.cjs.map → useOnGetState.js.map} +0 -0
- /package/lib/commonjs/{useOnPreventRemove.cjs.map → useOnPreventRemove.js.map} +0 -0
- /package/lib/commonjs/{useOnRouteFocus.cjs.map → useOnRouteFocus.js.map} +0 -0
- /package/lib/commonjs/{useOptionsGetters.cjs.map → useOptionsGetters.js.map} +0 -0
- /package/lib/commonjs/{usePreventRemove.cjs.map → usePreventRemove.js.map} +0 -0
- /package/lib/commonjs/{usePreventRemoveContext.cjs.map → usePreventRemoveContext.js.map} +0 -0
- /package/lib/commonjs/{useRegisterNavigator.cjs.map → useRegisterNavigator.js.map} +0 -0
- /package/lib/commonjs/{useRoute.cjs.map → useRoute.js.map} +0 -0
- /package/lib/commonjs/{useRouteCache.cjs.map → useRouteCache.js.map} +0 -0
- /package/lib/commonjs/{useSyncState.cjs.map → useSyncState.js.map} +0 -0
- /package/lib/typescript/{src → commonjs/src}/BaseNavigationContainer.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/CurrentRenderContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/DeprecatedNavigationInChildContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/EnsureSingleNavigator.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/Group.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationBuilderContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationContainerRefContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationHelpersContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationIndependentTree.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationIndependentTreeContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationRouteContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/NavigationStateContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/PreventRemoveContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/PreventRemoveProvider.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/SceneView.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/Screen.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/StaticContainer.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/StaticNavigation.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/UnhandledActionContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/checkDuplicateRouteNames.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/checkSerializable.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/createNavigationContainerRef.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/createNavigatorFactory.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/deepFreeze.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/findFocusedRoute.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/getActionFromState.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/getFocusedRouteNameFromRoute.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/getPathFromState.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/getStateFromPath.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/isArrayEqual.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/isRecordEqual.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/theming/ThemeContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/theming/ThemeProvider.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/theming/useTheme.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useChildListeners.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useComponent.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useCurrentRender.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useEventEmitter.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useFocusEffect.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useFocusEvents.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useFocusedListenersChildrenAdapter.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useIsFocused.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useIsomorphicLayoutEffect.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useIsomorphicLayoutEffect.native.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useKeyedChildListeners.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useLazyValue.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useNavigation.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useNavigationContainerRef.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useNavigationIndependentTree.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useNavigationState.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useOnAction.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useOnGetState.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useOnPreventRemove.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useOnRouteFocus.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useOptionsGetters.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/usePreventRemove.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/usePreventRemoveContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useRegisterNavigator.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useRoute.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useRouteCache.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/useSyncState.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/validatePathConfig.d.ts +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const checkSerializableWithoutCircularReference = (o, seen, location) => {
|
|
4
|
+
if (o === undefined || o === null || typeof o === 'boolean' || typeof o === 'number' || typeof o === 'string') {
|
|
5
|
+
return {
|
|
6
|
+
serializable: true
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
if (Object.prototype.toString.call(o) !== '[object Object]' && !Array.isArray(o)) {
|
|
10
|
+
return {
|
|
11
|
+
serializable: false,
|
|
12
|
+
location,
|
|
13
|
+
reason: typeof o === 'function' ? 'Function' : String(o)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
if (seen.has(o)) {
|
|
17
|
+
return {
|
|
18
|
+
serializable: false,
|
|
19
|
+
reason: 'Circular reference',
|
|
20
|
+
location
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
seen.add(o);
|
|
24
|
+
if (Array.isArray(o)) {
|
|
25
|
+
for (let i = 0; i < o.length; i++) {
|
|
26
|
+
const childResult = checkSerializableWithoutCircularReference(o[i], new Set(seen), [...location, i]);
|
|
27
|
+
if (!childResult.serializable) {
|
|
28
|
+
return childResult;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
} else {
|
|
32
|
+
for (const key in o) {
|
|
33
|
+
const childResult = checkSerializableWithoutCircularReference(o[key], new Set(seen), [...location, key]);
|
|
34
|
+
if (!childResult.serializable) {
|
|
35
|
+
return childResult;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
serializable: true
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export function checkSerializable(o) {
|
|
44
|
+
return checkSerializableWithoutCircularReference(o, new Set(), []);
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=checkSerializable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["checkSerializableWithoutCircularReference","o","seen","location","undefined","serializable","Object","prototype","toString","call","Array","isArray","reason","String","has","add","i","length","childResult","Set","key","checkSerializable"],"sourceRoot":"../../src","sources":["checkSerializable.tsx"],"mappings":";;AAAA,MAAMA,yCAAyC,GAAGA,CAChDC,CAAyB,EACzBC,IAAc,EACdC,QAA6B,KAOtB;EACP,IACEF,CAAC,KAAKG,SAAS,IACfH,CAAC,KAAK,IAAI,IACV,OAAOA,CAAC,KAAK,SAAS,IACtB,OAAOA,CAAC,KAAK,QAAQ,IACrB,OAAOA,CAAC,KAAK,Q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;IAAEb,YAAY,EAAE;EAAK,CAAC;AAC/B,CAAC;AAED,OAAO,SAASgB,iBAAiBA,CAACpB,CAAyB,EAAE;EAC3D,OAAOD,yCAAyC,CAACC,CAAC,EAAE,IAAIkB,GAAG,CAAM,CAAC,EAAE,EAAE,CAAC;AACzE","ignoreList":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { CommonActions } from '@react-navigation/routers';
|
|
4
|
+
export const NOT_INITIALIZED_ERROR = "The 'navigation' object hasn't been initialized yet. This might happen if you don't have a navigator mounted, or if the navigator hasn't finished mounting. See https://reactnavigation.org/docs/navigating-without-navigation-prop#handling-initialization for more details.";
|
|
5
|
+
export function createNavigationContainerRef() {
|
|
6
|
+
const methods = [...Object.keys(CommonActions), 'addListener', 'removeListener', 'resetRoot', 'dispatch', 'isFocused', 'canGoBack', 'getRootState', 'getState', 'getParent', 'getCurrentRoute', 'getCurrentOptions'];
|
|
7
|
+
const listeners = {};
|
|
8
|
+
const removeListener = (event, callback) => {
|
|
9
|
+
if (listeners[event]) {
|
|
10
|
+
listeners[event] = listeners[event].filter(cb => cb !== callback);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
let current = null;
|
|
14
|
+
const ref = {
|
|
15
|
+
get current() {
|
|
16
|
+
return current;
|
|
17
|
+
},
|
|
18
|
+
set current(value) {
|
|
19
|
+
current = value;
|
|
20
|
+
if (value != null) {
|
|
21
|
+
Object.entries(listeners).forEach(([event, callbacks]) => {
|
|
22
|
+
callbacks.forEach(callback => {
|
|
23
|
+
value.addListener(event, callback);
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
isReady: () => {
|
|
29
|
+
if (current == null) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return current.isReady();
|
|
33
|
+
},
|
|
34
|
+
...methods.reduce((acc, name) => {
|
|
35
|
+
acc[name] = (...args) => {
|
|
36
|
+
if (current == null) {
|
|
37
|
+
switch (name) {
|
|
38
|
+
case 'addListener':
|
|
39
|
+
{
|
|
40
|
+
const [event, callback] = args;
|
|
41
|
+
listeners[event] = listeners[event] || [];
|
|
42
|
+
listeners[event].push(callback);
|
|
43
|
+
return () => removeListener(event, callback);
|
|
44
|
+
}
|
|
45
|
+
case 'removeListener':
|
|
46
|
+
{
|
|
47
|
+
const [event, callback] = args;
|
|
48
|
+
removeListener(event, callback);
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
default:
|
|
52
|
+
console.error(NOT_INITIALIZED_ERROR);
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
// @ts-expect-error: this is ok
|
|
56
|
+
return current[name](...args);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
return acc;
|
|
60
|
+
}, {})
|
|
61
|
+
};
|
|
62
|
+
return ref;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=createNavigationContainerRef.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CommonActions","NOT_INITIALIZED_ERROR","createNavigationContainerRef","methods","Object","keys","listeners","removeListener","event","callback","filter","cb","current","ref","value","entries","forEach","callbacks","addListener","isReady","reduce","acc","name","args","push","console","error"],"sourceRoot":"../../src","sources":["createNavigationContainerRef.tsx"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,2BAA2B;AAQzD,OAAO,MAAMC,qBAAqB,GAChC,+QAA+Q;AAEjR,OAAO,SAASC,4BAA4BA,CAAA,EAEM;EAChD,MAAMC,OAAO,GAAG,CACd,GAAGC,MAAM,CAACC,IAAI,CAACL,aAAa,CAAC,EAC7B,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,WAAW,EACX,WAAW,EACX,cAAc,EACd,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,mBAAmB,CACX;EAEV,MAAMM,SAAuD,GAAG,CAAC,CAAC;EAElE,MAAMC,cAAc,GAAG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B,IAAI,CAACf,QAAQ,CAAC;gBAE/B,OAAO,MAAMF,cAAc,CAACC,KAAK,EAAEC,QAAQ,CAAC;cAC9C;YACA,KAAK,gBAAgB;cAAE;gBACrB,MAAM,CAACD,KAAK,EAAEC,QAAQ,CAAC,GAAGc,IAAI;gBAE9BhB,cAAc,CAACC,KAAK,EAAEC,QAAQ,CAAC;gBAC/B;cACF;YACA;cACEgB,OAAO,CAACC,KAAK,CAACzB,qBAAqB,CAAC;UACxC;QACF,CAAC,MAAM;UACL;UACA,OAAOW,OAAO,CAACU,IAAI,CAAC,CAAC,GAAGC,IAAI,CAAC;QAC/B;MACF,CAAC;MACD,OAAOF,GAAG;IACZ,CAAC,EAAE,CAAC,CAAC;EACP,CAAC;EAED,OAAOR,GAAG;AACZ","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Group } from "./Group.js";
|
|
4
|
+
import { Screen } from "./Screen.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Higher order component to create a `Navigator` and `Screen` pair.
|
|
8
|
+
* Custom navigators should wrap the navigator component in `createNavigator` before exporting.
|
|
9
|
+
*
|
|
10
|
+
* @param Navigator The navigator component to wrap.
|
|
11
|
+
* @returns Factory method to create a `Navigator` and `Screen` pair.
|
|
12
|
+
*/
|
|
13
|
+
export function createNavigatorFactory(Navigator) {
|
|
14
|
+
function createNavigator(config) {
|
|
15
|
+
if (config != null) {
|
|
16
|
+
return {
|
|
17
|
+
Navigator,
|
|
18
|
+
Screen,
|
|
19
|
+
Group,
|
|
20
|
+
config
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
Navigator,
|
|
25
|
+
Screen,
|
|
26
|
+
Group
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return createNavigator;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=createNavigatorFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Group","Screen","createNavigatorFactory","Navigator","createNavigator","config"],"sourceRoot":"../../src","sources":["createNavigatorFactory.tsx"],"mappings":";;AAEA,SAASA,KAAK,QAAQ,YAAS;AAC/B,SAASC,MAAM,QAAQ,aAAU;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAACC,SAAmC,EAAE;EAC1E,SAASC,eAAeA,CAACC,MAAY,EAAO;IAC1C,IAAIA,MAAM,IAAI,IAAI,EAAE;MAClB,OAAO;QACLF,SAAS;QACTF,MAAM;QACND,KAAK;QACLK;MACF,CAAC;IACH;IAEA,OAAO;MACLF,SAAS;MACTF,MAAM;MACND;IACF,CAAC;EACH;EAEA,OAAOI,eAAe;AACxB","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export const isPlainObject = value => {
|
|
4
|
+
if (typeof value === 'object' && value !== null) {
|
|
5
|
+
return Object.getPrototypeOf(value) === Object.prototype;
|
|
6
|
+
}
|
|
7
|
+
return false;
|
|
8
|
+
};
|
|
9
|
+
export const deepFreeze = object => {
|
|
10
|
+
// We only freeze in development to catch issues early
|
|
11
|
+
// Don't freeze in production to avoid unnecessary performance overhead
|
|
12
|
+
if (process.env.NODE_ENV === 'production') {
|
|
13
|
+
return object;
|
|
14
|
+
}
|
|
15
|
+
if (Object.isFrozen(object)) {
|
|
16
|
+
return object;
|
|
17
|
+
}
|
|
18
|
+
if (!isPlainObject(object) && !Array.isArray(object)) {
|
|
19
|
+
return object;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Freeze properties before freezing self
|
|
23
|
+
for (const key in object) {
|
|
24
|
+
if (Object.getOwnPropertyDescriptor(object, key)?.configurable) {
|
|
25
|
+
const value = object[key];
|
|
26
|
+
deepFreeze(value);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return Object.freeze(object);
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=deepFreeze.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isPlainObject","value","Object","getPrototypeOf","prototype","deepFreeze","object","process","env","NODE_ENV","isFrozen","Array","isArray","key","getOwnPropertyDescriptor","configurable","freeze"],"sourceRoot":"../../src","sources":["deepFreeze.tsx"],"mappings":";;AAAA,OAAO,MAAMA,aAAa,GAAIC,KAAc,IAAsB;EAChE,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,EAAE;IAC/C,OAAOC,MAAM,CAACC,cAAc,CAACF,KAAK,CAAC,KAAKC,MAAM,CAACE,SAAS;EAC1D;EAEA,OAAO,KAAK;AACd,CAAC;AAED,OAAO,MAAMC,UAAU,GAAQC,MAAS,IAAkB;EACxD;EACA;EACA,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC,OAAOH,MAAM;EACf;EAEA,IAAIJ,MAAM,CAACQ,QAAQ,CAACJ,MAAM,CAAC,EAAE;IAC3B,OAAOA,MAAM;EACf;EAEA,IAAI,CAACN,aAAa,CAACM,MAAM,CAAC,IAAI,CAACK,KAAK,CAACC,OAAO,CAACN,MAAM,CAAC,EAAE;IACpD,OAAOA,MAAM;EACf;;EAEA;EACA,KAAK,MAAMO,GAAG,IAAIP,MAAM,EAAE;IACxB,IAAIJ,MAAM,CAACY,wBAAwB,CAACR,MAAM,EAAEO,GAAG,CAAC,EAAEE,YAAY,EAAE;MAC9D,MAAMd,KAAK,GAAGK,MAAM,CAACO,GAAG,CAAC;MAEzBR,UAAU,CAACJ,KAAK,CAAC;IACnB;EACF;EAEA,OAAOC,MAAM,CAACc,MAAM,CAACV,MAAM,CAAC;AAC9B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export function findFocusedRoute(state) {
|
|
4
|
+
let current = state;
|
|
5
|
+
while (current?.routes[current.index ?? 0].state != null) {
|
|
6
|
+
current = current.routes[current.index ?? 0].state;
|
|
7
|
+
}
|
|
8
|
+
const route = current?.routes[current?.index ?? 0];
|
|
9
|
+
return route;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=findFocusedRoute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["findFocusedRoute","state","current","routes","index","route"],"sourceRoot":"../../src","sources":["findFocusedRoute.tsx"],"mappings":";;AAEA,OAAO,SAASA,gBAAgBA,CAACC,KAAmB,EAAE;EACpD,IAAIC,OAAiC,GAAGD,KAAK;EAE7C,OAAOC,OAAO,EAAEC,MAAM,CAACD,OAAO,CAACE,KAAK,IAAI,CAAC,CAAC,CAACH,KAAK,IAAI,IAAI,EAAE;IACxDC,OAAO,GAAGA,OAAO,CAACC,MAAM,CAACD,OAAO,CAACE,KAAK,IAAI,CAAC,CAAC,CAACH,KAAK;EACpD;EAEA,MAAMI,KAAK,GAAGH,OAAO,EAAEC,MAAM,CAACD,OAAO,EAAEE,KAAK,IAAI,CAAC,CAAC;EAElD,OAAOC,KAAK;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export function getActionFromState(state, options) {
|
|
4
|
+
// Create a normalized configs object which will be easier to use
|
|
5
|
+
const normalizedConfig = options ? createNormalizedConfigItem(options) : {};
|
|
6
|
+
const routes = state.index != null ? state.routes.slice(0, state.index + 1) : state.routes;
|
|
7
|
+
if (routes.length === 0) {
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
if (!(routes.length === 1 && routes[0].key === undefined || routes.length === 2 && routes[0].key === undefined && routes[0].name === normalizedConfig?.initialRouteName && routes[1].key === undefined)) {
|
|
11
|
+
return {
|
|
12
|
+
type: 'RESET',
|
|
13
|
+
payload: state
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
const route = state.routes[state.index ?? state.routes.length - 1];
|
|
17
|
+
let current = route?.state;
|
|
18
|
+
let config = normalizedConfig?.screens?.[route?.name];
|
|
19
|
+
let params = {
|
|
20
|
+
...route.params
|
|
21
|
+
};
|
|
22
|
+
const payload = route ? {
|
|
23
|
+
name: route.name,
|
|
24
|
+
path: route.path,
|
|
25
|
+
params
|
|
26
|
+
} : undefined;
|
|
27
|
+
while (current) {
|
|
28
|
+
if (current.routes.length === 0) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
const routes = current.index != null ? current.routes.slice(0, current.index + 1) : current.routes;
|
|
32
|
+
const route = routes[routes.length - 1];
|
|
33
|
+
|
|
34
|
+
// Explicitly set to override existing value when merging params
|
|
35
|
+
Object.assign(params, {
|
|
36
|
+
initial: undefined,
|
|
37
|
+
screen: undefined,
|
|
38
|
+
params: undefined,
|
|
39
|
+
state: undefined
|
|
40
|
+
});
|
|
41
|
+
if (routes.length === 1 && routes[0].key === undefined) {
|
|
42
|
+
params.initial = true;
|
|
43
|
+
params.screen = route.name;
|
|
44
|
+
} else if (routes.length === 2 && routes[0].key === undefined && routes[0].name === config?.initialRouteName && routes[1].key === undefined) {
|
|
45
|
+
params.initial = false;
|
|
46
|
+
params.screen = route.name;
|
|
47
|
+
} else {
|
|
48
|
+
params.state = current;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
if (route.state) {
|
|
52
|
+
params.params = {
|
|
53
|
+
...route.params
|
|
54
|
+
};
|
|
55
|
+
params = params.params;
|
|
56
|
+
} else {
|
|
57
|
+
params.path = route.path;
|
|
58
|
+
params.params = route.params;
|
|
59
|
+
}
|
|
60
|
+
current = route.state;
|
|
61
|
+
config = config?.screens?.[route.name];
|
|
62
|
+
}
|
|
63
|
+
if (!payload) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Try to construct payload for a `NAVIGATE` action from the state
|
|
68
|
+
// This lets us preserve the navigation state and not lose it
|
|
69
|
+
return {
|
|
70
|
+
type: 'NAVIGATE',
|
|
71
|
+
payload
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
const createNormalizedConfigItem = config => typeof config === 'object' && config != null ? {
|
|
75
|
+
initialRouteName: config.initialRouteName,
|
|
76
|
+
screens: config.screens != null ? createNormalizedConfigs(config.screens) : undefined
|
|
77
|
+
} : {};
|
|
78
|
+
const createNormalizedConfigs = options => Object.entries(options).reduce((acc, [k, v]) => {
|
|
79
|
+
acc[k] = createNormalizedConfigItem(v);
|
|
80
|
+
return acc;
|
|
81
|
+
}, {});
|
|
82
|
+
//# sourceMappingURL=getActionFromState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getActionFromState","state","options","normalizedConfig","createNormalizedConfigItem","routes","index","slice","length","undefined","key","name","initialRouteName","type","payload","route","current","config","screens","params","path","Object","assign","initial","screen","createNormalizedConfigs","entries","reduce","acc","k","v"],"sourceRoot":"../../src","sources":["getActionFromState.tsx"],"mappings":";;AA8BA,OAAO,SAASA,kBAAkBA,CAChCC,KAAoC,EACpCC,OAAiB,EACmD;EACpE;EACA,MAAMC,gBAAgB,GAAGD,OAAO,GAC5BE,0BAA0B,CAACF,OAAsC,CAAC,GAClE,CAAC,CAAC;EAEN,MAAMG,MAAM,GACVJ,KAAK,CAACK,KAAK,IAAI,IAAI,GAAGL,KAAK,CAACI,MAAM,CAACE,KAAK,CAAC,CAAC,EAAEN,KAAK,CAACK,KAAK,GAAG,CAAC,CAAC,GAAGL,KAAK,CAACI,MAAM;EAE7E,IAAIA,MAAM,CAACG,MAAM,KAAK,CAAC,EAAE;IACvB,OAAOC,SAAS;EAClB;EAEA,IACE,EACGJ,MAAM,CAACG,MAAM,KAAK,CAAC,IAAIH,MAAM,CAAC,CAAC,CAAC,CAACK,GAAG,KAAKD,SAAS,IAClDJ,MAAM,CAACG,MAAM,KAAK,CAAC,IAClBH,MAAM,CAAC,CAAC,CAAC,CAACK,GAAG,KAAKD,SAAS,IAC3BJ,MAAM,CAAC,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D,MAAM,CAACC,OAAO,IAAI,IAAI,GAClBO,uBAAuB,CAACR,MAAM,CAACC,OAAO,CAAC,GACvCT;AACR,CAAC,GACD,CAAC,CAAC;AAER,MAAMgB,uBAAuB,GAAIvB,OAA8B,IAC7DmB,MAAM,CAACK,OAAO,CAACxB,OAAO,CAAC,CAACyB,MAAM,CAA6B,CAACC,GAAG,EAAE,CAACC,CAAC,EAAEC,CAAC,CAAC,KAAK;EAC1EF,GAAG,CAACC,CAAC,CAAC,GAAGzB,0BAA0B,CAAC0B,CAAC,CAAC;EACtC,OAAOF,GAAG;AACZ,CAAC,EAAE,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { CHILD_STATE } from "./useRouteCache.js";
|
|
4
|
+
export function getFocusedRouteNameFromRoute(route) {
|
|
5
|
+
// @ts-expect-error: this isn't in type definitions coz we want this private
|
|
6
|
+
const state = route[CHILD_STATE] ?? route.state;
|
|
7
|
+
const params = route.params;
|
|
8
|
+
const routeName = state ?
|
|
9
|
+
// Get the currently active route name in the nested navigator
|
|
10
|
+
state.routes[
|
|
11
|
+
// If we have a partial state without index, for tab/drawer, first screen will be focused one, and last for stack
|
|
12
|
+
// The type property will only exist for rehydrated state and not for state from deep link
|
|
13
|
+
state.index ?? (typeof state.type === 'string' && state.type !== 'stack' ? 0 : state.routes.length - 1)].name :
|
|
14
|
+
// If state doesn't exist, we need to default to `screen` param if available
|
|
15
|
+
typeof params?.screen === 'string' ? params.screen : undefined;
|
|
16
|
+
return routeName;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=getFocusedRouteNameFromRoute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CHILD_STATE","getFocusedRouteNameFromRoute","route","state","params","routeName","routes","index","type","length","name","screen","undefined"],"sourceRoot":"../../src","sources":["getFocusedRouteNameFromRoute.tsx"],"mappings":";;AAEA,SAASA,WAAW,QAAQ,oBAAiB;AAE7C,OAAO,SAASC,4BAA4BA,CAC1CC,KAA6B,EACT;EACpB;EACA,MAAMC,KAAK,GAAGD,KAAK,CAACF,WAAW,CAAC,IAAIE,KAAK,CAACC,KAAK;EAC/C,MAAMC,MAAM,GAAGF,KAAK,CAACE,MAA0C;EAE/D,MAAMC,SAAS,GAAGF,KAAK;EACnB;EACAA,KAAK,CAACG,MAAM;EACV;EACA;EACAH,KAAK,CAACI,KAAK,KACR,OAAOJ,KAAK,CAACK,IAAI,KAAK,QAAQ,IAAIL,KAAK,CAACK,IAAI,KAAK,OAAO,GACrD,CAAC,GACDL,KAAK,CAACG,MAAM,CAACG,MAAM,GAAG,CAAC,CAAC,CAC/B,CAACC,IAAI;EACN;EACA,OAAON,MAAM,EAAEO,MAAM,KAAK,QAAQ,GAChCP,MAAM,CAACO,MAAM,GACbC,SAAS;EAEf,OAAOP,SAAS;AAClB","ignoreList":[]}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as queryString from 'query-string';
|
|
4
|
+
import { validatePathConfig } from "./validatePathConfig.js";
|
|
5
|
+
const getActiveRoute = state => {
|
|
6
|
+
const route = typeof state.index === 'number' ? state.routes[state.index] : state.routes[state.routes.length - 1];
|
|
7
|
+
if (route.state) {
|
|
8
|
+
return getActiveRoute(route.state);
|
|
9
|
+
}
|
|
10
|
+
return route;
|
|
11
|
+
};
|
|
12
|
+
const cachedNormalizedConfigs = new WeakMap();
|
|
13
|
+
const getNormalizedConfigs = options => {
|
|
14
|
+
if (!options?.screens) return {};
|
|
15
|
+
const cached = cachedNormalizedConfigs.get(options?.screens);
|
|
16
|
+
if (cached) return cached;
|
|
17
|
+
const normalizedConfigs = createNormalizedConfigs(options.screens);
|
|
18
|
+
cachedNormalizedConfigs.set(options.screens, normalizedConfigs);
|
|
19
|
+
return normalizedConfigs;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Utility to serialize a navigation state object to a path string.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```js
|
|
27
|
+
* getPathFromState(
|
|
28
|
+
* {
|
|
29
|
+
* routes: [
|
|
30
|
+
* {
|
|
31
|
+
* name: 'Chat',
|
|
32
|
+
* params: { author: 'Jane', id: 42 },
|
|
33
|
+
* },
|
|
34
|
+
* ],
|
|
35
|
+
* },
|
|
36
|
+
* {
|
|
37
|
+
* screens: {
|
|
38
|
+
* Chat: {
|
|
39
|
+
* path: 'chat/:author/:id',
|
|
40
|
+
* stringify: { author: author => author.toLowerCase() }
|
|
41
|
+
* }
|
|
42
|
+
* }
|
|
43
|
+
* }
|
|
44
|
+
* )
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @param state Navigation state to serialize.
|
|
48
|
+
* @param options Extra options to fine-tune how to serialize the path.
|
|
49
|
+
* @returns Path representing the state, e.g. /foo/bar?count=42.
|
|
50
|
+
*/
|
|
51
|
+
export function getPathFromState(state, options) {
|
|
52
|
+
if (state == null) {
|
|
53
|
+
throw Error("Got 'undefined' for the navigation state. You must pass a valid state object.");
|
|
54
|
+
}
|
|
55
|
+
if (options) {
|
|
56
|
+
validatePathConfig(options);
|
|
57
|
+
}
|
|
58
|
+
const configs = getNormalizedConfigs(options);
|
|
59
|
+
let path = '/';
|
|
60
|
+
let current = state;
|
|
61
|
+
const allParams = {};
|
|
62
|
+
while (current) {
|
|
63
|
+
let index = typeof current.index === 'number' ? current.index : 0;
|
|
64
|
+
let route = current.routes[index];
|
|
65
|
+
let pattern;
|
|
66
|
+
let focusedParams;
|
|
67
|
+
const focusedRoute = getActiveRoute(state);
|
|
68
|
+
let currentOptions = configs;
|
|
69
|
+
|
|
70
|
+
// Keep all the route names that appeared during going deeper in config in case the pattern is resolved to undefined
|
|
71
|
+
const nestedRouteNames = [];
|
|
72
|
+
let hasNext = true;
|
|
73
|
+
while (route.name in currentOptions && hasNext) {
|
|
74
|
+
pattern = currentOptions[route.name].pattern;
|
|
75
|
+
nestedRouteNames.push(route.name);
|
|
76
|
+
if (route.params) {
|
|
77
|
+
const stringify = currentOptions[route.name]?.stringify;
|
|
78
|
+
const currentParams = Object.fromEntries(Object.entries(route.params).map(([key, value]) => [key, stringify?.[key] ? stringify[key](value) : String(value)]));
|
|
79
|
+
if (pattern) {
|
|
80
|
+
Object.assign(allParams, currentParams);
|
|
81
|
+
}
|
|
82
|
+
if (focusedRoute === route) {
|
|
83
|
+
// If this is the focused route, keep the params for later use
|
|
84
|
+
// We save it here since it's been stringified already
|
|
85
|
+
focusedParams = {
|
|
86
|
+
...currentParams
|
|
87
|
+
};
|
|
88
|
+
pattern?.split('/').filter(p => p.startsWith(':'))
|
|
89
|
+
// eslint-disable-next-line no-loop-func
|
|
90
|
+
.forEach(p => {
|
|
91
|
+
const name = getParamName(p);
|
|
92
|
+
|
|
93
|
+
// Remove the params present in the pattern since we'll only use the rest for query string
|
|
94
|
+
if (focusedParams) {
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
|
96
|
+
delete focusedParams[name];
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// If there is no `screens` property or no nested state, we return pattern
|
|
103
|
+
if (!currentOptions[route.name].screens || route.state === undefined) {
|
|
104
|
+
hasNext = false;
|
|
105
|
+
} else {
|
|
106
|
+
index = typeof route.state.index === 'number' ? route.state.index : route.state.routes.length - 1;
|
|
107
|
+
const nextRoute = route.state.routes[index];
|
|
108
|
+
const nestedConfig = currentOptions[route.name].screens;
|
|
109
|
+
|
|
110
|
+
// if there is config for next route name, we go deeper
|
|
111
|
+
if (nestedConfig && nextRoute.name in nestedConfig) {
|
|
112
|
+
route = nextRoute;
|
|
113
|
+
currentOptions = nestedConfig;
|
|
114
|
+
} else {
|
|
115
|
+
// If not, there is no sense in going deeper in config
|
|
116
|
+
hasNext = false;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (pattern === undefined) {
|
|
121
|
+
pattern = nestedRouteNames.join('/');
|
|
122
|
+
}
|
|
123
|
+
if (currentOptions[route.name] !== undefined) {
|
|
124
|
+
path += pattern.split('/').map(p => {
|
|
125
|
+
const name = getParamName(p);
|
|
126
|
+
|
|
127
|
+
// We don't know what to show for wildcard patterns
|
|
128
|
+
// Showing the route name seems ok, though whatever we show here will be incorrect
|
|
129
|
+
// Since the page doesn't actually exist
|
|
130
|
+
if (p === '*') {
|
|
131
|
+
return route.name;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// If the path has a pattern for a param, put the param in the path
|
|
135
|
+
if (p.startsWith(':')) {
|
|
136
|
+
const value = allParams[name];
|
|
137
|
+
if (value === undefined && p.endsWith('?')) {
|
|
138
|
+
// Optional params without value assigned in route.params should be ignored
|
|
139
|
+
return '';
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Valid characters according to
|
|
143
|
+
// https://datatracker.ietf.org/doc/html/rfc3986#section-3.3 (see pchar definition)
|
|
144
|
+
return String(value).replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]/g, char => encodeURIComponent(char));
|
|
145
|
+
}
|
|
146
|
+
return encodeURIComponent(p);
|
|
147
|
+
}).join('/');
|
|
148
|
+
} else {
|
|
149
|
+
path += encodeURIComponent(route.name);
|
|
150
|
+
}
|
|
151
|
+
if (!focusedParams) {
|
|
152
|
+
focusedParams = focusedRoute.params;
|
|
153
|
+
}
|
|
154
|
+
if (route.state) {
|
|
155
|
+
path += '/';
|
|
156
|
+
} else if (focusedParams) {
|
|
157
|
+
for (const param in focusedParams) {
|
|
158
|
+
if (focusedParams[param] === 'undefined') {
|
|
159
|
+
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
|
160
|
+
delete focusedParams[param];
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
const query = queryString.stringify(focusedParams, {
|
|
164
|
+
sort: false
|
|
165
|
+
});
|
|
166
|
+
if (query) {
|
|
167
|
+
path += `?${query}`;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
current = route.state;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Remove multiple as well as trailing slashes
|
|
174
|
+
path = path.replace(/\/+/g, '/');
|
|
175
|
+
path = path.length > 1 ? path.replace(/\/$/, '') : path;
|
|
176
|
+
|
|
177
|
+
// Include the root path if specified
|
|
178
|
+
if (options?.path) {
|
|
179
|
+
path = joinPaths(options.path, path);
|
|
180
|
+
}
|
|
181
|
+
return path;
|
|
182
|
+
}
|
|
183
|
+
const getParamName = pattern => pattern.replace(/^:/, '').replace(/\?$/, '');
|
|
184
|
+
const joinPaths = (...paths) => [].concat(...paths.map(p => p.split('/'))).filter(Boolean).join('/');
|
|
185
|
+
const createConfigItem = (config, parentPattern) => {
|
|
186
|
+
if (typeof config === 'string') {
|
|
187
|
+
// If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern
|
|
188
|
+
const pattern = parentPattern ? joinPaths(parentPattern, config) : config;
|
|
189
|
+
return {
|
|
190
|
+
pattern
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
if (config.exact && config.path === undefined) {
|
|
194
|
+
throw new Error("A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.");
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// If an object is specified as the value (e.g. Foo: { ... }),
|
|
198
|
+
// It can have `path` property and `screens` prop which has nested configs
|
|
199
|
+
const pattern = config.exact !== true ? joinPaths(parentPattern || '', config.path || '') : config.path || '';
|
|
200
|
+
const screens = config.screens ? createNormalizedConfigs(config.screens, pattern) : undefined;
|
|
201
|
+
return {
|
|
202
|
+
// Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc.
|
|
203
|
+
pattern: pattern?.split('/').filter(Boolean).join('/'),
|
|
204
|
+
stringify: config.stringify,
|
|
205
|
+
screens
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
const createNormalizedConfigs = (options, pattern) => Object.fromEntries(Object.entries(options).map(([name, c]) => {
|
|
209
|
+
const result = createConfigItem(c, pattern);
|
|
210
|
+
return [name, result];
|
|
211
|
+
}));
|
|
212
|
+
//# sourceMappingURL=getPathFromState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["queryString","validatePathConfig","getActiveRoute","state","route","index","routes","length","cachedNormalizedConfigs","WeakMap","getNormalizedConfigs","options","screens","cached","get","normalizedConfigs","createNormalizedConfigs","set","getPathFromState","Error","configs","path","current","allParams","pattern","focusedParams","focusedRoute","currentOptions","nestedRouteNames","hasNext","name","push","params","stringify","currentParams","Object","fromEntries","entries","map","key","value","String","assign","split","filter","p","startsWith","forEach","getParamName","undefined","nextRoute","nestedConfig","join","endsWith","replace","char","encodeURIComponent","param","query","sort","joinPaths","paths","concat","Boolean","createConfigItem","config","parentPattern","exact","c","result"],"sourceRoot":"../../src","sources":["getPathFromState.tsx"],"mappings":";;AAKA,OAAO,KAAKA,WAAW,MAAM,cAAc;AAG3C,SAASC,kBAAkB,QAAQ,yBAAsB;AAkBzD,MAAMC,cAAc,GAAIC,KAAY,IAAwC;EAC1E,MAAMC,KAAK,GACT,OAAOD,KAAK,CAACE,KAAK,KAAK,QAAQ,GAC3BF,KAAK,CAACG,MAAM,CAACH,KAAK,CAACE,KAAK,CAAC,GACzBF,KAAK,CAACG,MAAM,CAACH,KAAK,CAACG,MAAM,CAACC,MAAM,GAAG,CAAC,CAAC;EAE3C,IAAIH,KAAK,CAACD,KAAK,EAAE;IACf,OAAOD,cAAc,CAACE,KAAK,CAACD,KAAK,CAAC;EACpC;EAEA,OAAOC,KAAK;AACd,CAAC;AAED,MAAMI,uBAAuB,GAAG,IAAIC,OAAO,CAGzC,CAAC;AAEH,MAAMC,oBAAoB,GAAIC,OAAqB,IAAK;EACtD,IAAI,CAACA,OAAO,EAAEC,OAAO,EAAE,OAAO,CAAC,CAAC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