From db2c45d692edabe853b88e8d543b01969298412c Mon Sep 17 00:00:00 2001 From: majean5 Date: Fri, 10 Feb 2023 08:58:33 +0100 Subject: [PATCH] coucou toto petit push cadeau --- iut-expo-starter/components/VilleCompopo.tsx | 8 +- iut-expo-starter/navigation/TabNavigation.tsx | 7 +- iut-expo-starter/node_modules/.bin/nanoid | 1 + .../node_modules/.package-lock.json | 205 +++ .../@react-navigation/bottom-tabs/LICENSE | 21 + .../@react-navigation/bottom-tabs/README.md | 5 + .../bottom-tabs/lib/commonjs/index.js | 49 + .../bottom-tabs/lib/commonjs/index.js.map | 1 + .../navigators/createBottomTabNavigator.js | 86 + .../createBottomTabNavigator.js.map | 1 + .../bottom-tabs/lib/commonjs/types.js | 6 + .../bottom-tabs/lib/commonjs/types.js.map | 1 + .../BottomTabBarHeightCallbackContext.js | 12 + .../BottomTabBarHeightCallbackContext.js.map | 1 + .../utils/BottomTabBarHeightContext.js | 12 + .../utils/BottomTabBarHeightContext.js.map | 1 + .../commonjs/utils/useBottomTabBarHeight.js | 19 + .../utils/useBottomTabBarHeight.js.map | 1 + .../lib/commonjs/utils/useIsKeyboardShown.js | 28 + .../commonjs/utils/useIsKeyboardShown.js.map | 1 + .../bottom-tabs/lib/commonjs/views/Badge.js | 88 + .../lib/commonjs/views/Badge.js.map | 1 + .../lib/commonjs/views/BottomTabBar.js | 310 ++++ .../lib/commonjs/views/BottomTabBar.js.map | 1 + .../lib/commonjs/views/BottomTabItem.js | 183 +++ .../lib/commonjs/views/BottomTabItem.js.map | 1 + .../lib/commonjs/views/BottomTabView.js | 134 ++ .../lib/commonjs/views/BottomTabView.js.map | 1 + .../lib/commonjs/views/ScreenFallback.js | 50 + .../lib/commonjs/views/ScreenFallback.js.map | 1 + .../lib/commonjs/views/TabBarIcon.js | 84 + .../lib/commonjs/views/TabBarIcon.js.map | 1 + .../bottom-tabs/lib/module/index.js | 22 + .../bottom-tabs/lib/module/index.js.map | 1 + .../navigators/createBottomTabNavigator.js | 76 + .../createBottomTabNavigator.js.map | 1 + .../bottom-tabs/lib/module/types.js | 2 + .../bottom-tabs/lib/module/types.js.map | 1 + .../BottomTabBarHeightCallbackContext.js | 3 + .../BottomTabBarHeightCallbackContext.js.map | 1 + .../module/utils/BottomTabBarHeightContext.js | 3 + .../utils/BottomTabBarHeightContext.js.map | 1 + .../lib/module/utils/useBottomTabBarHeight.js | 10 + .../module/utils/useBottomTabBarHeight.js.map | 1 + .../lib/module/utils/useIsKeyboardShown.js | 20 + .../module/utils/useIsKeyboardShown.js.map | 1 + .../bottom-tabs/lib/module/views/Badge.js | 79 + .../bottom-tabs/lib/module/views/Badge.js.map | 1 + .../lib/module/views/BottomTabBar.js | 301 ++++ .../lib/module/views/BottomTabBar.js.map | 1 + .../lib/module/views/BottomTabItem.js | 176 ++ .../lib/module/views/BottomTabItem.js.map | 1 + .../lib/module/views/BottomTabView.js | 125 ++ .../lib/module/views/BottomTabView.js.map | 1 + .../lib/module/views/ScreenFallback.js | 40 + .../lib/module/views/ScreenFallback.js.map | 1 + .../lib/module/views/TabBarIcon.js | 77 + .../lib/module/views/TabBarIcon.js.map | 1 + .../bottom-tabs/lib/typescript/src/index.d.ts | 20 + .../lib/typescript/src/index.d.ts.map | 1 + .../navigators/createBottomTabNavigator.d.ts | 8 + .../createBottomTabNavigator.d.ts.map | 1 + .../bottom-tabs/lib/typescript/src/types.d.ts | 242 +++ .../lib/typescript/src/types.d.ts.map | 1 + .../BottomTabBarHeightCallbackContext.d.ts | 4 + ...BottomTabBarHeightCallbackContext.d.ts.map | 1 + .../src/utils/BottomTabBarHeightContext.d.ts | 4 + .../utils/BottomTabBarHeightContext.d.ts.map | 1 + .../src/utils/useBottomTabBarHeight.d.ts | 2 + .../src/utils/useBottomTabBarHeight.d.ts.map | 1 + .../src/utils/useIsKeyboardShown.d.ts | 2 + .../src/utils/useIsKeyboardShown.d.ts.map | 1 + .../lib/typescript/src/views/Badge.d.ts | 23 + .../lib/typescript/src/views/Badge.d.ts.map | 1 + .../typescript/src/views/BottomTabBar.d.ts | 27 + .../src/views/BottomTabBar.d.ts.map | 1 + .../typescript/src/views/BottomTabItem.d.ts | 111 ++ .../src/views/BottomTabItem.d.ts.map | 1 + .../typescript/src/views/BottomTabView.d.ts | 11 + .../src/views/BottomTabView.d.ts.map | 1 + .../typescript/src/views/ScreenFallback.d.ts | 17 + .../src/views/ScreenFallback.d.ts.map | 1 + .../lib/typescript/src/views/TabBarIcon.d.ts | 22 + .../typescript/src/views/TabBarIcon.d.ts.map | 1 + .../node_modules/color-convert/CHANGELOG.md | 54 + .../node_modules/color-convert/LICENSE | 21 + .../node_modules/color-convert/README.md | 68 + .../node_modules/color-convert/conversions.js | 839 ++++++++++ .../node_modules/color-convert/index.js | 81 + .../node_modules/color-convert/package.json | 48 + .../node_modules/color-convert/route.js | 97 ++ .../bottom-tabs/node_modules/color/LICENSE | 21 + .../bottom-tabs/node_modules/color/README.md | 123 ++ .../bottom-tabs/node_modules/color/index.js | 496 ++++++ .../node_modules/color/package.json | 47 + .../bottom-tabs/package.json | 79 + .../bottom-tabs/src/index.tsx | 30 + .../navigators/createBottomTabNavigator.tsx | 134 ++ .../bottom-tabs/src/types.tsx | 329 ++++ .../BottomTabBarHeightCallbackContext.tsx | 5 + .../src/utils/BottomTabBarHeightContext.tsx | 3 + .../src/utils/useBottomTabBarHeight.tsx | 15 + .../src/utils/useIsKeyboardShown.tsx | 31 + .../bottom-tabs/src/views/Badge.tsx | 110 ++ .../bottom-tabs/src/views/BottomTabBar.tsx | 392 +++++ .../bottom-tabs/src/views/BottomTabItem.tsx | 333 ++++ .../bottom-tabs/src/views/BottomTabView.tsx | 170 ++ .../bottom-tabs/src/views/ScreenFallback.tsx | 50 + .../bottom-tabs/src/views/TabBarIcon.tsx | 110 ++ .../@react-navigation/core/LICENSE | 21 + .../@react-navigation/core/README.md | 44 + .../lib/commonjs/BaseNavigationContainer.js | 345 ++++ .../commonjs/BaseNavigationContainer.js.map | 1 + .../core/lib/commonjs/CurrentRenderContext.js | 17 + .../lib/commonjs/CurrentRenderContext.js.map | 1 + .../lib/commonjs/EnsureSingleNavigator.js | 43 + .../lib/commonjs/EnsureSingleNavigator.js.map | 1 + .../core/lib/commonjs/Group.js | 14 + .../core/lib/commonjs/Group.js.map | 1 + .../lib/commonjs/NavigationBuilderContext.js | 19 + .../commonjs/NavigationBuilderContext.js.map | 1 + .../commonjs/NavigationContainerRefContext.js | 16 + .../NavigationContainerRefContext.js.map | 1 + .../core/lib/commonjs/NavigationContext.js | 16 + .../lib/commonjs/NavigationContext.js.map | 1 + .../lib/commonjs/NavigationHelpersContext.js | 17 + .../commonjs/NavigationHelpersContext.js.map | 1 + .../lib/commonjs/NavigationRouteContext.js | 16 + .../commonjs/NavigationRouteContext.js.map | 1 + .../lib/commonjs/NavigationStateContext.js | 30 + .../commonjs/NavigationStateContext.js.map | 1 + .../core/lib/commonjs/PreventRemoveContext.js | 13 + .../lib/commonjs/PreventRemoveContext.js.map | 1 + .../lib/commonjs/PreventRemoveProvider.js | 96 ++ .../lib/commonjs/PreventRemoveProvider.js.map | 1 + .../core/lib/commonjs/SceneView.js | 93 ++ .../core/lib/commonjs/SceneView.js.map | 1 + .../core/lib/commonjs/Screen.js | 14 + .../core/lib/commonjs/Screen.js.map | 1 + .../core/lib/commonjs/StaticContainer.js | 33 + .../core/lib/commonjs/StaticContainer.js.map | 1 + .../lib/commonjs/UnhandledActionContext.js | 13 + .../commonjs/UnhandledActionContext.js.map | 1 + .../lib/commonjs/checkDuplicateRouteNames.js | 26 + .../commonjs/checkDuplicateRouteNames.js.map | 1 + .../core/lib/commonjs/checkSerializable.js | 50 + .../lib/commonjs/checkSerializable.js.map | 1 + .../commonjs/createNavigationContainerRef.js | 74 + .../createNavigationContainerRef.js.map | 1 + .../lib/commonjs/createNavigatorFactory.js | 29 + .../commonjs/createNavigatorFactory.js.map | 1 + .../core/lib/commonjs/findFocusedRoute.js | 17 + .../core/lib/commonjs/findFocusedRoute.js.map | 1 + .../core/lib/commonjs/fromEntries.js | 18 + .../core/lib/commonjs/fromEntries.js.map | 1 + .../core/lib/commonjs/getActionFromState.js | 89 + .../lib/commonjs/getActionFromState.js.map | 1 + .../commonjs/getFocusedRouteNameFromRoute.js | 22 + .../getFocusedRouteNameFromRoute.js.map | 1 + .../core/lib/commonjs/getPathFromState.js | 218 +++ .../core/lib/commonjs/getPathFromState.js.map | 1 + .../core/lib/commonjs/getStateFromPath.js | 403 +++++ .../core/lib/commonjs/getStateFromPath.js.map | 1 + .../core/lib/commonjs/index.js | 233 +++ .../core/lib/commonjs/index.js.map | 1 + .../core/lib/commonjs/isArrayEqual.js | 20 + .../core/lib/commonjs/isArrayEqual.js.map | 1 + .../core/lib/commonjs/isRecordEqual.js | 21 + .../core/lib/commonjs/isRecordEqual.js.map | 1 + .../core/lib/commonjs/types.js | 16 + .../core/lib/commonjs/types.js.map | 1 + .../core/lib/commonjs/useChildListeners.js | 36 + .../lib/commonjs/useChildListeners.js.map | 1 + .../core/lib/commonjs/useComponent.js | 40 + .../core/lib/commonjs/useComponent.js.map | 1 + .../core/lib/commonjs/useCurrentRender.js | 27 + .../core/lib/commonjs/useCurrentRender.js.map | 1 + .../core/lib/commonjs/useDescriptors.js | 132 ++ .../core/lib/commonjs/useDescriptors.js.map | 1 + .../core/lib/commonjs/useEventEmitter.js | 107 ++ .../core/lib/commonjs/useEventEmitter.js.map | 1 + .../core/lib/commonjs/useFocusEffect.js | 79 + .../core/lib/commonjs/useFocusEffect.js.map | 1 + .../core/lib/commonjs/useFocusEvents.js | 72 + .../core/lib/commonjs/useFocusEvents.js.map | 1 + .../useFocusedListenersChildrenAdapter.js | 50 + .../useFocusedListenersChildrenAdapter.js.map | 1 + .../core/lib/commonjs/useIsFocused.js | 39 + .../core/lib/commonjs/useIsFocused.js.map | 1 + .../lib/commonjs/useKeyedChildListeners.js | 33 + .../commonjs/useKeyedChildListeners.js.map | 1 + .../core/lib/commonjs/useNavigation.js | 28 + .../core/lib/commonjs/useNavigation.js.map | 1 + .../core/lib/commonjs/useNavigationBuilder.js | 457 ++++++ .../lib/commonjs/useNavigationBuilder.js.map | 1 + .../core/lib/commonjs/useNavigationCache.js | 126 ++ .../lib/commonjs/useNavigationCache.js.map | 1 + .../lib/commonjs/useNavigationContainerRef.js | 19 + .../commonjs/useNavigationContainerRef.js.map | 1 + .../core/lib/commonjs/useNavigationHelpers.js | 81 + .../lib/commonjs/useNavigationHelpers.js.map | 1 + .../core/lib/commonjs/useNavigationState.js | 37 + .../lib/commonjs/useNavigationState.js.map | 1 + .../core/lib/commonjs/useOnAction.js | 103 ++ .../core/lib/commonjs/useOnAction.js.map | 1 + .../core/lib/commonjs/useOnGetState.js | 51 + .../core/lib/commonjs/useOnGetState.js.map | 1 + .../core/lib/commonjs/useOnPreventRemove.js | 75 + .../lib/commonjs/useOnPreventRemove.js.map | 1 + .../core/lib/commonjs/useOnRouteFocus.js | 38 + .../core/lib/commonjs/useOnRouteFocus.js.map | 1 + .../core/lib/commonjs/useOptionsGetters.js | 81 + .../lib/commonjs/useOptionsGetters.js.map | 1 + .../core/lib/commonjs/usePreventRemove.js | 48 + .../core/lib/commonjs/usePreventRemove.js.map | 1 + .../lib/commonjs/usePreventRemoveContext.js | 19 + .../commonjs/usePreventRemoveContext.js.map | 1 + .../core/lib/commonjs/useRegisterNavigator.js | 32 + .../lib/commonjs/useRegisterNavigator.js.map | 1 + .../core/lib/commonjs/useRoute.js | 24 + .../core/lib/commonjs/useRoute.js.map | 1 + .../core/lib/commonjs/useRouteCache.js | 52 + .../core/lib/commonjs/useRouteCache.js.map | 1 + .../core/lib/commonjs/useScheduleUpdate.js | 37 + .../lib/commonjs/useScheduleUpdate.js.map | 1 + .../core/lib/commonjs/useSyncState.js | 68 + .../core/lib/commonjs/useSyncState.js.map | 1 + .../core/lib/commonjs/validatePathConfig.js | 27 + .../lib/commonjs/validatePathConfig.js.map | 1 + .../lib/module/BaseNavigationContainer.js | 335 ++++ .../lib/module/BaseNavigationContainer.js.map | 1 + .../core/lib/module/CurrentRenderContext.js | 9 + .../lib/module/CurrentRenderContext.js.map | 1 + .../core/lib/module/EnsureSingleNavigator.js | 33 + .../lib/module/EnsureSingleNavigator.js.map | 1 + .../core/lib/module/Group.js | 8 + .../core/lib/module/Group.js.map | 1 + .../lib/module/NavigationBuilderContext.js | 10 + .../module/NavigationBuilderContext.js.map | 1 + .../module/NavigationContainerRefContext.js | 7 + .../NavigationContainerRefContext.js.map | 1 + .../core/lib/module/NavigationContext.js | 7 + .../core/lib/module/NavigationContext.js.map | 1 + .../lib/module/NavigationHelpersContext.js | 8 + .../module/NavigationHelpersContext.js.map | 1 + .../core/lib/module/NavigationRouteContext.js | 8 + .../lib/module/NavigationRouteContext.js.map | 1 + .../core/lib/module/NavigationStateContext.js | 21 + .../lib/module/NavigationStateContext.js.map | 1 + .../core/lib/module/PreventRemoveContext.js | 10 + .../lib/module/PreventRemoveContext.js.map | 1 + .../core/lib/module/PreventRemoveProvider.js | 87 + .../lib/module/PreventRemoveProvider.js.map | 1 + .../core/lib/module/SceneView.js | 84 + .../core/lib/module/SceneView.js.map | 1 + .../core/lib/module/Screen.js | 8 + .../core/lib/module/Screen.js.map | 1 + .../core/lib/module/StaticContainer.js | 25 + .../core/lib/module/StaticContainer.js.map | 1 + .../core/lib/module/UnhandledActionContext.js | 4 + .../lib/module/UnhandledActionContext.js.map | 1 + .../lib/module/checkDuplicateRouteNames.js | 20 + .../module/checkDuplicateRouteNames.js.map | 1 + .../core/lib/module/checkSerializable.js | 44 + .../core/lib/module/checkSerializable.js.map | 1 + .../module/createNavigationContainerRef.js | 66 + .../createNavigationContainerRef.js.map | 1 + .../core/lib/module/createNavigatorFactory.js | 22 + .../lib/module/createNavigatorFactory.js.map | 1 + .../core/lib/module/findFocusedRoute.js | 11 + .../core/lib/module/findFocusedRoute.js.map | 1 + .../core/lib/module/fromEntries.js | 12 + .../core/lib/module/fromEntries.js.map | 1 + .../core/lib/module/getActionFromState.js | 83 + .../core/lib/module/getActionFromState.js.map | 1 + .../module/getFocusedRouteNameFromRoute.js | 16 + .../getFocusedRouteNameFromRoute.js.map | 1 + .../core/lib/module/getPathFromState.js | 209 +++ .../core/lib/module/getPathFromState.js.map | 1 + .../core/lib/module/getStateFromPath.js | 394 +++++ .../core/lib/module/getStateFromPath.js.map | 1 + .../core/lib/module/index.js | 28 + .../core/lib/module/index.js.map | 1 + .../core/lib/module/isArrayEqual.js | 14 + .../core/lib/module/isArrayEqual.js.map | 1 + .../core/lib/module/isRecordEqual.js | 15 + .../core/lib/module/isRecordEqual.js.map | 1 + .../core/lib/module/types.js | 9 + .../core/lib/module/types.js.map | 1 + .../core/lib/module/useChildListeners.js | 28 + .../core/lib/module/useChildListeners.js.map | 1 + .../core/lib/module/useComponent.js | 32 + .../core/lib/module/useComponent.js.map | 1 + .../core/lib/module/useCurrentRender.js | 18 + .../core/lib/module/useCurrentRender.js.map | 1 + .../core/lib/module/useDescriptors.js | 123 ++ .../core/lib/module/useDescriptors.js.map | 1 + .../core/lib/module/useEventEmitter.js | 99 ++ .../core/lib/module/useEventEmitter.js.map | 1 + .../core/lib/module/useFocusEffect.js | 70 + .../core/lib/module/useFocusEffect.js.map | 1 + .../core/lib/module/useFocusEvents.js | 63 + .../core/lib/module/useFocusEvents.js.map | 1 + .../useFocusedListenersChildrenAdapter.js | 41 + .../useFocusedListenersChildrenAdapter.js.map | 1 + .../core/lib/module/useIsFocused.js | 32 + .../core/lib/module/useIsFocused.js.map | 1 + .../core/lib/module/useKeyedChildListeners.js | 25 + .../lib/module/useKeyedChildListeners.js.map | 1 + .../core/lib/module/useNavigation.js | 19 + .../core/lib/module/useNavigation.js.map | 1 + .../core/lib/module/useNavigationBuilder.js | 449 ++++++ .../lib/module/useNavigationBuilder.js.map | 1 + .../core/lib/module/useNavigationCache.js | 117 ++ .../core/lib/module/useNavigationCache.js.map | 1 + .../lib/module/useNavigationContainerRef.js | 10 + .../module/useNavigationContainerRef.js.map | 1 + .../core/lib/module/useNavigationHelpers.js | 72 + .../lib/module/useNavigationHelpers.js.map | 1 + .../core/lib/module/useNavigationState.js | 28 + .../core/lib/module/useNavigationState.js.map | 1 + .../core/lib/module/useOnAction.js | 94 ++ .../core/lib/module/useOnAction.js.map | 1 + .../core/lib/module/useOnGetState.js | 42 + .../core/lib/module/useOnGetState.js.map | 1 + .../core/lib/module/useOnPreventRemove.js | 64 + .../core/lib/module/useOnPreventRemove.js.map | 1 + .../core/lib/module/useOnRouteFocus.js | 29 + .../core/lib/module/useOnRouteFocus.js.map | 1 + .../core/lib/module/useOptionsGetters.js | 72 + .../core/lib/module/useOptionsGetters.js.map | 1 + .../core/lib/module/usePreventRemove.js | 40 + .../core/lib/module/usePreventRemove.js.map | 1 + .../lib/module/usePreventRemoveContext.js | 10 + .../lib/module/usePreventRemoveContext.js.map | 1 + .../core/lib/module/useRegisterNavigator.js | 25 + .../lib/module/useRegisterNavigator.js.map | 1 + .../core/lib/module/useRoute.js | 15 + .../core/lib/module/useRoute.js.map | 1 + .../core/lib/module/useRouteCache.js | 42 + .../core/lib/module/useRouteCache.js.map | 1 + .../core/lib/module/useScheduleUpdate.js | 27 + .../core/lib/module/useScheduleUpdate.js.map | 1 + .../core/lib/module/useSyncState.js | 60 + .../core/lib/module/useSyncState.js.map | 1 + .../core/lib/module/validatePathConfig.js | 21 + .../core/lib/module/validatePathConfig.js.map | 1 + .../src/BaseNavigationContainer.d.ts | 15 + .../src/BaseNavigationContainer.d.ts.map | 1 + .../typescript/src/CurrentRenderContext.d.ts | 10 + .../src/CurrentRenderContext.d.ts.map | 1 + .../typescript/src/EnsureSingleNavigator.d.ts | 14 + .../src/EnsureSingleNavigator.d.ts.map | 1 + .../core/lib/typescript/src/Group.d.ts | 7 + .../core/lib/typescript/src/Group.d.ts.map | 1 + .../src/NavigationBuilderContext.d.ts | 35 + .../src/NavigationBuilderContext.d.ts.map | 1 + .../src/NavigationContainerRefContext.d.ts | 9 + .../NavigationContainerRefContext.d.ts.map | 1 + .../lib/typescript/src/NavigationContext.d.ts | 25 + .../typescript/src/NavigationContext.d.ts.map | 1 + .../src/NavigationHelpersContext.d.ts | 10 + .../src/NavigationHelpersContext.d.ts.map | 1 + .../src/NavigationRouteContext.d.ts | 8 + .../src/NavigationRouteContext.d.ts.map | 1 + .../src/NavigationStateContext.d.ts | 46 + .../src/NavigationStateContext.d.ts.map | 1 + .../typescript/src/PreventRemoveContext.d.ts | 14 + .../src/PreventRemoveContext.d.ts.map | 1 + .../typescript/src/PreventRemoveProvider.d.ts | 10 + .../src/PreventRemoveProvider.d.ts.map | 1 + .../core/lib/typescript/src/SceneView.d.ts | 22 + .../lib/typescript/src/SceneView.d.ts.map | 1 + .../core/lib/typescript/src/Screen.d.ts | 7 + .../core/lib/typescript/src/Screen.d.ts.map | 1 + .../lib/typescript/src/StaticContainer.d.ts | 8 + .../typescript/src/StaticContainer.d.ts.map | 1 + .../src/UnhandledActionContext.d.ts | 5 + .../src/UnhandledActionContext.d.ts.map | 1 + .../src/checkDuplicateRouteNames.d.ts | 3 + .../src/checkDuplicateRouteNames.d.ts.map | 1 + .../lib/typescript/src/checkSerializable.d.ts | 10 + .../typescript/src/checkSerializable.d.ts.map | 1 + .../src/createNavigationContainerRef.d.ts | 4 + .../src/createNavigationContainerRef.d.ts.map | 1 + .../src/createNavigatorFactory.d.ts | 12 + .../src/createNavigatorFactory.d.ts.map | 1 + .../lib/typescript/src/findFocusedRoute.d.ts | 23 + .../typescript/src/findFocusedRoute.d.ts.map | 1 + .../core/lib/typescript/src/fromEntries.d.ts | 2 + .../lib/typescript/src/fromEntries.d.ts.map | 1 + .../typescript/src/getActionFromState.d.ts | 17 + .../src/getActionFromState.d.ts.map | 1 + .../src/getFocusedRouteNameFromRoute.d.ts | 3 + .../src/getFocusedRouteNameFromRoute.d.ts.map | 1 + .../lib/typescript/src/getPathFromState.d.ts | 39 + .../typescript/src/getPathFromState.d.ts.map | 1 + .../lib/typescript/src/getStateFromPath.d.ts | 33 + .../typescript/src/getStateFromPath.d.ts.map | 1 + .../core/lib/typescript/src/index.d.ts | 28 + .../core/lib/typescript/src/index.d.ts.map | 1 + .../core/lib/typescript/src/isArrayEqual.d.ts | 6 + .../lib/typescript/src/isArrayEqual.d.ts.map | 1 + .../lib/typescript/src/isRecordEqual.d.ts | 5 + .../lib/typescript/src/isRecordEqual.d.ts.map | 1 + .../core/lib/typescript/src/types.d.ts | 513 ++++++ .../core/lib/typescript/src/types.d.ts.map | 1 + .../lib/typescript/src/useChildListeners.d.ts | 12 + .../typescript/src/useChildListeners.d.ts.map | 1 + .../core/lib/typescript/src/useComponent.d.ts | 7 + .../lib/typescript/src/useComponent.d.ts.map | 1 + .../lib/typescript/src/useCurrentRender.d.ts | 14 + .../typescript/src/useCurrentRender.d.ts.map | 1 + .../lib/typescript/src/useDescriptors.d.ts | 93 ++ .../typescript/src/useDescriptors.d.ts.map | 1 + .../lib/typescript/src/useEventEmitter.d.ts | 9 + .../typescript/src/useEventEmitter.d.ts.map | 1 + .../lib/typescript/src/useFocusEffect.d.ts | 11 + .../typescript/src/useFocusEffect.d.ts.map | 1 + .../lib/typescript/src/useFocusEvents.d.ts | 13 + .../typescript/src/useFocusEvents.d.ts.map | 1 + .../useFocusedListenersChildrenAdapter.d.ts | 13 + ...seFocusedListenersChildrenAdapter.d.ts.map | 1 + .../core/lib/typescript/src/useIsFocused.d.ts | 6 + .../lib/typescript/src/useIsFocused.d.ts.map | 1 + .../src/useKeyedChildListeners.d.ts | 12 + .../src/useKeyedChildListeners.d.ts.map | 1 + .../lib/typescript/src/useNavigation.d.ts | 8 + .../lib/typescript/src/useNavigation.d.ts.map | 1 + .../typescript/src/useNavigationBuilder.d.ts | 177 ++ .../src/useNavigationBuilder.d.ts.map | 1 + .../typescript/src/useNavigationCache.d.ts | 20 + .../src/useNavigationCache.d.ts.map | 1 + .../src/useNavigationContainerRef.d.ts | 3 + .../src/useNavigationContainerRef.d.ts.map | 1 + .../typescript/src/useNavigationHelpers.d.ts | 113 ++ .../src/useNavigationHelpers.d.ts.map | 1 + .../typescript/src/useNavigationState.d.ts | 10 + .../src/useNavigationState.d.ts.map | 1 + .../core/lib/typescript/src/useOnAction.d.ts | 26 + .../lib/typescript/src/useOnAction.d.ts.map | 1 + .../lib/typescript/src/useOnGetState.d.ts | 9 + .../lib/typescript/src/useOnGetState.d.ts.map | 1 + .../typescript/src/useOnPreventRemove.d.ts | 17 + .../src/useOnPreventRemove.d.ts.map | 1 + .../lib/typescript/src/useOnRouteFocus.d.ts | 15 + .../typescript/src/useOnRouteFocus.d.ts.map | 1 + .../lib/typescript/src/useOptionsGetters.d.ts | 13 + .../typescript/src/useOptionsGetters.d.ts.map | 1 + .../lib/typescript/src/usePreventRemove.d.ts | 13 + .../typescript/src/usePreventRemove.d.ts.map | 1 + .../src/usePreventRemoveContext.d.ts | 5 + .../src/usePreventRemoveContext.d.ts.map | 1 + .../typescript/src/useRegisterNavigator.d.ts | 6 + .../src/useRegisterNavigator.d.ts.map | 1 + .../core/lib/typescript/src/useRoute.d.ts | 9 + .../core/lib/typescript/src/useRoute.d.ts.map | 1 + .../lib/typescript/src/useRouteCache.d.ts | 14 + .../lib/typescript/src/useRouteCache.d.ts.map | 1 + .../lib/typescript/src/useScheduleUpdate.d.ts | 14 + .../typescript/src/useScheduleUpdate.d.ts.map | 1 + .../core/lib/typescript/src/useSyncState.d.ts | 5 + .../lib/typescript/src/useSyncState.d.ts.map | 1 + .../typescript/src/validatePathConfig.d.ts | 2 + .../src/validatePathConfig.d.ts.map | 1 + .../escape-string-regexp/index.d.ts | 18 + .../escape-string-regexp/index.js | 13 + .../node_modules/escape-string-regexp/license | 9 + .../escape-string-regexp/package.json | 38 + .../escape-string-regexp/readme.md | 34 + .../core/node_modules/react-is/LICENSE | 21 + .../core/node_modules/react-is/README.md | 104 ++ .../node_modules/react-is/build-info.json | 8 + .../react-is/cjs/react-is.development.js | 181 +++ .../react-is/cjs/react-is.production.min.js | 15 + .../core/node_modules/react-is/index.js | 7 + .../core/node_modules/react-is/package.json | 27 + .../react-is/umd/react-is.development.js | 181 +++ .../react-is/umd/react-is.production.min.js | 13 + .../@react-navigation/core/package.json | 74 + .../core/src/BaseNavigationContainer.tsx | 453 ++++++ .../core/src/CurrentRenderContext.tsx | 11 + .../core/src/EnsureSingleNavigator.tsx | 52 + .../@react-navigation/core/src/Group.tsx | 14 + .../core/src/NavigationBuilderContext.tsx | 70 + .../src/NavigationContainerRefContext.tsx | 13 + .../core/src/NavigationContext.tsx | 13 + .../core/src/NavigationHelpersContext.tsx | 14 + .../core/src/NavigationRouteContext.tsx | 11 + .../core/src/NavigationStateContext.tsx | 39 + .../core/src/PreventRemoveContext.tsx | 21 + .../core/src/PreventRemoveProvider.tsx | 126 ++ .../@react-navigation/core/src/SceneView.tsx | 140 ++ .../@react-navigation/core/src/Screen.tsx | 17 + .../core/src/StaticContainer.tsx | 29 + .../core/src/UnhandledActionContext.tsx | 8 + .../core/src/checkDuplicateRouteNames.tsx | 33 + .../core/src/checkSerializable.tsx | 74 + .../core/src/createNavigationContainerRef.tsx | 99 ++ .../core/src/createNavigatorFactory.tsx | 40 + .../core/src/findFocusedRoute.tsx | 13 + .../core/src/fromEntries.tsx | 13 + .../core/src/getActionFromState.tsx | 154 ++ .../core/src/getFocusedRouteNameFromRoute.tsx | 28 + .../core/src/getPathFromState.tsx | 297 ++++ .../core/src/getStateFromPath.tsx | 578 +++++++ .../@react-navigation/core/src/index.tsx | 27 + .../core/src/isArrayEqual.tsx | 15 + .../core/src/isRecordEqual.tsx | 20 + .../@react-navigation/core/src/types.tsx | 708 ++++++++ .../core/src/useChildListeners.tsx | 37 + .../core/src/useComponent.tsx | 37 + .../core/src/useCurrentRender.tsx | 35 + .../core/src/useDescriptors.tsx | 237 +++ .../core/src/useEventEmitter.tsx | 141 ++ .../core/src/useFocusEffect.tsx | 112 ++ .../core/src/useFocusEvents.tsx | 73 + .../useFocusedListenersChildrenAdapter.tsx | 47 + .../core/src/useIsFocused.tsx | 43 + .../core/src/useKeyedChildListeners.tsx | 42 + .../core/src/useNavigation.tsx | 26 + .../core/src/useNavigationBuilder.tsx | 723 +++++++++ .../core/src/useNavigationCache.tsx | 175 ++ .../core/src/useNavigationContainerRef.tsx | 17 + .../core/src/useNavigationHelpers.tsx | 116 ++ .../core/src/useNavigationState.tsx | 41 + .../core/src/useOnAction.tsx | 166 ++ .../core/src/useOnGetState.tsx | 47 + .../core/src/useOnPreventRemove.tsx | 99 ++ .../core/src/useOnRouteFocus.tsx | 47 + .../core/src/useOptionsGetters.tsx | 98 ++ .../core/src/usePreventRemove.tsx | 51 + .../core/src/usePreventRemoveContext.tsx | 15 + .../core/src/useRegisterNavigator.tsx | 29 + .../@react-navigation/core/src/useRoute.tsx | 22 + .../core/src/useRouteCache.tsx | 55 + .../core/src/useScheduleUpdate.tsx | 32 + .../core/src/useSyncState.tsx | 74 + .../core/src/validatePathConfig.tsx | 32 + .../@react-navigation/elements/LICENSE | 21 + .../@react-navigation/elements/README.md | 5 + .../elements/lib/commonjs/Background.js | 28 + .../elements/lib/commonjs/Background.js.map | 1 + .../elements/lib/commonjs/Header/Header.js | 239 +++ .../lib/commonjs/Header/Header.js.map | 1 + .../lib/commonjs/Header/HeaderBackButton.js | 205 +++ .../commonjs/Header/HeaderBackButton.js.map | 1 + .../lib/commonjs/Header/HeaderBackContext.js | 12 + .../commonjs/Header/HeaderBackContext.js.map | 1 + .../lib/commonjs/Header/HeaderBackground.js | 50 + .../commonjs/Header/HeaderBackground.js.map | 1 + .../commonjs/Header/HeaderHeightContext.js | 12 + .../Header/HeaderHeightContext.js.map | 1 + .../lib/commonjs/Header/HeaderShownContext.js | 12 + .../commonjs/Header/HeaderShownContext.js.map | 1 + .../lib/commonjs/Header/HeaderTitle.js | 49 + .../lib/commonjs/Header/HeaderTitle.js.map | 1 + .../commonjs/Header/getDefaultHeaderHeight.js | 36 + .../Header/getDefaultHeaderHeight.js.map | 1 + .../lib/commonjs/Header/getHeaderTitle.js | 10 + .../lib/commonjs/Header/getHeaderTitle.js.map | 1 + .../lib/commonjs/Header/useHeaderHeight.js | 19 + .../commonjs/Header/useHeaderHeight.js.map | 1 + .../lib/commonjs/MaskedView.android.js | 14 + .../lib/commonjs/MaskedView.android.js.map | 1 + .../elements/lib/commonjs/MaskedView.ios.js | 14 + .../lib/commonjs/MaskedView.ios.js.map | 1 + .../elements/lib/commonjs/MaskedView.js | 17 + .../elements/lib/commonjs/MaskedView.js.map | 1 + .../elements/lib/commonjs/MaskedViewNative.js | 34 + .../lib/commonjs/MaskedViewNative.js.map | 1 + .../elements/lib/commonjs/MissingIcon.js | 29 + .../elements/lib/commonjs/MissingIcon.js.map | 1 + .../lib/commonjs/PlatformPressable.js | 65 + .../lib/commonjs/PlatformPressable.js.map | 1 + .../lib/commonjs/ResourceSavingView.js | 60 + .../lib/commonjs/ResourceSavingView.js.map | 1 + .../lib/commonjs/SafeAreaProviderCompat.js | 60 + .../commonjs/SafeAreaProviderCompat.js.map | 1 + .../elements/lib/commonjs/Screen.js | 76 + .../elements/lib/commonjs/Screen.js.map | 1 + .../lib/commonjs/assets/back-icon-mask.png | Bin 0 -> 913 bytes .../lib/commonjs/assets/back-icon.png | Bin 0 -> 207 bytes .../assets/back-icon@1.5x.android.png | Bin 0 -> 134 bytes .../commonjs/assets/back-icon@1.5x.ios.png | Bin 0 -> 373 bytes .../commonjs/assets/back-icon@1x.android.png | Bin 0 -> 100 bytes .../lib/commonjs/assets/back-icon@1x.ios.png | Bin 0 -> 290 bytes .../commonjs/assets/back-icon@2x.android.png | Bin 0 -> 134 bytes .../lib/commonjs/assets/back-icon@2x.ios.png | Bin 0 -> 405 bytes .../commonjs/assets/back-icon@3x.android.png | Bin 0 -> 167 bytes .../lib/commonjs/assets/back-icon@3x.ios.png | Bin 0 -> 761 bytes .../commonjs/assets/back-icon@4x.android.png | Bin 0 -> 207 bytes .../lib/commonjs/assets/back-icon@4x.ios.png | Bin 0 -> 812 bytes .../elements/lib/commonjs/getNamedContext.js | 23 + .../lib/commonjs/getNamedContext.js.map | 1 + .../elements/lib/commonjs/index.js | 157 ++ .../elements/lib/commonjs/index.js.map | 1 + .../elements/lib/commonjs/types.js | 6 + .../elements/lib/commonjs/types.js.map | 1 + .../elements/lib/module/Background.js | 20 + .../elements/lib/module/Background.js.map | 1 + .../elements/lib/module/Header/Header.js | 230 +++ .../elements/lib/module/Header/Header.js.map | 1 + .../lib/module/Header/HeaderBackButton.js | 196 +++ .../lib/module/Header/HeaderBackButton.js.map | 1 + .../lib/module/Header/HeaderBackContext.js | 4 + .../module/Header/HeaderBackContext.js.map | 1 + .../lib/module/Header/HeaderBackground.js | 42 + .../lib/module/Header/HeaderBackground.js.map | 1 + .../lib/module/Header/HeaderHeightContext.js | 4 + .../module/Header/HeaderHeightContext.js.map | 1 + .../lib/module/Header/HeaderShownContext.js | 4 + .../module/Header/HeaderShownContext.js.map | 1 + .../elements/lib/module/Header/HeaderTitle.js | 41 + .../lib/module/Header/HeaderTitle.js.map | 1 + .../module/Header/getDefaultHeaderHeight.js | 30 + .../Header/getDefaultHeaderHeight.js.map | 1 + .../lib/module/Header/getHeaderTitle.js | 4 + .../lib/module/Header/getHeaderTitle.js.map | 1 + .../lib/module/Header/useHeaderHeight.js | 10 + .../lib/module/Header/useHeaderHeight.js.map | 1 + .../elements/lib/module/MaskedView.android.js | 2 + .../lib/module/MaskedView.android.js.map | 1 + .../elements/lib/module/MaskedView.ios.js | 2 + .../elements/lib/module/MaskedView.ios.js.map | 1 + .../elements/lib/module/MaskedView.js | 11 + .../elements/lib/module/MaskedView.js.map | 1 + .../elements/lib/module/MaskedViewNative.js | 25 + .../lib/module/MaskedViewNative.js.map | 1 + .../elements/lib/module/MissingIcon.js | 21 + .../elements/lib/module/MissingIcon.js.map | 1 + .../elements/lib/module/PlatformPressable.js | 57 + .../lib/module/PlatformPressable.js.map | 1 + .../elements/lib/module/ResourceSavingView.js | 52 + .../lib/module/ResourceSavingView.js.map | 1 + .../lib/module/SafeAreaProviderCompat.js | 52 + .../lib/module/SafeAreaProviderCompat.js.map | 1 + .../elements/lib/module/Screen.js | 67 + .../elements/lib/module/Screen.js.map | 1 + .../lib/module/assets/back-icon-mask.png | Bin 0 -> 913 bytes .../elements/lib/module/assets/back-icon.png | Bin 0 -> 207 bytes .../module/assets/back-icon@1.5x.android.png | Bin 0 -> 134 bytes .../lib/module/assets/back-icon@1.5x.ios.png | Bin 0 -> 373 bytes .../module/assets/back-icon@1x.android.png | Bin 0 -> 100 bytes .../lib/module/assets/back-icon@1x.ios.png | Bin 0 -> 290 bytes .../module/assets/back-icon@2x.android.png | Bin 0 -> 134 bytes .../lib/module/assets/back-icon@2x.ios.png | Bin 0 -> 405 bytes .../module/assets/back-icon@3x.android.png | Bin 0 -> 167 bytes .../lib/module/assets/back-icon@3x.ios.png | Bin 0 -> 761 bytes .../module/assets/back-icon@4x.android.png | Bin 0 -> 207 bytes .../lib/module/assets/back-icon@4x.ios.png | Bin 0 -> 812 bytes .../elements/lib/module/getNamedContext.js | 15 + .../lib/module/getNamedContext.js.map | 1 + .../elements/lib/module/index.js | 23 + .../elements/lib/module/index.js.map | 1 + .../elements/lib/module/types.js | 2 + .../elements/lib/module/types.js.map | 1 + .../lib/typescript/src/Background.d.ts | 8 + .../lib/typescript/src/Background.d.ts.map | 1 + .../lib/typescript/src/Header/Header.d.ts | 19 + .../lib/typescript/src/Header/Header.d.ts.map | 1 + .../src/Header/HeaderBackButton.d.ts | 4 + .../src/Header/HeaderBackButton.d.ts.map | 1 + .../src/Header/HeaderBackContext.d.ts | 6 + .../src/Header/HeaderBackContext.d.ts.map | 1 + .../src/Header/HeaderBackground.d.ts | 9 + .../src/Header/HeaderBackground.d.ts.map | 1 + .../src/Header/HeaderHeightContext.d.ts | 4 + .../src/Header/HeaderHeightContext.d.ts.map | 1 + .../src/Header/HeaderShownContext.d.ts | 4 + .../src/Header/HeaderShownContext.d.ts.map | 1 + .../typescript/src/Header/HeaderTitle.d.ts | 9 + .../src/Header/HeaderTitle.d.ts.map | 1 + .../src/Header/getDefaultHeaderHeight.d.ts | 3 + .../Header/getDefaultHeaderHeight.d.ts.map | 1 + .../typescript/src/Header/getHeaderTitle.d.ts | 6 + .../src/Header/getHeaderTitle.d.ts.map | 1 + .../src/Header/useHeaderHeight.d.ts | 2 + .../src/Header/useHeaderHeight.d.ts.map | 1 + .../typescript/src/MaskedView.android.d.ts | 2 + .../src/MaskedView.android.d.ts.map | 1 + .../lib/typescript/src/MaskedView.d.ts | 11 + .../lib/typescript/src/MaskedView.d.ts.map | 1 + .../lib/typescript/src/MaskedView.ios.d.ts | 2 + .../typescript/src/MaskedView.ios.d.ts.map | 1 + .../lib/typescript/src/MaskedViewNative.d.ts | 11 + .../typescript/src/MaskedViewNative.d.ts.map | 1 + .../lib/typescript/src/MissingIcon.d.ts | 10 + .../lib/typescript/src/MissingIcon.d.ts.map | 1 + .../lib/typescript/src/PlatformPressable.d.ts | 13 + .../typescript/src/PlatformPressable.d.ts.map | 1 + .../typescript/src/ResourceSavingView.d.ts | 10 + .../src/ResourceSavingView.d.ts.map | 1 + .../src/SafeAreaProviderCompat.d.ts | 12 + .../src/SafeAreaProviderCompat.d.ts.map | 1 + .../elements/lib/typescript/src/Screen.d.ts | 18 + .../lib/typescript/src/Screen.d.ts.map | 1 + .../lib/typescript/src/getNamedContext.d.ts | 6 + .../typescript/src/getNamedContext.d.ts.map | 1 + .../elements/lib/typescript/src/index.d.ts | 19 + .../lib/typescript/src/index.d.ts.map | 1 + .../elements/lib/typescript/src/types.d.ts | 222 +++ .../lib/typescript/src/types.d.ts.map | 1 + .../@react-navigation/elements/package.json | 72 + .../elements/src/Background.tsx | 18 + .../elements/src/Header/Header.tsx | 316 ++++ .../elements/src/Header/HeaderBackButton.tsx | 241 +++ .../elements/src/Header/HeaderBackContext.tsx | 8 + .../elements/src/Header/HeaderBackground.tsx | 56 + .../src/Header/HeaderHeightContext.tsx | 8 + .../src/Header/HeaderShownContext.tsx | 5 + .../elements/src/Header/HeaderTitle.tsx | 51 + .../src/Header/getDefaultHeaderHeight.tsx | 39 + .../elements/src/Header/getHeaderTitle.tsx | 12 + .../elements/src/Header/useHeaderHeight.tsx | 15 + .../elements/src/MaskedView.android.tsx | 1 + .../elements/src/MaskedView.ios.tsx | 1 + .../elements/src/MaskedView.tsx | 13 + .../elements/src/MaskedViewNative.tsx | 33 + .../elements/src/MissingIcon.tsx | 18 + .../elements/src/PlatformPressable.tsx | 86 + .../elements/src/ResourceSavingView.tsx | 70 + .../elements/src/SafeAreaProviderCompat.tsx | 61 + .../@react-navigation/elements/src/Screen.tsx | 109 ++ .../elements/src/assets/back-icon-mask.png | Bin 0 -> 913 bytes .../elements/src/assets/back-icon.png | Bin 0 -> 207 bytes .../src/assets/back-icon@1.5x.android.png | Bin 0 -> 134 bytes .../src/assets/back-icon@1.5x.ios.png | Bin 0 -> 373 bytes .../src/assets/back-icon@1x.android.png | Bin 0 -> 100 bytes .../elements/src/assets/back-icon@1x.ios.png | Bin 0 -> 290 bytes .../src/assets/back-icon@2x.android.png | Bin 0 -> 134 bytes .../elements/src/assets/back-icon@2x.ios.png | Bin 0 -> 405 bytes .../src/assets/back-icon@3x.android.png | Bin 0 -> 167 bytes .../elements/src/assets/back-icon@3x.ios.png | Bin 0 -> 761 bytes .../src/assets/back-icon@4x.android.png | Bin 0 -> 207 bytes .../elements/src/assets/back-icon@4x.ios.png | Bin 0 -> 812 bytes .../elements/src/getNamedContext.tsx | 28 + .../@react-navigation/elements/src/index.tsx | 25 + .../@react-navigation/elements/src/types.tsx | 228 +++ .../@react-navigation/native/LICENSE | 21 + .../@react-navigation/native/README.md | 5 + .../native/lib/commonjs/Link.js | 51 + .../native/lib/commonjs/Link.js.map | 1 + .../native/lib/commonjs/LinkingContext.js | 16 + .../native/lib/commonjs/LinkingContext.js.map | 1 + .../lib/commonjs/NavigationContainer.js | 111 ++ .../lib/commonjs/NavigationContainer.js.map | 1 + .../native/lib/commonjs/ServerContainer.js | 56 + .../lib/commonjs/ServerContainer.js.map | 1 + .../native/lib/commonjs/ServerContext.js | 13 + .../native/lib/commonjs/ServerContext.js.map | 1 + .../lib/commonjs/createMemoryHistory.js | 223 +++ .../lib/commonjs/createMemoryHistory.js.map | 1 + .../native/lib/commonjs/extractPathFromURL.js | 24 + .../lib/commonjs/extractPathFromURL.js.map | 1 + .../native/lib/commonjs/index.js | 129 ++ .../native/lib/commonjs/index.js.map | 1 + .../native/lib/commonjs/theming/DarkTheme.js | 20 + .../lib/commonjs/theming/DarkTheme.js.map | 1 + .../lib/commonjs/theming/DefaultTheme.js | 20 + .../lib/commonjs/theming/DefaultTheme.js.map | 1 + .../lib/commonjs/theming/ThemeContext.js | 16 + .../lib/commonjs/theming/ThemeContext.js.map | 1 + .../lib/commonjs/theming/ThemeProvider.js | 21 + .../lib/commonjs/theming/ThemeProvider.js.map | 1 + .../native/lib/commonjs/theming/useTheme.js | 16 + .../lib/commonjs/theming/useTheme.js.map | 1 + .../native/lib/commonjs/types.js | 6 + .../native/lib/commonjs/types.js.map | 1 + .../native/lib/commonjs/useBackButton.js | 27 + .../native/lib/commonjs/useBackButton.js.map | 1 + .../native/lib/commonjs/useDocumentTitle.js | 33 + .../lib/commonjs/useDocumentTitle.js.map | 1 + .../lib/commonjs/useDocumentTitle.native.js | 10 + .../commonjs/useDocumentTitle.native.js.map | 1 + .../native/lib/commonjs/useLinkBuilder.js | 63 + .../native/lib/commonjs/useLinkBuilder.js.map | 1 + .../native/lib/commonjs/useLinkProps.js | 98 ++ .../native/lib/commonjs/useLinkProps.js.map | 1 + .../native/lib/commonjs/useLinkTo.js | 45 + .../native/lib/commonjs/useLinkTo.js.map | 1 + .../native/lib/commonjs/useLinking.js | 322 ++++ .../native/lib/commonjs/useLinking.js.map | 1 + .../native/lib/commonjs/useLinking.native.js | 157 ++ .../lib/commonjs/useLinking.native.js.map | 1 + .../native/lib/commonjs/useScrollToTop.js | 95 ++ .../native/lib/commonjs/useScrollToTop.js.map | 1 + .../native/lib/commonjs/useThenable.js | 41 + .../native/lib/commonjs/useThenable.js.map | 1 + .../native/lib/module/Link.js | 42 + .../native/lib/module/Link.js.map | 1 + .../native/lib/module/LinkingContext.js | 7 + .../native/lib/module/LinkingContext.js.map | 1 + .../native/lib/module/NavigationContainer.js | 101 ++ .../lib/module/NavigationContainer.js.map | 1 + .../native/lib/module/ServerContainer.js | 46 + .../native/lib/module/ServerContainer.js.map | 1 + .../native/lib/module/ServerContext.js | 4 + .../native/lib/module/ServerContext.js.map | 1 + .../native/lib/module/createMemoryHistory.js | 217 +++ .../lib/module/createMemoryHistory.js.map | 1 + .../native/lib/module/extractPathFromURL.js | 17 + .../lib/module/extractPathFromURL.js.map | 1 + .../native/lib/module/index.js | 15 + .../native/lib/module/index.js.map | 1 + .../native/lib/module/theming/DarkTheme.js | 13 + .../lib/module/theming/DarkTheme.js.map | 1 + .../native/lib/module/theming/DefaultTheme.js | 13 + .../lib/module/theming/DefaultTheme.js.map | 1 + .../native/lib/module/theming/ThemeContext.js | 6 + .../lib/module/theming/ThemeContext.js.map | 1 + .../lib/module/theming/ThemeProvider.js | 12 + .../lib/module/theming/ThemeProvider.js.map | 1 + .../native/lib/module/theming/useTheme.js | 7 + .../native/lib/module/theming/useTheme.js.map | 1 + .../native/lib/module/types.js | 2 + .../native/lib/module/types.js.map | 1 + .../native/lib/module/useBackButton.js | 19 + .../native/lib/module/useBackButton.js.map | 1 + .../native/lib/module/useDocumentTitle.js | 25 + .../native/lib/module/useDocumentTitle.js.map | 1 + .../lib/module/useDocumentTitle.native.js | 4 + .../lib/module/useDocumentTitle.native.js.map | 1 + .../native/lib/module/useLinkBuilder.js | 54 + .../native/lib/module/useLinkBuilder.js.map | 1 + .../native/lib/module/useLinkProps.js | 89 + .../native/lib/module/useLinkProps.js.map | 1 + .../native/lib/module/useLinkTo.js | 36 + .../native/lib/module/useLinkTo.js.map | 1 + .../native/lib/module/useLinking.js | 313 ++++ .../native/lib/module/useLinking.js.map | 1 + .../native/lib/module/useLinking.native.js | 148 ++ .../lib/module/useLinking.native.js.map | 1 + .../native/lib/module/useScrollToTop.js | 87 + .../native/lib/module/useScrollToTop.js.map | 1 + .../native/lib/module/useThenable.js | 33 + .../native/lib/module/useThenable.js.map | 1 + .../native/lib/typescript/src/Link.d.ts | 23 + .../native/lib/typescript/src/Link.d.ts.map | 1 + .../lib/typescript/src/LinkingContext.d.ts | 8 + .../typescript/src/LinkingContext.d.ts.map | 1 + .../typescript/src/NavigationContainer.d.ts | 26 + .../src/NavigationContainer.d.ts.map | 1 + .../lib/typescript/src/ServerContainer.d.ts | 15 + .../typescript/src/ServerContainer.d.ts.map | 1 + .../lib/typescript/src/ServerContext.d.ts | 10 + .../lib/typescript/src/ServerContext.d.ts.map | 1 + .../lib/typescript/src/__mocks__/window.d.ts | 19 + .../typescript/src/__mocks__/window.d.ts.map | 1 + .../typescript/src/createMemoryHistory.d.ts | 25 + .../src/createMemoryHistory.d.ts.map | 1 + .../typescript/src/extractPathFromURL.d.ts | 2 + .../src/extractPathFromURL.d.ts.map | 1 + .../native/lib/typescript/src/index.d.ts | 15 + .../native/lib/typescript/src/index.d.ts.map | 1 + .../lib/typescript/src/theming/DarkTheme.d.ts | 4 + .../typescript/src/theming/DarkTheme.d.ts.map | 1 + .../typescript/src/theming/DefaultTheme.d.ts | 4 + .../src/theming/DefaultTheme.d.ts.map | 1 + .../typescript/src/theming/ThemeContext.d.ts | 5 + .../src/theming/ThemeContext.d.ts.map | 1 + .../typescript/src/theming/ThemeProvider.d.ts | 9 + .../src/theming/ThemeProvider.d.ts.map | 1 + .../lib/typescript/src/theming/useTheme.d.ts | 2 + .../typescript/src/theming/useTheme.d.ts.map | 1 + .../native/lib/typescript/src/types.d.ts | 127 ++ .../native/lib/typescript/src/types.d.ts.map | 1 + .../lib/typescript/src/useBackButton.d.ts | 4 + .../lib/typescript/src/useBackButton.d.ts.map | 1 + .../lib/typescript/src/useDocumentTitle.d.ts | 8 + .../typescript/src/useDocumentTitle.d.ts.map | 1 + .../src/useDocumentTitle.native.d.ts | 2 + .../src/useDocumentTitle.native.d.ts.map | 1 + .../lib/typescript/src/useLinkBuilder.d.ts | 6 + .../typescript/src/useLinkBuilder.d.ts.map | 1 + .../lib/typescript/src/useLinkProps.d.ts | 21 + .../lib/typescript/src/useLinkProps.d.ts.map | 1 + .../native/lib/typescript/src/useLinkTo.d.ts | 9 + .../lib/typescript/src/useLinkTo.d.ts.map | 1 + .../native/lib/typescript/src/useLinking.d.ts | 51 + .../lib/typescript/src/useLinking.d.ts.map | 1 + .../lib/typescript/src/useLinking.native.d.ts | 51 + .../typescript/src/useLinking.native.d.ts.map | 1 + .../lib/typescript/src/useScrollToTop.d.ts | 26 + .../typescript/src/useScrollToTop.d.ts.map | 1 + .../lib/typescript/src/useThenable.d.ts | 2 + .../lib/typescript/src/useThenable.d.ts.map | 1 + .../escape-string-regexp/index.d.ts | 18 + .../escape-string-regexp/index.js | 13 + .../node_modules/escape-string-regexp/license | 9 + .../escape-string-regexp/package.json | 38 + .../escape-string-regexp/readme.md | 34 + .../@react-navigation/native/package.json | 76 + .../@react-navigation/native/src/Link.tsx | 50 + .../native/src/LinkingContext.tsx | 12 + .../native/src/NavigationContainer.tsx | 152 ++ .../native/src/ServerContainer.tsx | 56 + .../native/src/ServerContext.tsx | 14 + .../native/src/__mocks__/window.tsx | 77 + .../native/src/createMemoryHistory.tsx | 224 +++ .../native/src/extractPathFromURL.tsx | 26 + .../@react-navigation/native/src/index.tsx | 14 + .../native/src/theming/DarkTheme.tsx | 15 + .../native/src/theming/DefaultTheme.tsx | 15 + .../native/src/theming/ThemeContext.tsx | 10 + .../native/src/theming/ThemeProvider.tsx | 15 + .../native/src/theming/useTheme.tsx | 9 + .../@react-navigation/native/src/types.tsx | 145 ++ .../native/src/useBackButton.tsx | 33 + .../native/src/useDocumentTitle.native.tsx | 3 + .../native/src/useDocumentTitle.tsx | 41 + .../native/src/useLinkBuilder.tsx | 82 + .../native/src/useLinkProps.tsx | 126 ++ .../native/src/useLinkTo.tsx | 71 + .../native/src/useLinking.native.tsx | 215 +++ .../native/src/useLinking.tsx | 420 +++++ .../native/src/useScrollToTop.tsx | 115 ++ .../native/src/useThenable.tsx | 41 + .../@react-navigation/routers/LICENSE | 21 + .../@react-navigation/routers/README.md | 17 + .../routers/lib/commonjs/BaseRouter.js | 62 + .../routers/lib/commonjs/BaseRouter.js.map | 1 + .../routers/lib/commonjs/CommonActions.js | 50 + .../routers/lib/commonjs/CommonActions.js.map | 1 + .../routers/lib/commonjs/DrawerRouter.js | 158 ++ .../routers/lib/commonjs/DrawerRouter.js.map | 1 + .../routers/lib/commonjs/StackRouter.js | 315 ++++ .../routers/lib/commonjs/StackRouter.js.map | 1 + .../routers/lib/commonjs/TabRouter.js | 249 +++ .../routers/lib/commonjs/TabRouter.js.map | 1 + .../routers/lib/commonjs/index.js | 80 + .../routers/lib/commonjs/index.js.map | 1 + .../routers/lib/commonjs/types.js | 6 + .../routers/lib/commonjs/types.js.map | 1 + .../routers/lib/module/BaseRouter.js | 55 + .../routers/lib/module/BaseRouter.js.map | 1 + .../routers/lib/module/CommonActions.js | 41 + .../routers/lib/module/CommonActions.js.map | 1 + .../routers/lib/module/DrawerRouter.js | 148 ++ .../routers/lib/module/DrawerRouter.js.map | 1 + .../routers/lib/module/StackRouter.js | 306 ++++ .../routers/lib/module/StackRouter.js.map | 1 + .../routers/lib/module/TabRouter.js | 240 +++ .../routers/lib/module/TabRouter.js.map | 1 + .../routers/lib/module/index.js | 8 + .../routers/lib/module/index.js.map | 1 + .../routers/lib/module/types.js | 2 + .../routers/lib/module/types.js.map | 1 + .../lib/typescript/src/BaseRouter.d.ts | 27 + .../lib/typescript/src/BaseRouter.d.ts.map | 1 + .../lib/typescript/src/CommonActions.d.ts | 56 + .../lib/typescript/src/CommonActions.d.ts.map | 1 + .../lib/typescript/src/DrawerRouter.d.ts | 53 + .../lib/typescript/src/DrawerRouter.d.ts.map | 1 + .../lib/typescript/src/StackRouter.d.ts | 69 + .../lib/typescript/src/StackRouter.d.ts.map | 1 + .../routers/lib/typescript/src/TabRouter.d.ts | 41 + .../lib/typescript/src/TabRouter.d.ts.map | 1 + .../routers/lib/typescript/src/index.d.ts | 11 + .../routers/lib/typescript/src/index.d.ts.map | 1 + .../routers/lib/typescript/src/types.d.ts | 177 ++ .../routers/lib/typescript/src/types.d.ts.map | 1 + .../@react-navigation/routers/package.json | 61 + .../routers/src/BaseRouter.tsx | 81 + .../routers/src/CommonActions.tsx | 89 + .../routers/src/DrawerRouter.tsx | 247 +++ .../routers/src/StackRouter.tsx | 495 ++++++ .../routers/src/TabRouter.tsx | 393 +++++ .../@react-navigation/routers/src/index.tsx | 28 + .../@react-navigation/routers/src/types.tsx | 228 +++ .../node_modules/filter-obj/index.js | 17 + .../node_modules/filter-obj/license | 21 + .../node_modules/filter-obj/package.json | 37 + .../node_modules/filter-obj/readme.md | 41 + iut-expo-starter/node_modules/nanoid/LICENSE | 20 + .../node_modules/nanoid/README.md | 39 + .../nanoid/async/index.browser.cjs | 34 + .../nanoid/async/index.browser.js | 34 + .../node_modules/nanoid/async/index.cjs | 35 + .../node_modules/nanoid/async/index.d.ts | 56 + .../node_modules/nanoid/async/index.js | 35 + .../node_modules/nanoid/async/index.native.js | 26 + .../node_modules/nanoid/async/package.json | 12 + .../node_modules/nanoid/bin/nanoid.cjs | 55 + .../node_modules/nanoid/index.browser.cjs | 34 + .../node_modules/nanoid/index.browser.js | 34 + .../node_modules/nanoid/index.cjs | 45 + .../node_modules/nanoid/index.d.ts | 91 ++ iut-expo-starter/node_modules/nanoid/index.js | 45 + .../node_modules/nanoid/nanoid.js | 1 + .../node_modules/nanoid/non-secure/index.cjs | 21 + .../node_modules/nanoid/non-secure/index.d.ts | 33 + .../node_modules/nanoid/non-secure/index.js | 21 + .../nanoid/non-secure/package.json | 6 + .../node_modules/nanoid/package.json | 60 + .../nanoid/url-alphabet/index.cjs | 3 + .../node_modules/nanoid/url-alphabet/index.js | 3 + .../nanoid/url-alphabet/package.json | 6 + .../node_modules/query-string/index.d.ts | 563 +++++++ .../node_modules/query-string/index.js | 482 ++++++ .../node_modules/query-string/license | 9 + .../node_modules/query-string/package.json | 54 + .../node_modules/query-string/readme.md | 639 ++++++++ .../node_modules/react-freeze/LICENSE | 21 + .../node_modules/react-freeze/README.md | 133 ++ .../node_modules/react-freeze/dist/index.d.ts | 8 + .../node_modules/react-freeze/dist/index.js | 39 + .../react-freeze/dist/index.js.map | 1 + .../react-freeze/dist/index.modern.js | 36 + .../react-freeze/dist/index.modern.js.map | 1 + .../node_modules/react-freeze/package.json | 64 + .../node_modules/react-freeze/src/index.tsx | 43 + .../node_modules/react-native-screens/LICENSE | 21 + .../react-native-screens/README.md | 210 +++ .../react-native-screens/RNScreens.podspec | 53 + .../react-native-screens/android/build.gradle | 113 ++ .../rnscreens/FabricEnabledViewGroup.kt | 49 + .../android/src/main/AndroidManifest.xml | 5 + .../swmansion/rnscreens/CustomSearchView.kt | 73 + .../com/swmansion/rnscreens/CustomToolbar.kt | 7 + .../rnscreens/FragmentBackPressOverrider.kt | 29 + .../swmansion/rnscreens/LifecycleHelper.kt | 60 + .../swmansion/rnscreens/RNScreensPackage.kt | 21 + .../java/com/swmansion/rnscreens/Screen.kt | 258 +++ .../swmansion/rnscreens/ScreenContainer.kt | 373 +++++ .../rnscreens/ScreenContainerViewManager.kt | 40 + .../com/swmansion/rnscreens/ScreenFragment.kt | 323 ++++ .../com/swmansion/rnscreens/ScreenStack.kt | 334 ++++ .../rnscreens/ScreenStackFragment.kt | 257 +++ .../rnscreens/ScreenStackHeaderConfig.kt | 398 +++++ .../ScreenStackHeaderConfigViewManager.kt | 196 +++ .../rnscreens/ScreenStackHeaderSubview.kt | 38 + .../ScreenStackHeaderSubviewManager.kt | 41 + .../rnscreens/ScreenStackViewManager.kt | 75 + .../swmansion/rnscreens/ScreenViewManager.kt | 193 +++ .../swmansion/rnscreens/ScreenWindowTraits.kt | 276 ++++ .../swmansion/rnscreens/ScreensShadowNode.kt | 19 + .../swmansion/rnscreens/SearchBarManager.kt | 107 ++ .../com/swmansion/rnscreens/SearchBarView.kt | 155 ++ .../rnscreens/SearchViewFormatter.kt | 67 + .../events/HeaderBackButtonClickedEvent.kt | 24 + .../rnscreens/events/ScreenAppearEvent.kt | 20 + .../rnscreens/events/ScreenDisappearEvent.kt | 20 + .../rnscreens/events/ScreenDismissedEvent.kt | 23 + .../events/ScreenTransitionProgressEvent.kt | 33 + .../rnscreens/events/ScreenWillAppearEvent.kt | 20 + .../events/ScreenWillDisappearEvent.kt | 20 + .../events/StackFinishTransitioningEvent.kt | 20 + .../android/src/main/jni/CMakeLists.txt | 72 + .../android/src/main/jni/rnscreens.cpp | 16 + .../android/src/main/jni/rnscreens.h | 28 + .../main/res/anim/rns_default_enter_in.xml | 18 + .../main/res/anim/rns_default_enter_out.xml | 19 + .../src/main/res/anim/rns_default_exit_in.xml | 17 + .../main/res/anim/rns_default_exit_out.xml | 18 + .../main/res/anim/rns_fade_from_bottom.xml | 14 + .../android/src/main/res/anim/rns_fade_in.xml | 7 + .../src/main/res/anim/rns_fade_out.xml | 7 + .../src/main/res/anim/rns_fade_to_bottom.xml | 15 + .../src/main/res/anim/rns_no_animation_20.xml | 6 + .../main/res/anim/rns_no_animation_250.xml | 7 + .../main/res/anim/rns_no_animation_350.xml | 6 + .../main/res/anim/rns_no_animation_medium.xml | 7 + .../res/anim/rns_slide_in_from_bottom.xml | 7 + .../main/res/anim/rns_slide_in_from_left.xml | 5 + .../main/res/anim/rns_slide_in_from_right.xml | 5 + .../main/res/anim/rns_slide_out_to_bottom.xml | 7 + .../main/res/anim/rns_slide_out_to_left.xml | 5 + .../main/res/anim/rns_slide_out_to_right.xml | 5 + .../RNSScreenManagerDelegate.java | 111 ++ .../RNSScreenManagerInterface.java | 44 + ...creenStackHeaderConfigManagerDelegate.java | 104 ++ ...reenStackHeaderConfigManagerInterface.java | 41 + ...reenStackHeaderSubviewManagerDelegate.java | 31 + ...eenStackHeaderSubviewManagerInterface.java | 17 + .../RNSScreenStackManagerDelegate.java | 25 + .../RNSScreenStackManagerInterface.java | 16 + .../rnscreens/FabricEnabledViewGroup.kt | 10 + .../rnscreens/RNSScreenComponentDescriptor.h | 41 + .../rnscreens/RNSScreenShadowNode.cpp | 9 + .../rnscreens/RNSScreenShadowNode.h | 30 + .../components/rnscreens/RNSScreenState.cpp | 14 + .../components/rnscreens/RNSScreenState.h | 46 + .../createNativeStackNavigator/README.md | 522 ++++++ .../createNativeStackNavigator/package.json | 6 + .../react-native-screens/ios/RNSConvert.h | 36 + .../react-native-screens/ios/RNSConvert.mm | 146 ++ .../react-native-screens/ios/RNSEnums.h | 65 + .../ios/RNSFullWindowOverlay.h | 30 + .../ios/RNSFullWindowOverlay.mm | 231 +++ .../react-native-screens/ios/RNSScreen.h | 126 ++ .../react-native-screens/ios/RNSScreen.mm | 1435 +++++++++++++++++ .../ios/RNSScreenContainer.h | 45 + .../ios/RNSScreenContainer.mm | 340 ++++ .../ios/RNSScreenNavigationContainer.h | 16 + .../ios/RNSScreenNavigationContainer.mm | 65 + .../react-native-screens/ios/RNSScreenStack.h | 37 + .../ios/RNSScreenStack.mm | 1056 ++++++++++++ .../ios/RNSScreenStackAnimator.h | 8 + .../ios/RNSScreenStackAnimator.mm | 320 ++++ .../ios/RNSScreenStackHeaderConfig.h | 67 + .../ios/RNSScreenStackHeaderConfig.mm | 903 +++++++++++ .../ios/RNSScreenStackHeaderSubview.h | 45 + .../ios/RNSScreenStackHeaderSubview.mm | 137 ++ .../ios/RNSScreenViewEvent.h | 12 + .../ios/RNSScreenViewEvent.mm | 59 + .../ios/RNSScreenWindowTraits.h | 26 + .../ios/RNSScreenWindowTraits.mm | 243 +++ .../react-native-screens/ios/RNSSearchBar.h | 35 + .../react-native-screens/ios/RNSSearchBar.mm | 351 ++++ .../ios/RNScreens.xcodeproj/project.pbxproj | 461 ++++++ .../ios/UIViewController+RNScreens.h | 9 + .../ios/UIViewController+RNScreens.mm | 78 + .../ios/UIWindow+RNScreens.h | 9 + .../ios/UIWindow+RNScreens.mm | 17 + .../ios/utils/RNSUIBarButtonItem.h | 5 + .../ios/utils/RNSUIBarButtonItem.mm | 22 + .../lib/commonjs/TransitionProgressContext.js | 12 + .../commonjs/TransitionProgressContext.js.map | 1 + .../commonjs/createNativeStackNavigator.js | 374 +++++ .../createNativeStackNavigator.js.map | 1 + .../FullWindowOverlayNativeComponent.js | 16 + .../FullWindowOverlayNativeComponent.js.map | 1 + .../fabric/ScreenContainerNativeComponent.js | 16 + .../ScreenContainerNativeComponent.js.map | 1 + .../commonjs/fabric/ScreenNativeComponent.js | 18 + .../fabric/ScreenNativeComponent.js.map | 1 + ...creenNavigationContainerNativeComponent.js | 16 + ...nNavigationContainerNativeComponent.js.map | 1 + .../ScreenStackHeaderConfigNativeComponent.js | 19 + ...eenStackHeaderConfigNativeComponent.js.map | 1 + ...ScreenStackHeaderSubviewNativeComponent.js | 19 + ...enStackHeaderSubviewNativeComponent.js.map | 1 + .../fabric/ScreenStackNativeComponent.js | 16 + .../fabric/ScreenStackNativeComponent.js.map | 1 + .../fabric/SearchBarNativeComponent.js | 18 + .../fabric/SearchBarNativeComponent.js.map | 1 + .../lib/commonjs/index.js | 154 ++ .../lib/commonjs/index.js.map | 1 + .../lib/commonjs/index.native.js | 354 ++++ .../lib/commonjs/index.native.js.map | 1 + .../lib/commonjs/native-stack/index.js | 35 + .../lib/commonjs/native-stack/index.js.map | 1 + .../navigators/createNativeStackNavigator.js | 66 + .../createNativeStackNavigator.js.map | 1 + .../lib/commonjs/native-stack/types.js | 6 + .../lib/commonjs/native-stack/types.js.map | 1 + .../native-stack/utils/HeaderHeightContext.js | 13 + .../utils/HeaderHeightContext.js.map | 1 + .../utils/SafeAreaProviderCompat.js | 63 + .../utils/SafeAreaProviderCompat.js.map | 1 + .../utils/getDefaultHeaderHeight.js | 32 + .../utils/getDefaultHeaderHeight.js.map | 1 + .../utils/useBackPressSubscription.js | 56 + .../utils/useBackPressSubscription.js.map | 1 + .../native-stack/utils/useHeaderHeight.js | 19 + .../native-stack/utils/useHeaderHeight.js.map | 1 + .../native-stack/views/FontProcessor.js | 20 + .../native-stack/views/FontProcessor.js.map | 1 + .../native-stack/views/HeaderConfig.js | 131 ++ .../native-stack/views/HeaderConfig.js.map | 1 + .../native-stack/views/NativeStackView.js | 275 ++++ .../native-stack/views/NativeStackView.js.map | 1 + .../reanimated/ReanimatedNativeStackScreen.js | 58 + .../ReanimatedNativeStackScreen.js.map | 1 + .../commonjs/reanimated/ReanimatedScreen.js | 23 + .../reanimated/ReanimatedScreen.js.map | 1 + .../reanimated/ReanimatedScreenProvider.js | 45 + .../ReanimatedScreenProvider.js.map | 1 + .../ReanimatedTransitionProgressContext.js | 12 + ...ReanimatedTransitionProgressContext.js.map | 1 + .../lib/commonjs/reanimated/index.js | 21 + .../lib/commonjs/reanimated/index.js.map | 1 + .../useReanimatedTransitionProgress.js | 19 + .../useReanimatedTransitionProgress.js.map | 1 + .../lib/commonjs/types.js | 6 + .../lib/commonjs/types.js.map | 1 + .../lib/commonjs/useTransitionProgress.js | 19 + .../lib/commonjs/useTransitionProgress.js.map | 1 + .../lib/commonjs/utils.js | 16 + .../lib/commonjs/utils.js.map | 1 + .../lib/module/TransitionProgressContext.js | 3 + .../module/TransitionProgressContext.js.map | 1 + .../lib/module/createNativeStackNavigator.js | 366 +++++ .../module/createNativeStackNavigator.js.map | 1 + .../FullWindowOverlayNativeComponent.js | 8 + .../FullWindowOverlayNativeComponent.js.map | 1 + .../fabric/ScreenContainerNativeComponent.js | 8 + .../ScreenContainerNativeComponent.js.map | 1 + .../module/fabric/ScreenNativeComponent.js | 10 + .../fabric/ScreenNativeComponent.js.map | 1 + ...creenNavigationContainerNativeComponent.js | 8 + ...nNavigationContainerNativeComponent.js.map | 1 + .../ScreenStackHeaderConfigNativeComponent.js | 9 + ...eenStackHeaderConfigNativeComponent.js.map | 1 + ...ScreenStackHeaderSubviewNativeComponent.js | 9 + ...enStackHeaderSubviewNativeComponent.js.map | 1 + .../fabric/ScreenStackNativeComponent.js | 8 + .../fabric/ScreenStackNativeComponent.js.map | 1 + .../module/fabric/SearchBarNativeComponent.js | 10 + .../fabric/SearchBarNativeComponent.js.map | 1 + .../react-native-screens/lib/module/index.js | 70 + .../lib/module/index.js.map | 1 + .../lib/module/index.native.js | 352 ++++ .../lib/module/index.native.js.map | 1 + .../lib/module/native-stack/index.js | 20 + .../lib/module/native-stack/index.js.map | 1 + .../navigators/createNativeStackNavigator.js | 56 + .../createNativeStackNavigator.js.map | 1 + .../lib/module/native-stack/types.js | 2 + .../lib/module/native-stack/types.js.map | 1 + .../native-stack/utils/HeaderHeightContext.js | 4 + .../utils/HeaderHeightContext.js.map | 1 + .../utils/SafeAreaProviderCompat.js | 54 + .../utils/SafeAreaProviderCompat.js.map | 1 + .../utils/getDefaultHeaderHeight.js | 26 + .../utils/getDefaultHeaderHeight.js.map | 1 + .../utils/useBackPressSubscription.js | 49 + .../utils/useBackPressSubscription.js.map | 1 + .../native-stack/utils/useHeaderHeight.js | 10 + .../native-stack/utils/useHeaderHeight.js.map | 1 + .../native-stack/views/FontProcessor.js | 12 + .../native-stack/views/FontProcessor.js.map | 1 + .../module/native-stack/views/HeaderConfig.js | 123 ++ .../native-stack/views/HeaderConfig.js.map | 1 + .../native-stack/views/NativeStackView.js | 267 +++ .../native-stack/views/NativeStackView.js.map | 1 + .../reanimated/ReanimatedNativeStackScreen.js | 50 + .../ReanimatedNativeStackScreen.js.map | 1 + .../lib/module/reanimated/ReanimatedScreen.js | 17 + .../module/reanimated/ReanimatedScreen.js.map | 1 + .../reanimated/ReanimatedScreenProvider.js | 38 + .../ReanimatedScreenProvider.js.map | 1 + .../ReanimatedTransitionProgressContext.js | 5 + ...ReanimatedTransitionProgressContext.js.map | 1 + .../lib/module/reanimated/index.js | 3 + .../lib/module/reanimated/index.js.map | 1 + .../useReanimatedTransitionProgress.js | 10 + .../useReanimatedTransitionProgress.js.map | 1 + .../react-native-screens/lib/module/types.js | 2 + .../lib/module/types.js.map | 1 + .../lib/module/useTransitionProgress.js | 10 + .../lib/module/useTransitionProgress.js.map | 1 + .../react-native-screens/lib/module/utils.js | 8 + .../lib/module/utils.js.map | 1 + .../typescript/TransitionProgressContext.d.ts | 9 + .../createNativeStackNavigator.d.ts | 51 + .../lib/typescript/index.d.ts | 33 + .../lib/typescript/index.native.d.ts | 2 + .../lib/typescript/native-stack/index.d.ts | 17 + .../createNativeStackNavigator.d.ts | 6 + .../lib/typescript/native-stack/types.d.ts | 368 +++++ .../utils/HeaderHeightContext.d.ts | 3 + .../utils/SafeAreaProviderCompat.d.ts | 11 + .../utils/getDefaultHeaderHeight.d.ts | 7 + .../utils/useBackPressSubscription.d.ts | 16 + .../native-stack/utils/useHeaderHeight.d.ts | 1 + .../native-stack/views/FontProcessor.d.ts | 1 + .../native-stack/views/HeaderConfig.d.ts | 8 + .../native-stack/views/NativeStackView.d.ts | 10 + .../ReanimatedNativeStackScreen.d.ts | 5 + .../reanimated/ReanimatedScreen.d.ts | 5 + .../reanimated/ReanimatedScreenProvider.d.ts | 2 + .../ReanimatedTransitionProgressContext.d.ts | 9 + .../lib/typescript/reanimated/index.d.ts | 2 + .../useReanimatedTransitionProgress.d.ts | 11 + .../lib/typescript/types.d.ts | 505 ++++++ .../lib/typescript/useTransitionProgress.d.ts | 5 + .../lib/typescript/utils.d.ts | 2 + .../native-stack/README.md | 730 +++++++++ .../native-stack/package.json | 6 + .../react-native-screens/package.json | 151 ++ .../react-native.config.js | 29 + .../reanimated/package.json | 6 + .../src/TransitionProgressContext.tsx | 12 + .../src/createNativeStackNavigator.tsx | 594 +++++++ .../FullWindowOverlayNativeComponent.js | 19 + .../fabric/ScreenContainerNativeComponent.js | 19 + .../src/fabric/ScreenNativeComponent.js | 104 ++ ...creenNavigationContainerNativeComponent.js | 19 + .../ScreenStackHeaderConfigNativeComponent.js | 54 + ...ScreenStackHeaderSubviewNativeComponent.js | 31 + .../src/fabric/ScreenStackNativeComponent.js | 23 + .../src/fabric/SearchBarNativeComponent.js | 62 + .../react-native-screens/src/index.native.tsx | 503 ++++++ .../react-native-screens/src/index.tsx | 117 ++ .../src/native-stack/index.tsx | 24 + .../navigators/createNativeStackNavigator.tsx | 89 + .../src/native-stack/types.tsx | 399 +++++ .../utils/HeaderHeightContext.tsx | 5 + .../utils/SafeAreaProviderCompat.tsx | 63 + .../utils/getDefaultHeaderHeight.tsx | 37 + .../utils/useBackPressSubscription.tsx | 66 + .../native-stack/utils/useHeaderHeight.tsx | 15 + .../src/native-stack/views/FontProcessor.tsx | 13 + .../src/native-stack/views/HeaderConfig.tsx | 172 ++ .../native-stack/views/NativeStackView.tsx | 358 ++++ .../ReanimatedNativeStackScreen.tsx | 71 + .../src/reanimated/ReanimatedScreen.tsx | 25 + .../reanimated/ReanimatedScreenProvider.tsx | 42 + .../ReanimatedTransitionProgressContext.tsx | 13 + .../src/reanimated/index.tsx | 2 + .../useReanimatedTransitionProgress.tsx | 14 + .../react-native-screens/src/types.tsx | 573 +++++++ .../src/useTransitionProgress.tsx | 15 + .../react-native-screens/src/utils.ts | 12 + .../react-native-screens/windows/README.md | 25 + .../windows/RNScreens/PropertySheet.props | 16 + .../windows/RNScreens/RNScreens.cpp | 66 + .../windows/RNScreens/RNScreens.def | 3 + .../windows/RNScreens/RNScreens.h | 41 + .../windows/RNScreens/RNScreens.idl | 8 + .../windows/RNScreens/RNScreens.vcxproj | 184 +++ .../RNScreens/RNScreens.vcxproj.filters | 52 + .../RNScreens/ReactPackageProvider.cpp | 30 + .../windows/RNScreens/ReactPackageProvider.h | 17 + .../RNScreens/ReactPackageProvider.idl | 9 + .../windows/RNScreens/Screen.cpp | 122 ++ .../windows/RNScreens/Screen.h | 64 + .../windows/RNScreens/ScreenContainer.cpp | 49 + .../windows/RNScreens/ScreenContainer.h | 23 + .../RNScreens/ScreenContainerViewManager.cpp | 133 ++ .../RNScreens/ScreenContainerViewManager.h | 78 + .../windows/RNScreens/ScreenStack.cpp | 49 + .../windows/RNScreens/ScreenStack.h | 22 + .../RNScreens/ScreenStackHeaderConfig.cpp | 19 + .../RNScreens/ScreenStackHeaderConfig.h | 14 + .../ScreenStackHeaderConfigViewManager.cpp | 89 + .../ScreenStackHeaderConfigViewManager.h | 62 + .../RNScreens/ScreenStackViewManager.cpp | 132 ++ .../RNScreens/ScreenStackViewManager.h | 78 + .../windows/RNScreens/ScreenViewManager.cpp | 154 ++ .../windows/RNScreens/ScreenViewManager.h | 78 + .../windows/RNScreens/packages.config | 4 + .../windows/RNScreens/pch.cpp | 1 + .../windows/RNScreens/pch.h | 9 + .../windows/RNScreens62.sln | 254 +++ .../windows/RNScreens63.sln | 225 +++ .../windows/RNScreens65.sln | 144 ++ .../node_modules/split-on-first/index.d.ts | 29 + .../node_modules/split-on-first/index.js | 22 + .../node_modules/split-on-first/license | 9 + .../node_modules/split-on-first/package.json | 36 + .../node_modules/split-on-first/readme.md | 58 + .../node_modules/strict-uri-encode/index.js | 2 + .../node_modules/strict-uri-encode/license | 21 + .../strict-uri-encode/package.json | 31 + .../node_modules/strict-uri-encode/readme.md | 39 + .../use-latest-callback/README.md | 37 + .../use-latest-callback/lib/index.d.ts | 4 + .../use-latest-callback/lib/index.js | 42 + .../use-latest-callback/package.json | 62 + .../use-latest-callback/src/index.ts | 25 + .../node_modules/warn-once/LICENSE | 21 + .../node_modules/warn-once/README.md | 27 + .../node_modules/warn-once/index.d.ts | 1 + .../node_modules/warn-once/index.js | 18 + .../node_modules/warn-once/package.json | 10 + iut-expo-starter/package-lock.json | 351 ++++ iut-expo-starter/package.json | 2 + .../{Home.tsx => screens/CityDetails.tsx} | 0 iut-expo-starter/{ => screens}/CityList.tsx | 6 +- iut-expo-starter/screens/Home.tsx | 0 iut-expo-starter/yarn.lock | 124 +- 1364 files changed, 63114 insertions(+), 12 deletions(-) create mode 120000 iut-expo-starter/node_modules/.bin/nanoid create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/LICENSE create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/README.md create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/index.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/index.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/navigators/createBottomTabNavigator.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/navigators/createBottomTabNavigator.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/types.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/types.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightCallbackContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightCallbackContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useBottomTabBarHeight.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useBottomTabBarHeight.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useIsKeyboardShown.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useIsKeyboardShown.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/Badge.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/Badge.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabBar.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabBar.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabItem.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabItem.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabView.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabView.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/ScreenFallback.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/ScreenFallback.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/TabBarIcon.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/TabBarIcon.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/index.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/index.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/navigators/createBottomTabNavigator.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/navigators/createBottomTabNavigator.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/types.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/types.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightCallbackContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightCallbackContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useBottomTabBarHeight.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useBottomTabBarHeight.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useIsKeyboardShown.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useIsKeyboardShown.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/Badge.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/Badge.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabBar.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabBar.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabItem.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabItem.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabView.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabView.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/ScreenFallback.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/ScreenFallback.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/TabBarIcon.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/TabBarIcon.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/index.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/index.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/navigators/createBottomTabNavigator.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/navigators/createBottomTabNavigator.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/types.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/types.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightCallbackContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightCallbackContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useBottomTabBarHeight.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useBottomTabBarHeight.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useIsKeyboardShown.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useIsKeyboardShown.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/Badge.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/Badge.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabBar.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabBar.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabItem.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabItem.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabView.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabView.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/ScreenFallback.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/ScreenFallback.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/TabBarIcon.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/TabBarIcon.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/CHANGELOG.md create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/LICENSE create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/README.md create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/conversions.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/index.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/package.json create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/route.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/LICENSE create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/README.md create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/index.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/package.json create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/package.json create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/index.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/navigators/createBottomTabNavigator.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/types.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/BottomTabBarHeightCallbackContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/BottomTabBarHeightContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/useBottomTabBarHeight.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/useIsKeyboardShown.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/Badge.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabBar.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabItem.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabView.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/ScreenFallback.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/TabBarIcon.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/LICENSE create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/README.md create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/BaseNavigationContainer.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/BaseNavigationContainer.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/CurrentRenderContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/CurrentRenderContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/EnsureSingleNavigator.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/EnsureSingleNavigator.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Group.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Group.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationBuilderContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationBuilderContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContainerRefContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContainerRefContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationHelpersContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationHelpersContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationRouteContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationRouteContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationStateContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationStateContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveProvider.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveProvider.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/SceneView.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/SceneView.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Screen.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Screen.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/StaticContainer.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/StaticContainer.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/UnhandledActionContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/UnhandledActionContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkDuplicateRouteNames.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkDuplicateRouteNames.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkSerializable.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkSerializable.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigationContainerRef.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigationContainerRef.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/findFocusedRoute.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/findFocusedRoute.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/fromEntries.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/fromEntries.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getActionFromState.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getActionFromState.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getFocusedRouteNameFromRoute.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getFocusedRouteNameFromRoute.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getPathFromState.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getPathFromState.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getStateFromPath.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getStateFromPath.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/index.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/index.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isArrayEqual.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isArrayEqual.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isRecordEqual.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isRecordEqual.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/types.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/types.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useChildListeners.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useChildListeners.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useComponent.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useComponent.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useCurrentRender.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useCurrentRender.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useDescriptors.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useDescriptors.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useEventEmitter.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useEventEmitter.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEffect.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEffect.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEvents.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEvents.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusedListenersChildrenAdapter.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusedListenersChildrenAdapter.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useIsFocused.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useIsFocused.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useKeyedChildListeners.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useKeyedChildListeners.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigation.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigation.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationCache.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationCache.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationContainerRef.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationContainerRef.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationHelpers.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationHelpers.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationState.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationState.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnAction.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnAction.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnGetState.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnGetState.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnPreventRemove.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnPreventRemove.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnRouteFocus.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnRouteFocus.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOptionsGetters.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOptionsGetters.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemove.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemove.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemoveContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemoveContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRegisterNavigator.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRegisterNavigator.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRoute.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRoute.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRouteCache.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRouteCache.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useScheduleUpdate.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useScheduleUpdate.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useSyncState.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useSyncState.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/validatePathConfig.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/validatePathConfig.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/BaseNavigationContainer.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/BaseNavigationContainer.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/CurrentRenderContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/CurrentRenderContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/EnsureSingleNavigator.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/EnsureSingleNavigator.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/Group.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/Group.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationBuilderContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationBuilderContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContainerRefContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContainerRefContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationHelpersContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationHelpersContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationRouteContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationRouteContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationStateContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationStateContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveProvider.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveProvider.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/SceneView.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/SceneView.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/Screen.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/Screen.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/StaticContainer.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/StaticContainer.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/UnhandledActionContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/UnhandledActionContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkDuplicateRouteNames.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkDuplicateRouteNames.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkSerializable.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkSerializable.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigationContainerRef.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigationContainerRef.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/findFocusedRoute.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/findFocusedRoute.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/fromEntries.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/fromEntries.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/getActionFromState.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/getActionFromState.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/getFocusedRouteNameFromRoute.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/getFocusedRouteNameFromRoute.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/getPathFromState.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/getPathFromState.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/getStateFromPath.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/getStateFromPath.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/index.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/index.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/isArrayEqual.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/isArrayEqual.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/isRecordEqual.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/isRecordEqual.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/types.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/types.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useChildListeners.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useChildListeners.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useComponent.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useComponent.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useCurrentRender.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useCurrentRender.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useDescriptors.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useDescriptors.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useEventEmitter.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useEventEmitter.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEffect.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEffect.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEvents.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEvents.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusedListenersChildrenAdapter.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusedListenersChildrenAdapter.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useIsFocused.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useIsFocused.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useKeyedChildListeners.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useKeyedChildListeners.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigation.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigation.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationCache.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationCache.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationContainerRef.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationContainerRef.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationHelpers.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationHelpers.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationState.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationState.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnAction.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnAction.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnGetState.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnGetState.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnPreventRemove.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnPreventRemove.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnRouteFocus.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnRouteFocus.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOptionsGetters.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOptionsGetters.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemove.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemove.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemoveContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemoveContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRegisterNavigator.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRegisterNavigator.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRoute.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRoute.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRouteCache.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRouteCache.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useScheduleUpdate.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useScheduleUpdate.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useSyncState.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/useSyncState.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/validatePathConfig.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/module/validatePathConfig.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/BaseNavigationContainer.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/BaseNavigationContainer.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/CurrentRenderContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/CurrentRenderContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/EnsureSingleNavigator.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/EnsureSingleNavigator.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Group.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Group.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationBuilderContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationBuilderContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContainerRefContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContainerRefContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationHelpersContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationHelpersContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationRouteContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationRouteContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationStateContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationStateContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveProvider.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveProvider.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/SceneView.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/SceneView.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Screen.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Screen.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/StaticContainer.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/StaticContainer.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/UnhandledActionContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/UnhandledActionContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkDuplicateRouteNames.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkDuplicateRouteNames.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkSerializable.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkSerializable.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigationContainerRef.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigationContainerRef.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/findFocusedRoute.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/findFocusedRoute.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/fromEntries.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/fromEntries.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getActionFromState.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getActionFromState.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getPathFromState.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getPathFromState.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getStateFromPath.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getStateFromPath.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isArrayEqual.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isArrayEqual.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isRecordEqual.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isRecordEqual.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useChildListeners.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useChildListeners.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useComponent.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useComponent.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useCurrentRender.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useCurrentRender.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useDescriptors.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useDescriptors.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useEventEmitter.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useEventEmitter.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEffect.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEffect.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEvents.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEvents.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useIsFocused.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useIsFocused.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useKeyedChildListeners.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useKeyedChildListeners.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigation.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigation.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationCache.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationCache.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationContainerRef.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationContainerRef.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationHelpers.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationHelpers.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationState.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationState.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnAction.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnAction.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnGetState.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnGetState.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnPreventRemove.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnPreventRemove.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnRouteFocus.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnRouteFocus.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOptionsGetters.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOptionsGetters.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemove.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemove.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemoveContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemoveContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRegisterNavigator.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRegisterNavigator.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRoute.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRoute.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRouteCache.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRouteCache.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useScheduleUpdate.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useScheduleUpdate.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useSyncState.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useSyncState.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/validatePathConfig.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/validatePathConfig.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/index.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/index.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/license create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/package.json create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/readme.md create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/LICENSE create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/README.md create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/build-info.json create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/cjs/react-is.development.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/cjs/react-is.production.min.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/index.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/package.json create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/umd/react-is.development.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/umd/react-is.production.min.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/package.json create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/BaseNavigationContainer.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/CurrentRenderContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/EnsureSingleNavigator.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/Group.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/NavigationBuilderContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/NavigationContainerRefContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/NavigationContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/NavigationHelpersContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/NavigationRouteContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/NavigationStateContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/PreventRemoveContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/PreventRemoveProvider.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/SceneView.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/Screen.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/StaticContainer.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/UnhandledActionContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/checkDuplicateRouteNames.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/checkSerializable.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/createNavigationContainerRef.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/createNavigatorFactory.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/findFocusedRoute.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/fromEntries.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/getActionFromState.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/getFocusedRouteNameFromRoute.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/getPathFromState.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/getStateFromPath.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/index.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/isArrayEqual.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/isRecordEqual.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/types.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useChildListeners.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useComponent.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useCurrentRender.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useDescriptors.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useEventEmitter.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useFocusEffect.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useFocusEvents.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useFocusedListenersChildrenAdapter.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useIsFocused.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useKeyedChildListeners.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useNavigation.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationCache.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationContainerRef.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationHelpers.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationState.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useOnAction.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useOnGetState.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useOnPreventRemove.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useOnRouteFocus.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useOptionsGetters.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/usePreventRemove.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/usePreventRemoveContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useRegisterNavigator.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useRoute.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useRouteCache.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useScheduleUpdate.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/useSyncState.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/core/src/validatePathConfig.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/LICENSE create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/README.md create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Background.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Background.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/Header.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/Header.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackButton.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackButton.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackground.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackground.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderHeightContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderHeightContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderShownContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderShownContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderTitle.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderTitle.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getDefaultHeaderHeight.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getDefaultHeaderHeight.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getHeaderTitle.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getHeaderTitle.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/useHeaderHeight.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/useHeaderHeight.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.android.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.android.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.ios.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.ios.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedViewNative.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedViewNative.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MissingIcon.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MissingIcon.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/PlatformPressable.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/PlatformPressable.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/ResourceSavingView.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/ResourceSavingView.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/SafeAreaProviderCompat.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/SafeAreaProviderCompat.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Screen.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Screen.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon-mask.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@1.5x.android.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@1.5x.ios.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@1x.android.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@1x.ios.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@2x.android.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@2x.ios.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@3x.android.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@3x.ios.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@4x.android.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@4x.ios.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/getNamedContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/getNamedContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/index.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/index.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/types.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/types.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Background.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Background.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/Header.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/Header.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackButton.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackButton.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackground.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackground.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderHeightContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderHeightContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderShownContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderShownContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderTitle.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderTitle.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getDefaultHeaderHeight.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getDefaultHeaderHeight.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getHeaderTitle.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getHeaderTitle.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/useHeaderHeight.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/useHeaderHeight.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.android.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.android.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.ios.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.ios.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedViewNative.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedViewNative.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MissingIcon.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MissingIcon.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/PlatformPressable.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/PlatformPressable.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/ResourceSavingView.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/ResourceSavingView.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/SafeAreaProviderCompat.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/SafeAreaProviderCompat.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Screen.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Screen.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon-mask.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@1.5x.android.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@1.5x.ios.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@1x.android.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@1x.ios.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@2x.android.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@2x.ios.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@3x.android.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@3x.ios.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@4x.android.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@4x.ios.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/getNamedContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/getNamedContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/index.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/index.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/types.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/module/types.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Background.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Background.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/Header.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/Header.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackButton.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackButton.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackground.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackground.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderHeightContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderHeightContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderShownContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderShownContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderTitle.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderTitle.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getDefaultHeaderHeight.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getDefaultHeaderHeight.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getHeaderTitle.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getHeaderTitle.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/useHeaderHeight.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/useHeaderHeight.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.android.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.android.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.ios.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.ios.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedViewNative.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedViewNative.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MissingIcon.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MissingIcon.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/PlatformPressable.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/PlatformPressable.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/ResourceSavingView.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/ResourceSavingView.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/SafeAreaProviderCompat.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/SafeAreaProviderCompat.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Screen.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Screen.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/getNamedContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/getNamedContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/index.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/index.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/types.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/types.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/package.json create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/Background.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/Header/Header.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderBackButton.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderBackContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderBackground.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderHeightContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderShownContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderTitle.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/Header/getDefaultHeaderHeight.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/Header/getHeaderTitle.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/Header/useHeaderHeight.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedView.android.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedView.ios.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedView.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedViewNative.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/MissingIcon.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/PlatformPressable.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/ResourceSavingView.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/SafeAreaProviderCompat.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/Screen.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon-mask.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@1.5x.android.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@1.5x.ios.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@1x.android.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@1x.ios.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@2x.android.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@2x.ios.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@3x.android.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@3x.ios.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@4x.android.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@4x.ios.png create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/getNamedContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/index.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/elements/src/types.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/LICENSE create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/README.md create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/Link.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/Link.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/LinkingContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/LinkingContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/NavigationContainer.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/NavigationContainer.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContainer.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContainer.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/createMemoryHistory.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/createMemoryHistory.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/extractPathFromURL.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/extractPathFromURL.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/index.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/index.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DarkTheme.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DarkTheme.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DefaultTheme.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DefaultTheme.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeProvider.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeProvider.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/useTheme.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/useTheme.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/types.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/types.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useBackButton.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useBackButton.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.native.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.native.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkBuilder.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkBuilder.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkProps.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkProps.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkTo.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkTo.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.native.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.native.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useScrollToTop.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useScrollToTop.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useThenable.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useThenable.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/Link.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/Link.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/LinkingContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/LinkingContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/NavigationContainer.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/NavigationContainer.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContainer.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContainer.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/createMemoryHistory.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/createMemoryHistory.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/extractPathFromURL.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/extractPathFromURL.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/index.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/index.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DarkTheme.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DarkTheme.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DefaultTheme.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DefaultTheme.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeContext.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeContext.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeProvider.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeProvider.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/useTheme.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/useTheme.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/types.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/types.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useBackButton.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useBackButton.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.native.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.native.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkBuilder.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkBuilder.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkProps.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkProps.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkTo.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkTo.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinking.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinking.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinking.native.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinking.native.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useScrollToTop.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useScrollToTop.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useThenable.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/module/useThenable.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/Link.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/Link.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/LinkingContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/LinkingContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/NavigationContainer.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/NavigationContainer.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContainer.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContainer.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/__mocks__/window.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/__mocks__/window.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/createMemoryHistory.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/createMemoryHistory.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/extractPathFromURL.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/extractPathFromURL.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/index.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/index.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DarkTheme.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DarkTheme.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DefaultTheme.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DefaultTheme.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeContext.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeContext.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeProvider.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeProvider.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/useTheme.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/useTheme.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/types.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/types.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useBackButton.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useBackButton.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.native.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.native.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkBuilder.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkBuilder.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkProps.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkProps.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkTo.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkTo.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.native.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.native.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useScrollToTop.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useScrollToTop.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useThenable.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useThenable.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/index.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/index.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/license create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/package.json create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/readme.md create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/package.json create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/Link.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/LinkingContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/NavigationContainer.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/ServerContainer.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/ServerContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/__mocks__/window.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/createMemoryHistory.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/extractPathFromURL.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/index.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/theming/DarkTheme.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/theming/DefaultTheme.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/theming/ThemeContext.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/theming/ThemeProvider.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/theming/useTheme.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/types.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/useBackButton.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/useDocumentTitle.native.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/useDocumentTitle.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/useLinkBuilder.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/useLinkProps.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/useLinkTo.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/useLinking.native.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/useLinking.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/useScrollToTop.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/native/src/useThenable.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/LICENSE create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/README.md create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/BaseRouter.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/BaseRouter.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/CommonActions.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/CommonActions.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/DrawerRouter.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/DrawerRouter.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/StackRouter.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/StackRouter.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/TabRouter.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/TabRouter.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/index.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/index.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/types.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/types.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/module/BaseRouter.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/module/BaseRouter.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/module/CommonActions.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/module/CommonActions.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/module/DrawerRouter.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/module/DrawerRouter.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/module/StackRouter.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/module/StackRouter.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/module/TabRouter.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/module/TabRouter.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/module/index.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/module/index.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/module/types.js create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/module/types.js.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/BaseRouter.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/BaseRouter.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/CommonActions.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/CommonActions.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/DrawerRouter.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/DrawerRouter.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/StackRouter.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/StackRouter.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/TabRouter.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/TabRouter.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/index.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/index.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/types.d.ts create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/types.d.ts.map create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/package.json create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/src/BaseRouter.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/src/CommonActions.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/src/DrawerRouter.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/src/StackRouter.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/src/TabRouter.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/src/index.tsx create mode 100644 iut-expo-starter/node_modules/@react-navigation/routers/src/types.tsx create mode 100644 iut-expo-starter/node_modules/filter-obj/index.js create mode 100644 iut-expo-starter/node_modules/filter-obj/license create mode 100644 iut-expo-starter/node_modules/filter-obj/package.json create mode 100644 iut-expo-starter/node_modules/filter-obj/readme.md create mode 100644 iut-expo-starter/node_modules/nanoid/LICENSE create mode 100644 iut-expo-starter/node_modules/nanoid/README.md create mode 100644 iut-expo-starter/node_modules/nanoid/async/index.browser.cjs create mode 100644 iut-expo-starter/node_modules/nanoid/async/index.browser.js create mode 100644 iut-expo-starter/node_modules/nanoid/async/index.cjs create mode 100644 iut-expo-starter/node_modules/nanoid/async/index.d.ts create mode 100644 iut-expo-starter/node_modules/nanoid/async/index.js create mode 100644 iut-expo-starter/node_modules/nanoid/async/index.native.js create mode 100644 iut-expo-starter/node_modules/nanoid/async/package.json create mode 100755 iut-expo-starter/node_modules/nanoid/bin/nanoid.cjs create mode 100644 iut-expo-starter/node_modules/nanoid/index.browser.cjs create mode 100644 iut-expo-starter/node_modules/nanoid/index.browser.js create mode 100644 iut-expo-starter/node_modules/nanoid/index.cjs create mode 100644 iut-expo-starter/node_modules/nanoid/index.d.ts create mode 100644 iut-expo-starter/node_modules/nanoid/index.js create mode 100644 iut-expo-starter/node_modules/nanoid/nanoid.js create mode 100644 iut-expo-starter/node_modules/nanoid/non-secure/index.cjs create mode 100644 iut-expo-starter/node_modules/nanoid/non-secure/index.d.ts create mode 100644 iut-expo-starter/node_modules/nanoid/non-secure/index.js create mode 100644 iut-expo-starter/node_modules/nanoid/non-secure/package.json create mode 100644 iut-expo-starter/node_modules/nanoid/package.json create mode 100644 iut-expo-starter/node_modules/nanoid/url-alphabet/index.cjs create mode 100644 iut-expo-starter/node_modules/nanoid/url-alphabet/index.js create mode 100644 iut-expo-starter/node_modules/nanoid/url-alphabet/package.json create mode 100644 iut-expo-starter/node_modules/query-string/index.d.ts create mode 100644 iut-expo-starter/node_modules/query-string/index.js create mode 100644 iut-expo-starter/node_modules/query-string/license create mode 100644 iut-expo-starter/node_modules/query-string/package.json create mode 100644 iut-expo-starter/node_modules/query-string/readme.md create mode 100644 iut-expo-starter/node_modules/react-freeze/LICENSE create mode 100644 iut-expo-starter/node_modules/react-freeze/README.md create mode 100644 iut-expo-starter/node_modules/react-freeze/dist/index.d.ts create mode 100644 iut-expo-starter/node_modules/react-freeze/dist/index.js create mode 100644 iut-expo-starter/node_modules/react-freeze/dist/index.js.map create mode 100644 iut-expo-starter/node_modules/react-freeze/dist/index.modern.js create mode 100644 iut-expo-starter/node_modules/react-freeze/dist/index.modern.js.map create mode 100644 iut-expo-starter/node_modules/react-freeze/package.json create mode 100644 iut-expo-starter/node_modules/react-freeze/src/index.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/LICENSE create mode 100644 iut-expo-starter/node_modules/react-native-screens/README.md create mode 100644 iut-expo-starter/node_modules/react-native-screens/RNScreens.podspec create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/build.gradle create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/AndroidManifest.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/CustomSearchView.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/CustomToolbar.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/FragmentBackPressOverrider.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/LifecycleHelper.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/Screen.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenContainerViewManager.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenFragment.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubview.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubviewManager.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackViewManager.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreensShadowNode.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchBarManager.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchViewFormatter.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/HeaderBackButtonClickedEvent.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenAppearEvent.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDisappearEvent.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDismissedEvent.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenTransitionProgressEvent.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillAppearEvent.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillDisappearEvent.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/StackFinishTransitioningEvent.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/jni/CMakeLists.txt create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/jni/rnscreens.cpp create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/jni/rnscreens.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_enter_in.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_enter_out.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_exit_in.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_exit_out.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_from_bottom.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_in.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_out.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_to_bottom.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_20.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_250.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_350.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_medium.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_in_from_bottom.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_in_from_left.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_in_from_right.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_out_to_bottom.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_out_to_left.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_out_to_right.xml create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerDelegate.java create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerInterface.java create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerDelegate.java create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerInterface.java create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderSubviewManagerDelegate.java create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderSubviewManagerInterface.java create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackManagerDelegate.java create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackManagerInterface.java create mode 100644 iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt create mode 100644 iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenComponentDescriptor.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp create mode 100644 iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenState.cpp create mode 100644 iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/createNativeStackNavigator/README.md create mode 100644 iut-expo-starter/node_modules/react-native-screens/createNativeStackNavigator/package.json create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSConvert.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSConvert.mm create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSEnums.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSFullWindowOverlay.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSFullWindowOverlay.mm create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreen.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreen.mm create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenContainer.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenContainer.mm create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenNavigationContainer.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenNavigationContainer.mm create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStack.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStack.mm create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackAnimator.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderConfig.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderConfig.mm create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderSubview.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderSubview.mm create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenViewEvent.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenViewEvent.mm create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenWindowTraits.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenWindowTraits.mm create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSSearchBar.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNSSearchBar.mm create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/RNScreens.xcodeproj/project.pbxproj create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/UIViewController+RNScreens.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/UIViewController+RNScreens.mm create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/UIWindow+RNScreens.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/UIWindow+RNScreens.mm create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/utils/RNSUIBarButtonItem.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/ios/utils/RNSUIBarButtonItem.mm create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/TransitionProgressContext.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/TransitionProgressContext.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/createNativeStackNavigator.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/createNativeStackNavigator.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenContainerNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenContainerNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/SearchBarNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/SearchBarNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/index.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/index.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/index.native.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/index.native.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/index.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/index.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/types.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/types.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/utils/HeaderHeightContext.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/utils/HeaderHeightContext.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/utils/getDefaultHeaderHeight.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/utils/getDefaultHeaderHeight.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/utils/useBackPressSubscription.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/utils/useBackPressSubscription.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/utils/useHeaderHeight.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/utils/useHeaderHeight.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/views/FontProcessor.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/views/FontProcessor.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/views/HeaderConfig.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/views/HeaderConfig.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/views/NativeStackView.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/views/NativeStackView.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreen.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreen.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreenProvider.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/index.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/index.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/useReanimatedTransitionProgress.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/types.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/types.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/useTransitionProgress.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/useTransitionProgress.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/utils.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/commonjs/utils.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/TransitionProgressContext.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/TransitionProgressContext.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/createNativeStackNavigator.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/createNativeStackNavigator.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/FullWindowOverlayNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/FullWindowOverlayNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenContainerNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenContainerNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNavigationContainerNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/SearchBarNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/SearchBarNativeComponent.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/index.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/index.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/index.native.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/index.native.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/index.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/index.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/navigators/createNativeStackNavigator.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/navigators/createNativeStackNavigator.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/types.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/types.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/utils/HeaderHeightContext.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/utils/HeaderHeightContext.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/utils/SafeAreaProviderCompat.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/utils/SafeAreaProviderCompat.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/utils/getDefaultHeaderHeight.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/utils/getDefaultHeaderHeight.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/utils/useBackPressSubscription.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/utils/useBackPressSubscription.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/utils/useHeaderHeight.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/utils/useHeaderHeight.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/views/FontProcessor.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/views/FontProcessor.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/views/HeaderConfig.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/views/HeaderConfig.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/views/NativeStackView.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/native-stack/views/NativeStackView.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/reanimated/ReanimatedNativeStackScreen.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/reanimated/ReanimatedNativeStackScreen.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/reanimated/ReanimatedScreen.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/reanimated/ReanimatedScreen.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/reanimated/ReanimatedScreenProvider.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/reanimated/ReanimatedScreenProvider.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/reanimated/ReanimatedTransitionProgressContext.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/reanimated/ReanimatedTransitionProgressContext.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/reanimated/index.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/reanimated/index.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/reanimated/useReanimatedTransitionProgress.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/reanimated/useReanimatedTransitionProgress.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/types.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/types.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/useTransitionProgress.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/useTransitionProgress.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/utils.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/module/utils.js.map create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/TransitionProgressContext.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/createNativeStackNavigator.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/index.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/index.native.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/native-stack/index.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/native-stack/types.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/native-stack/utils/HeaderHeightContext.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/native-stack/utils/SafeAreaProviderCompat.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/native-stack/utils/useBackPressSubscription.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/native-stack/utils/useHeaderHeight.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/native-stack/views/FontProcessor.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/native-stack/views/HeaderConfig.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/native-stack/views/NativeStackView.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/reanimated/ReanimatedScreen.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/reanimated/ReanimatedScreenProvider.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/reanimated/ReanimatedTransitionProgressContext.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/reanimated/index.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/reanimated/useReanimatedTransitionProgress.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/types.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/useTransitionProgress.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/lib/typescript/utils.d.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/native-stack/README.md create mode 100644 iut-expo-starter/node_modules/react-native-screens/native-stack/package.json create mode 100644 iut-expo-starter/node_modules/react-native-screens/package.json create mode 100644 iut-expo-starter/node_modules/react-native-screens/react-native.config.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/reanimated/package.json create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/TransitionProgressContext.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/createNativeStackNavigator.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/fabric/FullWindowOverlayNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/fabric/ScreenContainerNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/fabric/ScreenNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/fabric/ScreenNavigationContainerNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/fabric/ScreenStackHeaderConfigNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/fabric/ScreenStackHeaderSubviewNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/fabric/ScreenStackNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/fabric/SearchBarNativeComponent.js create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/index.native.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/index.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/native-stack/index.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/native-stack/navigators/createNativeStackNavigator.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/native-stack/types.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/native-stack/utils/HeaderHeightContext.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/native-stack/utils/SafeAreaProviderCompat.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/native-stack/utils/getDefaultHeaderHeight.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/native-stack/utils/useBackPressSubscription.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/native-stack/utils/useHeaderHeight.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/native-stack/views/FontProcessor.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/native-stack/views/HeaderConfig.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/native-stack/views/NativeStackView.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/reanimated/ReanimatedNativeStackScreen.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/reanimated/ReanimatedScreen.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/reanimated/ReanimatedScreenProvider.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/reanimated/ReanimatedTransitionProgressContext.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/reanimated/index.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/reanimated/useReanimatedTransitionProgress.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/types.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/useTransitionProgress.tsx create mode 100644 iut-expo-starter/node_modules/react-native-screens/src/utils.ts create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/README.md create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/PropertySheet.props create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/RNScreens.cpp create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/RNScreens.def create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/RNScreens.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/RNScreens.idl create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/RNScreens.vcxproj create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/RNScreens.vcxproj.filters create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ReactPackageProvider.cpp create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ReactPackageProvider.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ReactPackageProvider.idl create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/Screen.cpp create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/Screen.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ScreenContainer.cpp create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ScreenContainer.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ScreenContainerViewManager.cpp create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ScreenContainerViewManager.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ScreenStack.cpp create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ScreenStack.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ScreenStackHeaderConfig.cpp create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ScreenStackHeaderConfig.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ScreenStackHeaderConfigViewManager.cpp create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ScreenStackHeaderConfigViewManager.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ScreenStackViewManager.cpp create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ScreenStackViewManager.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ScreenViewManager.cpp create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/ScreenViewManager.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/packages.config create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/pch.cpp create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens/pch.h create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens62.sln create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens63.sln create mode 100644 iut-expo-starter/node_modules/react-native-screens/windows/RNScreens65.sln create mode 100644 iut-expo-starter/node_modules/split-on-first/index.d.ts create mode 100644 iut-expo-starter/node_modules/split-on-first/index.js create mode 100644 iut-expo-starter/node_modules/split-on-first/license create mode 100644 iut-expo-starter/node_modules/split-on-first/package.json create mode 100644 iut-expo-starter/node_modules/split-on-first/readme.md create mode 100644 iut-expo-starter/node_modules/strict-uri-encode/index.js create mode 100644 iut-expo-starter/node_modules/strict-uri-encode/license create mode 100644 iut-expo-starter/node_modules/strict-uri-encode/package.json create mode 100644 iut-expo-starter/node_modules/strict-uri-encode/readme.md create mode 100644 iut-expo-starter/node_modules/use-latest-callback/README.md create mode 100644 iut-expo-starter/node_modules/use-latest-callback/lib/index.d.ts create mode 100644 iut-expo-starter/node_modules/use-latest-callback/lib/index.js create mode 100644 iut-expo-starter/node_modules/use-latest-callback/package.json create mode 100644 iut-expo-starter/node_modules/use-latest-callback/src/index.ts create mode 100644 iut-expo-starter/node_modules/warn-once/LICENSE create mode 100644 iut-expo-starter/node_modules/warn-once/README.md create mode 100644 iut-expo-starter/node_modules/warn-once/index.d.ts create mode 100644 iut-expo-starter/node_modules/warn-once/index.js create mode 100644 iut-expo-starter/node_modules/warn-once/package.json rename iut-expo-starter/{Home.tsx => screens/CityDetails.tsx} (100%) rename iut-expo-starter/{ => screens}/CityList.tsx (82%) create mode 100644 iut-expo-starter/screens/Home.tsx diff --git a/iut-expo-starter/components/VilleCompopo.tsx b/iut-expo-starter/components/VilleCompopo.tsx index 2963797d..4c0ebefe 100644 --- a/iut-expo-starter/components/VilleCompopo.tsx +++ b/iut-expo-starter/components/VilleCompopo.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { View, StyleSheet, Text } from "react-native"; +import { View, StyleSheet, Text, Button, TouchableHighlight, Image } from "react-native"; import { City } from "../data/stub"; @@ -15,6 +15,9 @@ export function VilleCompopo(props: VilleProps){ {props.city.name} {props.city.latitude} - {props.city.longitude} + + + @@ -48,5 +51,8 @@ const styles = StyleSheet.create({ bothtext: { width: "80%", margin: 10 + }, + button: { + color: "black" } }); \ No newline at end of file diff --git a/iut-expo-starter/navigation/TabNavigation.tsx b/iut-expo-starter/navigation/TabNavigation.tsx index 9387f569..806dacd4 100644 --- a/iut-expo-starter/navigation/TabNavigation.tsx +++ b/iut-expo-starter/navigation/TabNavigation.tsx @@ -1,6 +1,8 @@ +import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; +import { NavigationContainer } from "@react-navigation/native"; import React from "react"; -import CityList from "../CityList"; -/* +import CityList from "../screens/CityList"; + export default function Navigation() { const BottomTabNavigator = createBottomTabNavigator(); return ( @@ -18,4 +20,3 @@ export default function Navigation() { ) } -*/ \ No newline at end of file diff --git a/iut-expo-starter/node_modules/.bin/nanoid b/iut-expo-starter/node_modules/.bin/nanoid new file mode 120000 index 00000000..e2be547b --- /dev/null +++ b/iut-expo-starter/node_modules/.bin/nanoid @@ -0,0 +1 @@ +../nanoid/bin/nanoid.cjs \ No newline at end of file diff --git a/iut-expo-starter/node_modules/.package-lock.json b/iut-expo-starter/node_modules/.package-lock.json index 49641c2f..c92ab0a7 100644 --- a/iut-expo-starter/node_modules/.package-lock.json +++ b/iut-expo-starter/node_modules/.package-lock.json @@ -5184,6 +5184,123 @@ "integrity": "sha512-K0aGNn1TjalKj+65D7ycc1//H9roAQ51GJVk5ZJQFb2teECGmzd86bYDC0aYdbRf7gtovescq4Zt6FR0tgXiHQ==", "license": "MIT" }, + "node_modules/@react-navigation/bottom-tabs": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/@react-navigation/bottom-tabs/-/bottom-tabs-6.5.4.tgz", + "integrity": "sha512-C2Tf+SsO9zc+p/MKUkILso8Dw4KTIscXPi7YhdepyZbM8ZYMGfnZKzffGjLFlLhQXtsFQQuHMelD8sIStTkgyQ==", + "dependencies": { + "@react-navigation/elements": "^1.3.14", + "color": "^4.2.3", + "warn-once": "^0.1.0" + }, + "peerDependencies": { + "@react-navigation/native": "^6.0.0", + "react": "*", + "react-native": "*", + "react-native-safe-area-context": ">= 3.0.0", + "react-native-screens": ">= 3.0.0" + } + }, + "node_modules/@react-navigation/bottom-tabs/node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, + "node_modules/@react-navigation/bottom-tabs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@react-navigation/core": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-6.4.6.tgz", + "integrity": "sha512-6zaAgUT5k4vhJlddUk2l52RZyMkMelHdrRv1cL57ALi2RZzERdgmbiMKhJerxFLn9S8E3PUe8vwxHzjHOZKG4w==", + "dependencies": { + "@react-navigation/routers": "^6.1.6", + "escape-string-regexp": "^4.0.0", + "nanoid": "^3.1.23", + "query-string": "^7.1.3", + "react-is": "^16.13.0", + "use-latest-callback": "^0.1.5" + }, + "peerDependencies": { + "react": "*" + } + }, + "node_modules/@react-navigation/core/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@react-navigation/core/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "node_modules/@react-navigation/elements": { + "version": "1.3.14", + "resolved": "https://registry.npmjs.org/@react-navigation/elements/-/elements-1.3.14.tgz", + "integrity": "sha512-RBbPhYq+KNFPAkWPaHB9gypq0jTGp/0fkMwRLToJ8jkLtWG4LV+JoQ/erFQnVARkR3Q807n0VnES15EYP4ITMQ==", + "peerDependencies": { + "@react-navigation/native": "^6.0.0", + "react": "*", + "react-native": "*", + "react-native-safe-area-context": ">= 3.0.0" + } + }, + "node_modules/@react-navigation/native": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-6.1.3.tgz", + "integrity": "sha512-DB5FyG6aqGfcjjVozljF5NEkjWaSymIbQHfWwsjL0YrvC1gfc7E53QXDOjxZ/wfbCo8qZs8RIC/LAgclP2YK/w==", + "dependencies": { + "@react-navigation/core": "^6.4.6", + "escape-string-regexp": "^4.0.0", + "fast-deep-equal": "^3.1.3", + "nanoid": "^3.1.23" + }, + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, + "node_modules/@react-navigation/native/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@react-navigation/routers": { + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-6.1.6.tgz", + "integrity": "sha512-Z5DeCW3pUvMafbU9Cjy1qJYC2Bvl8iy3+PfsB0DsAwQ6zZ3WAXW5FTMX4Gb9H+Jg6qHWGbMFFwlYpS3UJ3tlVQ==", + "dependencies": { + "nanoid": "^3.1.23" + } + }, "node_modules/@segment/loosely-validate-event": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@segment/loosely-validate-event/-/loosely-validate-event-2.0.0.tgz", @@ -10930,6 +11047,14 @@ "node": ">=0.10.0" } }, + "node_modules/filter-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", @@ -14829,6 +14954,17 @@ "license": "MIT", "optional": true }, + "node_modules/nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -16916,6 +17052,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/query-string": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", + "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", + "dependencies": { + "decode-uri-component": "^0.2.2", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", @@ -17438,6 +17591,18 @@ "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==", "license": "MIT" }, + "node_modules/react-freeze": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/react-freeze/-/react-freeze-1.0.3.tgz", + "integrity": "sha512-ZnXwLQnGzrDpHBHiC56TXFXvmolPeMjTn1UOm610M4EXGzbEDR7oOIyS2ZiItgbs6eZc4oU/a0hpk8PrcKvv5g==", + "peer": true, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": ">=17.0.0" + } + }, "node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", @@ -17536,6 +17701,20 @@ "react-native": "*" } }, + "node_modules/react-native-screens": { + "version": "3.19.0", + "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.19.0.tgz", + "integrity": "sha512-Ehsmy7jr3H3j5pmN+/FqsAaIAD+k+xkcdePfLcg4rYRbN5X7fJPgaqhcmiCcZ0YxsU8ttsstP9IvRLNQuIkRRA==", + "peer": true, + "dependencies": { + "react-freeze": "^1.0.0", + "warn-once": "^0.1.0" + }, + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, "node_modules/react-native-web": { "version": "0.18.11", "resolved": "https://registry.npmjs.org/react-native-web/-/react-native-web-0.18.11.tgz", @@ -18956,6 +19135,14 @@ "node": "*" } }, + "node_modules/split-on-first": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", + "engines": { + "node": ">=6" + } + }, "node_modules/split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", @@ -19123,6 +19310,14 @@ "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", "license": "MIT" }, + "node_modules/strict-uri-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==", + "engines": { + "node": ">=4" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -20506,6 +20701,11 @@ "node": ">=0.10.0" } }, + "node_modules/use-latest-callback": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/use-latest-callback/-/use-latest-callback-0.1.5.tgz", + "integrity": "sha512-HtHatS2U4/h32NlkhupDsPlrbiD27gSH5swBdtXbCAlc6pfOFzaj0FehW/FO12rx8j2Vy4/lJScCiJyM01E+bQ==" + }, "node_modules/use-sync-external-store": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", @@ -20624,6 +20824,11 @@ "makeerror": "1.0.12" } }, + "node_modules/warn-once": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/warn-once/-/warn-once-0.1.1.tgz", + "integrity": "sha512-VkQZJbO8zVImzYFteBXvBOZEl1qL175WH8VmZcxF2fZAoudNhNDvHi+doCaAEdU2l2vtcIwa2zn0QK5+I1HQ3Q==" + }, "node_modules/watchpack": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/LICENSE b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/LICENSE new file mode 100644 index 00000000..9d268cb0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 React Navigation Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/README.md b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/README.md new file mode 100644 index 00000000..e31eb02b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/README.md @@ -0,0 +1,5 @@ +# `@react-navigation/bottom-tabs` + +Bottom tab navigator for React Navigation following iOS design guidelines. + +Installation instructions and documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/bottom-tab-navigator/). diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/index.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/index.js new file mode 100644 index 00000000..20357d10 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/index.js @@ -0,0 +1,49 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "BottomTabBar", { + enumerable: true, + get: function () { + return _BottomTabBar.default; + } +}); +Object.defineProperty(exports, "BottomTabBarHeightCallbackContext", { + enumerable: true, + get: function () { + return _BottomTabBarHeightCallbackContext.default; + } +}); +Object.defineProperty(exports, "BottomTabBarHeightContext", { + enumerable: true, + get: function () { + return _BottomTabBarHeightContext.default; + } +}); +Object.defineProperty(exports, "BottomTabView", { + enumerable: true, + get: function () { + return _BottomTabView.default; + } +}); +Object.defineProperty(exports, "createBottomTabNavigator", { + enumerable: true, + get: function () { + return _createBottomTabNavigator.default; + } +}); +Object.defineProperty(exports, "useBottomTabBarHeight", { + enumerable: true, + get: function () { + return _useBottomTabBarHeight.default; + } +}); +var _createBottomTabNavigator = _interopRequireDefault(require("./navigators/createBottomTabNavigator")); +var _BottomTabBar = _interopRequireDefault(require("./views/BottomTabBar")); +var _BottomTabView = _interopRequireDefault(require("./views/BottomTabView")); +var _BottomTabBarHeightCallbackContext = _interopRequireDefault(require("./utils/BottomTabBarHeightCallbackContext")); +var _BottomTabBarHeightContext = _interopRequireDefault(require("./utils/BottomTabBarHeightContext")); +var _useBottomTabBarHeight = _interopRequireDefault(require("./utils/useBottomTabBarHeight")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/index.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/index.js.map new file mode 100644 index 00000000..fdfc16f4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;AAKA;AACA;AAKA;AACA;AACA;AAAiF"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/navigators/createBottomTabNavigator.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/navigators/createBottomTabNavigator.js new file mode 100644 index 00000000..ed090890 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/navigators/createBottomTabNavigator.js @@ -0,0 +1,86 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _native = require("@react-navigation/native"); +var React = _interopRequireWildcard(require("react")); +var _warnOnce = _interopRequireDefault(require("warn-once")); +var _BottomTabView = _interopRequireDefault(require("../views/BottomTabView")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +function BottomTabNavigator(_ref) { + let { + id, + initialRouteName, + backBehavior, + children, + screenListeners, + screenOptions, + sceneContainerStyle, + ...restWithDeprecated + } = _ref; + const { + // @ts-expect-error: lazy is deprecated + lazy, + // @ts-expect-error: tabBarOptions is deprecated + tabBarOptions, + ...rest + } = restWithDeprecated; + let defaultScreenOptions = {}; + if (tabBarOptions) { + Object.assign(defaultScreenOptions, { + tabBarHideOnKeyboard: tabBarOptions.keyboardHidesTabBar, + tabBarActiveTintColor: tabBarOptions.activeTintColor, + tabBarInactiveTintColor: tabBarOptions.inactiveTintColor, + tabBarActiveBackgroundColor: tabBarOptions.activeBackgroundColor, + tabBarInactiveBackgroundColor: tabBarOptions.inactiveBackgroundColor, + tabBarAllowFontScaling: tabBarOptions.allowFontScaling, + tabBarShowLabel: tabBarOptions.showLabel, + tabBarLabelStyle: tabBarOptions.labelStyle, + tabBarIconStyle: tabBarOptions.iconStyle, + tabBarItemStyle: tabBarOptions.tabStyle, + tabBarLabelPosition: tabBarOptions.labelPosition ?? (tabBarOptions.adaptive === false ? 'below-icon' : undefined), + tabBarStyle: [{ + display: tabBarOptions.tabBarVisible ? 'none' : 'flex' + }, defaultScreenOptions.tabBarStyle] + }); + Object.keys(defaultScreenOptions).forEach(key => { + if (defaultScreenOptions[key] === undefined) { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete defaultScreenOptions[key]; + } + }); + (0, _warnOnce.default)(tabBarOptions, `Bottom Tab Navigator: 'tabBarOptions' is deprecated. Migrate the options to 'screenOptions' instead.\n\nPlace the following in 'screenOptions' in your code to keep current behavior:\n\n${JSON.stringify(defaultScreenOptions, null, 2)}\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator#options for more details.`); + } + if (typeof lazy === 'boolean') { + defaultScreenOptions.lazy = lazy; + (0, _warnOnce.default)(true, `Bottom Tab Navigator: 'lazy' in props is deprecated. Move it to 'screenOptions' instead.\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator/#lazy for more details.`); + } + const { + state, + descriptors, + navigation, + NavigationContent + } = (0, _native.useNavigationBuilder)(_native.TabRouter, { + id, + initialRouteName, + backBehavior, + children, + screenListeners, + screenOptions, + defaultScreenOptions + }); + return /*#__PURE__*/React.createElement(NavigationContent, null, /*#__PURE__*/React.createElement(_BottomTabView.default, _extends({}, rest, { + state: state, + navigation: navigation, + descriptors: descriptors, + sceneContainerStyle: sceneContainerStyle + }))); +} +var _default = (0, _native.createNavigatorFactory)(BottomTabNavigator); +exports.default = _default; +//# sourceMappingURL=createBottomTabNavigator.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/navigators/createBottomTabNavigator.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/navigators/createBottomTabNavigator.js.map new file mode 100644 index 00000000..d08c9717 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/navigators/createBottomTabNavigator.js.map @@ -0,0 +1 @@ +{"version":3,"names":["BottomTabNavigator","id","initialRouteName","backBehavior","children","screenListeners","screenOptions","sceneContainerStyle","restWithDeprecated","lazy","tabBarOptions","rest","defaultScreenOptions","Object","assign","tabBarHideOnKeyboard","keyboardHidesTabBar","tabBarActiveTintColor","activeTintColor","tabBarInactiveTintColor","inactiveTintColor","tabBarActiveBackgroundColor","activeBackgroundColor","tabBarInactiveBackgroundColor","inactiveBackgroundColor","tabBarAllowFontScaling","allowFontScaling","tabBarShowLabel","showLabel","tabBarLabelStyle","labelStyle","tabBarIconStyle","iconStyle","tabBarItemStyle","tabStyle","tabBarLabelPosition","labelPosition","adaptive","undefined","tabBarStyle","display","tabBarVisible","keys","forEach","key","warnOnce","JSON","stringify","state","descriptors","navigation","NavigationContent","useNavigationBuilder","TabRouter","createNavigatorFactory"],"sourceRoot":"../../src","sources":["createBottomTabNavigator.tsx"],"mappings":";;;;;;AAAA;AAUA;AACA;AAOA;AAAmD;AAAA;AAAA;AAAA;AAWnD,SAASA,kBAAkB,OASjB;EAAA,IATkB;IAC1BC,EAAE;IACFC,gBAAgB;IAChBC,YAAY;IACZC,QAAQ;IACRC,eAAe;IACfC,aAAa;IACbC,mBAAmB;IACnB,GAAGC;EACE,CAAC;EACN,MAAM;IACJ;IACAC,IAAI;IACJ;IACAC,aAAa;IACb,GAAGC;EACL,CAAC,GAAGH,kBAAkB;EAEtB,IAAII,oBAAgD,GAAG,CAAC,CAAC;EAEzD,IAAIF,aAAa,EAAE;IACjBG,MAAM,CAACC,MAAM,CAACF,oBAAoB,EAAE;MAClCG,oBAAoB,EAAEL,aAAa,CAACM,mBAAmB;MACvDC,qBAAqB,EAAEP,aAAa,CAACQ,eAAe;MACpDC,uBAAuB,EAAET,aAAa,CAACU,iBAAiB;MACxDC,2BAA2B,EAAEX,aAAa,CAACY,qBAAqB;MAChEC,6BAA6B,EAAEb,aAAa,CAAC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B,qBAChB,oBAAC,sBAAa,eACRD,IAAI;IACR,KAAK,EAAEqC,KAAM;IACb,UAAU,EAAEE,UAAW;IACvB,WAAW,EAAED,WAAY;IACzB,mBAAmB,EAAE1C;EAAoB,GACzC,CACgB;AAExB;AAAC,eAEc,IAAA+C,8BAAsB,EAKnCtD,kBAAkB,CAAC;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/types.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/types.js new file mode 100644 index 00000000..239667a3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/types.js @@ -0,0 +1,6 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/types.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/types.js.map new file mode 100644 index 00000000..e7ae1280 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/types.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":""} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightCallbackContext.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightCallbackContext.js new file mode 100644 index 00000000..79bab717 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightCallbackContext.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +var _default = /*#__PURE__*/React.createContext(undefined); +exports.default = _default; +//# sourceMappingURL=BottomTabBarHeightCallbackContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightCallbackContext.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightCallbackContext.js.map new file mode 100644 index 00000000..aaf9ff65 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightCallbackContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","createContext","undefined"],"sourceRoot":"../../src","sources":["BottomTabBarHeightCallbackContext.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAAA,4BAEhBA,KAAK,CAACC,aAAa,CAChCC,SAAS,CACV;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightContext.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightContext.js new file mode 100644 index 00000000..f7ec5273 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightContext.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +var _default = /*#__PURE__*/React.createContext(undefined); +exports.default = _default; +//# sourceMappingURL=BottomTabBarHeightContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightContext.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightContext.js.map new file mode 100644 index 00000000..a4fd4dc5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/BottomTabBarHeightContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","createContext","undefined"],"sourceRoot":"../../src","sources":["BottomTabBarHeightContext.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAAA,4BAEhBA,KAAK,CAACC,aAAa,CAAqBC,SAAS,CAAC;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useBottomTabBarHeight.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useBottomTabBarHeight.js new file mode 100644 index 00000000..09c5a0a0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useBottomTabBarHeight.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useBottomTabBarHeight; +var React = _interopRequireWildcard(require("react")); +var _BottomTabBarHeightContext = _interopRequireDefault(require("./BottomTabBarHeightContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function useBottomTabBarHeight() { + const height = React.useContext(_BottomTabBarHeightContext.default); + if (height === undefined) { + throw new Error("Couldn't find the bottom tab bar height. Are you inside a screen in Bottom Tab Navigator?"); + } + return height; +} +//# sourceMappingURL=useBottomTabBarHeight.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useBottomTabBarHeight.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useBottomTabBarHeight.js.map new file mode 100644 index 00000000..f2e81bd9 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useBottomTabBarHeight.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useBottomTabBarHeight","height","React","useContext","BottomTabBarHeightContext","undefined","Error"],"sourceRoot":"../../src","sources":["useBottomTabBarHeight.tsx"],"mappings":";;;;;;AAAA;AAEA;AAAoE;AAAA;AAAA;AAErD,SAASA,qBAAqB,GAAG;EAC9C,MAAMC,MAAM,GAAGC,KAAK,CAACC,UAAU,CAACC,kCAAyB,CAAC;EAE1D,IAAIH,MAAM,KAAKI,SAAS,EAAE;IACxB,MAAM,IAAIC,KAAK,CACb,2FAA2F,CAC5F;EACH;EAEA,OAAOL,MAAM;AACf"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useIsKeyboardShown.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useIsKeyboardShown.js new file mode 100644 index 00000000..3d013bb3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useIsKeyboardShown.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useIsKeyboardShown; +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function useIsKeyboardShown() { + const [isKeyboardShown, setIsKeyboardShown] = React.useState(false); + React.useEffect(() => { + const handleKeyboardShow = () => setIsKeyboardShown(true); + const handleKeyboardHide = () => setIsKeyboardShown(false); + let subscriptions; + if (_reactNative.Platform.OS === 'ios') { + subscriptions = [_reactNative.Keyboard.addListener('keyboardWillShow', handleKeyboardShow), _reactNative.Keyboard.addListener('keyboardWillHide', handleKeyboardHide)]; + } else { + subscriptions = [_reactNative.Keyboard.addListener('keyboardDidShow', handleKeyboardShow), _reactNative.Keyboard.addListener('keyboardDidHide', handleKeyboardHide)]; + } + return () => { + subscriptions.forEach(s => s.remove()); + }; + }, []); + return isKeyboardShown; +} +//# sourceMappingURL=useIsKeyboardShown.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useIsKeyboardShown.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useIsKeyboardShown.js.map new file mode 100644 index 00000000..9b74ec9b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/utils/useIsKeyboardShown.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useIsKeyboardShown","isKeyboardShown","setIsKeyboardShown","React","useState","useEffect","handleKeyboardShow","handleKeyboardHide","subscriptions","Platform","OS","Keyboard","addListener","forEach","s","remove"],"sourceRoot":"../../src","sources":["useIsKeyboardShown.tsx"],"mappings":";;;;;;AAAA;AACA;AAAuE;AAAA;AAExD,SAASA,kBAAkB,GAAG;EAC3C,MAAM,CAACC,eAAe,EAAEC,kBAAkB,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;EAEnED,KAAK,CAACE,SAAS,CAAC,MAAM;IACpB,MAAMC,kBAAkB,GAAG,MAAMJ,kBAAkB,CAAC,IAAI,CAAC;IACzD,MAAMK,kBAAkB,GAAG,MAAML,kBAAkB,CAAC,KAAK,CAAC;IAE1D,IAAIM,aAAoC;IAExC,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;MACzBF,aAAa,GAAG,CACdG,qBAAQ,CAACC,WAAW,CAAC,kBAAkB,EAAEN,kBAAkB,CAAC,EAC5DK,qBAAQ,CAACC,WAAW,CAAC,kBAAkB,EAAEL,kBAAkB,CAAC,CAC7D;IACH,CAAC,MAAM;MACLC,aAAa,GAAG,CACdG,qBAAQ,CAACC,WAAW,CAAC,iBAAiB,EAAEN,kBAAkB,CAAC,EAC3DK,qBAAQ,CAACC,WAAW,CAAC,iBAAiB,EAAEL,kBAAkB,CAAC,CAC5D;IACH;IAEA,OAAO,MAAM;MACXC,aAAa,CAACK,OAAO,CAAEC,CAAC,IAAKA,CAAC,CAACC,MAAM,EAAE,CAAC;IAC1C,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOd,eAAe;AACxB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/Badge.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/Badge.js new file mode 100644 index 00000000..1f847a5d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/Badge.js @@ -0,0 +1,88 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = Badge; +var _native = require("@react-navigation/native"); +var _color = _interopRequireDefault(require("color")); +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +function Badge(_ref) { + let { + children, + style, + visible = true, + size = 18, + ...rest + } = _ref; + const [opacity] = React.useState(() => new _reactNative.Animated.Value(visible ? 1 : 0)); + const [rendered, setRendered] = React.useState(visible); + const theme = (0, _native.useTheme)(); + React.useEffect(() => { + if (!rendered) { + return; + } + _reactNative.Animated.timing(opacity, { + toValue: visible ? 1 : 0, + duration: 150, + useNativeDriver: true + }).start(_ref2 => { + let { + finished + } = _ref2; + if (finished && !visible) { + setRendered(false); + } + }); + return () => opacity.stopAnimation(); + }, [opacity, rendered, visible]); + if (!rendered) { + if (visible) { + setRendered(true); + } else { + return null; + } + } + + // @ts-expect-error: backgroundColor definitely exists + const { + backgroundColor = theme.colors.notification, + ...restStyle + } = _reactNative.StyleSheet.flatten(style) || {}; + const textColor = (0, _color.default)(backgroundColor).isLight() ? 'black' : 'white'; + const borderRadius = size / 2; + const fontSize = Math.floor(size * 3 / 4); + return /*#__PURE__*/React.createElement(_reactNative.Animated.Text, _extends({ + numberOfLines: 1, + style: [{ + transform: [{ + scale: opacity.interpolate({ + inputRange: [0, 1], + outputRange: [0.5, 1] + }) + }], + color: textColor, + lineHeight: size - 1, + height: size, + minWidth: size, + opacity, + backgroundColor, + fontSize, + borderRadius + }, styles.container, restStyle] + }, rest), children); +} +const styles = _reactNative.StyleSheet.create({ + container: { + alignSelf: 'flex-end', + textAlign: 'center', + paddingHorizontal: 4, + overflow: 'hidden' + } +}); +//# sourceMappingURL=Badge.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/Badge.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/Badge.js.map new file mode 100644 index 00000000..fdf29171 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/Badge.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Badge","children","style","visible","size","rest","opacity","React","useState","Animated","Value","rendered","setRendered","theme","useTheme","useEffect","timing","toValue","duration","useNativeDriver","start","finished","stopAnimation","backgroundColor","colors","notification","restStyle","StyleSheet","flatten","textColor","color","isLight","borderRadius","fontSize","Math","floor","transform","scale","interpolate","inputRange","outputRange","lineHeight","height","minWidth","styles","container","create","alignSelf","textAlign","paddingHorizontal","overflow"],"sourceRoot":"../../src","sources":["Badge.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAA0E;AAAA;AAAA;AAAA;AAqB3D,SAASA,KAAK,OAMnB;EAAA,IANoB;IAC5BC,QAAQ;IAC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AAO,EAAE,GAAG,OAAO,GAAG,OAAO;EAEtE,MAAMC,YAAY,GAAG5B,IAAI,GAAG,CAAC;EAC7B,MAAM6B,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAAE/B,IAAI,GAAG,CAAC,GAAI,CAAC,CAAC;EAE3C,oBACE,oBAAC,qBAAQ,CAAC,IAAI;IACZ,aAAa,EAAE,CAAE;IACjB,KAAK,EAAE,CACL;MACEgC,SAAS,EAAE,CACT;QACEC,KAAK,EAAE/B,OAAO,CAACgC,WAAW,CAAC;UACzBC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;UAClBC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC;QACtB,CAAC;MACH,CAAC,CACF;MACDV,KAAK,EAAED,SAAS;MAChBY,UAAU,EAAErC,IAAI,GAAG,CAAC;MACpBsC,MAAM,EAAEtC,IAAI;MACZuC,QAAQ,EAAEvC,IAAI;MACdE,OAAO;MACPiB,eAAe;MACfU,QAAQ;MACRD;IACF,CAAC,EACDY,MAAM,CAACC,SAAS,EAChBnB,SAAS;EACT,GACErB,IAAI,GAEPJ,QAAQ,CACK;AAEpB;AAEA,MAAM2C,MAAM,GAAGjB,uBAAU,CAACmB,MAAM,CAAC;EAC/BD,SAAS,EAAE;IACTE,SAAS,EAAE,UAAU;IACrBC,SAAS,EAAE,QAAQ;IACnBC,iBAAiB,EAAE,CAAC;IACpBC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabBar.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabBar.js new file mode 100644 index 00000000..1360dc65 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabBar.js @@ -0,0 +1,310 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = BottomTabBar; +exports.getTabBarHeight = void 0; +var _elements = require("@react-navigation/elements"); +var _native = require("@react-navigation/native"); +var _react = _interopRequireDefault(require("react")); +var _reactNative = require("react-native"); +var _reactNativeSafeAreaContext = require("react-native-safe-area-context"); +var _BottomTabBarHeightCallbackContext = _interopRequireDefault(require("../utils/BottomTabBarHeightCallbackContext")); +var _useIsKeyboardShown = _interopRequireDefault(require("../utils/useIsKeyboardShown")); +var _BottomTabItem = _interopRequireDefault(require("./BottomTabItem")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const DEFAULT_TABBAR_HEIGHT = 49; +const COMPACT_TABBAR_HEIGHT = 32; +const DEFAULT_MAX_TAB_ITEM_WIDTH = 125; +const useNativeDriver = _reactNative.Platform.OS !== 'web'; +const shouldUseHorizontalLabels = _ref => { + let { + state, + descriptors, + layout, + dimensions + } = _ref; + const { + tabBarLabelPosition + } = descriptors[state.routes[state.index].key].options; + if (tabBarLabelPosition) { + switch (tabBarLabelPosition) { + case 'beside-icon': + return true; + case 'below-icon': + return false; + } + } + if (layout.width >= 768) { + // Screen size matches a tablet + const maxTabWidth = state.routes.reduce((acc, route) => { + const { + tabBarItemStyle + } = descriptors[route.key].options; + const flattenedStyle = _reactNative.StyleSheet.flatten(tabBarItemStyle); + if (flattenedStyle) { + if (typeof flattenedStyle.width === 'number') { + return acc + flattenedStyle.width; + } else if (typeof flattenedStyle.maxWidth === 'number') { + return acc + flattenedStyle.maxWidth; + } + } + return acc + DEFAULT_MAX_TAB_ITEM_WIDTH; + }, 0); + return maxTabWidth <= layout.width; + } else { + return dimensions.width > dimensions.height; + } +}; +const getPaddingBottom = insets => Math.max(insets.bottom - _reactNative.Platform.select({ + ios: 4, + default: 0 +}), 0); +const getTabBarHeight = _ref2 => { + var _StyleSheet$flatten; + let { + state, + descriptors, + dimensions, + insets, + style, + ...rest + } = _ref2; + // @ts-ignore + const customHeight = (_StyleSheet$flatten = _reactNative.StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.height; + if (typeof customHeight === 'number') { + return customHeight; + } + const isLandscape = dimensions.width > dimensions.height; + const horizontalLabels = shouldUseHorizontalLabels({ + state, + descriptors, + dimensions, + ...rest + }); + const paddingBottom = getPaddingBottom(insets); + if (_reactNative.Platform.OS === 'ios' && !_reactNative.Platform.isPad && isLandscape && horizontalLabels) { + return COMPACT_TABBAR_HEIGHT + paddingBottom; + } + return DEFAULT_TABBAR_HEIGHT + paddingBottom; +}; +exports.getTabBarHeight = getTabBarHeight; +function BottomTabBar(_ref3) { + let { + state, + navigation, + descriptors, + insets, + style + } = _ref3; + const { + colors + } = (0, _native.useTheme)(); + const buildLink = (0, _native.useLinkBuilder)(); + const focusedRoute = state.routes[state.index]; + const focusedDescriptor = descriptors[focusedRoute.key]; + const focusedOptions = focusedDescriptor.options; + const { + tabBarShowLabel, + tabBarHideOnKeyboard = false, + tabBarVisibilityAnimationConfig, + tabBarStyle, + tabBarBackground, + tabBarActiveTintColor, + tabBarInactiveTintColor, + tabBarActiveBackgroundColor, + tabBarInactiveBackgroundColor + } = focusedOptions; + const dimensions = (0, _reactNativeSafeAreaContext.useSafeAreaFrame)(); + const isKeyboardShown = (0, _useIsKeyboardShown.default)(); + const onHeightChange = _react.default.useContext(_BottomTabBarHeightCallbackContext.default); + const shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown); + const visibilityAnimationConfigRef = _react.default.useRef(tabBarVisibilityAnimationConfig); + _react.default.useEffect(() => { + visibilityAnimationConfigRef.current = tabBarVisibilityAnimationConfig; + }); + const [isTabBarHidden, setIsTabBarHidden] = _react.default.useState(!shouldShowTabBar); + const [visible] = _react.default.useState(() => new _reactNative.Animated.Value(shouldShowTabBar ? 1 : 0)); + _react.default.useEffect(() => { + const visibilityAnimationConfig = visibilityAnimationConfigRef.current; + if (shouldShowTabBar) { + var _visibilityAnimationC, _visibilityAnimationC2; + const animation = (visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC = visibilityAnimationConfig.show) === null || _visibilityAnimationC === void 0 ? void 0 : _visibilityAnimationC.animation) === 'spring' ? _reactNative.Animated.spring : _reactNative.Animated.timing; + animation(visible, { + toValue: 1, + useNativeDriver, + duration: 250, + ...(visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC2 = visibilityAnimationConfig.show) === null || _visibilityAnimationC2 === void 0 ? void 0 : _visibilityAnimationC2.config) + }).start(_ref4 => { + let { + finished + } = _ref4; + if (finished) { + setIsTabBarHidden(false); + } + }); + } else { + var _visibilityAnimationC3, _visibilityAnimationC4; + setIsTabBarHidden(true); + const animation = (visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC3 = visibilityAnimationConfig.hide) === null || _visibilityAnimationC3 === void 0 ? void 0 : _visibilityAnimationC3.animation) === 'spring' ? _reactNative.Animated.spring : _reactNative.Animated.timing; + animation(visible, { + toValue: 0, + useNativeDriver, + duration: 200, + ...(visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC4 = visibilityAnimationConfig.hide) === null || _visibilityAnimationC4 === void 0 ? void 0 : _visibilityAnimationC4.config) + }).start(); + } + return () => visible.stopAnimation(); + }, [visible, shouldShowTabBar]); + const [layout, setLayout] = _react.default.useState({ + height: 0, + width: dimensions.width + }); + const handleLayout = e => { + const { + height, + width + } = e.nativeEvent.layout; + onHeightChange === null || onHeightChange === void 0 ? void 0 : onHeightChange(height); + setLayout(layout => { + if (height === layout.height && width === layout.width) { + return layout; + } else { + return { + height, + width + }; + } + }); + }; + const { + routes + } = state; + const paddingBottom = getPaddingBottom(insets); + const tabBarHeight = getTabBarHeight({ + state, + descriptors, + insets, + dimensions, + layout, + style: [tabBarStyle, style] + }); + const hasHorizontalLabels = shouldUseHorizontalLabels({ + state, + descriptors, + dimensions, + layout + }); + const tabBarBackgroundElement = tabBarBackground === null || tabBarBackground === void 0 ? void 0 : tabBarBackground(); + return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, { + style: [styles.tabBar, { + backgroundColor: tabBarBackgroundElement != null ? 'transparent' : colors.card, + borderTopColor: colors.border + }, { + transform: [{ + translateY: visible.interpolate({ + inputRange: [0, 1], + outputRange: [layout.height + paddingBottom + _reactNative.StyleSheet.hairlineWidth, 0] + }) + }], + // Absolutely position the tab bar so that the content is below it + // This is needed to avoid gap at bottom when the tab bar is hidden + position: isTabBarHidden ? 'absolute' : null + }, { + height: tabBarHeight, + paddingBottom, + paddingHorizontal: Math.max(insets.left, insets.right) + }, tabBarStyle], + pointerEvents: isTabBarHidden ? 'none' : 'auto', + onLayout: handleLayout + }, /*#__PURE__*/_react.default.createElement(_reactNative.View, { + pointerEvents: "none", + style: _reactNative.StyleSheet.absoluteFill + }, tabBarBackgroundElement), /*#__PURE__*/_react.default.createElement(_reactNative.View, { + accessibilityRole: "tablist", + style: styles.content + }, routes.map((route, index) => { + const focused = index === state.index; + const { + options + } = descriptors[route.key]; + const onPress = () => { + const event = navigation.emit({ + type: 'tabPress', + target: route.key, + canPreventDefault: true + }); + if (!focused && !event.defaultPrevented) { + navigation.dispatch({ + ..._native.CommonActions.navigate({ + name: route.name, + merge: true + }), + target: state.key + }); + } + }; + const onLongPress = () => { + navigation.emit({ + type: 'tabLongPress', + target: route.key + }); + }; + const label = options.tabBarLabel !== undefined ? options.tabBarLabel : options.title !== undefined ? options.title : route.name; + const accessibilityLabel = options.tabBarAccessibilityLabel !== undefined ? options.tabBarAccessibilityLabel : typeof label === 'string' && _reactNative.Platform.OS === 'ios' ? `${label}, tab, ${index + 1} of ${routes.length}` : undefined; + return /*#__PURE__*/_react.default.createElement(_native.NavigationContext.Provider, { + key: route.key, + value: descriptors[route.key].navigation + }, /*#__PURE__*/_react.default.createElement(_native.NavigationRouteContext.Provider, { + value: route + }, /*#__PURE__*/_react.default.createElement(_BottomTabItem.default, { + route: route, + descriptor: descriptors[route.key], + focused: focused, + horizontal: hasHorizontalLabels, + onPress: onPress, + onLongPress: onLongPress, + accessibilityLabel: accessibilityLabel, + to: buildLink(route.name, route.params), + testID: options.tabBarTestID, + allowFontScaling: options.tabBarAllowFontScaling, + activeTintColor: tabBarActiveTintColor, + inactiveTintColor: tabBarInactiveTintColor, + activeBackgroundColor: tabBarActiveBackgroundColor, + inactiveBackgroundColor: tabBarInactiveBackgroundColor, + button: options.tabBarButton, + icon: options.tabBarIcon ?? (_ref5 => { + let { + color, + size + } = _ref5; + return /*#__PURE__*/_react.default.createElement(_elements.MissingIcon, { + color: color, + size: size + }); + }), + badge: options.tabBarBadge, + badgeStyle: options.tabBarBadgeStyle, + label: label, + showLabel: tabBarShowLabel, + labelStyle: options.tabBarLabelStyle, + iconStyle: options.tabBarIconStyle, + style: options.tabBarItemStyle + }))); + }))); +} +const styles = _reactNative.StyleSheet.create({ + tabBar: { + left: 0, + right: 0, + bottom: 0, + borderTopWidth: _reactNative.StyleSheet.hairlineWidth, + elevation: 8 + }, + content: { + flex: 1, + flexDirection: 'row' + } +}); +//# sourceMappingURL=BottomTabBar.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabBar.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabBar.js.map new file mode 100644 index 00000000..0fb60a39 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabBar.js.map @@ -0,0 +1 @@ +{"version":3,"names":["DEFAULT_TABBAR_HEIGHT","COMPACT_TABBAR_HEIGHT","DEFAULT_MAX_TAB_ITEM_WIDTH","useNativeDriver","Platform","OS","shouldUseHorizontalLabels","state","descriptors","layout","dimensions","tabBarLabelPosition","routes","index","key","options","width","maxTabWidth","reduce","acc","route","tabBarItemStyle","flattenedStyle","StyleSheet","flatten","maxWidth","height","getPaddingBottom","insets","Math","max","bottom","select","ios","default","getTabBarHeight","style","rest","customHeight","isLandscape","horizontalLabels","paddingBottom","isPad","BottomTabBar","navigation","colors","useTheme","buildLink","useLinkBuilder","focusedRoute","focusedDescriptor","focusedOptions","tabBarShowLabel","tabBarHideOnKeyboard","tabBarVisibilityAnimationConfig","tabBarStyle","tabBarBackground","tabBarActiveTintColor","tabBarInactiveTintColor","tabBarActiveBackgroundColor","tabBarInactiveBackgroundColor","useSafeAreaFrame","isKeyboardShown","useIsKeyboardShown","onHeightChange","React","useContext","BottomTabBarHeightCallbackContext","shouldShowTabBar","visibilityAnimationConfigRef","useRef","useEffect","current","isTabBarHidden","setIsTabBarHidden","useState","visible","Animated","Value","visibilityAnimationConfig","animation","show","spring","timing","toValue","duration","config","start","finished","hide","stopAnimation","setLayout","handleLayout","e","nativeEvent","tabBarHeight","hasHorizontalLabels","tabBarBackgroundElement","styles","tabBar","backgroundColor","card","borderTopColor","border","transform","translateY","interpolate","inputRange","outputRange","hairlineWidth","position","paddingHorizontal","left","right","absoluteFill","content","map","focused","onPress","event","emit","type","target","canPreventDefault","defaultPrevented","dispatch","CommonActions","navigate","name","merge","onLongPress","label","tabBarLabel","undefined","title","accessibilityLabel","tabBarAccessibilityLabel","length","params","tabBarTestID","tabBarAllowFontScaling","tabBarButton","tabBarIcon","color","size","tabBarBadge","tabBarBadgeStyle","tabBarLabelStyle","tabBarIconStyle","create","borderTopWidth","elevation","flex","flexDirection"],"sourceRoot":"../../src","sources":["BottomTabBar.tsx"],"mappings":";;;;;;;AAAA;AACA;AASA;AACA;AASA;AAGA;AACA;AACA;AAA4C;AAM5C,MAAMA,qBAAqB,GAAG,EAAE;AAChC,MAAMC,qBAAqB,GAAG,EAAE;AAChC,MAAMC,0BAA0B,GAAG,GAAG;AAEtC,MAAMC,eAAe,GAAGC,qBAAQ,CAACC,EAAE,KAAK,KAAK;AAS7C,MAAMC,yBAAyB,GAAG,QAKnB;EAAA,IALoB;IACjCC,KAAK;IACLC,WAAW;IACXC,MAAM;IACNC;EACO,CAAC;EACR,MAAM;IAAEC;EAAoB,CAAC,GAC3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UAAC,KAAK,EAAED,KAAM;UAAC,IAAI,EAAEC;QAAK,EAAG;MAAA,CAC1C,CACF;MACD,KAAK,EAAEjI,OAAO,CAACkI,WAAY;MAC3B,UAAU,EAAElI,OAAO,CAACmI,gBAAiB;MACrC,KAAK,EAAEf,KAAM;MACb,SAAS,EAAE/E,eAAgB;MAC3B,UAAU,EAAErC,OAAO,CAACoI,gBAAiB;MACrC,SAAS,EAAEpI,OAAO,CAACqI,eAAgB;MACnC,KAAK,EAAErI,OAAO,CAACM;IAAgB,EAC/B,CAC8B,CACP;EAEjC,CAAC,CAAC,CACG,CACO;AAEpB;AAEA,MAAM6E,MAAM,GAAG3E,uBAAU,CAAC8H,MAAM,CAAC;EAC/BlD,MAAM,EAAE;IACNa,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRlF,MAAM,EAAE,CAAC;IACTuH,cAAc,EAAE/H,uBAAU,CAACsF,aAAa;IACxC0C,SAAS,EAAE;EACb,CAAC;EACDpC,OAAO,EAAE;IACPqC,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabItem.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabItem.js new file mode 100644 index 00000000..2c64cfe1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabItem.js @@ -0,0 +1,183 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = BottomTabBarItem; +var _native = require("@react-navigation/native"); +var _color = _interopRequireDefault(require("color")); +var _react = _interopRequireDefault(require("react")); +var _reactNative = require("react-native"); +var _TabBarIcon = _interopRequireDefault(require("./TabBarIcon")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +function BottomTabBarItem(_ref) { + let { + focused, + route, + descriptor, + label, + icon, + badge, + badgeStyle, + to, + button = _ref2 => { + let { + children, + style, + onPress, + to, + accessibilityRole, + ...rest + } = _ref2; + if (_reactNative.Platform.OS === 'web' && to) { + // React Native Web doesn't forward `onClick` if we use `TouchableWithoutFeedback`. + // We need to use `onClick` to be able to prevent default browser handling of links. + return /*#__PURE__*/_react.default.createElement(_native.Link, _extends({}, rest, { + to: to, + style: [styles.button, style], + onPress: e => { + if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && ( + // ignore clicks with modifier keys + e.button == null || e.button === 0) // ignore everything but left clicks + ) { + e.preventDefault(); + onPress === null || onPress === void 0 ? void 0 : onPress(e); + } + } + }), children); + } else { + return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({}, rest, { + accessibilityRole: accessibilityRole, + onPress: onPress, + style: style + }), children); + } + }, + accessibilityLabel, + testID, + onPress, + onLongPress, + horizontal, + activeTintColor: customActiveTintColor, + inactiveTintColor: customInactiveTintColor, + activeBackgroundColor = 'transparent', + inactiveBackgroundColor = 'transparent', + showLabel = true, + allowFontScaling, + labelStyle, + iconStyle, + style + } = _ref; + const { + colors + } = (0, _native.useTheme)(); + const activeTintColor = customActiveTintColor === undefined ? colors.primary : customActiveTintColor; + const inactiveTintColor = customInactiveTintColor === undefined ? (0, _color.default)(colors.text).mix((0, _color.default)(colors.card), 0.5).hex() : customInactiveTintColor; + const renderLabel = _ref3 => { + let { + focused + } = _ref3; + if (showLabel === false) { + return null; + } + const color = focused ? activeTintColor : inactiveTintColor; + if (typeof label === 'string') { + return /*#__PURE__*/_react.default.createElement(_reactNative.Text, { + numberOfLines: 1, + style: [styles.label, { + color + }, horizontal ? styles.labelBeside : styles.labelBeneath, labelStyle], + allowFontScaling: allowFontScaling + }, label); + } + const { + options + } = descriptor; + const children = typeof options.tabBarLabel === 'string' ? options.tabBarLabel : options.title !== undefined ? options.title : route.name; + return label({ + focused, + color, + position: horizontal ? 'beside-icon' : 'below-icon', + children + }); + }; + const renderIcon = _ref4 => { + let { + focused + } = _ref4; + if (icon === undefined) { + return null; + } + const activeOpacity = focused ? 1 : 0; + const inactiveOpacity = focused ? 0 : 1; + return /*#__PURE__*/_react.default.createElement(_TabBarIcon.default, { + route: route, + horizontal: horizontal, + badge: badge, + badgeStyle: badgeStyle, + activeOpacity: activeOpacity, + inactiveOpacity: inactiveOpacity, + activeTintColor: activeTintColor, + inactiveTintColor: inactiveTintColor, + renderIcon: icon, + style: iconStyle + }); + }; + const scene = { + route, + focused + }; + const backgroundColor = focused ? activeBackgroundColor : inactiveBackgroundColor; + return button({ + to, + onPress, + onLongPress, + testID, + accessibilityLabel, + // FIXME: accessibilityRole: 'tab' doesn't seem to work as expected on iOS + accessibilityRole: _reactNative.Platform.select({ + ios: 'button', + default: 'tab' + }), + accessibilityState: { + selected: focused + }, + // @ts-expect-error: keep for compatibility with older React Native versions + accessibilityStates: focused ? ['selected'] : [], + style: [styles.tab, { + backgroundColor + }, horizontal ? styles.tabLandscape : styles.tabPortrait, style], + children: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderIcon(scene), renderLabel(scene)) + }); +} +const styles = _reactNative.StyleSheet.create({ + tab: { + flex: 1, + alignItems: 'center' + }, + tabPortrait: { + justifyContent: 'flex-end', + flexDirection: 'column' + }, + tabLandscape: { + justifyContent: 'center', + flexDirection: 'row' + }, + label: { + textAlign: 'center', + backgroundColor: 'transparent' + }, + labelBeneath: { + fontSize: 10 + }, + labelBeside: { + fontSize: 13, + marginLeft: 20, + marginTop: 3 + }, + button: { + display: 'flex' + } +}); +//# sourceMappingURL=BottomTabItem.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabItem.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabItem.js.map new file mode 100644 index 00000000..6a9449fb --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabItem.js.map @@ -0,0 +1 @@ +{"version":3,"names":["BottomTabBarItem","focused","route","descriptor","label","icon","badge","badgeStyle","to","button","children","style","onPress","accessibilityRole","rest","Platform","OS","styles","e","metaKey","altKey","ctrlKey","shiftKey","preventDefault","accessibilityLabel","testID","onLongPress","horizontal","activeTintColor","customActiveTintColor","inactiveTintColor","customInactiveTintColor","activeBackgroundColor","inactiveBackgroundColor","showLabel","allowFontScaling","labelStyle","iconStyle","colors","useTheme","undefined","primary","Color","text","mix","card","hex","renderLabel","color","labelBeside","labelBeneath","options","tabBarLabel","title","name","position","renderIcon","activeOpacity","inactiveOpacity","scene","backgroundColor","select","ios","default","accessibilityState","selected","accessibilityStates","tab","tabLandscape","tabPortrait","StyleSheet","create","flex","alignItems","justifyContent","flexDirection","textAlign","fontSize","marginLeft","marginTop","display"],"sourceRoot":"../../src","sources":["BottomTabItem.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAgBA;AAAsC;AAAA;AA+GvB,SAASA,gBAAgB,OAiE9B;EAAA,IAjE+B;IACvCC,OAAO;IACPC,KAAK;IACLC,UAAU;IACVC,KAAK;IACLC,IAAI;IACJC,KAAK;IACLC,UAAU;IACVC,EAAE;IACFC,MAAM,GAAG,SAOsB;MAAA,IAPrB;QACRC,QAAQ;QACRC,KAAK;QACLC,OAAO;QACPJ,EAAE;QACFK,iBAAiB;QACjB,GAAGC;MACoB,CAAC;MACxB,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,IAAIR,EAAE,EAAE;QAC/B;QACA;QACA,oBACE,6BAAC,YAAI,eACCM,IAAI;UACR,EAAE,EAAEN,EAAG;UACP,KAAK,EAAE,CAACS,MAAM,CAACR,MAAM,EAAEE,KAAK,CAAE;UAC9B,OAAO,EAAGO,CA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nB,CAAC;EACDV,YAAY,EAAE;IACZ2B,QAAQ,EAAE;EACZ,CAAC;EACD5B,WAAW,EAAE;IACX4B,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE;EACb,CAAC;EACDtE,MAAM,EAAE;IACNuE,OAAO,EAAE;EACX;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabView.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabView.js new file mode 100644 index 00000000..55eccfb9 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabView.js @@ -0,0 +1,134 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = BottomTabView; +var _elements = require("@react-navigation/elements"); +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +var _reactNativeSafeAreaContext = require("react-native-safe-area-context"); +var _BottomTabBarHeightCallbackContext = _interopRequireDefault(require("../utils/BottomTabBarHeightCallbackContext")); +var _BottomTabBarHeightContext = _interopRequireDefault(require("../utils/BottomTabBarHeightContext")); +var _BottomTabBar = _interopRequireWildcard(require("./BottomTabBar")); +var _ScreenFallback = require("./ScreenFallback"); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +function BottomTabView(props) { + const { + tabBar = props => /*#__PURE__*/React.createElement(_BottomTabBar.default, props), + state, + navigation, + descriptors, + safeAreaInsets, + detachInactiveScreens = _reactNative.Platform.OS === 'web' || _reactNative.Platform.OS === 'android' || _reactNative.Platform.OS === 'ios', + sceneContainerStyle + } = props; + const focusedRouteKey = state.routes[state.index].key; + const [loaded, setLoaded] = React.useState([focusedRouteKey]); + if (!loaded.includes(focusedRouteKey)) { + setLoaded([...loaded, focusedRouteKey]); + } + const dimensions = _elements.SafeAreaProviderCompat.initialMetrics.frame; + const [tabBarHeight, setTabBarHeight] = React.useState(() => (0, _BottomTabBar.getTabBarHeight)({ + state, + descriptors, + dimensions, + layout: { + width: dimensions.width, + height: 0 + }, + insets: { + ..._elements.SafeAreaProviderCompat.initialMetrics.insets, + ...props.safeAreaInsets + }, + style: descriptors[state.routes[state.index].key].options.tabBarStyle + })); + const renderTabBar = () => { + return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaInsetsContext.Consumer, null, insets => tabBar({ + state: state, + descriptors: descriptors, + navigation: navigation, + insets: { + top: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.top) ?? (insets === null || insets === void 0 ? void 0 : insets.top) ?? 0, + right: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.right) ?? (insets === null || insets === void 0 ? void 0 : insets.right) ?? 0, + bottom: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.bottom) ?? (insets === null || insets === void 0 ? void 0 : insets.bottom) ?? 0, + left: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.left) ?? (insets === null || insets === void 0 ? void 0 : insets.left) ?? 0 + } + })); + }; + const { + routes + } = state; + return /*#__PURE__*/React.createElement(_elements.SafeAreaProviderCompat, null, /*#__PURE__*/React.createElement(_ScreenFallback.MaybeScreenContainer, { + enabled: detachInactiveScreens, + hasTwoStates: true, + style: styles.container + }, routes.map((route, index) => { + const descriptor = descriptors[route.key]; + const { + lazy = true, + unmountOnBlur + } = descriptor.options; + const isFocused = state.index === index; + if (unmountOnBlur && !isFocused) { + return null; + } + if (lazy && !loaded.includes(route.key) && !isFocused) { + // Don't render a lazy screen if we've never navigated to it + return null; + } + const { + freezeOnBlur, + header = _ref => { + let { + layout, + options + } = _ref; + return /*#__PURE__*/React.createElement(_elements.Header, _extends({}, options, { + layout: layout, + title: (0, _elements.getHeaderTitle)(options, route.name) + })); + }, + headerShown, + headerStatusBarHeight, + headerTransparent + } = descriptor.options; + return /*#__PURE__*/React.createElement(_ScreenFallback.MaybeScreen, { + key: route.key, + style: [_reactNative.StyleSheet.absoluteFill, { + zIndex: isFocused ? 0 : -1 + }], + visible: isFocused, + enabled: detachInactiveScreens, + freezeOnBlur: freezeOnBlur + }, /*#__PURE__*/React.createElement(_BottomTabBarHeightContext.default.Provider, { + value: tabBarHeight + }, /*#__PURE__*/React.createElement(_elements.Screen, { + focused: isFocused, + route: descriptor.route, + navigation: descriptor.navigation, + headerShown: headerShown, + headerStatusBarHeight: headerStatusBarHeight, + headerTransparent: headerTransparent, + header: header({ + layout: dimensions, + route: descriptor.route, + navigation: descriptor.navigation, + options: descriptor.options + }), + style: sceneContainerStyle + }, descriptor.render()))); + })), /*#__PURE__*/React.createElement(_BottomTabBarHeightCallbackContext.default.Provider, { + value: setTabBarHeight + }, renderTabBar())); +} +const styles = _reactNative.StyleSheet.create({ + container: { + flex: 1, + overflow: 'hidden' + } +}); +//# sourceMappingURL=BottomTabView.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabView.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabView.js.map new file mode 100644 index 00000000..c9608b47 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabView.js.map @@ -0,0 +1 @@ +{"version":3,"names":["BottomTabView","props","tabBar","state","navigation","descriptors","safeAreaInsets","detachInactiveScreens","Platform","OS","sceneContainerStyle","focusedRouteKey","routes","index","key","loaded","setLoaded","React","useState","includes","dimensions","SafeAreaProviderCompat","initialMetrics","frame","tabBarHeight","setTabBarHeight","getTabBarHeight","layout","width","height","insets","style","options","tabBarStyle","renderTabBar","top","right","bottom","left","styles","container","map","route","descriptor","lazy","unmountOnBlur","isFocused","freezeOnBlur","header","getHeaderTitle","name","headerShown","headerStatusBarHeight","headerTransparent","StyleSheet","absoluteFill","zIndex","render","create","flex","overflow"],"sourceRoot":"../../src","sources":["BottomTabView.tsx"],"mappings":";;;;;;AAAA;AAUA;AACA;AACA;AAUA;AACA;AACA;AACA;AAAqE;AAAA;AAAA;AAAA;AAQtD,SAASA,aAAa,CAACC,KAAY,EAAE;EAClD,MAAM;IACJC,MAAM,GAAID,KAAwB,iBAAK,oBAAC,qBAAY,EAAKA,KAAK,CAAI;IAClEE,KAAK;IACLC,UAAU;IACVC,WAAW;IACXC,cAAc;IACdC,qBAAqB,GAAGC,qBAAQ,CAACC,EAAE,KAAK,KAAK,IAC3CD,qBAAQ,CAACC,EAAE,KAAK,SAAS,IACzBD,qBAAQ,CAACC,EAAE,KAAK,KAAK;IACvBC;EACF,CAAC,GAAGT,KAAK;EAET,MAAMU,eAAe,GAAGR,KAAK,CAACS,MAAM,CAACT,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ules/@react-navigation/bottom-tabs/lib/commonjs/views/ScreenFallback.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/ScreenFallback.js new file mode 100644 index 00000000..7c9b4aef --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/ScreenFallback.js @@ -0,0 +1,50 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MaybeScreen = MaybeScreen; +exports.MaybeScreenContainer = void 0; +var _elements = require("@react-navigation/elements"); +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +let Screens; +try { + Screens = require('react-native-screens'); +} catch (e) { + // Ignore +} +const MaybeScreenContainer = _ref => { + var _Screens, _Screens$screensEnabl; + let { + enabled, + ...rest + } = _ref; + if ((_Screens = Screens) !== null && _Screens !== void 0 && (_Screens$screensEnabl = _Screens.screensEnabled) !== null && _Screens$screensEnabl !== void 0 && _Screens$screensEnabl.call(_Screens)) { + return /*#__PURE__*/React.createElement(Screens.ScreenContainer, _extends({ + enabled: enabled + }, rest)); + } + return /*#__PURE__*/React.createElement(_reactNative.View, rest); +}; +exports.MaybeScreenContainer = MaybeScreenContainer; +function MaybeScreen(_ref2) { + var _Screens2, _Screens2$screensEnab; + let { + visible, + children, + ...rest + } = _ref2; + if ((_Screens2 = Screens) !== null && _Screens2 !== void 0 && (_Screens2$screensEnab = _Screens2.screensEnabled) !== null && _Screens2$screensEnab !== void 0 && _Screens2$screensEnab.call(_Screens2)) { + return /*#__PURE__*/React.createElement(Screens.Screen, _extends({ + activityState: visible ? 2 : 0 + }, rest), children); + } + return /*#__PURE__*/React.createElement(_elements.ResourceSavingView, _extends({ + visible: visible + }, rest), children); +} +//# sourceMappingURL=ScreenFallback.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/ScreenFallback.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/ScreenFallback.js.map new file mode 100644 index 00000000..db986467 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/ScreenFallback.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Screens","require","e","MaybeScreenContainer","enabled","rest","screensEnabled","MaybeScreen","visible","children"],"sourceRoot":"../../src","sources":["ScreenFallback.tsx"],"mappings":";;;;;;;AAAA;AACA;AACA;AAAqE;AAAA;AAAA;AAUrE,IAAIA,OAA0D;AAE9D,IAAI;EACFA,OAAO,GAAGC,OAAO,CAAC,sBAAsB,CAAC;AAC3C,CAAC,CAAC,OAAOC,CAAC,EAAE;EACV;AAAA;AAGK,MAAMC,oBAAoB,GAAG,QAO9B;EAAA;EAAA,IAP+B;IACnCC,OAAO;IACP,GAAGC;EAKL,CAAC;EACC,gBAAIL,OAAO,8DAAP,SAASM,cAAc,kDAAvB,oCAA2B,EAAE;IAC/B,oBAAO,oBAAC,OAAO,CAAC,eAAe;MAAC,OAAO,EAAEF;IAAQ,GAAKC,IAAI,EAAI;EAChE;EAEA,oBAAO,oBAAC,iBAAI,EAAKA,IAAI,CAAI;AAC3B,CAAC;AAAC;AAEK,SAASE,WAAW,QAAwC;EAAA;EAAA,IAAvC;IAAEC,OAAO;IAAEC,QAAQ;IAAE,GAAGJ;EAAY,CAAC;EAC/D,iBAAIL,OAAO,+DAAP,UAASM,cAAc,kDAAvB,qCAA2B,EAAE;IAC/B,oBACE,oBAAC,OAAO,CAAC,MAAM;MAAC,aAAa,EAAEE,OAAO,GAAG,CAAC,GAAG;IAAE,GAAKH,IAAI,GACrDI,QAAQ,CACM;EAErB;EAEA,oBACE,oBAAC,4BAAkB;IAAC,OAAO,EAAED;EAAQ,GAAKH,IAAI,GAC3CI,QAAQ,CACU;AAEzB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/TabBarIcon.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/TabBarIcon.js new file mode 100644 index 00000000..80325baf --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/TabBarIcon.js @@ -0,0 +1,84 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = TabBarIcon; +var _react = _interopRequireDefault(require("react")); +var _reactNative = require("react-native"); +var _Badge = _interopRequireDefault(require("./Badge")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function TabBarIcon(_ref) { + let { + route: _, + horizontal, + badge, + badgeStyle, + activeOpacity, + inactiveOpacity, + activeTintColor, + inactiveTintColor, + renderIcon, + style + } = _ref; + const size = 25; + + // We render the icon twice at the same position on top of each other: + // active and inactive one, so we can fade between them. + return /*#__PURE__*/_react.default.createElement(_reactNative.View, { + style: [horizontal ? styles.iconHorizontal : styles.iconVertical, style] + }, /*#__PURE__*/_react.default.createElement(_reactNative.View, { + style: [styles.icon, { + opacity: activeOpacity + }] + }, renderIcon({ + focused: true, + size, + color: activeTintColor + })), /*#__PURE__*/_react.default.createElement(_reactNative.View, { + style: [styles.icon, { + opacity: inactiveOpacity + }] + }, renderIcon({ + focused: false, + size, + color: inactiveTintColor + })), /*#__PURE__*/_react.default.createElement(_Badge.default, { + visible: badge != null, + style: [styles.badge, horizontal ? styles.badgeHorizontal : styles.badgeVertical, badgeStyle], + size: size * 3 / 4 + }, badge)); +} +const styles = _reactNative.StyleSheet.create({ + icon: { + // We render the icon twice at the same position on top of each other: + // active and inactive one, so we can fade between them: + // Cover the whole iconContainer: + position: 'absolute', + alignSelf: 'center', + alignItems: 'center', + justifyContent: 'center', + height: '100%', + width: '100%', + // Workaround for react-native >= 0.54 layout bug + minWidth: 25 + }, + iconVertical: { + flex: 1 + }, + iconHorizontal: { + height: '100%', + marginTop: 3 + }, + badge: { + position: 'absolute', + left: 3 + }, + badgeVertical: { + top: 3 + }, + badgeHorizontal: { + top: 7 + } +}); +//# sourceMappingURL=TabBarIcon.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/TabBarIcon.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/TabBarIcon.js.map new file mode 100644 index 00000000..875af804 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/TabBarIcon.js.map @@ -0,0 +1 @@ +{"version":3,"names":["TabBarIcon","route","_","horizontal","badge","badgeStyle","activeOpacity","inactiveOpacity","activeTintColor","inactiveTintColor","renderIcon","style","size","styles","iconHorizontal","iconVertical","icon","opacity","focused","color","badgeHorizontal","badgeVertical","StyleSheet","create","position","alignSelf","alignItems","justifyContent","height","width","minWidth","flex","marginTop","left","top"],"sourceRoot":"../../src","sources":["TabB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AQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE,MAAM;IACb;IACAC,QAAQ,EAAE;EACZ,CAAC;EACDf,YAAY,EAAE;IACZgB,IAAI,EAAE;EACR,CAAC;EACDjB,cAAc,EAAE;IACdc,MAAM,EAAE,MAAM;IACdI,SAAS,EAAE;EACb,CAAC;EACD5B,KAAK,EAAE;IACLoB,QAAQ,EAAE,UAAU;IACpBS,IAAI,EAAE;EACR,CAAC;EACDZ,aAAa,EAAE;IACba,GAAG,EAAE;EACP,CAAC;EACDd,eAAe,EAAE;IACfc,GAAG,EAAE;EACP;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/index.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/index.js new file mode 100644 index 00000000..314621c4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/index.js @@ -0,0 +1,22 @@ +/** + * Navigators + */ +export { default as createBottomTabNavigator } from './navigators/createBottomTabNavigator'; + +/** + * Views + */ +export { default as BottomTabBar } from './views/BottomTabBar'; +export { default as BottomTabView } from './views/BottomTabView'; + +/** + * Utilities + */ +export { default as BottomTabBarHeightCallbackContext } from './utils/BottomTabBarHeightCallbackContext'; +export { default as BottomTabBarHeightContext } from './utils/BottomTabBarHeightContext'; +export { default as useBottomTabBarHeight } from './utils/useBottomTabBarHeight'; + +/** + * Types + */ +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/index.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/index.js.map new file mode 100644 index 00000000..d7f7e4b3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["default","createBottomTabNavigator","BottomTabBar","BottomTabView","BottomTabBarHeightCallbackContext","BottomTabBarHeightContext","useBottomTabBarHeight"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,wBAAwB,QAAQ,uCAAuC;;AAE3F;AACA;AACA;AACA,SAASD,OAAO,IAAIE,YAAY,QAAQ,sBAAsB;AAC9D,SAASF,OAAO,IAAIG,aAAa,QAAQ,uBAAuB;;AAEhE;AACA;AACA;AACA,SAASH,OAAO,IAAII,iCAAiC,QAAQ,2CAA2C;AACxG,SAASJ,OAAO,IAAIK,yBAAyB,QAAQ,mCAAmC;AACxF,SAASL,OAAO,IAAIM,qBAAqB,QAAQ,+BAA+B;;AAEhF;AACA;AACA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/navigators/createBottomTabNavigator.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/navigators/createBottomTabNavigator.js new file mode 100644 index 00000000..2184e0fb --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/navigators/createBottomTabNavigator.js @@ -0,0 +1,76 @@ +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +import { createNavigatorFactory, TabRouter, useNavigationBuilder } from '@react-navigation/native'; +import * as React from 'react'; +import warnOnce from 'warn-once'; +import BottomTabView from '../views/BottomTabView'; +function BottomTabNavigator(_ref) { + let { + id, + initialRouteName, + backBehavior, + children, + screenListeners, + screenOptions, + sceneContainerStyle, + ...restWithDeprecated + } = _ref; + const { + // @ts-expect-error: lazy is deprecated + lazy, + // @ts-expect-error: tabBarOptions is deprecated + tabBarOptions, + ...rest + } = restWithDeprecated; + let defaultScreenOptions = {}; + if (tabBarOptions) { + Object.assign(defaultScreenOptions, { + tabBarHideOnKeyboard: tabBarOptions.keyboardHidesTabBar, + tabBarActiveTintColor: tabBarOptions.activeTintColor, + tabBarInactiveTintColor: tabBarOptions.inactiveTintColor, + tabBarActiveBackgroundColor: tabBarOptions.activeBackgroundColor, + tabBarInactiveBackgroundColor: tabBarOptions.inactiveBackgroundColor, + tabBarAllowFontScaling: tabBarOptions.allowFontScaling, + tabBarShowLabel: tabBarOptions.showLabel, + tabBarLabelStyle: tabBarOptions.labelStyle, + tabBarIconStyle: tabBarOptions.iconStyle, + tabBarItemStyle: tabBarOptions.tabStyle, + tabBarLabelPosition: tabBarOptions.labelPosition ?? (tabBarOptions.adaptive === false ? 'below-icon' : undefined), + tabBarStyle: [{ + display: tabBarOptions.tabBarVisible ? 'none' : 'flex' + }, defaultScreenOptions.tabBarStyle] + }); + Object.keys(defaultScreenOptions).forEach(key => { + if (defaultScreenOptions[key] === undefined) { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete defaultScreenOptions[key]; + } + }); + warnOnce(tabBarOptions, `Bottom Tab Navigator: 'tabBarOptions' is deprecated. Migrate the options to 'screenOptions' instead.\n\nPlace the following in 'screenOptions' in your code to keep current behavior:\n\n${JSON.stringify(defaultScreenOptions, null, 2)}\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator#options for more details.`); + } + if (typeof lazy === 'boolean') { + defaultScreenOptions.lazy = lazy; + warnOnce(true, `Bottom Tab Navigator: 'lazy' in props is deprecated. Move it to 'screenOptions' instead.\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator/#lazy for more details.`); + } + const { + state, + descriptors, + navigation, + NavigationContent + } = useNavigationBuilder(TabRouter, { + id, + initialRouteName, + backBehavior, + children, + screenListeners, + screenOptions, + defaultScreenOptions + }); + return /*#__PURE__*/React.createElement(NavigationContent, null, /*#__PURE__*/React.createElement(BottomTabView, _extends({}, rest, { + state: state, + navigation: navigation, + descriptors: descriptors, + sceneContainerStyle: sceneContainerStyle + }))); +} +export default createNavigatorFactory(BottomTabNavigator); +//# sourceMappingURL=createBottomTabNavigator.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/navigators/createBottomTabNavigator.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/navigators/createBottomTabNavigator.js.map new file mode 100644 index 00000000..b31c2a08 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/navigators/createBottomTabNavigator.js.map @@ -0,0 +1 @@ +{"version":3,"names":["createNavigatorFactory","TabRouter","useNavigationBuilder","React","warnOnce","BottomTabView","BottomTabNavigator","id","initialRouteName","backBehavior","children","screenListeners","screenOptions","sceneContainerStyle","restWithDeprecated","lazy","tabBarOptions","rest","defaultScreenOptions","Object","assign","tabBarHideOnKeyboard","keyboardHidesTabBar","tabBarActiveTintColor","activeTintColor","tabBarInactiveTintColor","inactiveTintColor","tabBarActiveBackgroundColor","activeBackgroundColor","tabBarInactiveBackgroundColor","inactiveBackgroundColor","tabBarAllowFontScaling","allowFontScaling","tabBarShowLabel","showLabel","tabBarLabelStyle","labelStyle","tabBarIconStyle","iconStyle","tabBarItemStyle","tabStyle","tabBarLabelPosition","labelPosition","adaptive","undefined","tabBarStyle","display","tabBarVisible","keys","forEach","key","JSON","stringify","state","descriptors","navigation","NavigationContent"],"sourceRoot":"../../src","sources":["createBottomTabNavigator.tsx"],"mappings":";AAAA,SACEA,sBAAsB,EAKtBC,SAAS,EAETC,oBAAoB,QACf,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,QAAQ,MAAM,WAAW;AAOhC,OAAOC,aAAa,MAAM,wBAAwB;AAWlD,SAASC,kBAAkB,OASjB;EAAA,IATkB;IAC1BC,EAAE;IACFC,gBAAgB;IAChBC,YAAY;IACZC,QAAQ;IACRC,eAAe;IACfC,aAAa;IACbC,mBAAmB;IACnB,GAAGC;EACE,CAAC;EACN,MAAM;IACJ;IACAC,IAAI;IACJ;IACAC,aAAa;IACb,GAAGC;EACL,CAAC,GAAGH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I,GAAGA,IAAI;IAEhCX,QAAQ,CACN,IAAI,EACH,+KAA8K,CAChL;EACH;EAEA,MAAM;IAAEiD,KAAK;IAAEC,WAAW;IAAEC,UAAU;IAAEC;EAAkB,CAAC,GACzDtD,oBAAoB,CAMlBD,SAAS,EAAE;IACXM,EAAE;IACFC,gBAAgB;IAChBC,YAAY;IACZC,QAAQ;IACRC,eAAe;IACfC,aAAa;IACbM;EACF,CAAC,CAAC;EAEJ,oBACE,oBAAC,iBAAiB,qBAChB,oBAAC,aAAa,eACRD,IAAI;IACR,KAAK,EAAEoC,KAAM;IACb,UAAU,EAAEE,UAAW;IACvB,WAAW,EAAED,WAAY;IACzB,mBAAmB,EAAEzC;EAAoB,GACzC,CACgB;AAExB;AAEA,eAAeb,sBAAsB,CAKnCM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/types.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/types.js new file mode 100644 index 00000000..718fd38a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/types.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/types.js.map new file mode 100644 index 00000000..e7ae1280 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/types.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":""} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightCallbackContext.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightCallbackContext.js new file mode 100644 index 00000000..ca06ab40 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightCallbackContext.js @@ -0,0 +1,3 @@ +import * as React from 'react'; +export default /*#__PURE__*/React.createContext(undefined); +//# sourceMappingURL=BottomTabBarHeightCallbackContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightCallbackContext.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightCallbackContext.js.map new file mode 100644 index 00000000..7441c9c5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightCallbackContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","createContext","undefined"],"sourceRoot":"../../src","sources":["BottomTabBarHeightCallbackContext.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,4BAAeA,KAAK,CAACC,aAAa,CAChCC,SAAS,CACV"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightContext.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightContext.js new file mode 100644 index 00000000..a82e3d13 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightContext.js @@ -0,0 +1,3 @@ +import * as React from 'react'; +export default /*#__PURE__*/React.createContext(undefined); +//# sourceMappingURL=BottomTabBarHeightContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightContext.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightContext.js.map new file mode 100644 index 00000000..200a0877 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","createContext","undefined"],"sourceRoot":"../../src","sources":["BottomTabBarHeightContext.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,4BAAeA,KAAK,CAACC,aAAa,CAAqBC,SAAS,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useBottomTabBarHeight.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useBottomTabBarHeight.js new file mode 100644 index 00000000..6bbe1018 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useBottomTabBarHeight.js @@ -0,0 +1,10 @@ +import * as React from 'react'; +import BottomTabBarHeightContext from './BottomTabBarHeightContext'; +export default function useBottomTabBarHeight() { + const height = React.useContext(BottomTabBarHeightContext); + if (height === undefined) { + throw new Error("Couldn't find the bottom tab bar height. Are you inside a screen in Bottom Tab Navigator?"); + } + return height; +} +//# sourceMappingURL=useBottomTabBarHeight.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useBottomTabBarHeight.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useBottomTabBarHeight.js.map new file mode 100644 index 00000000..83a947ab --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useBottomTabBarHeight.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","BottomTabBarHeightContext","useBottomTabBarHeight","height","useContext","undefined","Error"],"sourceRoot":"../../src","sources":["useBottomTabBarHeight.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,yBAAyB,MAAM,6BAA6B;AAEnE,eAAe,SAASC,qBAAqB,GAAG;EAC9C,MAAMC,MAAM,GAAGH,KAAK,CAACI,UAAU,CAACH,yBAAyB,CAAC;EAE1D,IAAIE,MAAM,KAAKE,SAAS,EAAE;IACxB,MAAM,IAAIC,KAAK,CACb,2FAA2F,CAC5F;EACH;EAEA,OAAOH,MAAM;AACf"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useIsKeyboardShown.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useIsKeyboardShown.js new file mode 100644 index 00000000..0d7f97cc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useIsKeyboardShown.js @@ -0,0 +1,20 @@ +import * as React from 'react'; +import { Keyboard, Platform } from 'react-native'; +export default function useIsKeyboardShown() { + const [isKeyboardShown, setIsKeyboardShown] = React.useState(false); + React.useEffect(() => { + const handleKeyboardShow = () => setIsKeyboardShown(true); + const handleKeyboardHide = () => setIsKeyboardShown(false); + let subscriptions; + if (Platform.OS === 'ios') { + subscriptions = [Keyboard.addListener('keyboardWillShow', handleKeyboardShow), Keyboard.addListener('keyboardWillHide', handleKeyboardHide)]; + } else { + subscriptions = [Keyboard.addListener('keyboardDidShow', handleKeyboardShow), Keyboard.addListener('keyboardDidHide', handleKeyboardHide)]; + } + return () => { + subscriptions.forEach(s => s.remove()); + }; + }, []); + return isKeyboardShown; +} +//# sourceMappingURL=useIsKeyboardShown.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useIsKeyboardShown.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useIsKeyboardShown.js.map new file mode 100644 index 00000000..04806cfe --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useIsKeyboardShown.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","Keyboard","Platform","useIsKeyboardShown","isKeyboardShown","setIsKeyboardShown","useState","useEffect","handleKeyboardShow","handleKeyboardHide","subscriptions","OS","addListener","forEach","s","remove"],"sourceRoot":"../../src","sources":["useIsKeyboardShown.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAA8BC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AAEtE,eAAe,SAASC,kBAAkB,GAAG;EAC3C,MAAM,CAACC,eAAe,EAAEC,kBAAkB,CAAC,GAAGL,KAAK,CAACM,QAAQ,CAAC,KAAK,CAAC;EAEnEN,KAAK,CAACO,SAAS,CAAC,MAAM;IACpB,MAAMC,kBAAkB,GAAG,MAAMH,kBAAkB,CAAC,IAAI,CAAC;IACzD,MAAMI,kBAAkB,GAAG,MAAMJ,kBAAkB,CAAC,KAAK,CAAC;IAE1D,IAAIK,aAAoC;IAExC,IAAIR,QAAQ,CAACS,EAAE,KAAK,KAAK,EAAE;MACzBD,aAAa,GAAG,CACdT,QAAQ,CAACW,WAAW,CAAC,kBAAkB,EAAEJ,kBAAkB,CAAC,EAC5DP,QAAQ,CAACW,WAAW,CAAC,kBAAkB,EAAEH,kBAAkB,CAAC,CAC7D;IACH,CAAC,MAAM;MACLC,aAAa,GAAG,CACdT,QAAQ,CAACW,WAAW,CAAC,iBAAiB,EAAEJ,kBAAkB,CAAC,EAC3DP,QAAQ,CAACW,WAAW,CAAC,iBAAiB,EAAEH,kBAAkB,CAAC,CAC5D;IACH;IAEA,OAAO,MAAM;MACXC,aAAa,CAACG,OAAO,CAAEC,CAAC,IAAKA,CAAC,CAACC,MAAM,EAAE,CAAC;IAC1C,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOX,eAAe;AACxB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/Badge.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/Badge.js new file mode 100644 index 00000000..674f06f6 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/Badge.js @@ -0,0 +1,79 @@ +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +import { useTheme } from '@react-navigation/native'; +import color from 'color'; +import * as React from 'react'; +import { Animated, StyleSheet } from 'react-native'; +export default function Badge(_ref) { + let { + children, + style, + visible = true, + size = 18, + ...rest + } = _ref; + const [opacity] = React.useState(() => new Animated.Value(visible ? 1 : 0)); + const [rendered, setRendered] = React.useState(visible); + const theme = useTheme(); + React.useEffect(() => { + if (!rendered) { + return; + } + Animated.timing(opacity, { + toValue: visible ? 1 : 0, + duration: 150, + useNativeDriver: true + }).start(_ref2 => { + let { + finished + } = _ref2; + if (finished && !visible) { + setRendered(false); + } + }); + return () => opacity.stopAnimation(); + }, [opacity, rendered, visible]); + if (!rendered) { + if (visible) { + setRendered(true); + } else { + return null; + } + } + + // @ts-expect-error: backgroundColor definitely exists + const { + backgroundColor = theme.colors.notification, + ...restStyle + } = StyleSheet.flatten(style) || {}; + const textColor = color(backgroundColor).isLight() ? 'black' : 'white'; + const borderRadius = size / 2; + const fontSize = Math.floor(size * 3 / 4); + return /*#__PURE__*/React.createElement(Animated.Text, _extends({ + numberOfLines: 1, + style: [{ + transform: [{ + scale: opacity.interpolate({ + inputRange: [0, 1], + outputRange: [0.5, 1] + }) + }], + color: textColor, + lineHeight: size - 1, + height: size, + minWidth: size, + opacity, + backgroundColor, + fontSize, + borderRadius + }, styles.container, restStyle] + }, rest), children); +} +const styles = StyleSheet.create({ + container: { + alignSelf: 'flex-end', + textAlign: 'center', + paddingHorizontal: 4, + overflow: 'hidden' + } +}); +//# sourceMappingURL=Badge.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/Badge.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/Badge.js.map new file mode 100644 index 00000000..fb55ccbc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/Badge.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useTheme","color","React","Animated","StyleSheet","Badge","children","style","visible","size","rest","opacity","useState","Value","rendered","setRendered","theme","useEffect","timing","toValue","duration","useNativeDriver","start","finished","stopAnimation","backgroundColor","colors","notification","restStyle","flatten","textColor","isLight","borderRadius","fontSize","Math","floor","transform","scale","interpolate","inputRange","outputRange","lineHeight","height","minWidth","styles","container","create","alignSelf","textAlign","paddingHorizontal","overflow"],"sourceRoot":"../../src","sources":["Badge.tsx"],"mappings":";AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAaC,UAAU,QAAmB,cAAc;AAqBzE,eAAe,SAASC,KAAK,OAMnB;EAAA,IANoB;IAC5BC,QAAQ;IACRC,KAAK;IACLC,OAAO,GAAG,IAAI;IACdC,IAAI,GAAG,EAAE;IACT,GAAGC;EACE,CAAC;EACN,MAAM,CAACC,OAAO,CAAC,GAAGT,KAAK,CAACU,QAAQ,CAAC,MAAM,IAAIT,QAAQ,CAACU,KAAK,CAACL,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;EAC3E,MAAM,CAACM,QAAQ,EAAEC,WAAW,CAAC,GAAGb,KAAK,CAACU,QAAQ,CAACJ,OAAO,CAAC;EAEvD,MAAMQ,KAAK,GAAGhB,QAAQ,EAAE;EAExBE,KAAK,CAACe,SAAS,CAAC,MAAM;IACpB,IAAI,CAACH,QAAQ,EAAE;MACb;IACF;IAEAX,QAAQ,CAACe,MAAM,CAACP,OAAO,EAAE;MACvBQ,OAAO,EAAEX,OAAO,GAAG,CAAC,GAAG,CAAC;MACxBY,QAAQ,EAAE,GAAG;MACbC,eAAe,EAAE;IACnB,CAAC,CAAC,CAACC,KAAK,CAAC,SAAkB;MAAA,IAAjB;QAAEC;MAAS,CAAC;MACpB,IAAIA,QAAQ,IAAI,CAACf,OAAO,EAAE;QACxBO,WAAW,CAAC,KAAK,CAAC;MACpB;IACF,CAAC,CAAC;IAEF,OAAO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SAAS,EAAE;IACTE,SAAS,EAAE,UAAU;IACrBC,SAAS,EAAE,QAAQ;IACnBC,iBAAiB,EAAE,CAAC;IACpBC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabBar.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabBar.js new file mode 100644 index 00000000..dccff42b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabBar.js @@ -0,0 +1,301 @@ +import { MissingIcon } from '@react-navigation/elements'; +import { CommonActions, NavigationContext, NavigationRouteContext, useLinkBuilder, useTheme } from '@react-navigation/native'; +import React from 'react'; +import { Animated, Platform, StyleSheet, View } from 'react-native'; +import { useSafeAreaFrame } from 'react-native-safe-area-context'; +import BottomTabBarHeightCallbackContext from '../utils/BottomTabBarHeightCallbackContext'; +import useIsKeyboardShown from '../utils/useIsKeyboardShown'; +import BottomTabItem from './BottomTabItem'; +const DEFAULT_TABBAR_HEIGHT = 49; +const COMPACT_TABBAR_HEIGHT = 32; +const DEFAULT_MAX_TAB_ITEM_WIDTH = 125; +const useNativeDriver = Platform.OS !== 'web'; +const shouldUseHorizontalLabels = _ref => { + let { + state, + descriptors, + layout, + dimensions + } = _ref; + const { + tabBarLabelPosition + } = descriptors[state.routes[state.index].key].options; + if (tabBarLabelPosition) { + switch (tabBarLabelPosition) { + case 'beside-icon': + return true; + case 'below-icon': + return false; + } + } + if (layout.width >= 768) { + // Screen size matches a tablet + const maxTabWidth = state.routes.reduce((acc, route) => { + const { + tabBarItemStyle + } = descriptors[route.key].options; + const flattenedStyle = StyleSheet.flatten(tabBarItemStyle); + if (flattenedStyle) { + if (typeof flattenedStyle.width === 'number') { + return acc + flattenedStyle.width; + } else if (typeof flattenedStyle.maxWidth === 'number') { + return acc + flattenedStyle.maxWidth; + } + } + return acc + DEFAULT_MAX_TAB_ITEM_WIDTH; + }, 0); + return maxTabWidth <= layout.width; + } else { + return dimensions.width > dimensions.height; + } +}; +const getPaddingBottom = insets => Math.max(insets.bottom - Platform.select({ + ios: 4, + default: 0 +}), 0); +export const getTabBarHeight = _ref2 => { + var _StyleSheet$flatten; + let { + state, + descriptors, + dimensions, + insets, + style, + ...rest + } = _ref2; + // @ts-ignore + const customHeight = (_StyleSheet$flatten = StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.height; + if (typeof customHeight === 'number') { + return customHeight; + } + const isLandscape = dimensions.width > dimensions.height; + const horizontalLabels = shouldUseHorizontalLabels({ + state, + descriptors, + dimensions, + ...rest + }); + const paddingBottom = getPaddingBottom(insets); + if (Platform.OS === 'ios' && !Platform.isPad && isLandscape && horizontalLabels) { + return COMPACT_TABBAR_HEIGHT + paddingBottom; + } + return DEFAULT_TABBAR_HEIGHT + paddingBottom; +}; +export default function BottomTabBar(_ref3) { + let { + state, + navigation, + descriptors, + insets, + style + } = _ref3; + const { + colors + } = useTheme(); + const buildLink = useLinkBuilder(); + const focusedRoute = state.routes[state.index]; + const focusedDescriptor = descriptors[focusedRoute.key]; + const focusedOptions = focusedDescriptor.options; + const { + tabBarShowLabel, + tabBarHideOnKeyboard = false, + tabBarVisibilityAnimationConfig, + tabBarStyle, + tabBarBackground, + tabBarActiveTintColor, + tabBarInactiveTintColor, + tabBarActiveBackgroundColor, + tabBarInactiveBackgroundColor + } = focusedOptions; + const dimensions = useSafeAreaFrame(); + const isKeyboardShown = useIsKeyboardShown(); + const onHeightChange = React.useContext(BottomTabBarHeightCallbackContext); + const shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown); + const visibilityAnimationConfigRef = React.useRef(tabBarVisibilityAnimationConfig); + React.useEffect(() => { + visibilityAnimationConfigRef.current = tabBarVisibilityAnimationConfig; + }); + const [isTabBarHidden, setIsTabBarHidden] = React.useState(!shouldShowTabBar); + const [visible] = React.useState(() => new Animated.Value(shouldShowTabBar ? 1 : 0)); + React.useEffect(() => { + const visibilityAnimationConfig = visibilityAnimationConfigRef.current; + if (shouldShowTabBar) { + var _visibilityAnimationC, _visibilityAnimationC2; + const animation = (visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC = visibilityAnimationConfig.show) === null || _visibilityAnimationC === void 0 ? void 0 : _visibilityAnimationC.animation) === 'spring' ? Animated.spring : Animated.timing; + animation(visible, { + toValue: 1, + useNativeDriver, + duration: 250, + ...(visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC2 = visibilityAnimationConfig.show) === null || _visibilityAnimationC2 === void 0 ? void 0 : _visibilityAnimationC2.config) + }).start(_ref4 => { + let { + finished + } = _ref4; + if (finished) { + setIsTabBarHidden(false); + } + }); + } else { + var _visibilityAnimationC3, _visibilityAnimationC4; + setIsTabBarHidden(true); + const animation = (visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC3 = visibilityAnimationConfig.hide) === null || _visibilityAnimationC3 === void 0 ? void 0 : _visibilityAnimationC3.animation) === 'spring' ? Animated.spring : Animated.timing; + animation(visible, { + toValue: 0, + useNativeDriver, + duration: 200, + ...(visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC4 = visibilityAnimationConfig.hide) === null || _visibilityAnimationC4 === void 0 ? void 0 : _visibilityAnimationC4.config) + }).start(); + } + return () => visible.stopAnimation(); + }, [visible, shouldShowTabBar]); + const [layout, setLayout] = React.useState({ + height: 0, + width: dimensions.width + }); + const handleLayout = e => { + const { + height, + width + } = e.nativeEvent.layout; + onHeightChange === null || onHeightChange === void 0 ? void 0 : onHeightChange(height); + setLayout(layout => { + if (height === layout.height && width === layout.width) { + return layout; + } else { + return { + height, + width + }; + } + }); + }; + const { + routes + } = state; + const paddingBottom = getPaddingBottom(insets); + const tabBarHeight = getTabBarHeight({ + state, + descriptors, + insets, + dimensions, + layout, + style: [tabBarStyle, style] + }); + const hasHorizontalLabels = shouldUseHorizontalLabels({ + state, + descriptors, + dimensions, + layout + }); + const tabBarBackgroundElement = tabBarBackground === null || tabBarBackground === void 0 ? void 0 : tabBarBackground(); + return /*#__PURE__*/React.createElement(Animated.View, { + style: [styles.tabBar, { + backgroundColor: tabBarBackgroundElement != null ? 'transparent' : colors.card, + borderTopColor: colors.border + }, { + transform: [{ + translateY: visible.interpolate({ + inputRange: [0, 1], + outputRange: [layout.height + paddingBottom + StyleSheet.hairlineWidth, 0] + }) + }], + // Absolutely position the tab bar so that the content is below it + // This is needed to avoid gap at bottom when the tab bar is hidden + position: isTabBarHidden ? 'absolute' : null + }, { + height: tabBarHeight, + paddingBottom, + paddingHorizontal: Math.max(insets.left, insets.right) + }, tabBarStyle], + pointerEvents: isTabBarHidden ? 'none' : 'auto', + onLayout: handleLayout + }, /*#__PURE__*/React.createElement(View, { + pointerEvents: "none", + style: StyleSheet.absoluteFill + }, tabBarBackgroundElement), /*#__PURE__*/React.createElement(View, { + accessibilityRole: "tablist", + style: styles.content + }, routes.map((route, index) => { + const focused = index === state.index; + const { + options + } = descriptors[route.key]; + const onPress = () => { + const event = navigation.emit({ + type: 'tabPress', + target: route.key, + canPreventDefault: true + }); + if (!focused && !event.defaultPrevented) { + navigation.dispatch({ + ...CommonActions.navigate({ + name: route.name, + merge: true + }), + target: state.key + }); + } + }; + const onLongPress = () => { + navigation.emit({ + type: 'tabLongPress', + target: route.key + }); + }; + const label = options.tabBarLabel !== undefined ? options.tabBarLabel : options.title !== undefined ? options.title : route.name; + const accessibilityLabel = options.tabBarAccessibilityLabel !== undefined ? options.tabBarAccessibilityLabel : typeof label === 'string' && Platform.OS === 'ios' ? `${label}, tab, ${index + 1} of ${routes.length}` : undefined; + return /*#__PURE__*/React.createElement(NavigationContext.Provider, { + key: route.key, + value: descriptors[route.key].navigation + }, /*#__PURE__*/React.createElement(NavigationRouteContext.Provider, { + value: route + }, /*#__PURE__*/React.createElement(BottomTabItem, { + route: route, + descriptor: descriptors[route.key], + focused: focused, + horizontal: hasHorizontalLabels, + onPress: onPress, + onLongPress: onLongPress, + accessibilityLabel: accessibilityLabel, + to: buildLink(route.name, route.params), + testID: options.tabBarTestID, + allowFontScaling: options.tabBarAllowFontScaling, + activeTintColor: tabBarActiveTintColor, + inactiveTintColor: tabBarInactiveTintColor, + activeBackgroundColor: tabBarActiveBackgroundColor, + inactiveBackgroundColor: tabBarInactiveBackgroundColor, + button: options.tabBarButton, + icon: options.tabBarIcon ?? (_ref5 => { + let { + color, + size + } = _ref5; + return /*#__PURE__*/React.createElement(MissingIcon, { + color: color, + size: size + }); + }), + badge: options.tabBarBadge, + badgeStyle: options.tabBarBadgeStyle, + label: label, + showLabel: tabBarShowLabel, + labelStyle: options.tabBarLabelStyle, + iconStyle: options.tabBarIconStyle, + style: options.tabBarItemStyle + }))); + }))); +} +const styles = StyleSheet.create({ + tabBar: { + left: 0, + right: 0, + bottom: 0, + borderTopWidth: StyleSheet.hairlineWidth, + elevation: 8 + }, + content: { + flex: 1, + flexDirection: 'row' + } +}); +//# sourceMappingURL=BottomTabBar.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabBar.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabBar.js.map new file mode 100644 index 00000000..7e73972b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabBar.js.map @@ -0,0 +1 @@ +{"version":3,"names":["MissingIcon","CommonActions","NavigationContext","NavigationRouteContext","useLinkBuilder","useTheme","React","Animated","Platform","StyleSheet","View","useSafeAreaFrame","BottomTabBarHeightCallbackContext","useIsKeyboardShown","BottomTabItem","DEFAULT_TABBAR_HEIGHT","COMPACT_TABBAR_HEIGHT","DEFAULT_MAX_TAB_ITEM_WIDTH","useNativeDriver","OS","shouldUseHorizontalLabels","state","descriptors","layout","dimensions","tabBarLabelPosition","routes","index","key","options","width","maxTabWidth","reduce","acc","route","tabBarItemStyle","flattenedStyle","flatten","maxWidth","height","getPaddingBottom","insets","Math","max","bottom","select","ios","default","getTabBarHeight","style","rest","customHeight","isLandscape","horizontalLabels","paddingBottom","isPad","BottomTabBar","navigation","colors","buildLink","focusedRoute","focusedDescriptor","focusedOptions","tabBarShowLabel","tabBarHideOnKeyboard","tabBarVisibilityAnimationConfig","tabBarStyle","tabBarBackground","tabBarActiveTintColor","tabBarInactiveTintColor","tabBarActiveBackgroundColor","tabBarInactiveBackgroundColor","isKeyboardShown","onHeightChange","useContext","shouldShowTabBar","visibilityAnimationConfigRef","useRef","useEffect","current","isTabBarHidden","setIsTabBarHidden","useState","visible","Value","visibilityAnimationConfig","animation","show","spring","timing","toValue","duration","config","start","finished","hide","stopAnimation","setLayout","handleLayout","e","nativeEvent","tabBarHeight","hasHorizontalLabels","tabBarBackgroundElement","styles","tabBar","backgroundColor","card","borderTopColor","border","transform","translateY","interpolate","inputRange","outputRange","hairlineWidth","position","paddingHorizontal","left","right","absoluteFill","content","map","focused","onPress","event","emit","type","target","canPreventDefault","defaultPrevented","dispatch","navigate","name","merge","onLongPress","label","tabBarLabel","undefined","title","accessibilityLabel","tabBarAccessibilityLabel","length","params","tabBarTestID","tabBarAllowFontScaling","tabBarButton","tabBarIcon","color","size","tabBarBadge","tabBarBadgeStyle","tabBarLabelStyle","tabBarIconStyle","create","borderTopWidth","elevation","flex","flexDirection"],"sourceRoot":"../../src","sources":["BottomTabBar.tsx"],"mappings":"AAAA,SAASA,WAAW,QAAQ,4BAA4B;AACxD,SACEC,aAAa,EACbC,iBAAiB,EACjBC,sBAAsB,EAGtBC,cAAc,EACdC,QAAQ,QACH,0BAA0B;AACjC,OAAOC,KAAK,MAAM,OAAO;AACzB,SACEC,QAAQ,EAERC,QAAQ,EAERC,UAAU,EACVC,IAAI,QAEC,cAAc;AACrB,SAAqBC,gBAAgB,QAAQ,gCAAgC;AAG7E,OAAOC,iCAAiC,MAAM,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CAAC6G,MAAM,CAAE;MACxC,MAAM,EAAElH,OAAO,CAACmH,YAAa;MAC7B,gBAAgB,EAAEnH,OAAO,CAACoH,sBAAuB;MACjD,eAAe,EAAE7E,qBAAsB;MACvC,iBAAiB,EAAEC,uBAAwB;MAC3C,qBAAqB,EAAEC,2BAA4B;MACnD,uBAAuB,EAAEC,6BAA8B;MACvD,MAAM,EAAE1C,OAAO,CAACqH,YAAa;MAC7B,IAAI,EACFrH,OAAO,CAACsH,UAAU,KACjB;QAAA,IAAC;UAAEC,KAAK;UAAEC;QAAK,CAAC;QAAA,oBACf,oBAAC,WAAW;UAAC,KAAK,EAAED,KAAM;UAAC,IAAI,EAAEC;QAAK,EAAG;MAAA,CAC1C,CACF;MACD,KAAK,EAAExH,OAAO,CAACyH,WAAY;MAC3B,UAAU,EAAEzH,OAAO,CAAC0H,gBAAiB;MACrC,KAAK,EAAEf,KAAM;MACb,SAAS,EAAEzE,eAAgB;MAC3B,UAAU,EAAElC,OAAO,CAAC2H,gBAAiB;MACrC,SAAS,EAAE3H,OAAO,CAAC4H,eAAgB;MACnC,KAAK,EAAE5H,OAAO,CAACM;IAAgB,EAC/B,CAC8B,CACP;EAEjC,CAAC,CAAC,CACG,CACO;AAEpB;AAEA,MAAMqE,MAAM,GAAG/F,UAAU,CAACiJ,MAAM,CAAC;EAC/BjD,MAAM,EAAE;IACNa,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACR3E,MAAM,EAAE,CAAC;IACT+G,cAAc,EAAElJ,UAAU,CAAC0G,aAAa;IACxCyC,SAAS,EAAE;EACb,CAAC;EACDnC,OAAO,EAAE;IACPoC,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabItem.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabItem.js new file mode 100644 index 00000000..60198d9f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabItem.js @@ -0,0 +1,176 @@ +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +import { Link, useTheme } from '@react-navigation/native'; +import Color from 'color'; +import React from 'react'; +import { Platform, Pressable, StyleSheet, Text } from 'react-native'; +import TabBarIcon from './TabBarIcon'; +export default function BottomTabBarItem(_ref) { + let { + focused, + route, + descriptor, + label, + icon, + badge, + badgeStyle, + to, + button = _ref2 => { + let { + children, + style, + onPress, + to, + accessibilityRole, + ...rest + } = _ref2; + if (Platform.OS === 'web' && to) { + // React Native Web doesn't forward `onClick` if we use `TouchableWithoutFeedback`. + // We need to use `onClick` to be able to prevent default browser handling of links. + return /*#__PURE__*/React.createElement(Link, _extends({}, rest, { + to: to, + style: [styles.button, style], + onPress: e => { + if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && ( + // ignore clicks with modifier keys + e.button == null || e.button === 0) // ignore everything but left clicks + ) { + e.preventDefault(); + onPress === null || onPress === void 0 ? void 0 : onPress(e); + } + } + }), children); + } else { + return /*#__PURE__*/React.createElement(Pressable, _extends({}, rest, { + accessibilityRole: accessibilityRole, + onPress: onPress, + style: style + }), children); + } + }, + accessibilityLabel, + testID, + onPress, + onLongPress, + horizontal, + activeTintColor: customActiveTintColor, + inactiveTintColor: customInactiveTintColor, + activeBackgroundColor = 'transparent', + inactiveBackgroundColor = 'transparent', + showLabel = true, + allowFontScaling, + labelStyle, + iconStyle, + style + } = _ref; + const { + colors + } = useTheme(); + const activeTintColor = customActiveTintColor === undefined ? colors.primary : customActiveTintColor; + const inactiveTintColor = customInactiveTintColor === undefined ? Color(colors.text).mix(Color(colors.card), 0.5).hex() : customInactiveTintColor; + const renderLabel = _ref3 => { + let { + focused + } = _ref3; + if (showLabel === false) { + return null; + } + const color = focused ? activeTintColor : inactiveTintColor; + if (typeof label === 'string') { + return /*#__PURE__*/React.createElement(Text, { + numberOfLines: 1, + style: [styles.label, { + color + }, horizontal ? styles.labelBeside : styles.labelBeneath, labelStyle], + allowFontScaling: allowFontScaling + }, label); + } + const { + options + } = descriptor; + const children = typeof options.tabBarLabel === 'string' ? options.tabBarLabel : options.title !== undefined ? options.title : route.name; + return label({ + focused, + color, + position: horizontal ? 'beside-icon' : 'below-icon', + children + }); + }; + const renderIcon = _ref4 => { + let { + focused + } = _ref4; + if (icon === undefined) { + return null; + } + const activeOpacity = focused ? 1 : 0; + const inactiveOpacity = focused ? 0 : 1; + return /*#__PURE__*/React.createElement(TabBarIcon, { + route: route, + horizontal: horizontal, + badge: badge, + badgeStyle: badgeStyle, + activeOpacity: activeOpacity, + inactiveOpacity: inactiveOpacity, + activeTintColor: activeTintColor, + inactiveTintColor: inactiveTintColor, + renderIcon: icon, + style: iconStyle + }); + }; + const scene = { + route, + focused + }; + const backgroundColor = focused ? activeBackgroundColor : inactiveBackgroundColor; + return button({ + to, + onPress, + onLongPress, + testID, + accessibilityLabel, + // FIXME: accessibilityRole: 'tab' doesn't seem to work as expected on iOS + accessibilityRole: Platform.select({ + ios: 'button', + default: 'tab' + }), + accessibilityState: { + selected: focused + }, + // @ts-expect-error: keep for compatibility with older React Native versions + accessibilityStates: focused ? ['selected'] : [], + style: [styles.tab, { + backgroundColor + }, horizontal ? styles.tabLandscape : styles.tabPortrait, style], + children: /*#__PURE__*/React.createElement(React.Fragment, null, renderIcon(scene), renderLabel(scene)) + }); +} +const styles = StyleSheet.create({ + tab: { + flex: 1, + alignItems: 'center' + }, + tabPortrait: { + justifyContent: 'flex-end', + flexDirection: 'column' + }, + tabLandscape: { + justifyContent: 'center', + flexDirection: 'row' + }, + label: { + textAlign: 'center', + backgroundColor: 'transparent' + }, + labelBeneath: { + fontSize: 10 + }, + labelBeside: { + fontSize: 13, + marginLeft: 20, + marginTop: 3 + }, + button: { + display: 'flex' + } +}); +//# sourceMappingURL=BottomTabItem.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabItem.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabItem.js.map new file mode 100644 index 00000000..f71681ef --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabItem.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Link","useTheme","Color","React","Platform","Pressable","StyleSheet","Text","TabBarIcon","BottomTabBarItem","focused","route","descriptor","label","icon","badge","badgeStyle","to","button","children","style","onPress","accessibilityRole","rest","OS","styles","e","metaKey","altKey","ctrlKey","shiftKey","preventDefault","accessibilityLabel","testID","onLongPress","horizontal","activeTintColor","customActiveTintColor","inactiveTintColor","customInactiveTintColor","activeBackgroundColor","inactiveBackgroundColor","showLabel","allowFontScaling","labelStyle","iconStyle","colors","undefined","primary","text","mix","card","hex","renderLabel","color","labelBeside","labelBeneath","options","tabBarLabel","title","name","position","renderIcon","activeOpacity","inactiveOpacity","scene","backgroundColor","select","ios","default","accessibilityState","selected","accessibilityStates","tab","tabLandscape","tabPortrait","create","flex","alignItems","justifyContent","flexDirection","textAlign","fontSize","marginLeft","marginTop","display"],"sourceRoot":"../../src","sources":["BottomTabItem.tsx"],"mappings":";AAAA,SAASA,IAAI,EAASC,QAAQ,QAAQ,0BAA0B;AAChE,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,KAAK,MAAM,OAAO;AACzB,SAEEC,QAAQ,EACRC,SAAS,EAETC,UAAU,EACVC,IAAI,QAGC,cAAc;AAOrB,OAAOC,UAAU,MAAM,cAAc;AA+GrC,eAAe,SAASC,gBAAgB,OAiE9B;EAAA,IAjE+B;IACvCC,OAAO;IACPC,KAAK;IACLC,UAAU;IACVC,KAAK;IACLC,IAAI;IACJC,KAAK;IACLC,UAAU;IACVC,EAAE;IACFC,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,MAAM,GAAGnB,UAAU,CAACsE,MAAM,CAAC;EAC/BH,GAAG,EAAE;IACHI,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE;EACd,CAAC;EACDH,WAAW,EAAE;IACXI,cAAc,EAAE,UAAU;IAC1BC,aAAa,EAAE;EACjB,CAAC;EACDN,YAAY,EAAE;IACZK,cAAc,EAAE,QAAQ;IACxBC,aAAa,EAAE;EACjB,CAAC;EACDnE,KAAK,EAAE;IACLoE,SAAS,EAAE,QAAQ;IACnBf,eAAe,EAAE;EACnB,CAAC;EACDV,YAAY,EAAE;IACZ0B,QAAQ,EAAE;EACZ,CAAC;EACD3B,WAAW,EAAE;IACX2B,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE;EACb,CAAC;EACDlE,MAAM,EAAE;IACNmE,OAAO,EAAE;EACX;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabView.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabView.js new file mode 100644 index 00000000..2b0dc1ce --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabView.js @@ -0,0 +1,125 @@ +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +import { getHeaderTitle, Header, SafeAreaProviderCompat, Screen } from '@react-navigation/elements'; +import * as React from 'react'; +import { Platform, StyleSheet } from 'react-native'; +import { SafeAreaInsetsContext } from 'react-native-safe-area-context'; +import BottomTabBarHeightCallbackContext from '../utils/BottomTabBarHeightCallbackContext'; +import BottomTabBarHeightContext from '../utils/BottomTabBarHeightContext'; +import BottomTabBar, { getTabBarHeight } from './BottomTabBar'; +import { MaybeScreen, MaybeScreenContainer } from './ScreenFallback'; +export default function BottomTabView(props) { + const { + tabBar = props => /*#__PURE__*/React.createElement(BottomTabBar, props), + state, + navigation, + descriptors, + safeAreaInsets, + detachInactiveScreens = Platform.OS === 'web' || Platform.OS === 'android' || Platform.OS === 'ios', + sceneContainerStyle + } = props; + const focusedRouteKey = state.routes[state.index].key; + const [loaded, setLoaded] = React.useState([focusedRouteKey]); + if (!loaded.includes(focusedRouteKey)) { + setLoaded([...loaded, focusedRouteKey]); + } + const dimensions = SafeAreaProviderCompat.initialMetrics.frame; + const [tabBarHeight, setTabBarHeight] = React.useState(() => getTabBarHeight({ + state, + descriptors, + dimensions, + layout: { + width: dimensions.width, + height: 0 + }, + insets: { + ...SafeAreaProviderCompat.initialMetrics.insets, + ...props.safeAreaInsets + }, + style: descriptors[state.routes[state.index].key].options.tabBarStyle + })); + const renderTabBar = () => { + return /*#__PURE__*/React.createElement(SafeAreaInsetsContext.Consumer, null, insets => tabBar({ + state: state, + descriptors: descriptors, + navigation: navigation, + insets: { + top: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.top) ?? (insets === null || insets === void 0 ? void 0 : insets.top) ?? 0, + right: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.right) ?? (insets === null || insets === void 0 ? void 0 : insets.right) ?? 0, + bottom: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.bottom) ?? (insets === null || insets === void 0 ? void 0 : insets.bottom) ?? 0, + left: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.left) ?? (insets === null || insets === void 0 ? void 0 : insets.left) ?? 0 + } + })); + }; + const { + routes + } = state; + return /*#__PURE__*/React.createElement(SafeAreaProviderCompat, null, /*#__PURE__*/React.createElement(MaybeScreenContainer, { + enabled: detachInactiveScreens, + hasTwoStates: true, + style: styles.container + }, routes.map((route, index) => { + const descriptor = descriptors[route.key]; + const { + lazy = true, + unmountOnBlur + } = descriptor.options; + const isFocused = state.index === index; + if (unmountOnBlur && !isFocused) { + return null; + } + if (lazy && !loaded.includes(route.key) && !isFocused) { + // Don't render a lazy screen if we've never navigated to it + return null; + } + const { + freezeOnBlur, + header = _ref => { + let { + layout, + options + } = _ref; + return /*#__PURE__*/React.createElement(Header, _extends({}, options, { + layout: layout, + title: getHeaderTitle(options, route.name) + })); + }, + headerShown, + headerStatusBarHeight, + headerTransparent + } = descriptor.options; + return /*#__PURE__*/React.createElement(MaybeScreen, { + key: route.key, + style: [StyleSheet.absoluteFill, { + zIndex: isFocused ? 0 : -1 + }], + visible: isFocused, + enabled: detachInactiveScreens, + freezeOnBlur: freezeOnBlur + }, /*#__PURE__*/React.createElement(BottomTabBarHeightContext.Provider, { + value: tabBarHeight + }, /*#__PURE__*/React.createElement(Screen, { + focused: isFocused, + route: descriptor.route, + navigation: descriptor.navigation, + headerShown: headerShown, + headerStatusBarHeight: headerStatusBarHeight, + headerTransparent: headerTransparent, + header: header({ + layout: dimensions, + route: descriptor.route, + navigation: descriptor.navigation, + options: descriptor.options + }), + style: sceneContainerStyle + }, descriptor.render()))); + })), /*#__PURE__*/React.createElement(BottomTabBarHeightCallbackContext.Provider, { + value: setTabBarHeight + }, renderTabBar())); +} +const styles = StyleSheet.create({ + container: { + flex: 1, + overflow: 'hidden' + } +}); +//# sourceMappingURL=BottomTabView.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabView.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabView.js.map new file mode 100644 index 00000000..53fd069c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabView.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getHeaderTitle","Header","SafeAreaProviderCompat","Screen","React","Platform","StyleSheet","SafeAreaInsetsContext","BottomTabBarHeightCallbackContext","BottomTabBarHeightContext","BottomTabBar","getTabBarHeight","MaybeScreen","MaybeScreenContainer","BottomTabView","props","tabBar","state","navigation","descriptors","safeAreaInsets","detachInactiveScreens","OS","sceneContainerStyle","focusedRouteKey","routes","index","key","loaded","setLoaded","useState","includes","dimensions","initialMetrics","frame","tabBarHeight","setTabBarHeight","layout","width","height","insets","style","options","tabBarStyle","renderTabBar","top","right","bottom","left","styles","container","map","route","descriptor","lazy","unmountOnBlur","isFocused","freezeOnBlur","header","name","headerShown","headerStatusBarHeight","headerTransparent","absoluteFill","zIndex","render","create","flex","overflow"],"sourceRoot":"../../src","sources":["BottomTabView.tsx"],"mappings":";AAAA,SACEA,cAAc,EACdC,MAAM,EACNC,sBAAsB,EACtBC,MAAM,QACD,4BAA4B;AAKnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AACnD,SAASC,qBAAqB,QAAQ,gCAAgC;AAUtE,OAAOC,iCAAiC,MAAM,4CAA4C;AAC1F,OAAOC,yBAAyB,MAAM,oCAAoC;AAC1E,OAAOC,YAAY,IAAIC,eAAe,QAAQ,gBAAgB;AAC9D,SAASC,WAAW,EAAEC,oBAAoB,QAAQ,kBAAkB;AAQpE,eAAe,SAASC,aAAa,CAACC,KAAY,EAAE;EAClD,MAAM;IACJC,MAAM,GAAID,KAAwB,iBAAK,oBAAC,YAAY,EAAKA,KAAK,CAAI;IAClEE,KAAK;IACLC,UAAU;IACVC,WAAW;IACXC,cAAc;IACdC,qBAAqB,GAAGhB,QAAQ,CAACiB,EAAE,KAAK,KAAK,IAC3CjB,QAAQ,CAACiB,EAAE,KAAK,SAAS,IACzBjB,QAAQ,CAACiB,EAAE,KAAK,KAAK;IACvBC;EACF,CAAC,GAAGR,KAAK;EAET,MAAMS,eAAe,GAAGP,KAAK,CAACQ,MAAM,CAACR,KAAK,CAACS,KAAK,CAAC,CAACC,GAAG;EACrD,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGzB,KAAK,CAAC0B,QAAQ,CAAC,CAACN,eAAe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BACE,oBAAC,WAAW;MACV,GAAG,EAAEU,KAAK,CAACzB,GAAI;MACf,KAAK,EAAE,CAACrB,UAAU,CAACyD,YAAY,EAAE;QAAEC,MAAM,EAAER,SAAS,GAAG,CAAC,GAAG,CAAC;MAAE,CAAC,CAAE;MACjE,OAAO,EAAEA,SAAU;MACnB,OAAO,EAAEnC,qBAAsB;MAC/B,YAAY,EAAEoC;IAAa,gBAE3B,oBAAC,yBAAyB,CAAC,QAAQ;MAAC,KAAK,EAAEtB;IAAa,gBACtD,oBAAC,MAAM;MACL,OAAO,EAAEqB,SAAU;MACnB,KAAK,EAAEH,UAAU,CAACD,KAAM;MACxB,UAAU,EAAEC,UAAU,CAACnC,UAAW;MAClC,WAAW,EAAE0C,WAAY;MACzB,qBAAqB,EAAEC,qBAAsB;MAC7C,iBAAiB,EAAEC,iBAAkB;MACrC,MAAM,EAAEJ,MAAM,CAAC;QACbrB,MAAM,EAAEL,UAAU;QAClBoB,KAAK,EAAEC,UAAU,CAACD,KAAK;QACvBlC,UAAU,EACRmC,UAAU,CAACnC,UAAoD;QACjEwB,OAAO,EAAEW,UAAU,CAACX;MACtB,CAAC,CAAE;MACH,KAAK,EAAEnB;IAAoB,GAE1B8B,UAAU,CAACY,MAAM,EAAE,CACb,CAC0B,CACzB;EAElB,CAAC,CAAC,CACmB,eACvB,oBAAC,iCAAiC,CAAC,QAAQ;IAAC,KAAK,EAAE7B;EAAgB,GAChEQ,YAAY,EAAE,CAC4B,CACtB;AAE7B;AAEA,MAAMK,MAAM,GAAG3C,UAAU,CAAC4D,MAAM,CAAC;EAC/BhB,SAAS,EAAE;IACTiB,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/ScreenFallback.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/ScreenFallback.js new file mode 100644 index 00000000..1d94a8d1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/ScreenFallback.js @@ -0,0 +1,40 @@ +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +import { ResourceSavingView } from '@react-navigation/elements'; +import * as React from 'react'; +import { View } from 'react-native'; +let Screens; +try { + Screens = require('react-native-screens'); +} catch (e) { + // Ignore +} +export const MaybeScreenContainer = _ref => { + var _Screens, _Screens$screensEnabl; + let { + enabled, + ...rest + } = _ref; + if ((_Screens = Screens) !== null && _Screens !== void 0 && (_Screens$screensEnabl = _Screens.screensEnabled) !== null && _Screens$screensEnabl !== void 0 && _Screens$screensEnabl.call(_Screens)) { + return /*#__PURE__*/React.createElement(Screens.ScreenContainer, _extends({ + enabled: enabled + }, rest)); + } + return /*#__PURE__*/React.createElement(View, rest); +}; +export function MaybeScreen(_ref2) { + var _Screens2, _Screens2$screensEnab; + let { + visible, + children, + ...rest + } = _ref2; + if ((_Screens2 = Screens) !== null && _Screens2 !== void 0 && (_Screens2$screensEnab = _Screens2.screensEnabled) !== null && _Screens2$screensEnab !== void 0 && _Screens2$screensEnab.call(_Screens2)) { + return /*#__PURE__*/React.createElement(Screens.Screen, _extends({ + activityState: visible ? 2 : 0 + }, rest), children); + } + return /*#__PURE__*/React.createElement(ResourceSavingView, _extends({ + visible: visible + }, rest), children); +} +//# sourceMappingURL=ScreenFallback.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/ScreenFallback.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/ScreenFallback.js.map new file mode 100644 index 00000000..4966bcfc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/ScreenFallback.js.map @@ -0,0 +1 @@ +{"version":3,"names":["ResourceSavingView","React","View","Screens","require","e","MaybeScreenContainer","enabled","rest","screensEnabled","MaybeScreen","visible","children"],"sourceRoot":"../../src","sources":["ScreenFallback.tsx"],"mappings":";AAAA,SAASA,kBAAkB,QAAQ,4BAA4B;AAC/D,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAAoBC,IAAI,QAA8B,cAAc;AAUpE,IAAIC,OAA0D;AAE9D,IAAI;EACFA,OAAO,GAAGC,OAAO,CAAC,sBAAsB,CAAC;AAC3C,CAAC,CAAC,OAAOC,CAAC,EAAE;EACV;AAAA;AAGF,OAAO,MAAMC,oBAAoB,GAAG,QAO9B;EAAA;EAAA,IAP+B;IACnCC,OAAO;IACP,GAAGC;EAKL,CAAC;EACC,gBAAIL,OAAO,8DAAP,SAASM,cAAc,kDAAvB,oCAA2B,EAAE;IAC/B,oBAAO,oBAAC,OAAO,CAAC,eAAe;MAAC,OAAO,EAAEF;IAAQ,GAAKC,IAAI,EAAI;EAChE;EAEA,oBAAO,oBAAC,IAAI,EAAKA,IAAI,CAAI;AAC3B,CAAC;AAED,OAAO,SAASE,WAAW,QAAwC;EAAA;EAAA,IAAvC;IAAEC,OAAO;IAAEC,QAAQ;IAAE,GAAGJ;EAAY,CAAC;EAC/D,iBAAIL,OAAO,+DAAP,UAASM,cAAc,kDAAvB,qCAA2B,EAAE;IAC/B,oBACE,oBAAC,OAAO,CAAC,MAAM;MAAC,aAAa,EAAEE,OAAO,GAAG,CAAC,GAAG;IAAE,GAAKH,IAAI,GACrDI,QAAQ,CACM;EAErB;EAEA,oBACE,oBAAC,kBAAkB;IAAC,OAAO,EAAED;EAAQ,GAAKH,IAAI,GAC3CI,QAAQ,CACU;AAEzB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/TabBarIcon.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/TabBarIcon.js new file mode 100644 index 00000000..84799100 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/TabBarIcon.js @@ -0,0 +1,77 @@ +import React from 'react'; +import { StyleSheet, View } from 'react-native'; +import Badge from './Badge'; +export default function TabBarIcon(_ref) { + let { + route: _, + horizontal, + badge, + badgeStyle, + activeOpacity, + inactiveOpacity, + activeTintColor, + inactiveTintColor, + renderIcon, + style + } = _ref; + const size = 25; + + // We render the icon twice at the same position on top of each other: + // active and inactive one, so we can fade between them. + return /*#__PURE__*/React.createElement(View, { + style: [horizontal ? styles.iconHorizontal : styles.iconVertical, style] + }, /*#__PURE__*/React.createElement(View, { + style: [styles.icon, { + opacity: activeOpacity + }] + }, renderIcon({ + focused: true, + size, + color: activeTintColor + })), /*#__PURE__*/React.createElement(View, { + style: [styles.icon, { + opacity: inactiveOpacity + }] + }, renderIcon({ + focused: false, + size, + color: inactiveTintColor + })), /*#__PURE__*/React.createElement(Badge, { + visible: badge != null, + style: [styles.badge, horizontal ? styles.badgeHorizontal : styles.badgeVertical, badgeStyle], + size: size * 3 / 4 + }, badge)); +} +const styles = StyleSheet.create({ + icon: { + // We render the icon twice at the same position on top of each other: + // active and inactive one, so we can fade between them: + // Cover the whole iconContainer: + position: 'absolute', + alignSelf: 'center', + alignItems: 'center', + justifyContent: 'center', + height: '100%', + width: '100%', + // Workaround for react-native >= 0.54 layout bug + minWidth: 25 + }, + iconVertical: { + flex: 1 + }, + iconHorizontal: { + height: '100%', + marginTop: 3 + }, + badge: { + position: 'absolute', + left: 3 + }, + badgeVertical: { + top: 3 + }, + badgeHorizontal: { + top: 7 + } +}); +//# sourceMappingURL=TabBarIcon.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/TabBarIcon.js.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/TabBarIcon.js.map new file mode 100644 index 00000000..0c790029 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/module/views/TabBarIcon.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","StyleSheet","View","Badge","TabBarIcon","route","_","horizontal","badge","badgeStyle","activeOpacity","inactiveOpacity","activeTintColor","inactiveTintColor","renderIcon","style","size","styles","iconHorizontal","iconVertical","icon","opacity","focused","color","badgeHorizontal","badgeVertical","create","position","alignSelf","alignItems","justifyContent","height","width","minWidth","flex","marginTop","left","top"],"sourceRoot":"../../src","sources":["TabBarIcon.tsx"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAEEC,UAAU,EAEVC,IAAI,QAEC,cAAc;AAErB,OAAOC,KAAK,MAAM,SAAS;AAmB3B,eAAe,SAASC,UAAU,OAWxB;EAAA,IAXyB;IACjCC,KAAK,EAAEC,CAAC;IACRC,UAAU;IACVC,KAAK;IACLC,UAAU;IACVC,aAAa;IACbC,eAAe;IACfC,eAAe;IACfC,iBAAiB;IACjBC,UAAU;IACVC;EACK,CAAC;EACN,MAAMC,IAAI,GAAG,EAAE;;EAEf;EACA;EACA,oBACE,oBAAC,IAAI;IACH,KAAK,EAAE,CAACT,UAAU,GAAGU,MAAM,CAACC,cAAc,GAAGD,MAAM,CAACE,YAAY,EAAEJ,KAAK;EAAE,gBAEzE,oBAAC,IAAI;IAAC,KAAK,EAAE,CAACE,MAAM,CAACG,IAAI,EAAE;MAAEC,OAAO,EAAEX;IAAc,CAAC;EAAE,GACpDI,UAAU,CAAC;IACVQ,OAAO,EAAE,IAAI;IACbN,IAAI;IACJO,KAAK,EAAEX;EACT,CAAC,CAAC,CACG,eACP,oBAAC,IAAI;IAAC,KAAK,EAAE,CAACK,MAAM,CAACG,IAAI,EAAE;MAAEC,OAAO,EAAEV;IAAgB,CAAC;EAAE,GACtDG,UAAU,CAAC;IACVQ,OAAO,EAAE,KAAK;IACdN,IAAI;IACJO,KAAK,EAAEV;EACT,CAAC,CAAC,CACG,eACP,oBAAC,KAAK;IACJ,OAAO,EAAEL,KAAK,IAAI,IAAK;IACvB,KAAK,EAAE,CACLS,MAAM,CAACT,KAAK,EACZD,UAAU,GAAGU,MAAM,CAACO,eAAe,GAAGP,MAAM,CAACQ,aAAa,EAC1DhB,UAAU,CACV;IACF,IAAI,EAAGO,IAAI,GAAG,CAAC,GAAI;EAAE,GAEpBR,KAAK,CACA,CACH;AAEX;AAEA,MAAMS,MAAM,GAAGhB,UAAU,CAACyB,MAAM,CAAC;EAC/BN,IAAI,EAAE;IACJ;IACA;IACA;IACAO,QAAQ,EAAE,UAAU;IACpBC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE,MAAM;IACb;IACAC,QAAQ,EAAE;EACZ,CAAC;EACDd,YAAY,EAAE;IACZe,IAAI,EAAE;EACR,CAAC;EACDhB,cAAc,EAAE;IACda,MAAM,EAAE,MAAM;IACdI,SAAS,EAAE;EACb,CAAC;EACD3B,KAAK,EAAE;IACLmB,QAAQ,EAAE,UAAU;IACpBS,IAAI,EAAE;EACR,CAAC;EACDX,aAAa,EAAE;IACbY,GAAG,EAAE;EACP,CAAC;EACDb,eAAe,EAAE;IACfa,GAAG,EAAE;EACP;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/index.d.ts b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/index.d.ts new file mode 100644 index 00000000..e8b6b486 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/index.d.ts @@ -0,0 +1,20 @@ +/** + * Navigators + */ +export { default as createBottomTabNavigator } from './navigators/createBottomTabNavigator'; +/** + * Views + */ +export { default as BottomTabBar } from './views/BottomTabBar'; +export { default as BottomTabView } from './views/BottomTabView'; +/** + * Utilities + */ +export { default as BottomTabBarHeightCallbackContext } from './utils/BottomTabBarHeightCallbackContext'; +export { default as BottomTabBarHeightContext } from './utils/BottomTabBarHeightContext'; +export { default as useBottomTabBarHeight } from './utils/useBottomTabBarHeight'; +/** + * Types + */ +export type { BottomTabBarButtonProps, BottomTabBarProps, BottomTabHeaderProps, BottomTabNavigationEventMap, BottomTabNavigationOptions, BottomTabNavigationProp, BottomTabScreenProps, } from './types'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/index.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/index.d.ts.map new file mode 100644 index 00000000..1ffcf00f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAE5F;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEjE;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;AACzG,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEjF;;GAEG;AACH,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,SAAS,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/navigators/createBottomTabNavigator.d.ts b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/navigators/createBottomTabNavigator.d.ts new file mode 100644 index 00000000..82fe86b0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/navigators/createBottomTabNavigator.d.ts @@ -0,0 +1,8 @@ +/// +import { DefaultNavigatorOptions, ParamListBase, TabNavigationState, TabRouterOptions } from '@react-navigation/native'; +import type { BottomTabNavigationConfig, BottomTabNavigationEventMap, BottomTabNavigationOptions } from '../types'; +declare type Props = DefaultNavigatorOptions, BottomTabNavigationOptions, BottomTabNavigationEventMap> & TabRouterOptions & BottomTabNavigationConfig; +declare function BottomTabNavigator({ id, initialRouteName, backBehavior, children, screenListeners, screenOptions, sceneContainerStyle, ...restWithDeprecated }: Props): JSX.Element; +declare const _default: () => import("@react-navigation/native").TypedNavigator, BottomTabNavigationOptions, BottomTabNavigationEventMap, typeof BottomTabNavigator>; +export default _default; +//# sourceMappingURL=createBottomTabNavigator.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/navigators/createBottomTabNavigator.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/navigators/createBottomTabNavigator.d.ts.map new file mode 100644 index 00000000..61ae3de5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/navigators/createBottomTabNavigator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createBottomTabNavigator.d.ts","sourceRoot":"","sources":["../../../../src/navigators/createBottomTabNavigator.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,uBAAuB,EACvB,aAAa,EAEb,kBAAkB,EAElB,gBAAgB,EAEjB,MAAM,0BAA0B,CAAC;AAIlC,OAAO,KAAK,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,0BAA0B,EAC3B,MAAM,UAAU,CAAC;AAGlB,aAAK,KAAK,GAAG,uBAAuB,CAClC,aAAa,EACb,kBAAkB,CAAC,aAAa,CAAC,EACjC,0BAA0B,EAC1B,2BAA2B,CAC5B,GACC,gBAAgB,GAChB,yBAAyB,CAAC;AAE5B,iBAAS,kBAAkB,CAAC,EAC1B,EAAE,EACF,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,GAAG,kBAAkB,EACtB,EAAE,KAAK,eAwFP;;AAED,wBAKsB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/types.d.ts b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/types.d.ts new file mode 100644 index 00000000..e583bdc6 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/types.d.ts @@ -0,0 +1,242 @@ +import type { HeaderOptions } from '@react-navigation/elements'; +import type { Descriptor, NavigationHelpers, NavigationProp, ParamListBase, RouteProp, TabActionHelpers, TabNavigationState } from '@react-navigation/native'; +import type * as React from 'react'; +import type { Animated, GestureResponderEvent, StyleProp, TextStyle, TouchableWithoutFeedbackProps, ViewStyle } from 'react-native'; +import type { EdgeInsets } from 'react-native-safe-area-context'; +export declare type Layout = { + width: number; + height: number; +}; +export declare type BottomTabNavigationEventMap = { + /** + * Event which fires on tapping on the tab in the tab bar. + */ + tabPress: { + data: undefined; + canPreventDefault: true; + }; + /** + * Event which fires on long press on the tab in the tab bar. + */ + tabLongPress: { + data: undefined; + }; +}; +export declare type LabelPosition = 'beside-icon' | 'below-icon'; +export declare type BottomTabNavigationHelpers = NavigationHelpers & TabActionHelpers; +export declare type BottomTabNavigationProp = NavigationProp, BottomTabNavigationOptions, BottomTabNavigationEventMap> & TabActionHelpers; +export declare type BottomTabScreenProps = { + navigation: BottomTabNavigationProp; + route: RouteProp; +}; +export declare type TimingKeyboardAnimationConfig = { + animation: 'timing'; + config?: Omit, 'toValue' | 'useNativeDriver'>; +}; +export declare type SpringKeyboardAnimationConfig = { + animation: 'spring'; + config?: Omit, 'toValue' | 'useNativeDriver'>; +}; +export declare type TabBarVisibilityAnimationConfig = TimingKeyboardAnimationConfig | SpringKeyboardAnimationConfig; +export declare type BottomTabNavigationOptions = HeaderOptions & { + /** + * Title text for the screen. + */ + title?: string; + /** + * Title string of a tab displayed in the tab bar + * or a function that given { focused: boolean, color: string, position: 'below-icon' | 'beside-icon', children: string } returns a React.Node to display in tab bar. + * + * When undefined, scene title is used. Use `tabBarShowLabel` to hide the label. + */ + tabBarLabel?: string | ((props: { + focused: boolean; + color: string; + position: LabelPosition; + children: string; + }) => React.ReactNode); + /** + * Whether the tab label should be visible. Defaults to `true`. + */ + tabBarShowLabel?: boolean; + /** + * Whether the label is shown below the icon or beside the icon. + * + * - `below-icon`: the label is shown below the icon (typical for iPhones) + * - `beside-icon` the label is shown next to the icon (typical for iPad) + * + * By default, the position is chosen automatically based on device width. + */ + tabBarLabelPosition?: LabelPosition; + /** + * Style object for the tab label. + */ + tabBarLabelStyle?: StyleProp; + /** + * Whether label font should scale to respect Text Size accessibility settings. + */ + tabBarAllowFontScaling?: boolean; + /** + * A function that given { focused: boolean, color: string } returns a React.Node to display in the tab bar. + */ + tabBarIcon?: (props: { + focused: boolean; + color: string; + size: number; + }) => React.ReactNode; + /** + * Style object for the tab icon. + */ + tabBarIconStyle?: StyleProp; + /** + * Text to show in a badge on the tab icon. + */ + tabBarBadge?: number | string; + /** + * Custom style for the tab bar badge. + * You can specify a background color or text color here. + */ + tabBarBadgeStyle?: StyleProp; + /** + * Accessibility label for the tab button. This is read by the screen reader when the user taps the tab. + * It's recommended to set this if you don't have a label for the tab. + */ + tabBarAccessibilityLabel?: string; + /** + * ID to locate this tab button in tests. + */ + tabBarTestID?: string; + /** + * Function which returns a React element to render as the tab bar button. + * Renders `Pressable` by default. + */ + tabBarButton?: (props: BottomTabBarButtonProps) => React.ReactNode; + /** + * Color for the icon and label in the active tab. + */ + tabBarActiveTintColor?: string; + /** + * Color for the icon and label in the inactive tabs. + */ + tabBarInactiveTintColor?: string; + /** + * Background color for the active tab. + */ + tabBarActiveBackgroundColor?: string; + /** + * Background color for the inactive tabs. + */ + tabBarInactiveBackgroundColor?: string; + /** + * Style object for the tab item container. + */ + tabBarItemStyle?: StyleProp; + /** + * Whether the tab bar gets hidden when the keyboard is shown. Defaults to `false`. + */ + tabBarHideOnKeyboard?: boolean; + /** + * Animation config for showing and hiding the tab bar when the keyboard is shown/hidden. + */ + tabBarVisibilityAnimationConfig?: { + show?: TabBarVisibilityAnimationConfig; + hide?: TabBarVisibilityAnimationConfig; + }; + /** + * Style object for the tab bar container. + */ + tabBarStyle?: Animated.WithAnimatedValue>; + /** + * Function which returns a React Element to use as background for the tab bar. + * You could render an image, a gradient, blur view etc. + * + * When using `BlurView`, make sure to set `position: 'absolute'` in `tabBarStyle` as well. + * You'd also need to use `useBottomTabBarHeight()` to add a bottom padding to your content. + */ + tabBarBackground?: () => React.ReactNode; + /** + * Whether this screens should render the first time it's accessed. Defaults to `true`. + * Set it to `false` if you want to render the screen on initial render. + */ + lazy?: boolean; + /** + * Function that given returns a React Element to display as a header. + */ + header?: (props: BottomTabHeaderProps) => React.ReactNode; + /** + * Whether to show the header. Setting this to `false` hides the header. + * Defaults to `true`. + */ + headerShown?: boolean; + /** + * Whether this screen should be unmounted when navigating away from it. + * Defaults to `false`. + */ + unmountOnBlur?: boolean; + /** + * Whether inactive screens should be suspended from re-rendering. Defaults to `false`. + * Defaults to `true` when `enableFreeze()` is run at the top of the application. + * Requires `react-native-screens` version >=3.16.0. + * + * Only supported on iOS and Android. + */ + freezeOnBlur?: boolean; +}; +export declare type BottomTabDescriptor = Descriptor, RouteProp>; +export declare type BottomTabDescriptorMap = Record; +export declare type BottomTabNavigationConfig = { + /** + * Function that returns a React element to display as the tab bar. + */ + tabBar?: (props: BottomTabBarProps) => React.ReactNode; + /** + * Safe area insets for the tab bar. This is used to avoid elements like the navigation bar on Android and bottom safe area on iOS. + * By default, the device's safe area insets are automatically detected. You can override the behavior with this option. + */ + safeAreaInsets?: { + top?: number; + right?: number; + bottom?: number; + left?: number; + }; + /** + * Whether inactive screens should be detached from the view hierarchy to save memory. + * Make sure to call `enableScreens` from `react-native-screens` to make it work. + * Defaults to `true` on Android. + */ + detachInactiveScreens?: boolean; + /** + * Style object for the component wrapping the screen content. + */ + sceneContainerStyle?: StyleProp; +}; +export declare type BottomTabHeaderProps = { + /** + * Layout of the screen. + */ + layout: Layout; + /** + * Options for the current screen. + */ + options: BottomTabNavigationOptions; + /** + * Route object for the current screen. + */ + route: RouteProp; + /** + * Navigation prop for the header. + */ + navigation: BottomTabNavigationProp; +}; +export declare type BottomTabBarProps = { + state: TabNavigationState; + descriptors: BottomTabDescriptorMap; + navigation: NavigationHelpers; + insets: EdgeInsets; +}; +export declare type BottomTabBarButtonProps = Omit & { + to?: string; + children: React.ReactNode; + onPress?: (e: React.MouseEvent | GestureResponderEvent) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/types.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/types.d.ts.map new file mode 100644 index 00000000..5c65f8ec --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EACV,QAAQ,EACR,qBAAqB,EACrB,SAAS,EACT,SAAS,EACT,6BAA6B,EAC7B,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM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AG,qBAAqB,KACvE,IAAI,CAAC;CACX,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightCallbackContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightCallbackContext.d.ts new file mode 100644 index 00000000..cf890915 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightCallbackContext.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +declare const _default: React.Context<((height: number) => void) | undefined>; +export default _default; +//# sourceMappingURL=BottomTabBarHeightCallbackContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightCallbackContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightCallbackContext.d.ts.map new file mode 100644 index 00000000..90460f7f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightCallbackContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BottomTabBarHeightCallbackContext.d.ts","sourceRoot":"","sources":["../../../../src/utils/BottomTabBarHeightCallbackContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;gDAEc,MAAM,KAAK,IAAI;AAA5D,wBAEE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightContext.d.ts new file mode 100644 index 00000000..f8588f38 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightContext.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +declare const _default: React.Context; +export default _default; +//# sourceMappingURL=BottomTabBarHeightContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightContext.d.ts.map new file mode 100644 index 00000000..fc3995d3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/BottomTabBarHeightContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BottomTabBarHeightContext.d.ts","sourceRoot":"","sources":["../../../../src/utils/BottomTabBarHeightContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;;AAE/B,wBAAkE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useBottomTabBarHeight.d.ts b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useBottomTabBarHeight.d.ts new file mode 100644 index 00000000..4c12cd5e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useBottomTabBarHeight.d.ts @@ -0,0 +1,2 @@ +export default function useBottomTabBarHeight(): number; +//# sourceMappingURL=useBottomTabBarHeight.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useBottomTabBarHeight.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useBottomTabBarHeight.d.ts.map new file mode 100644 index 00000000..af533f45 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useBottomTabBarHeight.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useBottomTabBarHeight.d.ts","sourceRoot":"","sources":["../../../../src/utils/useBottomTabBarHeight.tsx"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,qBAAqB,WAU5C"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useIsKeyboardShown.d.ts b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useIsKeyboardShown.d.ts new file mode 100644 index 00000000..09ce70aa --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useIsKeyboardShown.d.ts @@ -0,0 +1,2 @@ +export default function useIsKeyboardShown(): boolean; +//# sourceMappingURL=useIsKeyboardShown.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useIsKeyboardShown.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useIsKeyboardShown.d.ts.map new file mode 100644 index 00000000..b214432b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/utils/useIsKeyboardShown.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useIsKeyboardShown.d.ts","sourceRoot":"","sources":["../../../../src/utils/useIsKeyboardShown.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,kBAAkB,YA2BzC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/Badge.d.ts b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/Badge.d.ts new file mode 100644 index 00000000..67e27c35 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/Badge.d.ts @@ -0,0 +1,23 @@ +/// +import { Animated, StyleProp, TextStyle } from 'react-native'; +declare type Props = { + /** + * Whether the badge is visible + */ + visible: boolean; + /** + * Content of the `Badge`. + */ + children?: string | number; + /** + * Size of the `Badge`. + */ + size?: number; + /** + * Style object for the tab bar container. + */ + style?: Animated.WithAnimatedValue>; +}; +export default function Badge({ children, style, visible, size, ...rest }: Props): JSX.Element | null; +export {}; +//# sourceMappingURL=Badge.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/Badge.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/Badge.d.ts.map new file mode 100644 index 00000000..d2ecfeca --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/Badge.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../src/views/Badge.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAc,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,aAAK,KAAK,GAAG;IACX;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;CAC1D,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,OAAc,EACd,IAAS,EACT,GAAG,IAAI,EACR,EAAE,KAAK,sBAsEP"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabBar.d.ts b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabBar.d.ts new file mode 100644 index 00000000..1b1452de --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabBar.d.ts @@ -0,0 +1,27 @@ +/// +import { ParamListBase, TabNavigationState } from '@react-navigation/native'; +import { Animated, StyleProp, ViewStyle } from 'react-native'; +import { EdgeInsets } from 'react-native-safe-area-context'; +import type { BottomTabBarProps, BottomTabDescriptorMap } from '../types'; +declare type Props = BottomTabBarProps & { + style?: Animated.WithAnimatedValue>; +}; +declare type Options = { + state: TabNavigationState; + descriptors: BottomTabDescriptorMap; + layout: { + height: number; + width: number; + }; + dimensions: { + height: number; + width: number; + }; +}; +export declare const getTabBarHeight: ({ state, descriptors, dimensions, insets, style, ...rest }: Options & { + insets: EdgeInsets; + style: Animated.WithAnimatedValue> | undefined; +}) => number; +export default function BottomTabBar({ state, navigation, descriptors, insets, style, }: Props): JSX.Element; +export {}; +//# sourceMappingURL=BottomTabBar.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabBar.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabBar.d.ts.map new file mode 100644 index 00000000..c36a0b79 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabBar.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BottomTabBar.d.ts","sourceRoot":"","sources":["../../../../src/views/BottomTabBar.tsx"],"names":[],"mappings":";AACA,OAAO,EAIL,aAAa,EACb,kBAAkB,EAGnB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,QAAQ,EAGR,SAAS,EAGT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAoB,MAAM,gCAAgC,CAAC;AAE9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAK1E,aAAK,KAAK,GAAG,iBAAiB,GAAG;IAC/B,KAAK,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;CAC1D,CAAC;AAQF,aAAK,OAAO,GAAG;IACb,KAAK,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IACzC,WAAW,EAAE,sBAAsB,CAAC;IACpC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C,CAAC;AA8CF,eAAO,MAAM,eAAe;YAQlB,UAAU;WACX,SAAS,iBAAiB,CAAC,UAAU,SAAS,CAAC,CAAC,GAAG,SAAS;YA4BpE,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,KAAK,EACL,UAAU,EACV,WAAW,EACX,MAAM,EACN,KAAK,GACN,EAAE,KAAK,eAoPP"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabItem.d.ts b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabItem.d.ts new file mode 100644 index 00000000..2d0abf56 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabItem.d.ts @@ -0,0 +1,111 @@ +import { Route } from '@react-navigation/native'; +import React from 'react'; +import { GestureResponderEvent, StyleProp, TextStyle, ViewStyle } from 'react-native'; +import type { BottomTabBarButtonProps, BottomTabDescriptor, LabelPosition } from '../types'; +declare type Props = { + /** + * Whether the tab is focused. + */ + focused: boolean; + /** + * The route object which should be specified by the tab. + */ + route: Route; + /** + * The descriptor object for the route. + */ + descriptor: BottomTabDescriptor; + /** + * The label text of the tab. + */ + label: string | ((props: { + focused: boolean; + color: string; + position: LabelPosition; + children: string; + }) => React.ReactNode); + /** + * Icon to display for the tab. + */ + icon: (props: { + focused: boolean; + size: number; + color: string; + }) => React.ReactNode; + /** + * Text to show in a badge on the tab icon. + */ + badge?: number | string; + /** + * Custom style for the badge. + */ + badgeStyle?: StyleProp; + /** + * URL to use for the link to the tab. + */ + to?: string; + /** + * The button for the tab. Uses a `TouchableWithoutFeedback` by default. + */ + button?: (props: BottomTabBarButtonProps) => React.ReactNode; + /** + * The accessibility label for the tab. + */ + accessibilityLabel?: string; + /** + * An unique ID for testing for the tab. + */ + testID?: string; + /** + * Function to execute on press in React Native. + * On the web, this will use onClick. + */ + onPress: (e: React.MouseEvent | GestureResponderEvent) => void; + /** + * Function to execute on long press. + */ + onLongPress: (e: GestureResponderEvent) => void; + /** + * Whether the label should be aligned with the icon horizontally. + */ + horizontal: boolean; + /** + * Color for the icon and label when the item is active. + */ + activeTintColor?: string; + /** + * Color for the icon and label when the item is inactive. + */ + inactiveTintColor?: string; + /** + * Background color for item when its active. + */ + activeBackgroundColor?: string; + /** + * Background color for item when its inactive. + */ + inactiveBackgroundColor?: string; + /** + * Whether to show the label text for the tab. + */ + showLabel?: boolean; + /** + * Whether to allow scaling the font for the label for accessibility purposes. + */ + allowFontScaling?: boolean; + /** + * Style object for the label element. + */ + labelStyle?: StyleProp; + /** + * Style object for the icon element. + */ + iconStyle?: StyleProp; + /** + * Style object for the wrapper element. + */ + style?: StyleProp; +}; +export default function BottomTabBarItem({ focused, route, descriptor, label, icon, badge, badgeStyle, to, button, accessibilityLabel, testID, onPress, onLongPress, horizontal, activeTintColor: customActiveTintColor, inactiveTintColor: customInactiveTintColor, activeBackgroundColor, inactiveBackgroundColor, showLabel, allowFontScaling, labelStyle, iconStyle, style, }: Props): React.ReactElement>; +export {}; +//# sourceMappingURL=BottomTabItem.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabItem.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabItem.d.ts.map new file mode 100644 index 00000000..588b8d89 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabItem.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":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ACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,EAAE,CACP,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,GAAG,qBAAqB,KACjE,IAAI,CAAC;IACV;;OAEG;IACH,WAAW,EAAE,CAAC,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAChD;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,OAAO,EACP,KAAK,EACL,UAAU,EACV,KAAK,EACL,IAAI,EACJ,KAAK,EACL,UAAU,EACV,EAAE,EACF,MAyCC,EACD,kBAAkB,EAClB,MAAM,EACN,OAAO,EACP,WAAW,EACX,UAAU,EACV,eAAe,EAAE,qBAAqB,EACtC,iBAAiB,EAAE,uBAAuB,EAC1C,qBAAqC,EACrC,uBAAuC,EACvC,SAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,KAAK,GACN,EAAE,KAAK,sEA2GP"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabView.d.ts b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabView.d.ts new file mode 100644 index 00000000..1cc857aa --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabView.d.ts @@ -0,0 +1,11 @@ +/// +import type { ParamListBase, TabNavigationState } from '@react-navigation/native'; +import type { BottomTabDescriptorMap, BottomTabNavigationConfig, BottomTabNavigationHelpers } from '../types'; +declare type Props = BottomTabNavigationConfig & { + state: TabNavigationState; + navigation: BottomTabNavigationHelpers; + descriptors: BottomTabDescriptorMap; +}; +export default function BottomTabView(props: Props): JSX.Element; +export {}; +//# sourceMappingURL=BottomTabView.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabView.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabView.d.ts.map new file mode 100644 index 00000000..f3bf19e5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/BottomTabView.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BottomTabView.d.ts","sourceRoot":"","sources":["../../../../src/views/BottomTabView.tsx"],"names":[],"mappings":";AAMA,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAKlC,OAAO,KAAK,EAEV,sBAAsB,EAEtB,yBAAyB,EACzB,0BAA0B,EAE3B,MAAM,UAAU,CAAC;AAMlB,aAAK,KAAK,GAAG,yBAAyB,GAAG;IACvC,KAAK,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IACzC,UAAU,EAAE,0BAA0B,CAAC;IACvC,WAAW,EAAE,sBAAsB,CAAC;CACrC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,KAAK,eAiIjD"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/ScreenFallback.d.ts b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/ScreenFallback.d.ts new file mode 100644 index 00000000..8810359c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/ScreenFallback.d.ts @@ -0,0 +1,17 @@ +import * as React from 'react'; +import { StyleProp, ViewProps, ViewStyle } from 'react-native'; +declare type Props = { + visible: boolean; + children: React.ReactNode; + enabled: boolean; + freezeOnBlur?: boolean; + style?: StyleProp; +}; +export declare const MaybeScreenContainer: ({ enabled, ...rest }: ViewProps & { + enabled: boolean; + hasTwoStates: boolean; + children: React.ReactNode; +}) => JSX.Element; +export declare function MaybeScreen({ visible, children, ...rest }: Props): JSX.Element; +export {}; +//# sourceMappingURL=ScreenFallback.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/ScreenFallback.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/ScreenFallback.d.ts.map new file mode 100644 index 00000000..4e5000b2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/ScreenFallback.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ScreenFallback.d.ts","sourceRoot":"","sources":["../../../../src/views/ScreenFallback.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAQ,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAErE,aAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAUF,eAAO,MAAM,oBAAoB;aAItB,OAAO;kBACF,OAAO;cACX,MAAM,SAAS;iBAO1B,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,eAchE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/TabBarIcon.d.ts b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/TabBarIcon.d.ts new file mode 100644 index 00000000..f8aef8e5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/TabBarIcon.d.ts @@ -0,0 +1,22 @@ +import type { Route } from '@react-navigation/native'; +import React from 'react'; +import { StyleProp, TextStyle, ViewStyle } from 'react-native'; +declare type Props = { + route: Route; + horizontal: boolean; + badge?: string | number; + badgeStyle?: StyleProp; + activeOpacity: number; + inactiveOpacity: number; + activeTintColor: string; + inactiveTintColor: string; + renderIcon: (props: { + focused: boolean; + color: string; + size: number; + }) => React.ReactNode; + style: StyleProp; +}; +export default function TabBarIcon({ route: _, horizontal, badge, badgeStyle, activeOpacity, inactiveOpacity, activeTintColor, inactiveTintColor, renderIcon, style, }: Props): JSX.Element; +export {}; +//# sourceMappingURL=TabBarIcon.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/TabBarIcon.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/TabBarIcon.d.ts.map new file mode 100644 index 00000000..ea4f128b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/lib/typescript/src/views/TabBarIcon.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TabBarIcon.d.ts","sourceRoot":"","sources":["../../../../src/views/TabBarIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,SAAS,EAET,SAAS,EAET,SAAS,EACV,MAAM,cAAc,CAAC;AAItB,aAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,CAAC,KAAK,EAAE;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,KAAK,KAAK,CAAC,SAAS,CAAC;IACtB,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC7B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,KAAK,EAAE,CAAC,EACR,UAAU,EACV,KAAK,EACL,UAAU,EACV,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,KAAK,GACN,EAAE,KAAK,eAoCP"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/CHANGELOG.md b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/CHANGELOG.md new file mode 100644 index 00000000..0a7bce4f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/CHANGELOG.md @@ -0,0 +1,54 @@ +# 1.0.0 - 2016-01-07 + +- Removed: unused speed test +- Added: Automatic routing between previously unsupported conversions +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Removed: `convert()` class +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Changed: all functions to lookup dictionary +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Changed: `ansi` to `ansi256` +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Fixed: argument grouping for functions requiring only one argument +([#27](https://github.com/Qix-/color-convert/pull/27)) + +# 0.6.0 - 2015-07-23 + +- Added: methods to handle +[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors: + - rgb2ansi16 + - rgb2ansi + - hsl2ansi16 + - hsl2ansi + - hsv2ansi16 + - hsv2ansi + - hwb2ansi16 + - hwb2ansi + - cmyk2ansi16 + - cmyk2ansi + - keyword2ansi16 + - keyword2ansi + - ansi162rgb + - ansi162hsl + - ansi162hsv + - ansi162hwb + - ansi162cmyk + - ansi162keyword + - ansi2rgb + - ansi2hsl + - ansi2hsv + - ansi2hwb + - ansi2cmyk + - ansi2keyword +([#18](https://github.com/harthur/color-convert/pull/18)) + +# 0.5.3 - 2015-06-02 + +- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]` +([#15](https://github.com/harthur/color-convert/issues/15)) + +--- + +Check out commit logs for older releases diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/LICENSE b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/LICENSE new file mode 100644 index 00000000..5b4c386f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2011-2016 Heather Arthur + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/README.md b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/README.md new file mode 100644 index 00000000..d4b08fc3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/README.md @@ -0,0 +1,68 @@ +# color-convert + +[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert) + +Color-convert is a color conversion library for JavaScript and node. +It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest): + +```js +var convert = require('color-convert'); + +convert.rgb.hsl(140, 200, 100); // [96, 48, 59] +convert.keyword.rgb('blue'); // [0, 0, 255] + +var rgbChannels = convert.rgb.channels; // 3 +var cmykChannels = convert.cmyk.channels; // 4 +var ansiChannels = convert.ansi16.channels; // 1 +``` + +# Install + +```console +$ npm install color-convert +``` + +# API + +Simply get the property of the _from_ and _to_ conversion that you're looking for. + +All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function. + +All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha). + +```js +var convert = require('color-convert'); + +// Hex to LAB +convert.hex.lab('DEADBF'); // [ 76, 21, -2 ] +convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ] + +// RGB to CMYK +convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ] +convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ] +``` + +### Arrays +All functions that accept multiple arguments also support passing an array. + +Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.) + +```js +var convert = require('color-convert'); + +convert.rgb.hex(123, 45, 67); // '7B2D43' +convert.rgb.hex([123, 45, 67]); // '7B2D43' +``` + +## Routing + +Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex). + +Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js). + +# Contribute + +If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request. + +# License +Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE). diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/conversions.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/conversions.js new file mode 100644 index 00000000..2657f265 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/conversions.js @@ -0,0 +1,839 @@ +/* MIT license */ +/* eslint-disable no-mixed-operators */ +const cssKeywords = require('color-name'); + +// NOTE: conversions should only return primitive values (i.e. arrays, or +// values that give correct `typeof` results). +// do not use box values types (i.e. Number(), String(), etc.) + +const reverseKeywords = {}; +for (const key of Object.keys(cssKeywords)) { + reverseKeywords[cssKeywords[key]] = key; +} + +const convert = { + rgb: {channels: 3, labels: 'rgb'}, + hsl: {channels: 3, labels: 'hsl'}, + hsv: {channels: 3, labels: 'hsv'}, + hwb: {channels: 3, labels: 'hwb'}, + cmyk: {channels: 4, labels: 'cmyk'}, + xyz: {channels: 3, labels: 'xyz'}, + lab: {channels: 3, labels: 'lab'}, + lch: {channels: 3, labels: 'lch'}, + hex: {channels: 1, labels: ['hex']}, + keyword: {channels: 1, labels: ['keyword']}, + ansi16: {channels: 1, labels: ['ansi16']}, + ansi256: {channels: 1, labels: ['ansi256']}, + hcg: {channels: 3, labels: ['h', 'c', 'g']}, + apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, + gray: {channels: 1, labels: ['gray']} +}; + +module.exports = convert; + +// Hide .channels and .labels properties +for (const model of Object.keys(convert)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + const {channels, labels} = convert[model]; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', {value: channels}); + Object.defineProperty(convert[model], 'labels', {value: labels}); +} + +convert.rgb.hsl = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const min = Math.min(r, g, b); + const max = Math.max(r, g, b); + const delta = max - min; + let h; + let s; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + const l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; +}; + +convert.rgb.hsv = function (rgb) { + let rdif; + let gdif; + let bdif; + let h; + let s; + + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const v = Math.max(r, g, b); + const diff = v - Math.min(r, g, b); + const diffc = function (c) { + return (v - c) / 6 / diff + 1 / 2; + }; + + if (diff === 0) { + h = 0; + s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = (1 / 3) + rdif - bdif; + } else if (b === v) { + h = (2 / 3) + gdif - rdif; + } + + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + + return [ + h * 360, + s * 100, + v * 100 + ]; +}; + +convert.rgb.hwb = function (rgb) { + const r = rgb[0]; + const g = rgb[1]; + let b = rgb[2]; + const h = convert.rgb.hsl(rgb)[0]; + const w = 1 / 255 * Math.min(r, Math.min(g, b)); + + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + + return [h, w * 100, b * 100]; +}; + +convert.rgb.cmyk = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + + const k = Math.min(1 - r, 1 - g, 1 - b); + const c = (1 - r - k) / (1 - k) || 0; + const m = (1 - g - k) / (1 - k) || 0; + const y = (1 - b - k) / (1 - k) || 0; + + return [c * 100, m * 100, y * 100, k * 100]; +}; + +function comparativeDistance(x, y) { + /* + See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + */ + return ( + ((x[0] - y[0]) ** 2) + + ((x[1] - y[1]) ** 2) + + ((x[2] - y[2]) ** 2) + ); +} + +convert.rgb.keyword = function (rgb) { + const reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + + let currentClosestDistance = Infinity; + let currentClosestKeyword; + + for (const keyword of Object.keys(cssKeywords)) { + const value = cssKeywords[keyword]; + + // Compute comparative distance + const distance = comparativeDistance(rgb, value); + + // Check if its less, if so set as closest + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + + return currentClosestKeyword; +}; + +convert.keyword.rgb = function (keyword) { + return cssKeywords[keyword]; +}; + +convert.rgb.xyz = function (rgb) { + let r = rgb[0] / 255; + let g = rgb[1] / 255; + let b = rgb[2] / 255; + + // Assume sRGB + r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92); + g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92); + b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92); + + const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); + const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); + const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); + + return [x * 100, y * 100, z * 100]; +}; + +convert.rgb.lab = function (rgb) { + const xyz = convert.rgb.xyz(rgb); + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); + + const l = (116 * y) - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.hsl.rgb = function (hsl) { + const h = hsl[0] / 360; + const s = hsl[1] / 100; + const l = hsl[2] / 100; + let t2; + let t3; + let val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + const t1 = 2 * l - t2; + + const rgb = [0, 0, 0]; + for (let i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; +}; + +convert.hsl.hsv = function (hsl) { + const h = hsl[0]; + let s = hsl[1] / 100; + let l = hsl[2] / 100; + let smin = s; + const lmin = Math.max(l, 0.01); + + l *= 2; + s *= (l <= 1) ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + const v = (l + s) / 2; + const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); + + return [h, sv * 100, v * 100]; +}; + +convert.hsv.rgb = function (hsv) { + const h = hsv[0] / 60; + const s = hsv[1] / 100; + let v = hsv[2] / 100; + const hi = Math.floor(h) % 6; + + const f = h - Math.floor(h); + const p = 255 * v * (1 - s); + const q = 255 * v * (1 - (s * f)); + const t = 255 * v * (1 - (s * (1 - f))); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } +}; + +convert.hsv.hsl = function (hsv) { + const h = hsv[0]; + const s = hsv[1] / 100; + const v = hsv[2] / 100; + const vmin = Math.max(v, 0.01); + let sl; + let l; + + l = (2 - s) * v; + const lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= (lmin <= 1) ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + + return [h, sl * 100, l * 100]; +}; + +// http://dev.w3.org/csswg/css-color/#hwb-to-rgb +convert.hwb.rgb = function (hwb) { + const h = hwb[0] / 360; + let wh = hwb[1] / 100; + let bl = hwb[2] / 100; + const ratio = wh + bl; + let f; + + // Wh + bl cant be > 1 + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + const i = Math.floor(6 * h); + const v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + const n = wh + f * (v - wh); // Linear interpolation + + let r; + let g; + let b; + /* eslint-disable max-statements-per-line,no-multi-spaces */ + switch (i) { + default: + case 6: + case 0: r = v; g = n; b = wh; break; + case 1: r = n; g = v; b = wh; break; + case 2: r = wh; g = v; b = n; break; + case 3: r = wh; g = n; b = v; break; + case 4: r = n; g = wh; b = v; break; + case 5: r = v; g = wh; b = n; break; + } + /* eslint-enable max-statements-per-line,no-multi-spaces */ + + return [r * 255, g * 255, b * 255]; +}; + +convert.cmyk.rgb = function (cmyk) { + const c = cmyk[0] / 100; + const m = cmyk[1] / 100; + const y = cmyk[2] / 100; + const k = cmyk[3] / 100; + + const r = 1 - Math.min(1, c * (1 - k) + k); + const g = 1 - Math.min(1, m * (1 - k) + k); + const b = 1 - Math.min(1, y * (1 - k) + k); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.rgb = function (xyz) { + const x = xyz[0] / 100; + const y = xyz[1] / 100; + const z = xyz[2] / 100; + let r; + let g; + let b; + + r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); + g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); + b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); + + // Assume sRGB + r = r > 0.0031308 + ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055) + : r * 12.92; + + g = g > 0.0031308 + ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055) + : g * 12.92; + + b = b > 0.0031308 + ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055) + : b * 12.92; + + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.lab = function (xyz) { + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); + + const l = (116 * y) - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.lab.xyz = function (lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let x; + let y; + let z; + + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + + const y2 = y ** 3; + const x2 = x ** 3; + const z2 = z ** 3; + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + + x *= 95.047; + y *= 100; + z *= 108.883; + + return [x, y, z]; +}; + +convert.lab.lch = function (lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let h; + + const hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + const c = Math.sqrt(a * a + b * b); + + return [l, c, h]; +}; + +convert.lch.lab = function (lch) { + const l = lch[0]; + const c = lch[1]; + const h = lch[2]; + + const hr = h / 360 * 2 * Math.PI; + const a = c * Math.cos(hr); + const b = c * Math.sin(hr); + + return [l, a, b]; +}; + +convert.rgb.ansi16 = function (args, saturation = null) { + const [r, g, b] = args; + let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + let ansi = 30 + + ((Math.round(b / 255) << 2) + | (Math.round(g / 255) << 1) + | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; +}; + +convert.hsv.ansi16 = function (args) { + // Optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); +}; + +convert.rgb.ansi256 = function (args) { + const r = args[0]; + const g = args[1]; + const b = args[2]; + + // We use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round(((r - 8) / 247) * 24) + 232; + } + + const ansi = 16 + + (36 * Math.round(r / 255 * 5)) + + (6 * Math.round(g / 255 * 5)) + + Math.round(b / 255 * 5); + + return ansi; +}; + +convert.ansi16.rgb = function (args) { + let color = args % 10; + + // Handle greyscale + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + + return [color, color, color]; + } + + const mult = (~~(args > 50) + 1) * 0.5; + const r = ((color & 1) * mult) * 255; + const g = (((color >> 1) & 1) * mult) * 255; + const b = (((color >> 2) & 1) * mult) * 255; + + return [r, g, b]; +}; + +convert.ansi256.rgb = function (args) { + // Handle greyscale + if (args >= 232) { + const c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + + let rem; + const r = Math.floor(args / 36) / 5 * 255; + const g = Math.floor((rem = args % 36) / 6) / 5 * 255; + const b = (rem % 6) / 5 * 255; + + return [r, g, b]; +}; + +convert.rgb.hex = function (args) { + const integer = ((Math.round(args[0]) & 0xFF) << 16) + + ((Math.round(args[1]) & 0xFF) << 8) + + (Math.round(args[2]) & 0xFF); + + const string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.hex.rgb = function (args) { + const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + + let colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(char => { + return char + char; + }).join(''); + } + + const integer = parseInt(colorString, 16); + const r = (integer >> 16) & 0xFF; + const g = (integer >> 8) & 0xFF; + const b = integer & 0xFF; + + return [r, g, b]; +}; + +convert.rgb.hcg = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const max = Math.max(Math.max(r, g), b); + const min = Math.min(Math.min(r, g), b); + const chroma = (max - min); + let grayscale; + let hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else + if (max === r) { + hue = ((g - b) / chroma) % 6; + } else + if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma; + } + + hue /= 6; + hue %= 1; + + return [hue * 360, chroma * 100, grayscale * 100]; +}; + +convert.hsl.hcg = function (hsl) { + const s = hsl[1] / 100; + const l = hsl[2] / 100; + + const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l)); + + let f = 0; + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; +}; + +convert.hsv.hcg = function (hsv) { + const s = hsv[1] / 100; + const v = hsv[2] / 100; + + const c = s * v; + let f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; +}; + +convert.hcg.rgb = function (hcg) { + const h = hcg[0] / 360; + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + const pure = [0, 0, 0]; + const hi = (h % 1) * 6; + const v = hi % 1; + const w = 1 - v; + let mg = 0; + + /* eslint-disable max-statements-per-line */ + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; pure[1] = v; pure[2] = 0; break; + case 1: + pure[0] = w; pure[1] = 1; pure[2] = 0; break; + case 2: + pure[0] = 0; pure[1] = 1; pure[2] = v; break; + case 3: + pure[0] = 0; pure[1] = w; pure[2] = 1; break; + case 4: + pure[0] = v; pure[1] = 0; pure[2] = 1; break; + default: + pure[0] = 1; pure[1] = 0; pure[2] = w; + } + /* eslint-enable max-statements-per-line */ + + mg = (1.0 - c) * g; + + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; +}; + +convert.hcg.hsv = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + const v = c + g * (1.0 - c); + let f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; +}; + +convert.hcg.hsl = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + const l = g * (1.0 - c) + 0.5 * c; + let s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else + if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; +}; + +convert.hcg.hwb = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + const v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; +}; + +convert.hwb.hcg = function (hwb) { + const w = hwb[1] / 100; + const b = hwb[2] / 100; + const v = 1 - b; + const c = v - w; + let g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; +}; + +convert.apple.rgb = function (apple) { + return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; +}; + +convert.rgb.apple = function (rgb) { + return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; +}; + +convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; +}; + +convert.gray.hsl = function (args) { + return [0, 0, args[0]]; +}; + +convert.gray.hsv = convert.gray.hsl; + +convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; +}; + +convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; +}; + +convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; +}; + +convert.gray.hex = function (gray) { + const val = Math.round(gray[0] / 100 * 255) & 0xFF; + const integer = (val << 16) + (val << 8) + val; + + const string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.rgb.gray = function (rgb) { + const val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; +}; diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/index.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/index.js new file mode 100644 index 00000000..b648e573 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/index.js @@ -0,0 +1,81 @@ +const conversions = require('./conversions'); +const route = require('./route'); + +const convert = {}; + +const models = Object.keys(conversions); + +function wrapRaw(fn) { + const wrappedFn = function (...args) { + const arg0 = args[0]; + if (arg0 === undefined || arg0 === null) { + return arg0; + } + + if (arg0.length > 1) { + args = arg0; + } + + return fn(args); + }; + + // Preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + const wrappedFn = function (...args) { + const arg0 = args[0]; + + if (arg0 === undefined || arg0 === null) { + return arg0; + } + + if (arg0.length > 1) { + args = arg0; + } + + const result = fn(args); + + // We're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + if (typeof result === 'object') { + for (let len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; + + // Preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(fromModel => { + convert[fromModel] = {}; + + Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); + Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); + + const routes = route(fromModel); + const routeModels = Object.keys(routes); + + routeModels.forEach(toModel => { + const fn = routes[toModel]; + + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); + +module.exports = convert; diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/package.json b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/package.json new file mode 100644 index 00000000..6e48000c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/package.json @@ -0,0 +1,48 @@ +{ + "name": "color-convert", + "description": "Plain color conversion functions", + "version": "2.0.1", + "author": "Heather Arthur ", + "license": "MIT", + "repository": "Qix-/color-convert", + "scripts": { + "pretest": "xo", + "test": "node test/basic.js" + }, + "engines": { + "node": ">=7.0.0" + }, + "keywords": [ + "color", + "colour", + "convert", + "converter", + "conversion", + "rgb", + "hsl", + "hsv", + "hwb", + "cmyk", + "ansi", + "ansi16" + ], + "files": [ + "index.js", + "conversions.js", + "route.js" + ], + "xo": { + "rules": { + "default-case": 0, + "no-inline-comments": 0, + "operator-linebreak": 0 + } + }, + "devDependencies": { + "chalk": "^2.4.2", + "xo": "^0.24.0" + }, + "dependencies": { + "color-name": "~1.1.4" + } +} diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/route.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/route.js new file mode 100644 index 00000000..1a08521b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color-convert/route.js @@ -0,0 +1,97 @@ +const conversions = require('./conversions'); + +/* + This function routes a model to all other models. + + all functions that are routed have a property `.conversion` attached + to the returned synthetic function. This property is an array + of strings, each with the steps in between the 'from' and 'to' + color models (inclusive). + + conversions that are not possible simply are not included. +*/ + +function buildGraph() { + const graph = {}; + // https://jsperf.com/object-keys-vs-for-in-with-closure/3 + const models = Object.keys(conversions); + + for (let len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + } + + return graph; +} + +// https://en.wikipedia.org/wiki/Breadth-first_search +function deriveBFS(fromModel) { + const graph = buildGraph(); + const queue = [fromModel]; // Unshift -> queue -> pop + + graph[fromModel].distance = 0; + + while (queue.length) { + const current = queue.pop(); + const adjacents = Object.keys(conversions[current]); + + for (let len = adjacents.length, i = 0; i < len; i++) { + const adjacent = adjacents[i]; + const node = graph[adjacent]; + + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + + return graph; +} + +function link(from, to) { + return function (args) { + return to(from(args)); + }; +} + +function wrapConversion(toModel, graph) { + const path = [graph[toModel].parent, toModel]; + let fn = conversions[graph[toModel].parent][toModel]; + + let cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + + fn.conversion = path; + return fn; +} + +module.exports = function (fromModel) { + const graph = deriveBFS(fromModel); + const conversion = {}; + + const models = Object.keys(graph); + for (let len = models.length, i = 0; i < len; i++) { + const toModel = models[i]; + const node = graph[toModel]; + + if (node.parent === null) { + // No possible conversion, or this node is the source model. + continue; + } + + conversion[toModel] = wrapConversion(toModel, graph); + } + + return conversion; +}; + diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/LICENSE b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/LICENSE new file mode 100644 index 00000000..68c864ee --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2012 Heather Arthur + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/README.md b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/README.md new file mode 100644 index 00000000..674a7318 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/README.md @@ -0,0 +1,123 @@ +# color + +> JavaScript library for immutable color conversion and manipulation with support for CSS color strings. + +```js +const color = Color('#7743CE').alpha(0.5).lighten(0.5); +console.log(color.hsl().string()); // 'hsla(262, 59%, 81%, 0.5)' + +console.log(color.cmyk().round().array()); // [ 16, 25, 0, 8, 0.5 ] + +console.log(color.ansi256().object()); // { ansi256: 183, alpha: 0.5 } +``` + +## Install +```console +$ npm install color +``` + +## Usage +```js +const Color = require('color'); +``` + +### Constructors +```js +const color = Color('rgb(255, 255, 255)') +const color = Color({r: 255, g: 255, b: 255}) +const color = Color.rgb(255, 255, 255) +const color = Color.rgb([255, 255, 255]) +``` + +Set the values for individual channels with `alpha`, `red`, `green`, `blue`, `hue`, `saturationl` (hsl), `saturationv` (hsv), `lightness`, `whiteness`, `blackness`, `cyan`, `magenta`, `yellow`, `black` + +String constructors are handled by [color-string](https://www.npmjs.com/package/color-string) + +### Getters +```js +color.hsl(); +``` +Convert a color to a different space (`hsl()`, `cmyk()`, etc.). + +```js +color.object(); // {r: 255, g: 255, b: 255} +``` +Get a hash of the color value. Reflects the color's current model (see above). + +```js +color.rgb().array() // [255, 255, 255] +``` +Get an array of the values with `array()`. Reflects the color's current model (see above). + +```js +color.rgbNumber() // 16777215 (0xffffff) +``` +Get the rgb number value. + +```js +color.hex() // #ffffff +``` +Get the hex value. (**NOTE:** `.hex()` does not return alpha values; use `.hexa()` for an RGBA representation) + +```js +color.red() // 255 +``` +Get the value for an individual channel. + +### CSS Strings +```js +color.hsl().string() // 'hsl(320, 50%, 100%)' +``` + +Calling `.string()` with a number rounds the numbers to that decimal place. It defaults to 1. + +### Luminosity +```js +color.luminosity(); // 0.412 +``` +The [WCAG luminosity](http://www.w3.org/TR/WCAG20/#relativeluminancedef) of the color. 0 is black, 1 is white. + +```js +color.contrast(Color("blue")) // 12 +``` +The [WCAG contrast ratio](http://www.w3.org/TR/WCAG20/#contrast-ratiodef) to another color, from 1 (same color) to 21 (contrast b/w white and black). + +```js +color.isLight(); // true +color.isDark(); // false +``` +Get whether the color is "light" or "dark", useful for deciding text color. + +### Manipulation +```js +color.negate() // rgb(0, 100, 255) -> rgb(255, 155, 0) + +color.lighten(0.5) // hsl(100, 50%, 50%) -> hsl(100, 50%, 75%) +color.lighten(0.5) // hsl(100, 50%, 0) -> hsl(100, 50%, 0) +color.darken(0.5) // hsl(100, 50%, 50%) -> hsl(100, 50%, 25%) +color.darken(0.5) // hsl(100, 50%, 0) -> hsl(100, 50%, 0) + +color.lightness(50) // hsl(100, 50%, 10%) -> hsl(100, 50%, 50%) + +color.saturate(0.5) // hsl(100, 50%, 50%) -> hsl(100, 75%, 50%) +color.desaturate(0.5) // hsl(100, 50%, 50%) -> hsl(100, 25%, 50%) +color.grayscale() // #5CBF54 -> #969696 + +color.whiten(0.5) // hwb(100, 50%, 50%) -> hwb(100, 75%, 50%) +color.blacken(0.5) // hwb(100, 50%, 50%) -> hwb(100, 50%, 75%) + +color.fade(0.5) // rgba(10, 10, 10, 0.8) -> rgba(10, 10, 10, 0.4) +color.opaquer(0.5) // rgba(10, 10, 10, 0.8) -> rgba(10, 10, 10, 1.0) + +color.rotate(180) // hsl(60, 20%, 20%) -> hsl(240, 20%, 20%) +color.rotate(-90) // hsl(60, 20%, 20%) -> hsl(330, 20%, 20%) + +color.mix(Color("yellow")) // cyan -> rgb(128, 255, 128) +color.mix(Color("yellow"), 0.3) // cyan -> rgb(77, 255, 179) + +// chaining +color.green(100).grayscale().lighten(0.6) +``` + +## Propers +The API was inspired by [color-js](https://github.com/brehaut/color-js). Manipulation functions by CSS tools like Sass, LESS, and Stylus. diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/index.js b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/index.js new file mode 100644 index 00000000..ddb0b5df --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/index.js @@ -0,0 +1,496 @@ +const colorString = require('color-string'); +const convert = require('color-convert'); + +const skippedModels = [ + // To be honest, I don't really feel like keyword belongs in color convert, but eh. + 'keyword', + + // Gray conflicts with some method names, and has its own method defined. + 'gray', + + // Shouldn't really be in color-convert either... + 'hex', +]; + +const hashedModelKeys = {}; +for (const model of Object.keys(convert)) { + hashedModelKeys[[...convert[model].labels].sort().join('')] = model; +} + +const limiters = {}; + +function Color(object, model) { + if (!(this instanceof Color)) { + return new Color(object, model); + } + + if (model && model in skippedModels) { + model = null; + } + + if (model && !(model in convert)) { + throw new Error('Unknown model: ' + model); + } + + let i; + let channels; + + if (object == null) { // eslint-disable-line no-eq-null,eqeqeq + this.model = 'rgb'; + this.color = [0, 0, 0]; + this.valpha = 1; + } else if (object instanceof Color) { + this.model = object.model; + this.color = [...object.color]; + this.valpha = object.valpha; + } else if (typeof object === 'string') { + const result = colorString.get(object); + if (result === null) { + throw new Error('Unable to parse color from string: ' + object); + } + + this.model = result.model; + channels = convert[this.model].channels; + this.color = result.value.slice(0, channels); + this.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1; + } else if (object.length > 0) { + this.model = model || 'rgb'; + channels = convert[this.model].channels; + const newArray = Array.prototype.slice.call(object, 0, channels); + this.color = zeroArray(newArray, channels); + this.valpha = typeof object[channels] === 'number' ? object[channels] : 1; + } else if (typeof object === 'number') { + // This is always RGB - can be converted later on. + this.model = 'rgb'; + this.color = [ + (object >> 16) & 0xFF, + (object >> 8) & 0xFF, + object & 0xFF, + ]; + this.valpha = 1; + } else { + this.valpha = 1; + + const keys = Object.keys(object); + if ('alpha' in object) { + keys.splice(keys.indexOf('alpha'), 1); + this.valpha = typeof object.alpha === 'number' ? object.alpha : 0; + } + + const hashedKeys = keys.sort().join(''); + if (!(hashedKeys in hashedModelKeys)) { + throw new Error('Unable to parse color from object: ' + JSON.stringify(object)); + } + + this.model = hashedModelKeys[hashedKeys]; + + const {labels} = convert[this.model]; + const color = []; + for (i = 0; i < labels.length; i++) { + color.push(object[labels[i]]); + } + + this.color = zeroArray(color); + } + + // Perform limitations (clamping, etc.) + if (limiters[this.model]) { + channels = convert[this.model].channels; + for (i = 0; i < channels; i++) { + const limit = limiters[this.model][i]; + if (limit) { + this.color[i] = limit(this.color[i]); + } + } + } + + this.valpha = Math.max(0, Math.min(1, this.valpha)); + + if (Object.freeze) { + Object.freeze(this); + } +} + +Color.prototype = { + toString() { + return this.string(); + }, + + toJSON() { + return this[this.model](); + }, + + string(places) { + let self = this.model in colorString.to ? this : this.rgb(); + self = self.round(typeof places === 'number' ? places : 1); + const args = self.valpha === 1 ? self.color : [...self.color, this.valpha]; + return colorString.to[self.model](args); + }, + + percentString(places) { + const self = this.rgb().round(typeof places === 'number' ? places : 1); + const args = self.valpha === 1 ? self.color : [...self.color, this.valpha]; + return colorString.to.rgb.percent(args); + }, + + array() { + return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha]; + }, + + object() { + const result = {}; + const {channels} = convert[this.model]; + const {labels} = convert[this.model]; + + for (let i = 0; i < channels; i++) { + result[labels[i]] = this.color[i]; + } + + if (this.valpha !== 1) { + result.alpha = this.valpha; + } + + return result; + }, + + unitArray() { + const rgb = this.rgb().color; + rgb[0] /= 255; + rgb[1] /= 255; + rgb[2] /= 255; + + if (this.valpha !== 1) { + rgb.push(this.valpha); + } + + return rgb; + }, + + unitObject() { + const rgb = this.rgb().object(); + rgb.r /= 255; + rgb.g /= 255; + rgb.b /= 255; + + if (this.valpha !== 1) { + rgb.alpha = this.valpha; + } + + return rgb; + }, + + round(places) { + places = Math.max(places || 0, 0); + return new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model); + }, + + alpha(value) { + if (value !== undefined) { + return new Color([...this.color, Math.max(0, Math.min(1, value))], this.model); + } + + return this.valpha; + }, + + // Rgb + red: getset('rgb', 0, maxfn(255)), + green: getset('rgb', 1, maxfn(255)), + blue: getset('rgb', 2, maxfn(255)), + + hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => ((value % 360) + 360) % 360), + + saturationl: getset('hsl', 1, maxfn(100)), + lightness: getset('hsl', 2, maxfn(100)), + + saturationv: getset('hsv', 1, maxfn(100)), + value: getset('hsv', 2, maxfn(100)), + + chroma: getset('hcg', 1, maxfn(100)), + gray: getset('hcg', 2, maxfn(100)), + + white: getset('hwb', 1, maxfn(100)), + wblack: getset('hwb', 2, maxfn(100)), + + cyan: getset('cmyk', 0, maxfn(100)), + magenta: getset('cmyk', 1, maxfn(100)), + yellow: getset('cmyk', 2, maxfn(100)), + black: getset('cmyk', 3, maxfn(100)), + + x: getset('xyz', 0, maxfn(95.047)), + y: getset('xyz', 1, maxfn(100)), + z: getset('xyz', 2, maxfn(108.833)), + + l: getset('lab', 0, maxfn(100)), + a: getset('lab', 1), + b: getset('lab', 2), + + keyword(value) { + if (value !== undefined) { + return new Color(value); + } + + return convert[this.model].keyword(this.color); + }, + + hex(value) { + if (value !== undefined) { + return new Color(value); + } + + return colorString.to.hex(this.rgb().round().color); + }, + + hexa(value) { + if (value !== undefined) { + return new Color(value); + } + + const rgbArray = this.rgb().round().color; + + let alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase(); + if (alphaHex.length === 1) { + alphaHex = '0' + alphaHex; + } + + return colorString.to.hex(rgbArray) + alphaHex; + }, + + rgbNumber() { + const rgb = this.rgb().color; + return ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF); + }, + + luminosity() { + // http://www.w3.org/TR/WCAG20/#relativeluminancedef + const rgb = this.rgb().color; + + const lum = []; + for (const [i, element] of rgb.entries()) { + const chan = element / 255; + lum[i] = (chan <= 0.04045) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4; + } + + return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2]; + }, + + contrast(color2) { + // http://www.w3.org/TR/WCAG20/#contrast-ratiodef + const lum1 = this.luminosity(); + const lum2 = color2.luminosity(); + + if (lum1 > lum2) { + return (lum1 + 0.05) / (lum2 + 0.05); + } + + return (lum2 + 0.05) / (lum1 + 0.05); + }, + + level(color2) { + // https://www.w3.org/TR/WCAG/#contrast-enhanced + const contrastRatio = this.contrast(color2); + if (contrastRatio >= 7) { + return 'AAA'; + } + + return (contrastRatio >= 4.5) ? 'AA' : ''; + }, + + isDark() { + // YIQ equation from http://24ways.org/2010/calculating-color-contrast + const rgb = this.rgb().color; + const yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 10000; + return yiq < 128; + }, + + isLight() { + return !this.isDark(); + }, + + negate() { + const rgb = this.rgb(); + for (let i = 0; i < 3; i++) { + rgb.color[i] = 255 - rgb.color[i]; + } + + return rgb; + }, + + lighten(ratio) { + const hsl = this.hsl(); + hsl.color[2] += hsl.color[2] * ratio; + return hsl; + }, + + darken(ratio) { + const hsl = this.hsl(); + hsl.color[2] -= hsl.color[2] * ratio; + return hsl; + }, + + saturate(ratio) { + const hsl = this.hsl(); + hsl.color[1] += hsl.color[1] * ratio; + return hsl; + }, + + desaturate(ratio) { + const hsl = this.hsl(); + hsl.color[1] -= hsl.color[1] * ratio; + return hsl; + }, + + whiten(ratio) { + const hwb = this.hwb(); + hwb.color[1] += hwb.color[1] * ratio; + return hwb; + }, + + blacken(ratio) { + const hwb = this.hwb(); + hwb.color[2] += hwb.color[2] * ratio; + return hwb; + }, + + grayscale() { + // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale + const rgb = this.rgb().color; + const value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11; + return Color.rgb(value, value, value); + }, + + fade(ratio) { + return this.alpha(this.valpha - (this.valpha * ratio)); + }, + + opaquer(ratio) { + return this.alpha(this.valpha + (this.valpha * ratio)); + }, + + rotate(degrees) { + const hsl = this.hsl(); + let hue = hsl.color[0]; + hue = (hue + degrees) % 360; + hue = hue < 0 ? 360 + hue : hue; + hsl.color[0] = hue; + return hsl; + }, + + mix(mixinColor, weight) { + // Ported from sass implementation in C + // https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209 + if (!mixinColor || !mixinColor.rgb) { + throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor); + } + + const color1 = mixinColor.rgb(); + const color2 = this.rgb(); + const p = weight === undefined ? 0.5 : weight; + + const w = 2 * p - 1; + const a = color1.alpha() - color2.alpha(); + + const w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2; + const w2 = 1 - w1; + + return Color.rgb( + w1 * color1.red() + w2 * color2.red(), + w1 * color1.green() + w2 * color2.green(), + w1 * color1.blue() + w2 * color2.blue(), + color1.alpha() * p + color2.alpha() * (1 - p)); + }, +}; + +// Model conversion methods and static constructors +for (const model of Object.keys(convert)) { + if (skippedModels.includes(model)) { + continue; + } + + const {channels} = convert[model]; + + // Conversion methods + Color.prototype[model] = function (...args) { + if (this.model === model) { + return new Color(this); + } + + if (args.length > 0) { + return new Color(args, model); + } + + return new Color([...assertArray(convert[this.model][model].raw(this.color)), this.valpha], model); + }; + + // 'static' construction methods + Color[model] = function (...args) { + let color = args[0]; + if (typeof color === 'number') { + color = zeroArray(args, channels); + } + + return new Color(color, model); + }; +} + +function roundTo(number, places) { + return Number(number.toFixed(places)); +} + +function roundToPlace(places) { + return function (number) { + return roundTo(number, places); + }; +} + +function getset(model, channel, modifier) { + model = Array.isArray(model) ? model : [model]; + + for (const m of model) { + (limiters[m] || (limiters[m] = []))[channel] = modifier; + } + + model = model[0]; + + return function (value) { + let result; + + if (value !== undefined) { + if (modifier) { + value = modifier(value); + } + + result = this[model](); + result.color[channel] = value; + return result; + } + + result = this[model]().color[channel]; + if (modifier) { + result = modifier(result); + } + + return result; + }; +} + +function maxfn(max) { + return function (v) { + return Math.max(0, Math.min(max, v)); + }; +} + +function assertArray(value) { + return Array.isArray(value) ? value : [value]; +} + +function zeroArray(array, length) { + for (let i = 0; i < length; i++) { + if (typeof array[i] !== 'number') { + array[i] = 0; + } + } + + return array; +} + +module.exports = Color; diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/package.json b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/package.json new file mode 100644 index 00000000..4cdb6e31 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/node_modules/color/package.json @@ -0,0 +1,47 @@ +{ + "name": "color", + "version": "4.2.3", + "description": "Color conversion and manipulation with CSS string support", + "sideEffects": false, + "keywords": [ + "color", + "colour", + "css" + ], + "authors": [ + "Josh Junon ", + "Heather Arthur ", + "Maxime Thirouin" + ], + "license": "MIT", + "repository": "Qix-/color", + "xo": { + "rules": { + "no-cond-assign": 0, + "new-cap": 0, + "unicorn/prefer-module": 0, + "no-mixed-operators": 0, + "complexity": 0, + "unicorn/numeric-separators-style": 0 + } + }, + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "pretest": "xo", + "test": "mocha" + }, + "engines": { + "node": ">=12.5.0" + }, + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "devDependencies": { + "mocha": "9.0.2", + "xo": "0.42.0" + } +} diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/package.json b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/package.json new file mode 100644 index 00000000..a4033831 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/package.json @@ -0,0 +1,79 @@ +{ + "name": "@react-navigation/bottom-tabs", + "description": "Bottom tab navigator following iOS design guidelines", + "version": "6.5.4", + "keywords": [ + "react-native-component", + "react-component", + "react-native", + "react-navigation", + "ios", + "android", + "tab" + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/react-navigation/react-navigation.git", + "directory": "packages/bottom-tabs" + }, + "main": "lib/commonjs/index.js", + "react-native": "src/index.tsx", + "source": "src/index.tsx", + "module": "lib/module/index.js", + "types": "lib/typescript/src/index.d.ts", + "files": [ + "src", + "lib", + "!**/__tests__" + ], + "sideEffects": false, + "publishConfig": { + "access": "public" + }, + "scripts": { + "prepack": "bob build", + "clean": "del lib" + }, + "dependencies": { + "@react-navigation/elements": "^1.3.14", + "color": "^4.2.3", + "warn-once": "^0.1.0" + }, + "devDependencies": { + "@react-navigation/native": "^6.1.3", + "@testing-library/react-native": "^11.5.0", + "@types/color": "^3.0.1", + "@types/react": "~18.0.0", + "@types/react-native": "~0.69.1", + "del-cli": "^3.0.1", + "react": "18.0.0", + "react-native": "0.69.5", + "react-native-builder-bob": "^0.20.3", + "react-native-safe-area-context": "4.3.1", + "react-native-screens": "~3.15.0", + "typescript": "^4.7.4" + }, + "peerDependencies": { + "@react-navigation/native": "^6.0.0", + "react": "*", + "react-native": "*", + "react-native-safe-area-context": ">= 3.0.0", + "react-native-screens": ">= 3.0.0" + }, + "react-native-builder-bob": { + "source": "src", + "output": "lib", + "targets": [ + "commonjs", + "module", + [ + "typescript", + { + "project": "tsconfig.build.json" + } + ] + ] + }, + "gitHead": "ef3f7377ef1a5623bc38273b63663b0f7bd39815" +} diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/index.tsx b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/index.tsx new file mode 100644 index 00000000..510d1e79 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/index.tsx @@ -0,0 +1,30 @@ +/** + * Navigators + */ +export { default as createBottomTabNavigator } from './navigators/createBottomTabNavigator'; + +/** + * Views + */ +export { default as BottomTabBar } from './views/BottomTabBar'; +export { default as BottomTabView } from './views/BottomTabView'; + +/** + * Utilities + */ +export { default as BottomTabBarHeightCallbackContext } from './utils/BottomTabBarHeightCallbackContext'; +export { default as BottomTabBarHeightContext } from './utils/BottomTabBarHeightContext'; +export { default as useBottomTabBarHeight } from './utils/useBottomTabBarHeight'; + +/** + * Types + */ +export type { + BottomTabBarButtonProps, + BottomTabBarProps, + BottomTabHeaderProps, + BottomTabNavigationEventMap, + BottomTabNavigationOptions, + BottomTabNavigationProp, + BottomTabScreenProps, +} from './types'; diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/navigators/createBottomTabNavigator.tsx b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/navigators/createBottomTabNavigator.tsx new file mode 100644 index 00000000..fe0054ed --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/navigators/createBottomTabNavigator.tsx @@ -0,0 +1,134 @@ +import { + createNavigatorFactory, + DefaultNavigatorOptions, + ParamListBase, + TabActionHelpers, + TabNavigationState, + TabRouter, + TabRouterOptions, + useNavigationBuilder, +} from '@react-navigation/native'; +import * as React from 'react'; +import warnOnce from 'warn-once'; + +import type { + BottomTabNavigationConfig, + BottomTabNavigationEventMap, + BottomTabNavigationOptions, +} from '../types'; +import BottomTabView from '../views/BottomTabView'; + +type Props = DefaultNavigatorOptions< + ParamListBase, + TabNavigationState, + BottomTabNavigationOptions, + BottomTabNavigationEventMap +> & + TabRouterOptions & + BottomTabNavigationConfig; + +function BottomTabNavigator({ + id, + initialRouteName, + backBehavior, + children, + screenListeners, + screenOptions, + sceneContainerStyle, + ...restWithDeprecated +}: Props) { + const { + // @ts-expect-error: lazy is deprecated + lazy, + // @ts-expect-error: tabBarOptions is deprecated + tabBarOptions, + ...rest + } = restWithDeprecated; + + let defaultScreenOptions: BottomTabNavigationOptions = {}; + + if (tabBarOptions) { + Object.assign(defaultScreenOptions, { + tabBarHideOnKeyboard: tabBarOptions.keyboardHidesTabBar, + tabBarActiveTintColor: tabBarOptions.activeTintColor, + tabBarInactiveTintColor: tabBarOptions.inactiveTintColor, + tabBarActiveBackgroundColor: tabBarOptions.activeBackgroundColor, + tabBarInactiveBackgroundColor: tabBarOptions.inactiveBackgroundColor, + tabBarAllowFontScaling: tabBarOptions.allowFontScaling, + tabBarShowLabel: tabBarOptions.showLabel, + tabBarLabelStyle: tabBarOptions.labelStyle, + tabBarIconStyle: tabBarOptions.iconStyle, + tabBarItemStyle: tabBarOptions.tabStyle, + tabBarLabelPosition: + tabBarOptions.labelPosition ?? + (tabBarOptions.adaptive === false ? 'below-icon' : undefined), + tabBarStyle: [ + { display: tabBarOptions.tabBarVisible ? 'none' : 'flex' }, + defaultScreenOptions.tabBarStyle, + ], + }); + + ( + Object.keys(defaultScreenOptions) as (keyof BottomTabNavigationOptions)[] + ).forEach((key) => { + if (defaultScreenOptions[key] === undefined) { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete defaultScreenOptions[key]; + } + }); + + warnOnce( + tabBarOptions, + `Bottom Tab Navigator: 'tabBarOptions' is deprecated. Migrate the options to 'screenOptions' instead.\n\nPlace the following in 'screenOptions' in your code to keep current behavior:\n\n${JSON.stringify( + defaultScreenOptions, + null, + 2 + )}\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator#options for more details.` + ); + } + + if (typeof lazy === 'boolean') { + defaultScreenOptions.lazy = lazy; + + warnOnce( + true, + `Bottom Tab Navigator: 'lazy' in props is deprecated. Move it to 'screenOptions' instead.\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator/#lazy for more details.` + ); + } + + const { state, descriptors, navigation, NavigationContent } = + useNavigationBuilder< + TabNavigationState, + TabRouterOptions, + TabActionHelpers, + BottomTabNavigationOptions, + BottomTabNavigationEventMap + >(TabRouter, { + id, + initialRouteName, + backBehavior, + children, + screenListeners, + screenOptions, + defaultScreenOptions, + }); + + return ( + + + + ); +} + +export default createNavigatorFactory< + TabNavigationState, + BottomTabNavigationOptions, + BottomTabNavigationEventMap, + typeof BottomTabNavigator +>(BottomTabNavigator); diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/types.tsx b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/types.tsx new file mode 100644 index 00000000..03c34122 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/types.tsx @@ -0,0 +1,329 @@ +import type { HeaderOptions } from '@react-navigation/elements'; +import type { + Descriptor, + NavigationHelpers, + NavigationProp, + ParamListBase, + RouteProp, + TabActionHelpers, + TabNavigationState, +} from '@react-navigation/native'; +import type * as React from 'react'; +import type { + Animated, + GestureResponderEvent, + StyleProp, + TextStyle, + TouchableWithoutFeedbackProps, + ViewStyle, +} from 'react-native'; +import type { EdgeInsets } from 'react-native-safe-area-context'; + +export type Layout = { width: number; height: number }; + +export type BottomTabNavigationEventMap = { + /** + * Event which fires on tapping on the tab in the tab bar. + */ + tabPress: { data: undefined; canPreventDefault: true }; + /** + * Event which fires on long press on the tab in the tab bar. + */ + tabLongPress: { data: undefined }; +}; + +export type LabelPosition = 'beside-icon' | 'below-icon'; + +export type BottomTabNavigationHelpers = NavigationHelpers< + ParamListBase, + BottomTabNavigationEventMap +> & + TabActionHelpers; + +export type BottomTabNavigationProp< + ParamList extends ParamListBase, + RouteName extends keyof ParamList = keyof ParamList, + NavigatorID extends string | undefined = undefined +> = NavigationProp< + ParamList, + RouteName, + NavigatorID, + TabNavigationState, + BottomTabNavigationOptions, + BottomTabNavigationEventMap +> & + TabActionHelpers; + +export type BottomTabScreenProps< + ParamList extends ParamListBase, + RouteName extends keyof ParamList = keyof ParamList, + NavigatorID extends string | undefined = undefined +> = { + navigation: BottomTabNavigationProp; + route: RouteProp; +}; + +export type TimingKeyboardAnimationConfig = { + animation: 'timing'; + config?: Omit< + Partial, + 'toValue' | 'useNativeDriver' + >; +}; + +export type SpringKeyboardAnimationConfig = { + animation: 'spring'; + config?: Omit< + Partial, + 'toValue' | 'useNativeDriver' + >; +}; + +export type TabBarVisibilityAnimationConfig = + | TimingKeyboardAnimationConfig + | SpringKeyboardAnimationConfig; + +export type BottomTabNavigationOptions = HeaderOptions & { + /** + * Title text for the screen. + */ + title?: string; + + /** + * Title string of a tab displayed in the tab bar + * or a function that given { focused: boolean, color: string, position: 'below-icon' | 'beside-icon', children: string } returns a React.Node to display in tab bar. + * + * When undefined, scene title is used. Use `tabBarShowLabel` to hide the label. + */ + tabBarLabel?: + | string + | ((props: { + focused: boolean; + color: string; + position: LabelPosition; + children: string; + }) => React.ReactNode); + + /** + * Whether the tab label should be visible. Defaults to `true`. + */ + tabBarShowLabel?: boolean; + + /** + * Whether the label is shown below the icon or beside the icon. + * + * - `below-icon`: the label is shown below the icon (typical for iPhones) + * - `beside-icon` the label is shown next to the icon (typical for iPad) + * + * By default, the position is chosen automatically based on device width. + */ + tabBarLabelPosition?: LabelPosition; + + /** + * Style object for the tab label. + */ + tabBarLabelStyle?: StyleProp; + + /** + * Whether label font should scale to respect Text Size accessibility settings. + */ + tabBarAllowFontScaling?: boolean; + + /** + * A function that given { focused: boolean, color: string } returns a React.Node to display in the tab bar. + */ + tabBarIcon?: (props: { + focused: boolean; + color: string; + size: number; + }) => React.ReactNode; + + /** + * Style object for the tab icon. + */ + tabBarIconStyle?: StyleProp; + + /** + * Text to show in a badge on the tab icon. + */ + tabBarBadge?: number | string; + + /** + * Custom style for the tab bar badge. + * You can specify a background color or text color here. + */ + tabBarBadgeStyle?: StyleProp; + + /** + * Accessibility label for the tab button. This is read by the screen reader when the user taps the tab. + * It's recommended to set this if you don't have a label for the tab. + */ + tabBarAccessibilityLabel?: string; + + /** + * ID to locate this tab button in tests. + */ + tabBarTestID?: string; + + /** + * Function which returns a React element to render as the tab bar button. + * Renders `Pressable` by default. + */ + tabBarButton?: (props: BottomTabBarButtonProps) => React.ReactNode; + + /** + * Color for the icon and label in the active tab. + */ + tabBarActiveTintColor?: string; + + /** + * Color for the icon and label in the inactive tabs. + */ + tabBarInactiveTintColor?: string; + + /** + * Background color for the active tab. + */ + tabBarActiveBackgroundColor?: string; + + /** + * Background color for the inactive tabs. + */ + tabBarInactiveBackgroundColor?: string; + + /** + * Style object for the tab item container. + */ + tabBarItemStyle?: StyleProp; + + /** + * Whether the tab bar gets hidden when the keyboard is shown. Defaults to `false`. + */ + tabBarHideOnKeyboard?: boolean; + + /** + * Animation config for showing and hiding the tab bar when the keyboard is shown/hidden. + */ + tabBarVisibilityAnimationConfig?: { + show?: TabBarVisibilityAnimationConfig; + hide?: TabBarVisibilityAnimationConfig; + }; + + /** + * Style object for the tab bar container. + */ + tabBarStyle?: Animated.WithAnimatedValue>; + + /** + * Function which returns a React Element to use as background for the tab bar. + * You could render an image, a gradient, blur view etc. + * + * When using `BlurView`, make sure to set `position: 'absolute'` in `tabBarStyle` as well. + * You'd also need to use `useBottomTabBarHeight()` to add a bottom padding to your content. + */ + tabBarBackground?: () => React.ReactNode; + + /** + * Whether this screens should render the first time it's accessed. Defaults to `true`. + * Set it to `false` if you want to render the screen on initial render. + */ + lazy?: boolean; + + /** + * Function that given returns a React Element to display as a header. + */ + header?: (props: BottomTabHeaderProps) => React.ReactNode; + + /** + * Whether to show the header. Setting this to `false` hides the header. + * Defaults to `true`. + */ + headerShown?: boolean; + + /** + * Whether this screen should be unmounted when navigating away from it. + * Defaults to `false`. + */ + unmountOnBlur?: boolean; + + /** + * Whether inactive screens should be suspended from re-rendering. Defaults to `false`. + * Defaults to `true` when `enableFreeze()` is run at the top of the application. + * Requires `react-native-screens` version >=3.16.0. + * + * Only supported on iOS and Android. + */ + freezeOnBlur?: boolean; +}; + +export type BottomTabDescriptor = Descriptor< + BottomTabNavigationOptions, + BottomTabNavigationProp, + RouteProp +>; + +export type BottomTabDescriptorMap = Record; + +export type BottomTabNavigationConfig = { + /** + * Function that returns a React element to display as the tab bar. + */ + tabBar?: (props: BottomTabBarProps) => React.ReactNode; + /** + * Safe area insets for the tab bar. This is used to avoid elements like the navigation bar on Android and bottom safe area on iOS. + * By default, the device's safe area insets are automatically detected. You can override the behavior with this option. + */ + safeAreaInsets?: { + top?: number; + right?: number; + bottom?: number; + left?: number; + }; + /** + * Whether inactive screens should be detached from the view hierarchy to save memory. + * Make sure to call `enableScreens` from `react-native-screens` to make it work. + * Defaults to `true` on Android. + */ + detachInactiveScreens?: boolean; + /** + * Style object for the component wrapping the screen content. + */ + sceneContainerStyle?: StyleProp; +}; + +export type BottomTabHeaderProps = { + /** + * Layout of the screen. + */ + layout: Layout; + /** + * Options for the current screen. + */ + options: BottomTabNavigationOptions; + /** + * Route object for the current screen. + */ + route: RouteProp; + /** + * Navigation prop for the header. + */ + navigation: BottomTabNavigationProp; +}; + +export type BottomTabBarProps = { + state: TabNavigationState; + descriptors: BottomTabDescriptorMap; + navigation: NavigationHelpers; + insets: EdgeInsets; +}; + +export type BottomTabBarButtonProps = Omit< + TouchableWithoutFeedbackProps, + 'onPress' +> & { + to?: string; + children: React.ReactNode; + onPress?: ( + e: React.MouseEvent | GestureResponderEvent + ) => void; +}; diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/BottomTabBarHeightCallbackContext.tsx b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/BottomTabBarHeightCallbackContext.tsx new file mode 100644 index 00000000..03b3ef32 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/BottomTabBarHeightCallbackContext.tsx @@ -0,0 +1,5 @@ +import * as React from 'react'; + +export default React.createContext<((height: number) => void) | undefined>( + undefined +); diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/BottomTabBarHeightContext.tsx b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/BottomTabBarHeightContext.tsx new file mode 100644 index 00000000..e61d0446 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/BottomTabBarHeightContext.tsx @@ -0,0 +1,3 @@ +import * as React from 'react'; + +export default React.createContext(undefined); diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/useBottomTabBarHeight.tsx b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/useBottomTabBarHeight.tsx new file mode 100644 index 00000000..8a559a7a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/useBottomTabBarHeight.tsx @@ -0,0 +1,15 @@ +import * as React from 'react'; + +import BottomTabBarHeightContext from './BottomTabBarHeightContext'; + +export default function useBottomTabBarHeight() { + const height = React.useContext(BottomTabBarHeightContext); + + if (height === undefined) { + throw new Error( + "Couldn't find the bottom tab bar height. Are you inside a screen in Bottom Tab Navigator?" + ); + } + + return height; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/useIsKeyboardShown.tsx b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/useIsKeyboardShown.tsx new file mode 100644 index 00000000..2b3f356d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/utils/useIsKeyboardShown.tsx @@ -0,0 +1,31 @@ +import * as React from 'react'; +import { EmitterSubscription, Keyboard, Platform } from 'react-native'; + +export default function useIsKeyboardShown() { + const [isKeyboardShown, setIsKeyboardShown] = React.useState(false); + + React.useEffect(() => { + const handleKeyboardShow = () => setIsKeyboardShown(true); + const handleKeyboardHide = () => setIsKeyboardShown(false); + + let subscriptions: EmitterSubscription[]; + + if (Platform.OS === 'ios') { + subscriptions = [ + Keyboard.addListener('keyboardWillShow', handleKeyboardShow), + Keyboard.addListener('keyboardWillHide', handleKeyboardHide), + ]; + } else { + subscriptions = [ + Keyboard.addListener('keyboardDidShow', handleKeyboardShow), + Keyboard.addListener('keyboardDidHide', handleKeyboardHide), + ]; + } + + return () => { + subscriptions.forEach((s) => s.remove()); + }; + }, []); + + return isKeyboardShown; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/Badge.tsx b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/Badge.tsx new file mode 100644 index 00000000..a9baa37f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/Badge.tsx @@ -0,0 +1,110 @@ +import { useTheme } from '@react-navigation/native'; +import color from 'color'; +import * as React from 'react'; +import { Animated, StyleProp, StyleSheet, TextStyle } from 'react-native'; + +type Props = { + /** + * Whether the badge is visible + */ + visible: boolean; + /** + * Content of the `Badge`. + */ + children?: string | number; + /** + * Size of the `Badge`. + */ + size?: number; + /** + * Style object for the tab bar container. + */ + style?: Animated.WithAnimatedValue>; +}; + +export default function Badge({ + children, + style, + visible = true, + size = 18, + ...rest +}: Props) { + const [opacity] = React.useState(() => new Animated.Value(visible ? 1 : 0)); + const [rendered, setRendered] = React.useState(visible); + + const theme = useTheme(); + + React.useEffect(() => { + if (!rendered) { + return; + } + + Animated.timing(opacity, { + toValue: visible ? 1 : 0, + duration: 150, + useNativeDriver: true, + }).start(({ finished }) => { + if (finished && !visible) { + setRendered(false); + } + }); + + return () => opacity.stopAnimation(); + }, [opacity, rendered, visible]); + + if (!rendered) { + if (visible) { + setRendered(true); + } else { + return null; + } + } + + // @ts-expect-error: backgroundColor definitely exists + const { backgroundColor = theme.colors.notification, ...restStyle } = + StyleSheet.flatten(style) || {}; + const textColor = color(backgroundColor).isLight() ? 'black' : 'white'; + + const borderRadius = size / 2; + const fontSize = Math.floor((size * 3) / 4); + + return ( + + {children} + + ); +} + +const styles = StyleSheet.create({ + container: { + alignSelf: 'flex-end', + textAlign: 'center', + paddingHorizontal: 4, + overflow: 'hidden', + }, +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabBar.tsx b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabBar.tsx new file mode 100644 index 00000000..96469a29 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabBar.tsx @@ -0,0 +1,392 @@ +import { MissingIcon } from '@react-navigation/elements'; +import { + CommonActions, + NavigationContext, + NavigationRouteContext, + ParamListBase, + TabNavigationState, + useLinkBuilder, + useTheme, +} from '@react-navigation/native'; +import React from 'react'; +import { + Animated, + LayoutChangeEvent, + Platform, + StyleProp, + StyleSheet, + View, + ViewStyle, +} from 'react-native'; +import { EdgeInsets, useSafeAreaFrame } from 'react-native-safe-area-context'; + +import type { BottomTabBarProps, BottomTabDescriptorMap } from '../types'; +import BottomTabBarHeightCallbackContext from '../utils/BottomTabBarHeightCallbackContext'; +import useIsKeyboardShown from '../utils/useIsKeyboardShown'; +import BottomTabItem from './BottomTabItem'; + +type Props = BottomTabBarProps & { + style?: Animated.WithAnimatedValue>; +}; + +const DEFAULT_TABBAR_HEIGHT = 49; +const COMPACT_TABBAR_HEIGHT = 32; +const DEFAULT_MAX_TAB_ITEM_WIDTH = 125; + +const useNativeDriver = Platform.OS !== 'web'; + +type Options = { + state: TabNavigationState; + descriptors: BottomTabDescriptorMap; + layout: { height: number; width: number }; + dimensions: { height: number; width: number }; +}; + +const shouldUseHorizontalLabels = ({ + state, + descriptors, + layout, + dimensions, +}: Options) => { + const { tabBarLabelPosition } = + descriptors[state.routes[state.index].key].options; + + if (tabBarLabelPosition) { + switch (tabBarLabelPosition) { + case 'beside-icon': + return true; + case 'below-icon': + return false; + } + } + + if (layout.width >= 768) { + // Screen size matches a tablet + const maxTabWidth = state.routes.reduce((acc, route) => { + const { tabBarItemStyle } = descriptors[route.key].options; + const flattenedStyle = StyleSheet.flatten(tabBarItemStyle); + + if (flattenedStyle) { + if (typeof flattenedStyle.width === 'number') { + return acc + flattenedStyle.width; + } else if (typeof flattenedStyle.maxWidth === 'number') { + return acc + flattenedStyle.maxWidth; + } + } + + return acc + DEFAULT_MAX_TAB_ITEM_WIDTH; + }, 0); + + return maxTabWidth <= layout.width; + } else { + return dimensions.width > dimensions.height; + } +}; + +const getPaddingBottom = (insets: EdgeInsets) => + Math.max(insets.bottom - Platform.select({ ios: 4, default: 0 }), 0); + +export const getTabBarHeight = ({ + state, + descriptors, + dimensions, + insets, + style, + ...rest +}: Options & { + insets: EdgeInsets; + style: Animated.WithAnimatedValue> | undefined; +}) => { + // @ts-ignore + const customHeight = StyleSheet.flatten(style)?.height; + + if (typeof customHeight === 'number') { + return customHeight; + } + + const isLandscape = dimensions.width > dimensions.height; + const horizontalLabels = shouldUseHorizontalLabels({ + state, + descriptors, + dimensions, + ...rest, + }); + const paddingBottom = getPaddingBottom(insets); + + if ( + Platform.OS === 'ios' && + !Platform.isPad && + isLandscape && + horizontalLabels + ) { + return COMPACT_TABBAR_HEIGHT + paddingBottom; + } + + return DEFAULT_TABBAR_HEIGHT + paddingBottom; +}; + +export default function BottomTabBar({ + state, + navigation, + descriptors, + insets, + style, +}: Props) { + const { colors } = useTheme(); + const buildLink = useLinkBuilder(); + + const focusedRoute = state.routes[state.index]; + const focusedDescriptor = descriptors[focusedRoute.key]; + const focusedOptions = focusedDescriptor.options; + + const { + tabBarShowLabel, + tabBarHideOnKeyboard = false, + tabBarVisibilityAnimationConfig, + tabBarStyle, + tabBarBackground, + tabBarActiveTintColor, + tabBarInactiveTintColor, + tabBarActiveBackgroundColor, + tabBarInactiveBackgroundColor, + } = focusedOptions; + + const dimensions = useSafeAreaFrame(); + const isKeyboardShown = useIsKeyboardShown(); + + const onHeightChange = React.useContext(BottomTabBarHeightCallbackContext); + + const shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown); + + const visibilityAnimationConfigRef = React.useRef( + tabBarVisibilityAnimationConfig + ); + + React.useEffect(() => { + visibilityAnimationConfigRef.current = tabBarVisibilityAnimationConfig; + }); + + const [isTabBarHidden, setIsTabBarHidden] = React.useState(!shouldShowTabBar); + + const [visible] = React.useState( + () => new Animated.Value(shouldShowTabBar ? 1 : 0) + ); + + React.useEffect(() => { + const visibilityAnimationConfig = visibilityAnimationConfigRef.current; + + if (shouldShowTabBar) { + const animation = + visibilityAnimationConfig?.show?.animation === 'spring' + ? Animated.spring + : Animated.timing; + + animation(visible, { + toValue: 1, + useNativeDriver, + duration: 250, + ...visibilityAnimationConfig?.show?.config, + }).start(({ finished }) => { + if (finished) { + setIsTabBarHidden(false); + } + }); + } else { + setIsTabBarHidden(true); + + const animation = + visibilityAnimationConfig?.hide?.animation === 'spring' + ? Animated.spring + : Animated.timing; + + animation(visible, { + toValue: 0, + useNativeDriver, + duration: 200, + ...visibilityAnimationConfig?.hide?.config, + }).start(); + } + + return () => visible.stopAnimation(); + }, [visible, shouldShowTabBar]); + + const [layout, setLayout] = React.useState({ + height: 0, + width: dimensions.width, + }); + + const handleLayout = (e: LayoutChangeEvent) => { + const { height, width } = e.nativeEvent.layout; + + onHeightChange?.(height); + + setLayout((layout) => { + if (height === layout.height && width === layout.width) { + return layout; + } else { + return { + height, + width, + }; + } + }); + }; + + const { routes } = state; + + const paddingBottom = getPaddingBottom(insets); + const tabBarHeight = getTabBarHeight({ + state, + descriptors, + insets, + dimensions, + layout, + style: [tabBarStyle, style], + }); + + const hasHorizontalLabels = shouldUseHorizontalLabels({ + state, + descriptors, + dimensions, + layout, + }); + + const tabBarBackgroundElement = tabBarBackground?.(); + + return ( + + ); +} + +const styles = StyleSheet.create({ + tabBar: { + left: 0, + right: 0, + bottom: 0, + borderTopWidth: StyleSheet.hairlineWidth, + elevation: 8, + }, + content: { + flex: 1, + flexDirection: 'row', + }, +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabItem.tsx b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabItem.tsx new file mode 100644 index 00000000..9b5975af --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabItem.tsx @@ -0,0 +1,333 @@ +import { Link, Route, useTheme } from '@react-navigation/native'; +import Color from 'color'; +import React from 'react'; +import { + GestureResponderEvent, + Platform, + Pressable, + StyleProp, + StyleSheet, + Text, + TextStyle, + ViewStyle, +} from 'react-native'; + +import type { + BottomTabBarButtonProps, + BottomTabDescriptor, + LabelPosition, +} from '../types'; +import TabBarIcon from './TabBarIcon'; + +type Props = { + /** + * Whether the tab is focused. + */ + focused: boolean; + /** + * The route object which should be specified by the tab. + */ + route: Route; + /** + * The descriptor object for the route. + */ + descriptor: BottomTabDescriptor; + /** + * The label text of the tab. + */ + label: + | string + | ((props: { + focused: boolean; + color: string; + position: LabelPosition; + children: string; + }) => React.ReactNode); + /** + * Icon to display for the tab. + */ + icon: (props: { + focused: boolean; + size: number; + color: string; + }) => React.ReactNode; + /** + * Text to show in a badge on the tab icon. + */ + badge?: number | string; + /** + * Custom style for the badge. + */ + badgeStyle?: StyleProp; + /** + * URL to use for the link to the tab. + */ + to?: string; + /** + * The button for the tab. Uses a `TouchableWithoutFeedback` by default. + */ + button?: (props: BottomTabBarButtonProps) => React.ReactNode; + /** + * The accessibility label for the tab. + */ + accessibilityLabel?: string; + /** + * An unique ID for testing for the tab. + */ + testID?: string; + /** + * Function to execute on press in React Native. + * On the web, this will use onClick. + */ + onPress: ( + e: React.MouseEvent | GestureResponderEvent + ) => void; + /** + * Function to execute on long press. + */ + onLongPress: (e: GestureResponderEvent) => void; + /** + * Whether the label should be aligned with the icon horizontally. + */ + horizontal: boolean; + /** + * Color for the icon and label when the item is active. + */ + activeTintColor?: string; + /** + * Color for the icon and label when the item is inactive. + */ + inactiveTintColor?: string; + /** + * Background color for item when its active. + */ + activeBackgroundColor?: string; + /** + * Background color for item when its inactive. + */ + inactiveBackgroundColor?: string; + /** + * Whether to show the label text for the tab. + */ + showLabel?: boolean; + /** + * Whether to allow scaling the font for the label for accessibility purposes. + */ + allowFontScaling?: boolean; + /** + * Style object for the label element. + */ + labelStyle?: StyleProp; + /** + * Style object for the icon element. + */ + iconStyle?: StyleProp; + /** + * Style object for the wrapper element. + */ + style?: StyleProp; +}; + +export default function BottomTabBarItem({ + focused, + route, + descriptor, + label, + icon, + badge, + badgeStyle, + to, + button = ({ + children, + style, + onPress, + to, + accessibilityRole, + ...rest + }: BottomTabBarButtonProps) => { + if (Platform.OS === 'web' && to) { + // React Native Web doesn't forward `onClick` if we use `TouchableWithoutFeedback`. + // We need to use `onClick` to be able to prevent default browser handling of links. + return ( + { + if ( + !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && // ignore clicks with modifier keys + (e.button == null || e.button === 0) // ignore everything but left clicks + ) { + e.preventDefault(); + onPress?.(e); + } + }} + > + {children} + + ); + } else { + return ( + + {children} + + ); + } + }, + accessibilityLabel, + testID, + onPress, + onLongPress, + horizontal, + activeTintColor: customActiveTintColor, + inactiveTintColor: customInactiveTintColor, + activeBackgroundColor = 'transparent', + inactiveBackgroundColor = 'transparent', + showLabel = true, + allowFontScaling, + labelStyle, + iconStyle, + style, +}: Props) { + const { colors } = useTheme(); + + const activeTintColor = + customActiveTintColor === undefined + ? colors.primary + : customActiveTintColor; + + const inactiveTintColor = + customInactiveTintColor === undefined + ? Color(colors.text).mix(Color(colors.card), 0.5).hex() + : customInactiveTintColor; + + const renderLabel = ({ focused }: { focused: boolean }) => { + if (showLabel === false) { + return null; + } + + const color = focused ? activeTintColor : inactiveTintColor; + + if (typeof label === 'string') { + return ( + + {label} + + ); + } + + const { options } = descriptor; + const children = + typeof options.tabBarLabel === 'string' + ? options.tabBarLabel + : options.title !== undefined + ? options.title + : route.name; + + return label({ + focused, + color, + position: horizontal ? 'beside-icon' : 'below-icon', + children, + }); + }; + + const renderIcon = ({ focused }: { focused: boolean }) => { + if (icon === undefined) { + return null; + } + + const activeOpacity = focused ? 1 : 0; + const inactiveOpacity = focused ? 0 : 1; + + return ( + + ); + }; + + const scene = { route, focused }; + + const backgroundColor = focused + ? activeBackgroundColor + : inactiveBackgroundColor; + + return button({ + to, + onPress, + onLongPress, + testID, + accessibilityLabel, + // FIXME: accessibilityRole: 'tab' doesn't seem to work as expected on iOS + accessibilityRole: Platform.select({ ios: 'button', default: 'tab' }), + accessibilityState: { selected: focused }, + // @ts-expect-error: keep for compatibility with older React Native versions + accessibilityStates: focused ? ['selected'] : [], + style: [ + styles.tab, + { backgroundColor }, + horizontal ? styles.tabLandscape : styles.tabPortrait, + style, + ], + children: ( + + {renderIcon(scene)} + {renderLabel(scene)} + + ), + }) as React.ReactElement; +} + +const styles = StyleSheet.create({ + tab: { + flex: 1, + alignItems: 'center', + }, + tabPortrait: { + justifyContent: 'flex-end', + flexDirection: 'column', + }, + tabLandscape: { + justifyContent: 'center', + flexDirection: 'row', + }, + label: { + textAlign: 'center', + backgroundColor: 'transparent', + }, + labelBeneath: { + fontSize: 10, + }, + labelBeside: { + fontSize: 13, + marginLeft: 20, + marginTop: 3, + }, + button: { + display: 'flex', + }, +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabView.tsx b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabView.tsx new file mode 100644 index 00000000..f50d37a6 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabView.tsx @@ -0,0 +1,170 @@ +import { + getHeaderTitle, + Header, + SafeAreaProviderCompat, + Screen, +} from '@react-navigation/elements'; +import type { + ParamListBase, + TabNavigationState, +} from '@react-navigation/native'; +import * as React from 'react'; +import { Platform, StyleSheet } from 'react-native'; +import { SafeAreaInsetsContext } from 'react-native-safe-area-context'; + +import type { + BottomTabBarProps, + BottomTabDescriptorMap, + BottomTabHeaderProps, + BottomTabNavigationConfig, + BottomTabNavigationHelpers, + BottomTabNavigationProp, +} from '../types'; +import BottomTabBarHeightCallbackContext from '../utils/BottomTabBarHeightCallbackContext'; +import BottomTabBarHeightContext from '../utils/BottomTabBarHeightContext'; +import BottomTabBar, { getTabBarHeight } from './BottomTabBar'; +import { MaybeScreen, MaybeScreenContainer } from './ScreenFallback'; + +type Props = BottomTabNavigationConfig & { + state: TabNavigationState; + navigation: BottomTabNavigationHelpers; + descriptors: BottomTabDescriptorMap; +}; + +export default function BottomTabView(props: Props) { + const { + tabBar = (props: BottomTabBarProps) => , + state, + navigation, + descriptors, + safeAreaInsets, + detachInactiveScreens = Platform.OS === 'web' || + Platform.OS === 'android' || + Platform.OS === 'ios', + sceneContainerStyle, + } = props; + + const focusedRouteKey = state.routes[state.index].key; + const [loaded, setLoaded] = React.useState([focusedRouteKey]); + + if (!loaded.includes(focusedRouteKey)) { + setLoaded([...loaded, focusedRouteKey]); + } + + const dimensions = SafeAreaProviderCompat.initialMetrics.frame; + const [tabBarHeight, setTabBarHeight] = React.useState(() => + getTabBarHeight({ + state, + descriptors, + dimensions, + layout: { width: dimensions.width, height: 0 }, + insets: { + ...SafeAreaProviderCompat.initialMetrics.insets, + ...props.safeAreaInsets, + }, + style: descriptors[state.routes[state.index].key].options.tabBarStyle, + }) + ); + + const renderTabBar = () => { + return ( + + {(insets) => + tabBar({ + state: state, + descriptors: descriptors, + navigation: navigation, + insets: { + top: safeAreaInsets?.top ?? insets?.top ?? 0, + right: safeAreaInsets?.right ?? insets?.right ?? 0, + bottom: safeAreaInsets?.bottom ?? insets?.bottom ?? 0, + left: safeAreaInsets?.left ?? insets?.left ?? 0, + }, + }) + } + + ); + }; + + const { routes } = state; + + return ( + + + {routes.map((route, index) => { + const descriptor = descriptors[route.key]; + const { lazy = true, unmountOnBlur } = descriptor.options; + const isFocused = state.index === index; + + if (unmountOnBlur && !isFocused) { + return null; + } + + if (lazy && !loaded.includes(route.key) && !isFocused) { + // Don't render a lazy screen if we've never navigated to it + return null; + } + + const { + freezeOnBlur, + header = ({ layout, options }: BottomTabHeaderProps) => ( +
+ ), + headerShown, + headerStatusBarHeight, + headerTransparent, + } = descriptor.options; + + return ( + + + , + options: descriptor.options, + })} + style={sceneContainerStyle} + > + {descriptor.render()} + + + + ); + })} + + + {renderTabBar()} + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + overflow: 'hidden', + }, +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/ScreenFallback.tsx b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/ScreenFallback.tsx new file mode 100644 index 00000000..9b7580db --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/ScreenFallback.tsx @@ -0,0 +1,50 @@ +import { ResourceSavingView } from '@react-navigation/elements'; +import * as React from 'react'; +import { StyleProp, View, ViewProps, ViewStyle } from 'react-native'; + +type Props = { + visible: boolean; + children: React.ReactNode; + enabled: boolean; + freezeOnBlur?: boolean; + style?: StyleProp; +}; + +let Screens: typeof import('react-native-screens') | undefined; + +try { + Screens = require('react-native-screens'); +} catch (e) { + // Ignore +} + +export const MaybeScreenContainer = ({ + enabled, + ...rest +}: ViewProps & { + enabled: boolean; + hasTwoStates: boolean; + children: React.ReactNode; +}) => { + if (Screens?.screensEnabled?.()) { + return ; + } + + return ; +}; + +export function MaybeScreen({ visible, children, ...rest }: Props) { + if (Screens?.screensEnabled?.()) { + return ( + + {children} + + ); + } + + return ( + + {children} + + ); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/TabBarIcon.tsx b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/TabBarIcon.tsx new file mode 100644 index 00000000..de3c07b8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/bottom-tabs/src/views/TabBarIcon.tsx @@ -0,0 +1,110 @@ +import type { Route } from '@react-navigation/native'; +import React from 'react'; +import { + StyleProp, + StyleSheet, + TextStyle, + View, + ViewStyle, +} from 'react-native'; + +import Badge from './Badge'; + +type Props = { + route: Route; + horizontal: boolean; + badge?: string | number; + badgeStyle?: StyleProp; + activeOpacity: number; + inactiveOpacity: number; + activeTintColor: string; + inactiveTintColor: string; + renderIcon: (props: { + focused: boolean; + color: string; + size: number; + }) => React.ReactNode; + style: StyleProp; +}; + +export default function TabBarIcon({ + route: _, + horizontal, + badge, + badgeStyle, + activeOpacity, + inactiveOpacity, + activeTintColor, + inactiveTintColor, + renderIcon, + style, +}: Props) { + const size = 25; + + // We render the icon twice at the same position on top of each other: + // active and inactive one, so we can fade between them. + return ( + + + {renderIcon({ + focused: true, + size, + color: activeTintColor, + })} + + + {renderIcon({ + focused: false, + size, + color: inactiveTintColor, + })} + + + {badge} + + + ); +} + +const styles = StyleSheet.create({ + icon: { + // We render the icon twice at the same position on top of each other: + // active and inactive one, so we can fade between them: + // Cover the whole iconContainer: + position: 'absolute', + alignSelf: 'center', + alignItems: 'center', + justifyContent: 'center', + height: '100%', + width: '100%', + // Workaround for react-native >= 0.54 layout bug + minWidth: 25, + }, + iconVertical: { + flex: 1, + }, + iconHorizontal: { + height: '100%', + marginTop: 3, + }, + badge: { + position: 'absolute', + left: 3, + }, + badgeVertical: { + top: 3, + }, + badgeHorizontal: { + top: 7, + }, +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/core/LICENSE b/iut-expo-starter/node_modules/@react-navigation/core/LICENSE new file mode 100644 index 00000000..9d268cb0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 React Navigation Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/iut-expo-starter/node_modules/@react-navigation/core/README.md b/iut-expo-starter/node_modules/@react-navigation/core/README.md new file mode 100644 index 00000000..f5ff3f30 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/README.md @@ -0,0 +1,44 @@ +# `@react-navigation/core` + +Core utilities for building navigators independent of the platform. + +## Installation + +Open a Terminal in your project's folder and run, + +```sh +yarn add @react-navigation/core +``` + +## Usage + +A basic custom navigator bundling a router and a view looks like this: + +```js +import { + createNavigatorFactory, + useNavigationBuilder, +} from '@react-navigation/core'; +import { StackRouter } from '@react-navigation/routers'; + +function StackNavigator({ initialRouteName, children, ...rest }) { + const { state, navigation, descriptors, NavigationContent } = + useNavigationBuilder(StackRouter, { + initialRouteName, + children, + }); + + return ( + + + + ); +} + +export default createNavigatorFactory(StackNavigator); +``` diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/BaseNavigationContainer.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/BaseNavigationContainer.js new file mode 100644 index 00000000..7b51331b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/BaseNavigationContainer.js @@ -0,0 +1,345 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _routers = require("@react-navigation/routers"); +var React = _interopRequireWildcard(require("react")); +var _checkDuplicateRouteNames = _interopRequireDefault(require("./checkDuplicateRouteNames")); +var _checkSerializable = _interopRequireDefault(require("./checkSerializable")); +var _createNavigationContainerRef = require("./createNavigationContainerRef"); +var _EnsureSingleNavigator = _interopRequireDefault(require("./EnsureSingleNavigator")); +var _findFocusedRoute = _interopRequireDefault(require("./findFocusedRoute")); +var _NavigationBuilderContext = _interopRequireDefault(require("./NavigationBuilderContext")); +var _NavigationContainerRefContext = _interopRequireDefault(require("./NavigationContainerRefContext")); +var _NavigationContext = _interopRequireDefault(require("./NavigationContext")); +var _NavigationRouteContext = _interopRequireDefault(require("./NavigationRouteContext")); +var _NavigationStateContext = _interopRequireDefault(require("./NavigationStateContext")); +var _UnhandledActionContext = _interopRequireDefault(require("./UnhandledActionContext")); +var _useChildListeners = _interopRequireDefault(require("./useChildListeners")); +var _useEventEmitter = _interopRequireDefault(require("./useEventEmitter")); +var _useKeyedChildListeners = _interopRequireDefault(require("./useKeyedChildListeners")); +var _useOptionsGetters = _interopRequireDefault(require("./useOptionsGetters")); +var _useScheduleUpdate = require("./useScheduleUpdate"); +var _useSyncState = _interopRequireDefault(require("./useSyncState")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const serializableWarnings = []; +const duplicateNameWarnings = []; + +/** + * Remove `key` and `routeNames` from the state objects recursively to get partial state. + * + * @param state Initial state object. + */ +const getPartialState = state => { + if (state === undefined) { + return; + } + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { + key, + routeNames, + ...partialState + } = state; + return { + ...partialState, + stale: true, + routes: state.routes.map(route => { + if (route.state === undefined) { + return route; + } + return { + ...route, + state: getPartialState(route.state) + }; + }) + }; +}; + +/** + * Container component which holds the navigation state. + * This should be rendered at the root wrapping the whole app. + * + * @param props.initialState Initial state object for the navigation tree. + * @param props.onStateChange Callback which is called with the latest navigation state when it changes. + * @param props.children Child elements to render the content. + * @param props.ref Ref object which refers to the navigation object containing helper methods. + */ +const BaseNavigationContainer = /*#__PURE__*/React.forwardRef(function BaseNavigationContainer(_ref, ref) { + let { + initialState, + onStateChange, + onUnhandledAction, + independent, + children + } = _ref; + const parent = React.useContext(_NavigationStateContext.default); + if (!parent.isDefault && !independent) { + throw new Error("Looks like you have nested a 'NavigationContainer' inside another. Normally you need only one container at the root of the app, so this was probably an error. If this was intentional, pass 'independent={true}' explicitly. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them."); + } + const [state, getState, setState, scheduleUpdate, flushUpdates] = (0, _useSyncState.default)(() => getPartialState(initialState == null ? undefined : initialState)); + const isFirstMountRef = React.useRef(true); + const navigatorKeyRef = React.useRef(); + const getKey = React.useCallback(() => navigatorKeyRef.current, []); + const setKey = React.useCallback(key => { + navigatorKeyRef.current = key; + }, []); + const { + listeners, + addListener + } = (0, _useChildListeners.default)(); + const { + keyedListeners, + addKeyedListener + } = (0, _useKeyedChildListeners.default)(); + const dispatch = React.useCallback(action => { + if (listeners.focus[0] == null) { + console.error(_createNavigationContainerRef.NOT_INITIALIZED_ERROR); + } else { + listeners.focus[0](navigation => navigation.dispatch(action)); + } + }, [listeners.focus]); + const canGoBack = React.useCallback(() => { + if (listeners.focus[0] == null) { + return false; + } + const { + result, + handled + } = listeners.focus[0](navigation => navigation.canGoBack()); + if (handled) { + return result; + } else { + return false; + } + }, [listeners.focus]); + const resetRoot = React.useCallback(state => { + var _keyedListeners$getSt, _keyedListeners$getSt2; + const target = (state === null || state === void 0 ? void 0 : state.key) ?? ((_keyedListeners$getSt = (_keyedListeners$getSt2 = keyedListeners.getState).root) === null || _keyedListeners$getSt === void 0 ? void 0 : _keyedListeners$getSt.call(_keyedListeners$getSt2).key); + if (target == null) { + console.error(_createNavigationContainerRef.NOT_INITIALIZED_ERROR); + } else { + listeners.focus[0](navigation => navigation.dispatch({ + ..._routers.CommonActions.reset(state), + target + })); + } + }, [keyedListeners.getState, listeners.focus]); + const getRootState = React.useCallback(() => { + var _keyedListeners$getSt3, _keyedListeners$getSt4; + return (_keyedListeners$getSt3 = (_keyedListeners$getSt4 = keyedListeners.getState).root) === null || _keyedListeners$getSt3 === void 0 ? void 0 : _keyedListeners$getSt3.call(_keyedListeners$getSt4); + }, [keyedListeners.getState]); + const getCurrentRoute = React.useCallback(() => { + const state = getRootState(); + if (state == null) { + return undefined; + } + const route = (0, _findFocusedRoute.default)(state); + return route; + }, [getRootState]); + const emitter = (0, _useEventEmitter.default)(); + const { + addOptionsGetter, + getCurrentOptions + } = (0, _useOptionsGetters.default)({}); + const navigation = React.useMemo(() => ({ + ...Object.keys(_routers.CommonActions).reduce((acc, name) => { + acc[name] = function () { + return ( + // @ts-expect-error: this is ok + dispatch(_routers.CommonActions[name](...arguments)) + ); + }; + return acc; + }, {}), + ...emitter.create('root'), + dispatch, + resetRoot, + isFocused: () => true, + canGoBack, + getParent: () => undefined, + getState: () => stateRef.current, + getRootState, + getCurrentRoute, + getCurrentOptions, + isReady: () => listeners.focus[0] != null + }), [canGoBack, dispatch, emitter, getCurrentOptions, getCurrentRoute, getRootState, listeners.focus, resetRoot]); + React.useImperativeHandle(ref, () => navigation, [navigation]); + const onDispatchAction = React.useCallback((action, noop) => { + emitter.emit({ + type: '__unsafe_action__', + data: { + action, + noop, + stack: stackRef.current + } + }); + }, [emitter]); + const lastEmittedOptionsRef = React.useRef(); + const onOptionsChange = React.useCallback(options => { + if (lastEmittedOptionsRef.current === options) { + return; + } + lastEmittedOptionsRef.current = options; + emitter.emit({ + type: 'options', + data: { + options + } + }); + }, [emitter]); + const stackRef = React.useRef(); + const builderContext = React.useMemo(() => ({ + addListener, + addKeyedListener, + onDispatchAction, + onOptionsChange, + stackRef + }), [addListener, addKeyedListener, onDispatchAction, onOptionsChange]); + const scheduleContext = React.useMemo(() => ({ + scheduleUpdate, + flushUpdates + }), [scheduleUpdate, flushUpdates]); + const isInitialRef = React.useRef(true); + const getIsInitial = React.useCallback(() => isInitialRef.current, []); + const context = React.useMemo(() => ({ + state, + getState, + setState, + getKey, + setKey, + getIsInitial, + addOptionsGetter + }), [state, getState, setState, getKey, setKey, getIsInitial, addOptionsGetter]); + const onStateChangeRef = React.useRef(onStateChange); + const stateRef = React.useRef(state); + React.useEffect(() => { + isInitialRef.current = false; + onStateChangeRef.current = onStateChange; + stateRef.current = state; + }); + React.useEffect(() => { + const hydratedState = getRootState(); + if (process.env.NODE_ENV !== 'production') { + if (hydratedState !== undefined) { + const serializableResult = (0, _checkSerializable.default)(hydratedState); + if (!serializableResult.serializable) { + const { + location, + reason + } = serializableResult; + let path = ''; + let pointer = hydratedState; + let params = false; + for (let i = 0; i < location.length; i++) { + const curr = location[i]; + const prev = location[i - 1]; + pointer = pointer[curr]; + if (!params && curr === 'state') { + continue; + } else if (!params && curr === 'routes') { + if (path) { + path += ' > '; + } + } else if (!params && typeof curr === 'number' && prev === 'routes') { + var _pointer; + path += (_pointer = pointer) === null || _pointer === void 0 ? void 0 : _pointer.name; + } else if (!params) { + path += ` > ${curr}`; + params = true; + } else { + if (typeof curr === 'number' || /^[0-9]+$/.test(curr)) { + path += `[${curr}]`; + } else if (/^[a-z$_]+$/i.test(curr)) { + path += `.${curr}`; + } else { + path += `[${JSON.stringify(curr)}]`; + } + } + } + const message = `Non-serializable values were found in the navigation state. Check:\n\n${path} (${reason})\n\nThis can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.`; + if (!serializableWarnings.includes(message)) { + serializableWarnings.push(message); + console.warn(message); + } + } + const duplicateRouteNamesResult = (0, _checkDuplicateRouteNames.default)(hydratedState); + if (duplicateRouteNamesResult.length) { + const message = `Found screens with the same name nested inside one another. Check:\n${duplicateRouteNamesResult.map(locations => `\n${locations.join(', ')}`)}\n\nThis can cause confusing behavior during navigation. Consider using unique names for each screen instead.`; + if (!duplicateNameWarnings.includes(message)) { + duplicateNameWarnings.push(message); + console.warn(message); + } + } + } + } + emitter.emit({ + type: 'state', + data: { + state + } + }); + if (!isFirstMountRef.current && onStateChangeRef.current) { + onStateChangeRef.current(hydratedState); + } + isFirstMountRef.current = false; + }, [getRootState, emitter, state]); + const defaultOnUnhandledAction = React.useCallback(action => { + if (process.env.NODE_ENV === 'production') { + return; + } + const payload = action.payload; + let message = `The action '${action.type}'${payload ? ` with payload ${JSON.stringify(action.payload)}` : ''} was not handled by any navigator.`; + switch (action.type) { + case 'NAVIGATE': + case 'PUSH': + case 'REPLACE': + case 'JUMP_TO': + if (payload !== null && payload !== void 0 && payload.name) { + message += `\n\nDo you have a screen named '${payload.name}'?\n\nIf you're trying to navigate to a screen in a nested navigator, see https://reactnavigation.org/docs/nesting-navigators#navigating-to-a-screen-in-a-nested-navigator.`; + } else { + message += `\n\nYou need to pass the name of the screen to navigate to.\n\nSee https://reactnavigation.org/docs/navigation-actions for usage.`; + } + break; + case 'GO_BACK': + case 'POP': + case 'POP_TO_TOP': + message += `\n\nIs there any screen to go back to?`; + break; + case 'OPEN_DRAWER': + case 'CLOSE_DRAWER': + case 'TOGGLE_DRAWER': + message += `\n\nIs your screen inside a Drawer navigator?`; + break; + } + message += `\n\nThis is a development-only warning and won't be shown in production.`; + console.error(message); + }, []); + let element = /*#__PURE__*/React.createElement(_NavigationContainerRefContext.default.Provider, { + value: navigation + }, /*#__PURE__*/React.createElement(_useScheduleUpdate.ScheduleUpdateContext.Provider, { + value: scheduleContext + }, /*#__PURE__*/React.createElement(_NavigationBuilderContext.default.Provider, { + value: builderContext + }, /*#__PURE__*/React.createElement(_NavigationStateContext.default.Provider, { + value: context + }, /*#__PURE__*/React.createElement(_UnhandledActionContext.default.Provider, { + value: onUnhandledAction ?? defaultOnUnhandledAction + }, /*#__PURE__*/React.createElement(_EnsureSingleNavigator.default, null, children)))))); + if (independent) { + // We need to clear any existing contexts for nested independent container to work correctly + element = /*#__PURE__*/React.createElement(_NavigationRouteContext.default.Provider, { + value: undefined + }, /*#__PURE__*/React.createElement(_NavigationContext.default.Provider, { + value: undefined + }, element)); + } + return element; +}); +var _default = BaseNavigationContainer; +exports.default = _default; +//# sourceMappingURL=BaseNavigationContainer.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/BaseNavigationContainer.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/BaseNavigationContainer.js.map new file mode 100644 index 00000000..66c681b6 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/BaseNavigationContainer.js.map @@ -0,0 +1 @@ +{"version":3,"names":["serializableWarnings","duplicateNameWarnings","getPartialState","state","undefined","key","routeNames","partialState","stale","routes","map","route","BaseNavigationContainer","React","forwardRef","ref","initialState","onStateChange","onUnhandledAction","independent","children","parent","useContext","NavigationStateContext","isDefault","Error","getState","setState","scheduleUpdate","flushUpdates","useSyncState","isFirstMountRef","useRef","navigatorKeyRef","getKey","useCallback","current","setKey","listeners","addListener","useChildListeners","keyedListeners","addKeyedListener","useKeyedChildListeners","dispatch","action","focus","console","error","NOT_INITIALIZED_ERROR","navigation","canGoBack","result","handled","resetRoot","target","root","CommonActions","reset","getRootState","getCurrentRoute","findFocusedRoute","emitter","useEventEmitter","addOptionsGetter","getCurrentOptions","useOptionsGetters","useMemo","Object","keys","reduce","acc","name","create","isFocused","getParent","stateRef","isReady","useImperativeHandle","onDispatchAction","noop","emit","type","data","stack","stackRef","lastEmittedOptionsRef","onOptionsChange","options","builderContext","scheduleContext","isInitialRef","getIsInitial","context","onStateChangeRef","useEffect","hydratedState","process","env","NODE_ENV","serializableResult","checkSerializable","serializable","location","reason","path","pointer","params","i","length","curr","prev","test","JSON","stringify","message","includes","push","warn","duplicateRouteNamesResult","checkDuplicateRouteNames","locations","join","defaultOnUnhandledAction","payload","element"],"sourceRoot":"../../src","sources":["BaseNavigationContainer.tsx"],"mappings":";;;;;;AAAA;AASA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AAA0C;AAAA;AAAA;AAI1C,MAAMA,oBAA8B,GAAG,EAAE;AACzC,MAAMC,qBAA+B,GA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CAAC;EACxB,CAAC,EACD,EAAE,CACH;EAED,IAAIU,OAAO,gBACT,oBAAC,sCAA6B,CAAC,QAAQ;IAAC,KAAK,EAAE3E;EAAW,gBACxD,oBAAC,wCAAqB,CAAC,QAAQ;IAAC,KAAK,EAAEwC;EAAgB,gBACrD,oBAAC,iCAAwB,CAAC,QAAQ;IAAC,KAAK,EAAED;EAAe,gBACvD,oBAAC,+BAAsB,CAAC,QAAQ;IAAC,KAAK,EAAEI;EAAQ,gBAC9C,oBAAC,+BAAsB,CAAC,QAAQ;IAC9B,KAAK,EAAE3E,iBAAiB,IAAIyG;EAAyB,gBAErD,oBAAC,8BAAqB,QAAEvG,QAAQ,CAAyB,CACzB,CACF,CACA,CACL,CAEpC;EAED,IAAID,WAAW,EAAE;IACf;IACA0G,OAAO,gBACL,oBAAC,+BAAsB,CAAC,QAAQ;MAAC,KAAK,EAAEzH;IAAU,gBAChD,oBAAC,0BAAiB,CAAC,QAAQ;MAAC,KAAK,EAAEA;IAAU,GAC1CyH,OAAO,CACmB,CAEhC;EACH;EAEA,OAAOA,OAAO;AAChB,CAAC,CACF;AAAC,eAEajH,uBAAuB;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/CurrentRenderContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/CurrentRenderContext.js new file mode 100644 index 00000000..96fa3db4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/CurrentRenderContext.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Context which holds the values for the current navigation tree. + * Intended for use in SSR. This is not safe to use on the client. + */ +const CurrentRenderContext = /*#__PURE__*/React.createContext(undefined); +var _default = CurrentRenderContext; +exports.default = _default; +//# sourceMappingURL=CurrentRenderContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/CurrentRenderContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/CurrentRenderContext.js.map new file mode 100644 index 00000000..0318b68d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/CurrentRenderContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["CurrentRenderContext","React","createContext","undefined"],"sourceRoot":"../../src","sources":["CurrentRenderContext.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAE/B;AACA;AACA;AACA;AACA,MAAMA,oBAAoB,gBAAGC,KAAK,CAACC,aAAa,CAE9CC,SAAS,CAAC;AAAC,eAEEH,oBAAoB;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/EnsureSingleNavigator.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/EnsureSingleNavigator.js new file mode 100644 index 00000000..f06a663a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/EnsureSingleNavigator.js @@ -0,0 +1,43 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SingleNavigatorContext = void 0; +exports.default = EnsureSingleNavigator; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const MULTIPLE_NAVIGATOR_ERROR = `Another navigator is already registered for this container. You likely have multiple navigators under a single "NavigationContainer" or "Screen". Make sure each navigator is under a separate "Screen" container. See https://reactnavigation.org/docs/nesting-navigators for a guide on nesting.`; +const SingleNavigatorContext = /*#__PURE__*/React.createContext(undefined); + +/** + * Component which ensures that there's only one navigator nested under it. + */ +exports.SingleNavigatorContext = SingleNavigatorContext; +function EnsureSingleNavigator(_ref) { + let { + children + } = _ref; + const navigatorKeyRef = React.useRef(); + const value = React.useMemo(() => ({ + register(key) { + const currentKey = navigatorKeyRef.current; + if (currentKey !== undefined && key !== currentKey) { + throw new Error(MULTIPLE_NAVIGATOR_ERROR); + } + navigatorKeyRef.current = key; + }, + unregister(key) { + const currentKey = navigatorKeyRef.current; + if (key !== currentKey) { + return; + } + navigatorKeyRef.current = undefined; + } + }), []); + return /*#__PURE__*/React.createElement(SingleNavigatorContext.Provider, { + value: value + }, children); +} +//# sourceMappingURL=EnsureSingleNavigator.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/EnsureSingleNavigator.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/EnsureSingleNavigator.js.map new file mode 100644 index 00000000..20d8e906 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/EnsureSingleNavigator.js.map @@ -0,0 +1 @@ +{"version":3,"names":["MULTIPLE_NAVIGATOR_ERROR","SingleNavigatorContext","React","createContext","undefined","EnsureSingleNavigator","children","navigatorKeyRef","useRef","value","useMemo","register","key","currentKey","current","Error","unregister"],"sourceRoot":"../../src","sources":["EnsureSingleNavigator.tsx"],"mappings":";;;;;;;AAAA;AAA+B;AAAA;AAM/B,MAAMA,wBAAwB,GAAI,oSAAmS;AAE9T,MAAMC,sBAAsB,gBAAGC,KAAK,CAACC,aAAa,CAMvDC,SAAS,CAAC;;AAEZ;AACA;AACA;AAFA;AAGe,SAASC,qBAAqB,OAAsB;EAAA,IAArB;IAAEC;EAAgB,CAAC;EAC/D,MAAMC,eAAe,GAAGL,KAAK,CAACM,MAAM,EAAsB;EAE1D,MAAMC,KAAK,GAAGP,KAAK,CAACQ,OAAO,CACzB,OAAO;IACLC,QAAQ,CAACC,GAAW,EAAE;MACpB,MAAMC,UAAU,GAAGN,eAAe,CAACO,OAAO;MAE1C,IAAID,UAAU,KAAKT,SAAS,IAAIQ,GAAG,KAAKC,UAAU,EAAE;QAClD,MAAM,IAAIE,KAAK,CAACf,wBAAwB,CAAC;MAC3C;MAEAO,eAAe,CAACO,OAAO,GAAGF,GAAG;IAC/B,CAAC;IACDI,UAAU,CAACJ,GAAW,EAAE;MACtB,MAAMC,UAAU,GAAGN,eAAe,CAACO,OAAO;MAE1C,IAAIF,GAAG,KAAKC,UAAU,EAAE;QACtB;MACF;MAEAN,eAAe,CAACO,OAAO,GAAGV,SAAS;IACrC;EACF,CAAC,CAAC,EACF,EAAE,CACH;EAED,oBACE,oBAAC,sBAAsB,CAAC,QAAQ;IAAC,KAAK,EAAEK;EAAM,GAC3CH,QAAQ,CACuB;AAEtC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Group.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Group.js new file mode 100644 index 00000000..1798639b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Group.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = Group; +/** + * Empty component used for grouping screen configs. + */ +function Group(_) { + /* istanbul ignore next */ + return null; +} +//# sourceMappingURL=Group.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Group.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Group.js.map new file mode 100644 index 00000000..50eb0772 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Group.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Group","_"],"sourceRoot":"../../src","sources":["Group.tsx"],"mappings":";;;;;;AAIA;AACA;AACA;AACe,SAASA,KAAK,CAG3BC,CAA6C,EAAE;EAC/C;EACA,OAAO,IAAI;AACb"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationBuilderContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationBuilderContext.js new file mode 100644 index 00000000..4f78e9b1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationBuilderContext.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Context which holds the required helpers needed to build nested navigators. + */ +const NavigationBuilderContext = /*#__PURE__*/React.createContext({ + onDispatchAction: () => undefined, + onOptionsChange: () => undefined +}); +var _default = NavigationBuilderContext; +exports.default = _default; +//# sourceMappingURL=NavigationBuilderContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationBuilderContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationBuilderContext.js.map new file mode 100644 index 00000000..a7a6a98a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationBuilderContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["NavigationBuilderContext","React","createContext","onDispatchAction","undefined","onOptionsChange"],"sourceRoot":"../../src","sources":["NavigationBuilderContext.tsx"],"mappings":";;;;;;AAKA;AAA+B;AAAA;AA6C/B;AACA;AACA;AACA,MAAMA,wBAAwB,gBAAGC,KAAK,CAACC,aAAa,CAWjD;EACDC,gBAAgB,EAAE,MAAMC,SAAS;EACjCC,eAAe,EAAE,MAAMD;AACzB,CAAC,CAAC;AAAC,eAEYJ,wBAAwB;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContainerRefContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContainerRefContext.js new file mode 100644 index 00000000..ed337885 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContainerRefContext.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Context which holds the route prop for a screen. + */ +const NavigationContainerRefContext = /*#__PURE__*/React.createContext(undefined); +var _default = NavigationContainerRefContext; +exports.default = _default; +//# sourceMappingURL=NavigationContainerRefContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContainerRefContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContainerRefContext.js.map new file mode 100644 index 00000000..d945f211 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContainerRefContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["NavigationContainerRefContext","React","createContext","undefined"],"sourceRoot":"../../src","sources":["NavigationContainerRefContext.tsx"],"mappings":";;;;;;AACA;AAA+B;AAAA;AAI/B;AACA;AACA;AACA,MAAMA,6BAA6B,gBAAGC,KAAK,CAACC,aAAa,CAEvDC,SAAS,CAAC;AAAC,eAEEH,6BAA6B;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContext.js new file mode 100644 index 00000000..72ab1911 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContext.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Context which holds the navigation prop for a screen. + */ +const NavigationContext = /*#__PURE__*/React.createContext(undefined); +var _default = NavigationContext; +exports.default = _default; +//# sourceMappingURL=NavigationContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContext.js.map new file mode 100644 index 00000000..4901fa29 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["NavigationContext","React","createContext","undefined"],"sourceRoot":"../../src","sources":["NavigationContext.tsx"],"mappings":";;;;;;AACA;AAA+B;AAAA;AAI/B;AACA;AACA;AACA,MAAMA,iBAAiB,gBAAGC,KAAK,CAACC,aAAa,CAE3CC,SAAS,CAAC;AAAC,eAEEH,iBAAiB;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationHelpersContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationHelpersContext.js new file mode 100644 index 00000000..9d2f645b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationHelpersContext.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Context which holds the navigation helpers of the parent navigator. + * Navigators should use this context in their view component. + */ +const NavigationHelpersContext = /*#__PURE__*/React.createContext(undefined); +var _default = NavigationHelpersContext; +exports.default = _default; +//# sourceMappingURL=NavigationHelpersContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationHelpersContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationHelpersContext.js.map new file mode 100644 index 00000000..0a9a38f2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationHelpersContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["NavigationHelpersContext","React","createContext","undefined"],"sourceRoot":"../../src","sources":["NavigationHelpersContext.tsx"],"mappings":";;;;;;AACA;AAA+B;AAAA;AAI/B;AACA;AACA;AACA;AACA,MAAMA,wBAAwB,gBAAGC,KAAK,CAACC,aAAa,CAElDC,SAAS,CAAC;AAAC,eAEEH,wBAAwB;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationRouteContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationRouteContext.js new file mode 100644 index 00000000..9341dd74 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationRouteContext.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Context which holds the route prop for a screen. + */ +const NavigationRouteContext = /*#__PURE__*/React.createContext(undefined); +var _default = NavigationRouteContext; +exports.default = _default; +//# sourceMappingURL=NavigationRouteContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationRouteContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationRouteContext.js.map new file mode 100644 index 00000000..b18215e9 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationRouteContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["NavigationRouteContext","React","createContext","undefined"],"sourceRoot":"../../src","sources":["NavigationRouteContext.tsx"],"mappings":";;;;;;AACA;AAA+B;AAAA;AAE/B;AACA;AACA;AACA,MAAMA,sBAAsB,gBAAGC,KAAK,CAACC,aAAa,CAChDC,SAAS,CACV;AAAC,eAEaH,sBAAsB;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationStateContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationStateContext.js new file mode 100644 index 00000000..16228796 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationStateContext.js @@ -0,0 +1,30 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const MISSING_CONTEXT_ERROR = "Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'? See https://reactnavigation.org/docs/getting-started for setup instructions."; +var _default = /*#__PURE__*/React.createContext({ + isDefault: true, + get getKey() { + throw new Error(MISSING_CONTEXT_ERROR); + }, + get setKey() { + throw new Error(MISSING_CONTEXT_ERROR); + }, + get getState() { + throw new Error(MISSING_CONTEXT_ERROR); + }, + get setState() { + throw new Error(MISSING_CONTEXT_ERROR); + }, + get getIsInitial() { + throw new Error(MISSING_CONTEXT_ERROR); + } +}); +exports.default = _default; +//# sourceMappingURL=NavigationStateContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationStateContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationStateContext.js.map new file mode 100644 index 00000000..4044b9b2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/NavigationStateContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["MISSING_CONTEXT_ERROR","React","createContext","isDefault","getKey","Error","setKey","getState","setState","getIsInitial"],"sourceRoot":"../../src","sources":["NavigationStateContext.tsx"],"mappings":";;;;;;AACA;AAA+B;AAAA;AAE/B,MAAMA,qBAAqB,GACzB,wKAAwK;AAAC,4BAE5JC,KAAK,CAACC,aAAa,CAc/B;EACDC,SAAS,EAAE,IAAI;EAEf,IAAIC,MAAM,GAAQ;IAChB,MAAM,IAAIC,KAAK,CAACL,qBAAqB,CAAC;EACxC,CAAC;EACD,IAAIM,MAAM,GAAQ;IAChB,MAAM,IAAID,KAAK,CAACL,qBAAqB,CAAC;EACxC,CAAC;EACD,IAAIO,QAAQ,GAAQ;IAClB,MAAM,IAAIF,KAAK,CAACL,qBAAqB,CAAC;EACxC,CAAC;EACD,IAAIQ,QAAQ,GAAQ;IAClB,MAAM,IAAIH,KAAK,CAACL,qBAAqB,CAAC;EACxC,CAAC;EACD,IAAIS,YAAY,GAAQ;IACtB,MAAM,IAAIJ,KAAK,CAACL,qBAAqB,CAAC;EACxC;AACF,CAAC,CAAC;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveContext.js new file mode 100644 index 00000000..55ae5318 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveContext.js @@ -0,0 +1,13 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const PreventRemoveContext = /*#__PURE__*/React.createContext(undefined); +var _default = PreventRemoveContext; +exports.default = _default; +//# sourceMappingURL=PreventRemoveContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveContext.js.map new file mode 100644 index 00000000..34756b84 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["PreventRemoveContext","React","createContext","undefined"],"sourceRoot":"../../src","sources":["PreventRemoveContext.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAQ/B,MAAMA,oBAAoB,gBAAGC,KAAK,CAACC,aAAa,CAU9CC,SAAS,CAAC;AAAC,eAEEH,oBAAoB;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveProvider.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveProvider.js new file mode 100644 index 00000000..77db1d60 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveProvider.js @@ -0,0 +1,96 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = PreventRemoveProvider; +var _nonSecure = require("nanoid/non-secure"); +var React = _interopRequireWildcard(require("react")); +var _useLatestCallback = _interopRequireDefault(require("use-latest-callback")); +var _NavigationHelpersContext = _interopRequireDefault(require("./NavigationHelpersContext")); +var _NavigationRouteContext = _interopRequireDefault(require("./NavigationRouteContext")); +var _PreventRemoveContext = _interopRequireDefault(require("./PreventRemoveContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Util function to transform map of prevented routes to a simpler object. + */ +const transformPreventedRoutes = preventedRoutesMap => { + const preventedRoutesToTransform = [...preventedRoutesMap.values()]; + const preventedRoutes = preventedRoutesToTransform.reduce((acc, _ref) => { + var _acc$routeKey; + let { + routeKey, + preventRemove + } = _ref; + acc[routeKey] = { + preventRemove: ((_acc$routeKey = acc[routeKey]) === null || _acc$routeKey === void 0 ? void 0 : _acc$routeKey.preventRemove) || preventRemove + }; + return acc; + }, {}); + return preventedRoutes; +}; + +/** + * Component used for managing which routes have to be prevented from removal in native-stack. + */ +function PreventRemoveProvider(_ref2) { + let { + children + } = _ref2; + const [parentId] = React.useState(() => (0, _nonSecure.nanoid)()); + const [preventedRoutesMap, setPreventedRoutesMap] = React.useState(new Map()); + const navigation = React.useContext(_NavigationHelpersContext.default); + const route = React.useContext(_NavigationRouteContext.default); + const preventRemoveContextValue = React.useContext(_PreventRemoveContext.default); + // take `setPreventRemove` from parent context - if exist it means we're in a nested context + const setParentPrevented = preventRemoveContextValue === null || preventRemoveContextValue === void 0 ? void 0 : preventRemoveContextValue.setPreventRemove; + const setPreventRemove = (0, _useLatestCallback.default)((id, routeKey, preventRemove) => { + if (preventRemove && (navigation == null || navigation !== null && navigation !== void 0 && navigation.getState().routes.every(route => route.key !== routeKey))) { + throw new Error(`Couldn't find a route with the key ${routeKey}. Is your component inside NavigationContent?`); + } + setPreventedRoutesMap(prevPrevented => { + var _prevPrevented$get, _prevPrevented$get2; + // values haven't changed - do nothing + if (routeKey === ((_prevPrevented$get = prevPrevented.get(id)) === null || _prevPrevented$get === void 0 ? void 0 : _prevPrevented$get.routeKey) && preventRemove === ((_prevPrevented$get2 = prevPrevented.get(id)) === null || _prevPrevented$get2 === void 0 ? void 0 : _prevPrevented$get2.preventRemove)) { + return prevPrevented; + } + const nextPrevented = new Map(prevPrevented); + if (preventRemove) { + nextPrevented.set(id, { + routeKey, + preventRemove + }); + } else { + nextPrevented.delete(id); + } + return nextPrevented; + }); + }); + const isPrevented = [...preventedRoutesMap.values()].some(_ref3 => { + let { + preventRemove + } = _ref3; + return preventRemove; + }); + React.useEffect(() => { + if ((route === null || route === void 0 ? void 0 : route.key) !== undefined && setParentPrevented !== undefined) { + // when route is defined (and setParentPrevented) it means we're in a nested stack + // route.key then will be the route key of parent + setParentPrevented(parentId, route.key, isPrevented); + return () => { + setParentPrevented(parentId, route.key, false); + }; + } + return; + }, [parentId, isPrevented, route === null || route === void 0 ? void 0 : route.key, setParentPrevented]); + const value = React.useMemo(() => ({ + setPreventRemove, + preventedRoutes: transformPreventedRoutes(preventedRoutesMap) + }), [setPreventRemove, preventedRoutesMap]); + return /*#__PURE__*/React.createElement(_PreventRemoveContext.default.Provider, { + value: value + }, children); +} +//# sourceMappingURL=PreventRemoveProvider.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveProvider.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveProvider.js.map new file mode 100644 index 00000000..5183a74d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/PreventRemoveProvider.js.map @@ -0,0 +1 @@ +{"version":3,"names":["transformPreventedRoutes","preventedRoutesMap","preventedRoutesToTransform","values","preventedRoutes","reduce","acc","routeKey","preventRemove","PreventRemoveProvider","children","parentId","React","useState","nanoid","setPreventedRoutesMap","Map","navigation","useContext","NavigationHelpersContext","route","NavigationRouteContext","preventRemoveContextValue","PreventRemoveContext","setParentPrevented","setPreventRemove","useLatestCallback","id","getState","routes","every","key","Error","prevPrevented","get","nextPrevented","set","delete","isPrevented","some","useEffect","undefined","value","useMemo"],"sourceRoot":"../../src","sources":["PreventRemoveProvider.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AAEA;AACA;AACA;AAA+E;AAAA;AAAA;AAc/E;AACA;AACA;AACA,MAAMA,wBAAwB,GAC5BC,kBAAsC,IAClB;EACpB,MAAMC,0BAA0B,GAAG,CAAC,GAAGD,kBAAkB,CAACE,MAAM,EAAE,CAAC;EAEnE,MAAMC,eAAe,GAAGF,0BAA0B,CAACG,MAAM,CACvD,CAACC,GAAG,WAAkC;IAAA;IAAA,IAAhC;MAAEC,QAAQ;MAAEC;IAAc,CAAC;IAC/BF,GAAG,CAACC,QAAQ,CAAC,GAAG;MACdC,aAAa,EAAE,kBAAAF,GAAG,CAACC,QAAQ,CAAC,kDAAb,cAAe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,EAAEyC;EAAM,GACzChC,QAAQ,CACqB;AAEpC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/SceneView.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/SceneView.js new file mode 100644 index 00000000..b7dfca99 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/SceneView.js @@ -0,0 +1,93 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = SceneView; +var React = _interopRequireWildcard(require("react")); +var _EnsureSingleNavigator = _interopRequireDefault(require("./EnsureSingleNavigator")); +var _NavigationStateContext = _interopRequireDefault(require("./NavigationStateContext")); +var _StaticContainer = _interopRequireDefault(require("./StaticContainer")); +var _useOptionsGetters = _interopRequireDefault(require("./useOptionsGetters")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Component which takes care of rendering the screen for a route. + * It provides all required contexts and applies optimizations when applicable. + */ +function SceneView(_ref) { + let { + screen, + route, + navigation, + routeState, + getState, + setState, + options, + clearOptions + } = _ref; + const navigatorKeyRef = React.useRef(); + const getKey = React.useCallback(() => navigatorKeyRef.current, []); + const { + addOptionsGetter + } = (0, _useOptionsGetters.default)({ + key: route.key, + options, + navigation + }); + const setKey = React.useCallback(key => { + navigatorKeyRef.current = key; + }, []); + const getCurrentState = React.useCallback(() => { + const state = getState(); + const currentRoute = state.routes.find(r => r.key === route.key); + return currentRoute ? currentRoute.state : undefined; + }, [getState, route.key]); + const setCurrentState = React.useCallback(child => { + const state = getState(); + setState({ + ...state, + routes: state.routes.map(r => r.key === route.key ? { + ...r, + state: child + } : r) + }); + }, [getState, route.key, setState]); + const isInitialRef = React.useRef(true); + React.useEffect(() => { + isInitialRef.current = false; + }); + + // Clear options set by this screen when it is unmounted + React.useEffect(() => { + return clearOptions; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + const getIsInitial = React.useCallback(() => isInitialRef.current, []); + const context = React.useMemo(() => ({ + state: routeState, + getState: getCurrentState, + setState: setCurrentState, + getKey, + setKey, + getIsInitial, + addOptionsGetter + }), [routeState, getCurrentState, setCurrentState, getKey, setKey, getIsInitial, addOptionsGetter]); + const ScreenComponent = screen.getComponent ? screen.getComponent() : screen.component; + return /*#__PURE__*/React.createElement(_NavigationStateContext.default.Provider, { + value: context + }, /*#__PURE__*/React.createElement(_EnsureSingleNavigator.default, null, /*#__PURE__*/React.createElement(_StaticContainer.default, { + name: screen.name, + render: ScreenComponent || screen.children, + navigation: navigation, + route: route + }, ScreenComponent !== undefined ? /*#__PURE__*/React.createElement(ScreenComponent, { + navigation: navigation, + route: route + }) : screen.children !== undefined ? screen.children({ + navigation, + route + }) : null))); +} +//# sourceMappingURL=SceneView.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/SceneView.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/SceneView.js.map new file mode 100644 index 00000000..8c991d94 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/SceneView.js.map @@ -0,0 +1 @@ +{"version":3,"names":["SceneView","screen","route","navigation","routeState","getState","setState","options","clearOptions","navigatorKeyRef","React","useRef","getKey","useCallback","current","addOptionsGetter","useOptionsGetters","key","setKey","getCurrentState","state","currentRoute","routes","find","r","undefined","setCurrentState","child","map","isInitialRef","useEffect","getIsInitial","context","useMemo","ScreenComponent","getComponent","component","name","children"],"sourceRoot":"../../src","sources":["SceneView.tsx"],"mappings":";;;;;;AAMA;AAEA;AACA;AACA;AAEA;AAAoD;AAAA;AAAA;AAmBpD;AACA;AACA;AACA;AACe,SAASA,SAAS,OAYD;EAAA,IAT9B;IACAC,MAAM;IACNC,KAAK;IACLC,UAAU;IACVC,UAAU;IACVC,QAAQ;IACRC,QAAQ;IACRC,OAAO;IACPC;EAC2B,CAAC;EAC5B,MAAMC,eAAe,GAAGC,KAAK,CAACC,MAAM,EAAsB;EAC1D,MAAMC,MAAM,GAAGF,KAAK,CAACG,WAAW,CAAC,MAAMJ,eAAe,CAACK,OAAO,EAAE,EAAE,CAAC;EAEnE,MAAM;IAAEC;EAAiB,CAAC,GAAG,IAAAC,0BAAiB,EAAC;IAC7CC,GAAG,EAAEf,KAAK,CAACe,GAAG;IACdV,OAAO;IACPJ;EACF,CAAC,CAAC;EAEF,MAAMe,MAAM,GAAGR,KAAK,CAACG,WAAW,CAAEI,GAAW,IAAK;IAChDR,eAAe,CAACK,OAAO,GAAGG,GAAG;EAC/B,CAAC,EAAE,EAAE,CAAC;EAEN,MAAME,eAAe,GAAGT,KAAK,CAACG,WAAW,CAAC,MAAM;IAC9C,MAAMO,KAAK,GAAGf,QAAQ,EAAE;IACxB,MAAMgB,YAAY,GAAGD,KAAK,CAACE,MAAM,CAACC,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACP,GAAG,KAAKf,KAAK,CAACe,GAAG,CAAC;IAElE,OAAOI,YAAY,GAAGA,YAAY,CAACD,KAAK,GAAGK,SAAS;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,CAACkC,YAAY,EAAE,GACrBlC,MAAM,CAACmC,SAAS;EAEpB,oBACE,oBAAC,+BAAsB,CAAC,QAAQ;IAAC,KAAK,EAAEJ;EAAQ,gBAC9C,oBAAC,8BAAqB,qBACpB,oBAAC,wBAAe;IACd,IAAI,EAAE/B,MAAM,CAACoC,IAAK;IAClB,MAAM,EAAEH,eAAe,IAAIjC,MAAM,CAACqC,QAAS;IAC3C,UAAU,EAAEnC,UAAW;IACvB,KAAK,EAAED;EAAM,GAEZgC,eAAe,KAAKT,SAAS,gBAC5B,oBAAC,eAAe;IAAC,UAAU,EAAEtB,UAAW;IAAC,KAAK,EAAED;EAAM,EAAG,GACvDD,MAAM,CAACqC,QAAQ,KAAKb,SAAS,GAC/BxB,MAAM,CAACqC,QAAQ,CAAC;IAAEnC,UAAU;IAAED;EAAM,CAAC,CAAC,GACpC,IAAI,CACQ,CACI,CACQ;AAEtC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Screen.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Screen.js new file mode 100644 index 00000000..2670ba0a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Screen.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = Screen; +/** + * Empty component used for specifying route configuration. + */ +function Screen(_) { + /* istanbul ignore next */ + return null; +} +//# sourceMappingURL=Screen.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Screen.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Screen.js.map new file mode 100644 index 00000000..756464bf --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/Screen.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Screen","_"],"sourceRoot":"../../src","sources":["Screen.tsx"],"mappings":";;;;;;AAIA;AACA;AACA;AACe,SAASA,MAAM,CAM5BC,CAAoE,EAAE;EACtE;EACA,OAAO,IAAI;AACb"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/StaticContainer.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/StaticContainer.js new file mode 100644 index 00000000..ddbf2311 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/StaticContainer.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Component which prevents updates for children if no props changed + */ +function StaticContainer(props) { + return props.children; +} +var _default = /*#__PURE__*/React.memo(StaticContainer, (prevProps, nextProps) => { + const prevPropKeys = Object.keys(prevProps); + const nextPropKeys = Object.keys(nextProps); + if (prevPropKeys.length !== nextPropKeys.length) { + return false; + } + for (const key of prevPropKeys) { + if (key === 'children') { + continue; + } + if (prevProps[key] !== nextProps[key]) { + return false; + } + } + return true; +}); +exports.default = _default; +//# sourceMappingURL=StaticContainer.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/StaticContainer.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/StaticContainer.js.map new file mode 100644 index 00000000..8e082272 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/StaticContainer.js.map @@ -0,0 +1 @@ +{"version":3,"names":["StaticContainer","props","children","React","memo","prevProps","nextProps","prevPropKeys","Object","keys","nextPropKeys","length","key"],"sourceRoot":"../../src","sources":["StaticContainer.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAE/B;AACA;AACA;AACA,SAASA,eAAe,CAACC,KAAU,EAAE;EACnC,OAAOA,KAAK,CAACC,QAAQ;AACvB;AAAC,4BAEcC,KAAK,CAACC,IAAI,CAACJ,eAAe,EAAE,CAACK,SAAc,EAAEC,SAAc,KAAK;EAC7E,MAAMC,YAAY,GAAGC,MAAM,CAACC,IAAI,CAACJ,SAAS,CAAC;EAC3C,MAAMK,YAAY,GAAGF,MAAM,CAACC,IAAI,CAACH,SAAS,CAAC;EAE3C,IAAIC,YAAY,CAACI,MAAM,KAAKD,YAAY,CAACC,MAAM,EAAE;IAC/C,OAAO,KAAK;EACd;EAEA,KAAK,MAAMC,GAAG,IAAIL,YAAY,EAAE;IAC9B,IAAIK,GAAG,KAAK,UAAU,EAAE;MACtB;IACF;IAEA,IAAIP,SAAS,CAACO,GAAG,CAAC,KAAKN,SAAS,CAACM,GAAG,CAAC,EAAE;MACrC,OAAO,KAAK;IACd;EACF;EAEA,OAAO,IAAI;AACb,CAAC,CAAC;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/UnhandledActionContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/UnhandledActionContext.js new file mode 100644 index 00000000..5e8a8634 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/UnhandledActionContext.js @@ -0,0 +1,13 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const UnhandledActionContext = /*#__PURE__*/React.createContext(undefined); +var _default = UnhandledActionContext; +exports.default = _default; +//# sourceMappingURL=UnhandledActionContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/UnhandledActionContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/UnhandledActionContext.js.map new file mode 100644 index 00000000..a45874b0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/UnhandledActionContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["UnhandledActionContext","React","createContext","undefined"],"sourceRoot":"../../src","sources":["UnhandledActionContext.tsx"],"mappings":";;;;;;AACA;AAA+B;AAAA;AAE/B,MAAMA,sBAAsB,gBAAGC,KAAK,CAACC,aAAa,CAEhDC,SAAS,CAAC;AAAC,eAEEH,sBAAsB;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkDuplicateRouteNames.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkDuplicateRouteNames.js new file mode 100644 index 00000000..8d35138b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkDuplicateRouteNames.js @@ -0,0 +1,26 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = checkDuplicateRouteNames; +function checkDuplicateRouteNames(state) { + const duplicates = []; + const getRouteNames = (location, state) => { + state.routes.forEach(route => { + var _route$state, _route$state$routeNam; + const currentLocation = location ? `${location} > ${route.name}` : route.name; + (_route$state = route.state) === null || _route$state === void 0 ? void 0 : (_route$state$routeNam = _route$state.routeNames) === null || _route$state$routeNam === void 0 ? void 0 : _route$state$routeNam.forEach(routeName => { + if (routeName === route.name) { + duplicates.push([currentLocation, `${currentLocation} > ${route.name}`]); + } + }); + if (route.state) { + getRouteNames(currentLocation, route.state); + } + }); + }; + getRouteNames('', state); + return duplicates; +} +//# sourceMappingURL=checkDuplicateRouteNames.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkDuplicateRouteNames.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkDuplicateRouteNames.js.map new file mode 100644 index 00000000..f3e10f7a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkDuplicateRouteNames.js.map @@ -0,0 +1 @@ +{"version":3,"names":["checkDuplicateRouteNames","state","duplicates","getRouteNames","location","routes","forEach","route","currentLocation","name","routeNames","routeName","push"],"sourceRoot":"../../src","sources":["checkDuplicateRouteNames.tsx"],"mappings":";;;;;;AAEe,SAASA,wBAAwB,CAACC,KAAsB,EAAE;EACvE,MAAMC,UAAsB,GAAG,EAAE;EAEjC,MAAMC,aAAa,GAAG,CACpBC,QAAgB,EAChBH,KAAsD,KACnD;IACHA,KAAK,CAACI,MAAM,CAACC,OAAO,CAAEC,KAA6B,IAAK;MAAA;MACtD,MAAMC,eAAe,GAAGJ,QAAQ,GAC3B,GAAEA,QAAS,MAAKG,KAAK,CAACE,IAAK,EAAC,GAC7BF,KAAK,CAACE,IAAI;MAEd,gBAAAF,KAAK,CAACN,KAAK,0EAAX,aAAaS,UAAU,0DAAvB,sBAAyBJ,OAAO,CAAEK,SAAS,IAAK;QAC9C,IAAIA,SAAS,KAAKJ,KAAK,CAACE,IAAI,EAAE;UAC5BP,UAAU,CAACU,IAAI,CAAC,CACdJ,eAAe,EACd,GAAEA,eAAgB,MAAKD,KAAK,CAACE,IAAK,EAAC,CACrC,CAAC;QACJ;MACF,CAAC,CAAC;MAEF,IAAIF,KAAK,CAACN,KAAK,EAAE;QACfE,aAAa,CAACK,eAAe,EAAED,KAAK,CAACN,KAAK,CAAC;MAC7C;IACF,CAAC,CAAC;EACJ,CAAC;EAEDE,aAAa,CAAC,EAAE,EAAEF,KAAK,CAAC;EAExB,OAAOC,UAAU;AACnB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkSerializable.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkSerializable.js new file mode 100644 index 00000000..968031ce --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkSerializable.js @@ -0,0 +1,50 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = checkSerializable; +const checkSerializableWithoutCircularReference = (o, seen, location) => { + if (o === undefined || o === null || typeof o === 'boolean' || typeof o === 'number' || typeof o === 'string') { + return { + serializable: true + }; + } + if (Object.prototype.toString.call(o) !== '[object Object]' && !Array.isArray(o)) { + return { + serializable: false, + location, + reason: typeof o === 'function' ? 'Function' : String(o) + }; + } + if (seen.has(o)) { + return { + serializable: false, + reason: 'Circular reference', + location + }; + } + seen.add(o); + if (Array.isArray(o)) { + for (let i = 0; i < o.length; i++) { + const childResult = checkSerializableWithoutCircularReference(o[i], new Set(seen), [...location, i]); + if (!childResult.serializable) { + return childResult; + } + } + } else { + for (const key in o) { + const childResult = checkSerializableWithoutCircularReference(o[key], new Set(seen), [...location, key]); + if (!childResult.serializable) { + return childResult; + } + } + } + return { + serializable: true + }; +}; +function checkSerializable(o) { + return checkSerializableWithoutCircularReference(o, new Set(), []); +} +//# sourceMappingURL=checkSerializable.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkSerializable.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkSerializable.js.map new file mode 100644 index 00000000..ec36c269 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/checkSerializable.js.map @@ -0,0 +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,GAAG,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,QAAQ,EACrB;IACA,OAAO;MAAEI,YAAY,EAAE;IAAK,CAAC;EAC/B;EAEA,IACEC,MAAM,CAACC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACR,CAAC,CAAC,KAAK,iBAAiB,IACvD,CAACS,KAAK,CAACC,OAAO,CAACV,CAAC,CAAC,EACjB;IACA,OAAO;MACLI,YAAY,EAAE,KAAK;MACnBF,QAAQ;MACRS,MAAM,EAAE,OAAOX,CAAC,KAAK,UAAU,GAAG,UAAU,GAAGY,MAAM,CAACZ,CAAC;IACzD,CAAC;EACH;EAEA,IAAIC,IAAI,CAACY,GAAG,CAACb,CAAC,CAAC,EAAE;IACf,OAAO;MACLI,YAAY,EAAE,KAAK;MACnBO,MAAM,EAAE,oBAAoB;MAC5BT;IACF,CAAC;EACH;EAEAD,IAAI,CAACa,GAAG,CAACd,CAAC,CAAC;EAEX,IAAIS,KAAK,CAACC,OAAO,CAACV,CAAC,CAAC,EAAE;IACpB,KAAK,IAAIe,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGf,CAAC,CAACgB,MAAM,EAAED,CAAC,EAAE,EAAE;MACjC,MAAME,WAAW,GAAGlB,yCAAyC,CAC3DC,CAAC,CAACe,CAAC,CAAC,EACJ,IAAIG,GAAG,CAAMjB,IAAI,CAAC,EAClB,CAAC,GAAGC,QAAQ,EAAEa,CAAC,CAAC,CACjB;MAED,IAAI,CAACE,WAAW,CAACb,YAAY,EAAE;QAC7B,OAAOa,WAAW;MACpB;IACF;EACF,CAAC,MAAM;IACL,KAAK,MAAME,GAAG,IAAInB,CAAC,EAAE;MACnB,MAAMiB,WAAW,GAAGlB,yCAAyC,CAC3DC,CAAC,CAACmB,GAAG,CAAC,EACN,IAAID,GAAG,CAAMjB,IAAI,CAAC,EAClB,CAAC,GAAGC,QAAQ,EAAEiB,GAAG,CAAC,CACnB;MAED,IAAI,CAACF,WAAW,CAACb,YAAY,EAAE;QAC7B,OAAOa,WAAW;MACpB;IACF;EACF;EAEA,OAAO;IAAEb,YAAY,EAAE;EAAK,CAAC;AAC/B,CAAC;AAEc,SAASgB,iBAAiB,CAACpB,CAAyB,EAAE;EACnE,OAAOD,yCAAyC,CAACC,CAAC,EAAE,IAAIkB,GAAG,EAAO,EAAE,EAAE,CAAC;AACzE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigationContainerRef.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigationContainerRef.js new file mode 100644 index 00000000..a31cde78 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigationContainerRef.js @@ -0,0 +1,74 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.NOT_INITIALIZED_ERROR = void 0; +exports.default = createNavigationContainerRef; +var _routers = require("@react-navigation/routers"); +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."; +exports.NOT_INITIALIZED_ERROR = NOT_INITIALIZED_ERROR; +function createNavigationContainerRef() { + const methods = [...Object.keys(_routers.CommonActions), 'addListener', 'removeListener', 'resetRoot', 'dispatch', 'isFocused', 'canGoBack', 'getRootState', 'getState', 'getParent', 'getCurrentRoute', 'getCurrentOptions']; + const listeners = {}; + const removeListener = (event, callback) => { + if (listeners[event]) { + listeners[event] = listeners[event].filter(cb => cb !== callback); + } + }; + let current = null; + const ref = { + get current() { + return current; + }, + set current(value) { + current = value; + if (value != null) { + Object.entries(listeners).forEach(_ref => { + let [event, callbacks] = _ref; + callbacks.forEach(callback => { + value.addListener(event, callback); + }); + }); + } + }, + isReady: () => { + if (current == null) { + return false; + } + return current.isReady(); + }, + ...methods.reduce((acc, name) => { + acc[name] = function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + if (current == null) { + switch (name) { + case 'addListener': + { + const [event, callback] = args; + listeners[event] = listeners[event] || []; + listeners[event].push(callback); + return () => removeListener(event, callback); + } + case 'removeListener': + { + const [event, callback] = args; + removeListener(event, callback); + break; + } + default: + console.error(NOT_INITIALIZED_ERROR); + } + } else { + // @ts-expect-error: this is ok + return current[name](...args); + } + }; + return acc; + }, {}) + }; + return ref; +} +//# sourceMappingURL=createNavigationContainerRef.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigationContainerRef.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigationContainerRef.js.map new file mode 100644 index 00000000..e3a1bc9d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigationContainerRef.js.map @@ -0,0 +1 @@ +{"version":3,"names":["NOT_INITIALIZED_ERROR","createNavigationContainerRef","methods","Object","keys","CommonActions","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;AAQO,MAAMA,qBAAqB,GAChC,+QAA+Q;AAAC;AAEnQ,SAASC,4BAA4B,GAEF;EAChD,MAAMC,OAAO,GAAG,CACd,GAAGC,MAAM,CAACC,IAAI,CAACC,sBAAa,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,MAAMC,SAAuD,GAAG,CAAC,CAAC;EAElE,MAAMC,cAAc,GAAG,CACrBC,KAAa,EACbC,QAAkC,KAC/B;IACH,IAAIH,SAAS,CAACE,KAAK,CAAC,EAAE;MACpBF,SAAS,CAACE,KAAK,CAAC,GAAGF,SAAS,CAACE,KAAK,CAAC,CAACE,MAAM,CAAEC,EAAE,IAAKA,EAAE,KAAKF,QAAQ,CAAC;IACrE;EACF,CAAC;EAED,IAAIG,OAAiD,GAAG,IAAI;EAE5D,MAAMC,GAAiD,GAAG;IACxD,IAAID,OAAO,GAAG;MACZ,OAAOA,OAAO;IAChB,CAAC;IACD,IAAIA,OAAO,CAACE,KAA+C,EAAE;MAC3DF,OAAO,GAAGE,KAAK;MAEf,IAAIA,KAAK,IAAI,IAAI,EAAE;QACjBX,MAAM,CAACY,OAAO,CAACT,SAAS,CAAC,CAACU,OAAO,CAAC,QAAwB;UAAA,IAAvB,CAACR,KAAK,EAAES,SAAS,CAAC;UACnDA,SAAS,CAACD,OAAO,CAAEP,QAAQ,IAAK;YAC9BK,KAAK,CAACI,WAAW,CACfV,KAAK,EACLC,QAAQ,CACT;UACH,CAAC,CAAC;QACJ,CAAC,CAAC;MACJ;IACF,CAAC;IACDU,OAAO,EAAE,MAAM;MACb,IAAIP,OAAO,IAAI,IAAI,EAAE;QACnB,OAAO,KAAK;MACd;MAEA,OAAOA,OAAO,CAACO,OAAO,EAAE;IAC1B,CAAC;IACD,GAAGjB,OAAO,CAACkB,MAAM,CAAM,CAACC,GAAG,EAAEC,IAAI,KAAK;MACpCD,GAAG,CAACC,IAAI,CAAC,GAAG,YAAoB;QAAA,kCAAhBC,IAAI;UAAJA,IAAI;QAAA;QAClB,IAAIX,OAAO,IAAI,IAAI,EAAE;UACnB,QAAQU,IAAI;YACV,KAAK,aAAa;cAAE;gBAClB,MAAM,CAACd,KAAK,EAAEC,QAAQ,CAAC,GAAGc,IAAI;gBAE9BjB,SAAS,CAACE,KAAK,CAAC,GAAGF,SAAS,CAACE,KAAK,CAAC,IAAI,EAAE;gBACzCF,SAAS,CAACE,KAAK,CAAC,CAACgB,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,CAAC1B,qBAAqB,CAAC;UAAC;QAE3C,CAAC,MAAM;UACL;UACA,OAAOY,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"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js new file mode 100644 index 00000000..e73a338c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js @@ -0,0 +1,29 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = createNavigatorFactory; +var _Group = _interopRequireDefault(require("./Group")); +var _Screen = _interopRequireDefault(require("./Screen")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * Higher order component to create a `Navigator` and `Screen` pair. + * Custom navigators should wrap the navigator component in `createNavigator` before exporting. + * + * @param Navigator The navigtor component to wrap. + * @returns Factory method to create a `Navigator` and `Screen` pair. + */ +function createNavigatorFactory(Navigator) { + return function () { + if (arguments[0] !== undefined) { + throw new Error("Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API? See https://reactnavigation.org/docs/hello-react-navigation for the latest API and guides."); + } + return { + Navigator, + Group: _Group.default, + Screen: _Screen.default + }; + }; +} +//# sourceMappingURL=createNavigatorFactory.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js.map new file mode 100644 index 00000000..e5c26f67 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js.map @@ -0,0 +1 @@ +{"version":3,"names":["createNavigatorFactory","Navigator","arguments","undefined","Error","Group","Screen"],"sourceRoot":"../../src","sources":["createNavigatorFactory.tsx"],"mappings":";;;;;;AAGA;AACA;AAA8B;AAG9B;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,sBAAsB,CAK5CC,SAA6B,EAAE;EAC/B,OAAO,YAML;IACA,IAAIC,SAAS,CAAC,CAAC,CAAC,KAAKC,SAAS,EAAE;MAC9B,MAAM,IAAIC,KAAK,CACb,+LAA+L,CAChM;IACH;IAEA,OAAO;MACLH,SAAS;MACTI,KAAK,EAALA,cAAK;MACLC,MAAM,EAANA;IACF,CAAC;EACH,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/findFocusedRoute.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/findFocusedRoute.js new file mode 100644 index 00000000..e3a6d33f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/findFocusedRoute.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = findFocusedRoute; +function findFocusedRoute(state) { + var _current2, _current3; + let current = state; + while (((_current = current) === null || _current === void 0 ? void 0 : _current.routes[current.index ?? 0].state) != null) { + var _current; + current = current.routes[current.index ?? 0].state; + } + const route = (_current2 = current) === null || _current2 === void 0 ? void 0 : _current2.routes[((_current3 = current) === null || _current3 === void 0 ? void 0 : _current3.index) ?? 0]; + return route; +} +//# sourceMappingURL=findFocusedRoute.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/findFocusedRoute.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/findFocusedRoute.js.map new file mode 100644 index 00000000..1584bc7a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/findFocusedRoute.js.map @@ -0,0 +1 @@ +{"version":3,"names":["findFocusedRoute","state","current","routes","index","route"],"sourceRoot":"../../src","sources":["findFocusedRoute.tsx"],"mappings":";;;;;;AAEe,SAASA,gBAAgB,CAACC,KAAmB,EAAE;EAAA;EAC5D,IAAIC,OAAiC,GAAGD,KAAK;EAE7C,OAAO,aAAAC,OAAO,6CAAP,SAASC,MAAM,CAACD,OAAO,CAACE,KAAK,IAAI,CAAC,CAAC,CAACH,KAAK,KAAI,IAAI,EAAE;IAAA;IACxDC,OAAO,GAAGA,OAAO,CAACC,MAAM,CAACD,OAAO,CAACE,KAAK,IAAI,CAAC,CAAC,CAACH,KAAK;EACpD;EAEA,MAAMI,KAAK,gBAAGH,OAAO,8CAAP,UAASC,MAAM,CAAC,cAAAD,OAAO,8CAAP,UAASE,KAAK,KAAI,CAAC,CAAC;EAElD,OAAOC,KAAK;AACd"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/fromEntries.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/fromEntries.js new file mode 100644 index 00000000..d370567f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/fromEntries.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = fromEntries; +// Object.fromEntries is not available in older iOS versions +function fromEntries(entries) { + return entries.reduce((acc, _ref) => { + let [k, v] = _ref; + if (acc.hasOwnProperty(k)) { + throw new Error(`A value for key '${k}' already exists in the object.`); + } + acc[k] = v; + return acc; + }, {}); +} +//# sourceMappingURL=fromEntries.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/fromEntries.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/fromEntries.js.map new file mode 100644 index 00000000..aa30384b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/fromEntries.js.map @@ -0,0 +1 @@ +{"version":3,"names":["fromEntries","entries","reduce","acc","k","v","hasOwnProperty","Error"],"sourceRoot":"../../src","sources":["fromEntries.tsx"],"mappings":";;;;;;AAAA;AACe,SAASA,WAAW,CACjCC,OAA4B,EAC5B;EACA,OAAOA,OAAO,CAACC,MAAM,CAAC,CAACC,GAAG,WAAa;IAAA,IAAX,CAACC,CAAC,EAAEC,CAAC,CAAC;IAChC,IAAIF,GAAG,CAACG,cAAc,CAACF,CAAC,CAAC,EAAE;MACzB,MAAM,IAAIG,KAAK,CAAE,oBAAmBH,CAAE,iCAAgC,CAAC;IACzE;IAEAD,GAAG,CAACC,CAAC,CAAC,GAAGC,CAAC;IACV,OAAOF,GAAG;EACZ,CAAC,EAAE,CAAC,CAAC,CAAiB;AACxB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getActionFromState.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getActionFromState.js new file mode 100644 index 00000000..5f25c245 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getActionFromState.js @@ -0,0 +1,89 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getActionFromState; +function getActionFromState(state, options) { + var _normalizedConfig$scr; + // Create a normalized configs object which will be easier to use + const normalizedConfig = options ? createNormalizedConfigItem(options) : {}; + const routes = state.index != null ? state.routes.slice(0, state.index + 1) : state.routes; + if (routes.length === 0) { + return undefined; + } + if (!(routes.length === 1 && routes[0].key === undefined || routes.length === 2 && routes[0].key === undefined && routes[0].name === (normalizedConfig === null || normalizedConfig === void 0 ? void 0 : normalizedConfig.initialRouteName) && routes[1].key === undefined)) { + return { + type: 'RESET', + payload: state + }; + } + const route = state.routes[state.index ?? state.routes.length - 1]; + let current = route === null || route === void 0 ? void 0 : route.state; + let config = normalizedConfig === null || normalizedConfig === void 0 ? void 0 : (_normalizedConfig$scr = normalizedConfig.screens) === null || _normalizedConfig$scr === void 0 ? void 0 : _normalizedConfig$scr[route === null || route === void 0 ? void 0 : route.name]; + let params = { + ...route.params + }; + let payload = route ? { + name: route.name, + path: route.path, + params + } : undefined; + while (current) { + var _config, _config2, _config2$screens; + if (current.routes.length === 0) { + return undefined; + } + const routes = current.index != null ? current.routes.slice(0, current.index + 1) : current.routes; + const route = routes[routes.length - 1]; + + // Explicitly set to override existing value when merging params + Object.assign(params, { + initial: undefined, + screen: undefined, + params: undefined, + state: undefined + }); + if (routes.length === 1 && routes[0].key === undefined) { + params.initial = true; + params.screen = route.name; + } else if (routes.length === 2 && routes[0].key === undefined && routes[0].name === ((_config = config) === null || _config === void 0 ? void 0 : _config.initialRouteName) && routes[1].key === undefined) { + params.initial = false; + params.screen = route.name; + } else { + params.state = current; + break; + } + if (route.state) { + params.params = { + ...route.params + }; + params = params.params; + } else { + params.path = route.path; + params.params = route.params; + } + current = route.state; + config = (_config2 = config) === null || _config2 === void 0 ? void 0 : (_config2$screens = _config2.screens) === null || _config2$screens === void 0 ? void 0 : _config2$screens[route.name]; + } + if (!payload) { + return; + } + + // Try to construct payload for a `NAVIGATE` action from the state + // This lets us preserve the navigation state and not lose it + return { + type: 'NAVIGATE', + payload + }; +} +const createNormalizedConfigItem = config => typeof config === 'object' && config != null ? { + initialRouteName: config.initialRouteName, + screens: config.screens != null ? createNormalizedConfigs(config.screens) : undefined +} : {}; +const createNormalizedConfigs = options => Object.entries(options).reduce((acc, _ref) => { + let [k, v] = _ref; + acc[k] = createNormalizedConfigItem(v); + return acc; +}, {}); +//# sourceMappingURL=getActionFromState.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getActionFromState.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getActionFromState.js.map new file mode 100644 index 00000000..d7fb1e97 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getActionFromState.js.map @@ -0,0 +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":";;;;;;AA8Be,SAASA,kBAAkB,CACxCC,KAAoC,EACpCC,OAAiB,EACmD;EAAA;EACpE;EACA,MAAMC,gBAAgB,GAAGD,OAAO,GAC5BE,0BAA0B,CAACF,OAAO,CAAgC,GAClE,CAAC,CAAC;EAEN,MAAMG,MAAM,GACVJ,KAAK,CAACK,KAAK,IAAI,IAAI,GAAGL,KAAK,CAACI,MAAM,CAACE,KAAK,CAAC,CAAC,EAAEN,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AAM;MACLA,MAAM,CAACC,IAAI,GAAGL,KAAK,CAACK,IAAI;MACxBD,MAAM,CAACA,MAAM,GAAGJ,KAAK,CAACI,MAAM;IAC9B;IAEAH,OAAO,GAAGD,KAAK,CAACd,KAAK;IACrBgB,MAAM,eAAGA,MAAM,iEAAN,SAAQC,OAAO,qDAAf,iBAAkBH,KAAK,CAACJ,IAAI,CAAC;EACxC;EAEA,IAAI,CAACG,OAAO,EAAE;IACZ;EACF;;EAEA;EACA;EACA,OAAO;IACLD,IAAI,EAAE,UAAU;IAChBC;EACF,CAAC;AACH;AAEA,MAAMV,0BAA0B,GAAIa,MAAmC,IACrE,OAAOA,MAAM,KAAK,QAAQ,IAAIA,MAAM,IAAI,IAAI,GACxC;EACEL,gBAAgB,EAAEK,MAAM,CAACL,gBAAgB;EACzCM,OAAO,EACLD,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,WAAa;EAAA,IAAX,CAACC,CAAC,EAAEC,CAAC,CAAC;EACrEF,GAAG,CAACC,CAAC,CAAC,GAAGzB,0BAA0B,CAAC0B,CAAC,CAAC;EACtC,OAAOF,GAAG;AACZ,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getFocusedRouteNameFromRoute.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getFocusedRouteNameFromRoute.js new file mode 100644 index 00000000..dc34a799 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getFocusedRouteNameFromRoute.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getFocusedRouteNameFromRoute; +var _useRouteCache = require("./useRouteCache"); +function getFocusedRouteNameFromRoute(route) { + // @ts-expect-error: this isn't in type definitions coz we want this private + const state = route[_useRouteCache.CHILD_STATE] ?? route.state; + const params = route.params; + const routeName = state ? + // Get the currently active route name in the nested navigator + state.routes[ + // If we have a partial state without index, for tab/drawer, first screen will be focused one, and last for stack + // The type property will only exist for rehydrated state and not for state from deep link + state.index ?? (typeof state.type === 'string' && state.type !== 'stack' ? 0 : state.routes.length - 1)].name : + // If state doesn't exist, we need to default to `screen` param if available + typeof (params === null || params === void 0 ? void 0 : params.screen) === 'string' ? params.screen : undefined; + return routeName; +} +//# sourceMappingURL=getFocusedRouteNameFromRoute.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getFocusedRouteNameFromRoute.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getFocusedRouteNameFromRoute.js.map new file mode 100644 index 00000000..df2f939e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getFocusedRouteNameFromRoute.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getFocusedRouteNameFromRoute","route","state","CHILD_STATE","params","routeName","routes","index","type","length","name","screen","undefined"],"sourceRoot":"../../src","sources":["getFocusedRouteNameFromRoute.tsx"],"mappings":";;;;;;AAEA;AAEe,SAASA,4BAA4B,CAClDC,KAA6B,EACT;EACpB;EACA,MAAMC,KAAK,GAAGD,KAAK,CAACE,0BAAW,CAAC,IAAIF,KAAK,CAACC,KAAK;EAC/C,MAAME,MAAM,GAAGH,KAAK,CAACG,MAA0C;EAE/D,MAAMC,SAAS,GAAGH,KAAK;EACnB;EACAA,KAAK,CAACI,MAAM;EACV;EACA;EACAJ,KAAK,CAACK,KAAK,KACR,OAAOL,KAAK,CAACM,IAAI,KAAK,QAAQ,IAAIN,KAAK,CAACM,IAAI,KAAK,OAAO,GACrD,CAAC,GACDN,KAAK,CAACI,MAAM,CAACG,MAAM,GAAG,CAAC,CAAC,CAC/B,CAACC,IAAI;EACN;EACF,QAAON,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEO,MAAM,MAAK,QAAQ,GAChCP,MAAM,CAACO,MAAM,GACbC,SAAS;EAEb,OAAOP,SAAS;AAClB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getPathFromState.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getPathFromState.js new file mode 100644 index 00000000..dbed7e2c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getPathFromState.js @@ -0,0 +1,218 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getPathFromState; +var queryString = _interopRequireWildcard(require("query-string")); +var _fromEntries = _interopRequireDefault(require("./fromEntries")); +var _validatePathConfig = _interopRequireDefault(require("./validatePathConfig")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const getActiveRoute = state => { + const route = typeof state.index === 'number' ? state.routes[state.index] : state.routes[state.routes.length - 1]; + if (route.state) { + return getActiveRoute(route.state); + } + return route; +}; + +/** + * Utility to serialize a navigation state object to a path string. + * + * @example + * ```js + * getPathFromState( + * { + * routes: [ + * { + * name: 'Chat', + * params: { author: 'Jane', id: 42 }, + * }, + * ], + * }, + * { + * screens: { + * Chat: { + * path: 'chat/:author/:id', + * stringify: { author: author => author.toLowerCase() } + * } + * } + * } + * ) + * ``` + * + * @param state Navigation state to serialize. + * @param options Extra options to fine-tune how to serialize the path. + * @returns Path representing the state, e.g. /foo/bar?count=42. + */ +function getPathFromState(state, options) { + if (state == null) { + throw Error("Got 'undefined' for the navigation state. You must pass a valid state object."); + } + if (options) { + (0, _validatePathConfig.default)(options); + } + + // Create a normalized configs object which will be easier to use + const configs = options !== null && options !== void 0 && options.screens ? createNormalizedConfigs(options === null || options === void 0 ? void 0 : options.screens) : {}; + let path = '/'; + let current = state; + const allParams = {}; + while (current) { + let index = typeof current.index === 'number' ? current.index : 0; + let route = current.routes[index]; + let pattern; + let focusedParams; + let focusedRoute = getActiveRoute(state); + let currentOptions = configs; + + // Keep all the route names that appeared during going deeper in config in case the pattern is resolved to undefined + let nestedRouteNames = []; + let hasNext = true; + while (route.name in currentOptions && hasNext) { + pattern = currentOptions[route.name].pattern; + nestedRouteNames.push(route.name); + if (route.params) { + var _currentOptions$route; + const stringify = (_currentOptions$route = currentOptions[route.name]) === null || _currentOptions$route === void 0 ? void 0 : _currentOptions$route.stringify; + const currentParams = (0, _fromEntries.default)(Object.entries(route.params).map(_ref => { + let [key, value] = _ref; + return [key, stringify !== null && stringify !== void 0 && stringify[key] ? stringify[key](value) : String(value)]; + })); + if (pattern) { + Object.assign(allParams, currentParams); + } + if (focusedRoute === route) { + var _pattern; + // If this is the focused route, keep the params for later use + // We save it here since it's been stringified already + focusedParams = { + ...currentParams + }; + (_pattern = pattern) === null || _pattern === void 0 ? void 0 : _pattern.split('/').filter(p => p.startsWith(':')) + // eslint-disable-next-line no-loop-func + .forEach(p => { + const name = getParamName(p); + + // Remove the params present in the pattern since we'll only use the rest for query string + if (focusedParams) { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete focusedParams[name]; + } + }); + } + } + + // If there is no `screens` property or no nested state, we return pattern + if (!currentOptions[route.name].screens || route.state === undefined) { + hasNext = false; + } else { + index = typeof route.state.index === 'number' ? route.state.index : route.state.routes.length - 1; + const nextRoute = route.state.routes[index]; + const nestedConfig = currentOptions[route.name].screens; + + // if there is config for next route name, we go deeper + if (nestedConfig && nextRoute.name in nestedConfig) { + route = nextRoute; + currentOptions = nestedConfig; + } else { + // If not, there is no sense in going deeper in config + hasNext = false; + } + } + } + if (pattern === undefined) { + pattern = nestedRouteNames.join('/'); + } + if (currentOptions[route.name] !== undefined) { + path += pattern.split('/').map(p => { + const name = getParamName(p); + + // We don't know what to show for wildcard patterns + // Showing the route name seems ok, though whatever we show here will be incorrect + // Since the page doesn't actually exist + if (p === '*') { + return route.name; + } + + // If the path has a pattern for a param, put the param in the path + if (p.startsWith(':')) { + const value = allParams[name]; + if (value === undefined && p.endsWith('?')) { + // Optional params without value assigned in route.params should be ignored + return ''; + } + return encodeURIComponent(value); + } + return encodeURIComponent(p); + }).join('/'); + } else { + path += encodeURIComponent(route.name); + } + if (!focusedParams) { + focusedParams = focusedRoute.params; + } + if (route.state) { + path += '/'; + } else if (focusedParams) { + for (let param in focusedParams) { + if (focusedParams[param] === 'undefined') { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete focusedParams[param]; + } + } + const query = queryString.stringify(focusedParams, { + sort: false + }); + if (query) { + path += `?${query}`; + } + } + current = route.state; + } + + // Remove multiple as well as trailing slashes + path = path.replace(/\/+/g, '/'); + path = path.length > 1 ? path.replace(/\/$/, '') : path; + return path; +} +const getParamName = pattern => pattern.replace(/^:/, '').replace(/\?$/, ''); +const joinPaths = function () { + for (var _len = arguments.length, paths = new Array(_len), _key = 0; _key < _len; _key++) { + paths[_key] = arguments[_key]; + } + return [].concat(...paths.map(p => p.split('/'))).filter(Boolean).join('/'); +}; +const createConfigItem = (config, parentPattern) => { + var _pattern2; + if (typeof config === 'string') { + // If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern + const pattern = parentPattern ? joinPaths(parentPattern, config) : config; + return { + pattern + }; + } + + // If an object is specified as the value (e.g. Foo: { ... }), + // It can have `path` property and `screens` prop which has nested configs + let pattern; + if (config.exact && config.path === undefined) { + 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: ''`."); + } + pattern = config.exact !== true ? joinPaths(parentPattern || '', config.path || '') : config.path || ''; + const screens = config.screens ? createNormalizedConfigs(config.screens, pattern) : undefined; + return { + // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc. + pattern: (_pattern2 = pattern) === null || _pattern2 === void 0 ? void 0 : _pattern2.split('/').filter(Boolean).join('/'), + stringify: config.stringify, + screens + }; +}; +const createNormalizedConfigs = (options, pattern) => (0, _fromEntries.default)(Object.entries(options).map(_ref2 => { + let [name, c] = _ref2; + const result = createConfigItem(c, pattern); + return [name, result]; +})); +//# sourceMappingURL=getPathFromState.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getPathFromState.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getPathFromState.js.map new file mode 100644 index 00000000..f576e368 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getPathFromState.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getActiveRoute","state","route","index","routes","length","getPathFromState","options","Error","validatePathConfig","configs","screens","createNormalizedConfigs","path","current","allParams","pattern","focusedParams","focusedRoute","currentOptions","nestedRouteNames","hasNext","name","push","params","stringify","currentParams","fromEntries","Object","entries","map","key","value","String","assign","split","filter","p","startsWith","forEach","getParamName","undefined","nextRoute","nestedConfig","join","endsWith","encodeURIComponent","param","query","queryString","sort","replace","joinPaths","paths","concat","Boolean","createConfigItem","config","parentPattern","exact","c","result"],"sourceRoot":"../../src","sources":["getPathFromState.tsx"],"mappings":";;;;;;AAKA;AAEA;AAEA;AAAsD;AAAA;AAAA;AAiBtD,MAAMA,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASI,gBAAgB,CACtCL,KAAY,EACZM,OAA4B,EACpB;EACR,IAAIN,KAAK,IAAI,IAAI,EAAE;IACjB,MAAMO,KAAK,CACT,+EAA+E,CAChF;EACH;EAEA,IAAID,OAAO,EAAE;IACX,IAAAE,2BAAkB,EAACF,OAAO,CAAC;EAC7B;;EAEA;EACA,MAAMG,OAAmC,GAAGH,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEI,OAAO,GACxDC,uBAAuB,CAACL,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,OAAO,CAAC,GACzC,CAAC,CAAC;EAEN,IAAIE,IAAI,GAAG,GAAG;EACd,IAAIC,OAA0B,GAAGb,KAAK;EAEtC,MAAMc,SAA8B,GAAG,CAAC,CAAC;EAEzC,OAAOD,OAAO,EAAE;IACd,IAAIX,KAAK,GAAG,OAAOW,OAAO,CAACX,KAAK,KAAK,QAAQ,GAAGW,OAAO,CAACX,KAAK,GAAG,CAAC;IACjE,IAAID,KAAK,G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AO,eAAEA,OAAO,8CAAP,UAASmB,KAAK,CAAC,GAAG,CAAC,CAACC,MAAM,CAACmB,OAAO,CAAC,CAACX,IAAI,CAAC,GAAG,CAAC;IACtDnB,SAAS,EAAEgC,MAAM,CAAChC,SAAS;IAC3Bd;EACF,CAAC;AACH,CAAC;AAED,MAAMC,uBAAuB,GAAG,CAC9BL,OAA8B,EAC9BS,OAAgB,KAEhB,IAAAW,oBAAW,EACTC,MAAM,CAACC,OAAO,CAACtB,OAAO,CAAC,CAACuB,GAAG,CAAC,SAAe;EAAA,IAAd,CAACR,IAAI,EAAEsC,CAAC,CAAC;EACpC,MAAMC,MAAM,GAAGL,gBAAgB,CAACI,CAAC,EAAE5C,OAAO,CAAC;EAE3C,OAAO,CAACM,IAAI,EAAEuC,MAAM,CAAC;AACvB,CAAC,CAAC,CACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getStateFromPath.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getStateFromPath.js new file mode 100644 index 00000000..88246e24 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getStateFromPath.js @@ -0,0 +1,403 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getStateFromPath; +var _escapeStringRegexp = _interopRequireDefault(require("escape-string-regexp")); +var queryString = _interopRequireWildcard(require("query-string")); +var _findFocusedRoute = _interopRequireDefault(require("./findFocusedRoute")); +var _validatePathConfig = _interopRequireDefault(require("./validatePathConfig")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * Utility to parse a path string to initial state object accepted by the container. + * This is useful for deep linking when we need to handle the incoming URL. + * + * @example + * ```js + * getStateFromPath( + * '/chat/jane/42', + * { + * screens: { + * Chat: { + * path: 'chat/:author/:id', + * parse: { id: Number } + * } + * } + * } + * ) + * ``` + * @param path Path string to parse and convert, e.g. /foo/bar?count=42. + * @param options Extra options to fine-tune how to parse the path. + */ +function getStateFromPath(path, options) { + if (options) { + (0, _validatePathConfig.default)(options); + } + let initialRoutes = []; + if (options !== null && options !== void 0 && options.initialRouteName) { + initialRoutes.push({ + initialRouteName: options.initialRouteName, + parentScreens: [] + }); + } + const screens = options === null || options === void 0 ? void 0 : options.screens; + let remaining = path.replace(/\/+/g, '/') // Replace multiple slash (//) with single ones + .replace(/^\//, '') // Remove extra leading slash + .replace(/\?.*$/, ''); // Remove query params which we will handle later + + // Make sure there is a trailing slash + remaining = remaining.endsWith('/') ? remaining : `${remaining}/`; + if (screens === undefined) { + // When no config is specified, use the path segments as route names + const routes = remaining.split('/').filter(Boolean).map(segment => { + const name = decodeURIComponent(segment); + return { + name + }; + }); + if (routes.length) { + return createNestedStateObject(path, routes, initialRoutes); + } + return undefined; + } + + // Create a normalized configs array which will be easier to use + const configs = [].concat(...Object.keys(screens).map(key => createNormalizedConfigs(key, screens, [], initialRoutes, []))).sort((a, b) => { + // Sort config so that: + // - the most exhaustive ones are always at the beginning + // - patterns with wildcard are always at the end + + // If 2 patterns are same, move the one with less route names up + // This is an error state, so it's only useful for consistent error messages + if (a.pattern === b.pattern) { + return b.routeNames.join('>').localeCompare(a.routeNames.join('>')); + } + + // If one of the patterns starts with the other, it's more exhaustive + // So move it up + if (a.pattern.startsWith(b.pattern)) { + return -1; + } + if (b.pattern.startsWith(a.pattern)) { + return 1; + } + const aParts = a.pattern.split('/'); + const bParts = b.pattern.split('/'); + for (let i = 0; i < Math.max(aParts.length, bParts.length); i++) { + // if b is longer, b get higher priority + if (aParts[i] == null) { + return 1; + } + // if a is longer, a get higher priority + if (bParts[i] == null) { + return -1; + } + const aWildCard = aParts[i] === '*' || aParts[i].startsWith(':'); + const bWildCard = bParts[i] === '*' || bParts[i].startsWith(':'); + // if both are wildcard we compare next component + if (aWildCard && bWildCard) { + continue; + } + // if only a is wild card, b get higher priority + if (aWildCard) { + return 1; + } + // if only b is wild card, a get higher priority + if (bWildCard) { + return -1; + } + } + return bParts.length - aParts.length; + }); + + // Check for duplicate patterns in the config + configs.reduce((acc, config) => { + if (acc[config.pattern]) { + const a = acc[config.pattern].routeNames; + const b = config.routeNames; + + // It's not a problem if the path string omitted from a inner most screen + // For example, it's ok if a path resolves to `A > B > C` or `A > B` + const intersects = a.length > b.length ? b.every((it, i) => a[i] === it) : a.every((it, i) => b[i] === it); + if (!intersects) { + throw new Error(`Found conflicting screens with the same pattern. The pattern '${config.pattern}' resolves to both '${a.join(' > ')}' and '${b.join(' > ')}'. Patterns must be unique and cannot resolve to more than one screen.`); + } + } + return Object.assign(acc, { + [config.pattern]: config + }); + }, {}); + if (remaining === '/') { + // We need to add special handling of empty path so navigation to empty path also works + // When handling empty path, we should only look at the root level config + const match = configs.find(config => config.path === '' && config.routeNames.every( + // Make sure that none of the parent configs have a non-empty path defined + name => { + var _configs$find; + return !((_configs$find = configs.find(c => c.screen === name)) !== null && _configs$find !== void 0 && _configs$find.path); + })); + if (match) { + return createNestedStateObject(path, match.routeNames.map(name => ({ + name + })), initialRoutes, configs); + } + return undefined; + } + let result; + let current; + + // We match the whole path against the regex instead of segments + // This makes sure matches such as wildcard will catch any unmatched routes, even if nested + const { + routes, + remainingPath + } = matchAgainstConfigs(remaining, configs.map(c => ({ + ...c, + // Add `$` to the regex to make sure it matches till end of the path and not just beginning + regex: c.regex ? new RegExp(c.regex.source + '$') : undefined + }))); + if (routes !== undefined) { + // This will always be empty if full path matched + current = createNestedStateObject(path, routes, initialRoutes, configs); + remaining = remainingPath; + result = current; + } + if (current == null || result == null) { + return undefined; + } + return result; +} +const joinPaths = function () { + for (var _len = arguments.length, paths = new Array(_len), _key = 0; _key < _len; _key++) { + paths[_key] = arguments[_key]; + } + return [].concat(...paths.map(p => p.split('/'))).filter(Boolean).join('/'); +}; +const matchAgainstConfigs = (remaining, configs) => { + let routes; + let remainingPath = remaining; + + // Go through all configs, and see if the next path segment matches our regex + for (const config of configs) { + if (!config.regex) { + continue; + } + const match = remainingPath.match(config.regex); + + // If our regex matches, we need to extract params from the path + if (match) { + var _config$pattern; + const matchedParams = (_config$pattern = config.pattern) === null || _config$pattern === void 0 ? void 0 : _config$pattern.split('/').filter(p => p.startsWith(':')).reduce((acc, p, i) => Object.assign(acc, { + // The param segments appear every second item starting from 2 in the regex match result + [p]: match[(i + 1) * 2].replace(/\//, '') + }), {}); + routes = config.routeNames.map(name => { + var _config$path; + const config = configs.find(c => c.screen === name); + const params = config === null || config === void 0 ? void 0 : (_config$path = config.path) === null || _config$path === void 0 ? void 0 : _config$path.split('/').filter(p => p.startsWith(':')).reduce((acc, p) => { + const value = matchedParams[p]; + if (value) { + var _config$parse; + const key = p.replace(/^:/, '').replace(/\?$/, ''); + acc[key] = (_config$parse = config.parse) !== null && _config$parse !== void 0 && _config$parse[key] ? config.parse[key](value) : value; + } + return acc; + }, {}); + if (params && Object.keys(params).length) { + return { + name, + params + }; + } + return { + name + }; + }); + remainingPath = remainingPath.replace(match[1], ''); + break; + } + } + return { + routes, + remainingPath + }; +}; +const createNormalizedConfigs = function (screen, routeConfig) { + let routeNames = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; + let initials = arguments.length > 3 ? arguments[3] : undefined; + let parentScreens = arguments.length > 4 ? arguments[4] : undefined; + let parentPattern = arguments.length > 5 ? arguments[5] : undefined; + const configs = []; + routeNames.push(screen); + parentScreens.push(screen); + + // @ts-expect-error: we can't strongly typecheck this for now + const config = routeConfig[screen]; + if (typeof config === 'string') { + // If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern + const pattern = parentPattern ? joinPaths(parentPattern, config) : config; + configs.push(createConfigItem(screen, routeNames, pattern, config)); + } else if (typeof config === 'object') { + let pattern; + + // if an object is specified as the value (e.g. Foo: { ... }), + // it can have `path` property and + // it could have `screens` prop which has nested configs + if (typeof config.path === 'string') { + if (config.exact && config.path === undefined) { + 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: ''`."); + } + pattern = config.exact !== true ? joinPaths(parentPattern || '', config.path || '') : config.path || ''; + configs.push(createConfigItem(screen, routeNames, pattern, config.path, config.parse)); + } + if (config.screens) { + // property `initialRouteName` without `screens` has no purpose + if (config.initialRouteName) { + initials.push({ + initialRouteName: config.initialRouteName, + parentScreens + }); + } + Object.keys(config.screens).forEach(nestedConfig => { + const result = createNormalizedConfigs(nestedConfig, config.screens, routeNames, initials, [...parentScreens], pattern ?? parentPattern); + configs.push(...result); + }); + } + } + routeNames.pop(); + return configs; +}; +const createConfigItem = (screen, routeNames, pattern, path, parse) => { + // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc. + pattern = pattern.split('/').filter(Boolean).join('/'); + const regex = pattern ? new RegExp(`^(${pattern.split('/').map(it => { + if (it.startsWith(':')) { + return `(([^/]+\\/)${it.endsWith('?') ? '?' : ''})`; + } + return `${it === '*' ? '.*' : (0, _escapeStringRegexp.default)(it)}\\/`; + }).join('')})`) : undefined; + return { + screen, + regex, + pattern, + path, + // The routeNames array is mutated, so copy it to keep the current state + routeNames: [...routeNames], + parse + }; +}; +const findParseConfigForRoute = (routeName, flatConfig) => { + for (const config of flatConfig) { + if (routeName === config.routeNames[config.routeNames.length - 1]) { + return config.parse; + } + } + return undefined; +}; + +// Try to find an initial route connected with the one passed +const findInitialRoute = (routeName, parentScreens, initialRoutes) => { + for (const config of initialRoutes) { + if (parentScreens.length === config.parentScreens.length) { + let sameParents = true; + for (let i = 0; i < parentScreens.length; i++) { + if (parentScreens[i].localeCompare(config.parentScreens[i]) !== 0) { + sameParents = false; + break; + } + } + if (sameParents) { + return routeName !== config.initialRouteName ? config.initialRouteName : undefined; + } + } + } + return undefined; +}; + +// returns state object with values depending on whether +// it is the end of state and if there is initialRoute for this level +const createStateObject = (initialRoute, route, isEmpty) => { + if (isEmpty) { + if (initialRoute) { + return { + index: 1, + routes: [{ + name: initialRoute + }, route] + }; + } else { + return { + routes: [route] + }; + } + } else { + if (initialRoute) { + return { + index: 1, + routes: [{ + name: initialRoute + }, { + ...route, + state: { + routes: [] + } + }] + }; + } else { + return { + routes: [{ + ...route, + state: { + routes: [] + } + }] + }; + } + } +}; +const createNestedStateObject = (path, routes, initialRoutes, flatConfig) => { + let state; + let route = routes.shift(); + const parentScreens = []; + let initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes); + parentScreens.push(route.name); + state = createStateObject(initialRoute, route, routes.length === 0); + if (routes.length > 0) { + let nestedState = state; + while (route = routes.shift()) { + initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes); + const nestedStateIndex = nestedState.index || nestedState.routes.length - 1; + nestedState.routes[nestedStateIndex].state = createStateObject(initialRoute, route, routes.length === 0); + if (routes.length > 0) { + nestedState = nestedState.routes[nestedStateIndex].state; + } + parentScreens.push(route.name); + } + } + route = (0, _findFocusedRoute.default)(state); + route.path = path; + const params = parseQueryParams(path, flatConfig ? findParseConfigForRoute(route.name, flatConfig) : undefined); + if (params) { + route.params = { + ...route.params, + ...params + }; + } + return state; +}; +const parseQueryParams = (path, parseConfig) => { + const query = path.split('?')[1]; + const params = queryString.parse(query); + if (parseConfig) { + Object.keys(params).forEach(name => { + if (Object.hasOwnProperty.call(parseConfig, name) && typeof params[name] === 'string') { + params[name] = parseConfig[name](params[name]); + } + }); + } + return Object.keys(params).length ? params : undefined; +}; +//# sourceMappingURL=getStateFromPath.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getStateFromPath.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getStateFromPath.js.map new file mode 100644 index 00000000..e31c9e98 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/getStateFromPath.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getStateFromPath","path","options","validatePathConfig","initialRoutes","initialRouteName","push","parentScreens","screens","remaining","replace","endsWith","undefined","routes","split","filter","Boolean","map","segment","name","decodeURIComponent","length","createNestedStateObject","configs","concat","Object","keys","key","createNormalizedConfigs","sort","a","b","pattern","routeNames","join","localeCompare","startsWith","aParts","bParts","i","Math","max","aWildCard","bWildCard","reduce","acc","config","intersects","every","it","Error","assign","match","find","c","screen","result","current","remainingPath","matchAgainstConfigs","regex","RegExp","source","joinPaths","paths","p","matchedParams","params","value","parse","routeConfig","initials","parentPattern","createConfigItem","exact","forEach","nestedConfig","pop","escape","findParseConfigForRoute","routeName","flatConfig","findInitialRoute","sameParents","createStateObject","initialRoute","route","isEmpty","index","state","shift","nestedState","nestedStateIndex","findFocusedRoute","parseQueryParams","parseConfig","query","queryString","hasOwnProperty","call"],"sourceRoot":"../../src","sources":["getStateFromPath.tsx"],"mappings":";;;;;;AAKA;AACA;AAEA;AAEA;AAAsD;AAAA;AAAA;AAiCtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,gBAAgB,CACtCC,IAAY,EACZC,OAA4B,EACH;EACzB,IAAIA,OAAO,EAAE;IACX,IAAAC,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,CAAC,CAACgD,MAAM,CAAChD,IAAI,CAAC,CAAW;MAC1D;IACF,CAAC,CAAC;EACJ;EAEA,OAAOM,MAAM,CAACC,IAAI,CAACyC,MAAM,CAAC,CAAC9C,MAAM,GAAG8C,MAAM,GAAGvD,SAAS;AACxD,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/index.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/index.js new file mode 100644 index 00000000..d1ea4eb5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/index.js @@ -0,0 +1,233 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _exportNames = { + BaseNavigationContainer: true, + createNavigationContainerRef: true, + createNavigatorFactory: true, + CurrentRenderContext: true, + findFocusedRoute: true, + getActionFromState: true, + getFocusedRouteNameFromRoute: true, + getPathFromState: true, + getStateFromPath: true, + NavigationContainerRefContext: true, + NavigationContext: true, + NavigationHelpersContext: true, + NavigationRouteContext: true, + PreventRemoveContext: true, + PreventRemoveProvider: true, + useFocusEffect: true, + useIsFocused: true, + useNavigation: true, + useNavigationBuilder: true, + useNavigationContainerRef: true, + useNavigationState: true, + UNSTABLE_usePreventRemove: true, + usePreventRemoveContext: true, + useRoute: true, + validatePathConfig: true +}; +Object.defineProperty(exports, "BaseNavigationContainer", { + enumerable: true, + get: function () { + return _BaseNavigationContainer.default; + } +}); +Object.defineProperty(exports, "CurrentRenderContext", { + enumerable: true, + get: function () { + return _CurrentRenderContext.default; + } +}); +Object.defineProperty(exports, "NavigationContainerRefContext", { + enumerable: true, + get: function () { + return _NavigationContainerRefContext.default; + } +}); +Object.defineProperty(exports, "NavigationContext", { + enumerable: true, + get: function () { + return _NavigationContext.default; + } +}); +Object.defineProperty(exports, "NavigationHelpersContext", { + enumerable: true, + get: function () { + return _NavigationHelpersContext.default; + } +}); +Object.defineProperty(exports, "NavigationRouteContext", { + enumerable: true, + get: function () { + return _NavigationRouteContext.default; + } +}); +Object.defineProperty(exports, "PreventRemoveContext", { + enumerable: true, + get: function () { + return _PreventRemoveContext.default; + } +}); +Object.defineProperty(exports, "PreventRemoveProvider", { + enumerable: true, + get: function () { + return _PreventRemoveProvider.default; + } +}); +Object.defineProperty(exports, "UNSTABLE_usePreventRemove", { + enumerable: true, + get: function () { + return _usePreventRemove.default; + } +}); +Object.defineProperty(exports, "createNavigationContainerRef", { + enumerable: true, + get: function () { + return _createNavigationContainerRef.default; + } +}); +Object.defineProperty(exports, "createNavigatorFactory", { + enumerable: true, + get: function () { + return _createNavigatorFactory.default; + } +}); +Object.defineProperty(exports, "findFocusedRoute", { + enumerable: true, + get: function () { + return _findFocusedRoute.default; + } +}); +Object.defineProperty(exports, "getActionFromState", { + enumerable: true, + get: function () { + return _getActionFromState.default; + } +}); +Object.defineProperty(exports, "getFocusedRouteNameFromRoute", { + enumerable: true, + get: function () { + return _getFocusedRouteNameFromRoute.default; + } +}); +Object.defineProperty(exports, "getPathFromState", { + enumerable: true, + get: function () { + return _getPathFromState.default; + } +}); +Object.defineProperty(exports, "getStateFromPath", { + enumerable: true, + get: function () { + return _getStateFromPath.default; + } +}); +Object.defineProperty(exports, "useFocusEffect", { + enumerable: true, + get: function () { + return _useFocusEffect.default; + } +}); +Object.defineProperty(exports, "useIsFocused", { + enumerable: true, + get: function () { + return _useIsFocused.default; + } +}); +Object.defineProperty(exports, "useNavigation", { + enumerable: true, + get: function () { + return _useNavigation.default; + } +}); +Object.defineProperty(exports, "useNavigationBuilder", { + enumerable: true, + get: function () { + return _useNavigationBuilder.default; + } +}); +Object.defineProperty(exports, "useNavigationContainerRef", { + enumerable: true, + get: function () { + return _useNavigationContainerRef.default; + } +}); +Object.defineProperty(exports, "useNavigationState", { + enumerable: true, + get: function () { + return _useNavigationState.default; + } +}); +Object.defineProperty(exports, "usePreventRemoveContext", { + enumerable: true, + get: function () { + return _usePreventRemoveContext.default; + } +}); +Object.defineProperty(exports, "useRoute", { + enumerable: true, + get: function () { + return _useRoute.default; + } +}); +Object.defineProperty(exports, "validatePathConfig", { + enumerable: true, + get: function () { + return _validatePathConfig.default; + } +}); +var _BaseNavigationContainer = _interopRequireDefault(require("./BaseNavigationContainer")); +var _createNavigationContainerRef = _interopRequireDefault(require("./createNavigationContainerRef")); +var _createNavigatorFactory = _interopRequireDefault(require("./createNavigatorFactory")); +var _CurrentRenderContext = _interopRequireDefault(require("./CurrentRenderContext")); +var _findFocusedRoute = _interopRequireDefault(require("./findFocusedRoute")); +var _getActionFromState = _interopRequireDefault(require("./getActionFromState")); +var _getFocusedRouteNameFromRoute = _interopRequireDefault(require("./getFocusedRouteNameFromRoute")); +var _getPathFromState = _interopRequireDefault(require("./getPathFromState")); +var _getStateFromPath = _interopRequireDefault(require("./getStateFromPath")); +var _NavigationContainerRefContext = _interopRequireDefault(require("./NavigationContainerRefContext")); +var _NavigationContext = _interopRequireDefault(require("./NavigationContext")); +var _NavigationHelpersContext = _interopRequireDefault(require("./NavigationHelpersContext")); +var _NavigationRouteContext = _interopRequireDefault(require("./NavigationRouteContext")); +var _PreventRemoveContext = _interopRequireDefault(require("./PreventRemoveContext")); +var _PreventRemoveProvider = _interopRequireDefault(require("./PreventRemoveProvider")); +var _types = require("./types"); +Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _types[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _types[key]; + } + }); +}); +var _useFocusEffect = _interopRequireDefault(require("./useFocusEffect")); +var _useIsFocused = _interopRequireDefault(require("./useIsFocused")); +var _useNavigation = _interopRequireDefault(require("./useNavigation")); +var _useNavigationBuilder = _interopRequireDefault(require("./useNavigationBuilder")); +var _useNavigationContainerRef = _interopRequireDefault(require("./useNavigationContainerRef")); +var _useNavigationState = _interopRequireDefault(require("./useNavigationState")); +var _usePreventRemove = _interopRequireDefault(require("./usePreventRemove")); +var _usePreventRemoveContext = _interopRequireDefault(require("./usePreventRemoveContext")); +var _useRoute = _interopRequireDefault(require("./useRoute")); +var _validatePathConfig = _interopRequireDefault(require("./validatePathConfig")); +var _routers = require("@react-navigation/routers"); +Object.keys(_routers).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _routers[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _routers[key]; + } + }); +}); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/index.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/index.js.map new file mode 100644 index 00000000..f531070c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAA0C"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isArrayEqual.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isArrayEqual.js new file mode 100644 index 00000000..d5e036bf --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isArrayEqual.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isArrayEqual; +/** + * Compare two arrays with primitive values as the content. + * We need to make sure that both values and order match. + */ +function isArrayEqual(a, b) { + if (a === b) { + return true; + } + if (a.length !== b.length) { + return false; + } + return a.every((it, index) => it === b[index]); +} +//# sourceMappingURL=isArrayEqual.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isArrayEqual.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isArrayEqual.js.map new file mode 100644 index 00000000..29e754bb --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isArrayEqual.js.map @@ -0,0 +1 @@ +{"version":3,"names":["isArrayEqual","a","b","length","every","it","index"],"sourceRoot":"../../src","sources":["isArrayEqual.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACe,SAASA,YAAY,CAACC,CAAQ,EAAEC,CAAQ,EAAE;EACvD,IAAID,CAAC,KAAKC,CAAC,EAAE;IACX,OAAO,IAAI;EACb;EAEA,IAAID,CAAC,CAACE,MAAM,KAAKD,CAAC,CAACC,MAAM,EAAE;IACzB,OAAO,KAAK;EACd;EAEA,OAAOF,CAAC,CAACG,KAAK,CAAC,CAACC,EAAE,EAAEC,KAAK,KAAKD,EAAE,KAAKH,CAAC,CAACI,KAAK,CAAC,CAAC;AAChD"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isRecordEqual.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isRecordEqual.js new file mode 100644 index 00000000..aa723a90 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isRecordEqual.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isRecordEqual; +/** + * Compare two records with primitive values as the content. + */ +function isRecordEqual(a, b) { + if (a === b) { + return true; + } + const aKeys = Object.keys(a); + const bKeys = Object.keys(b); + if (aKeys.length !== bKeys.length) { + return false; + } + return aKeys.every(key => a[key] === b[key]); +} +//# sourceMappingURL=isRecordEqual.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isRecordEqual.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isRecordEqual.js.map new file mode 100644 index 00000000..2c77e087 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/isRecordEqual.js.map @@ -0,0 +1 @@ +{"version":3,"names":["isRecordEqual","a","b","aKeys","Object","keys","bKeys","length","every","key"],"sourceRoot":"../../src","sources":["isRecordEqual.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AACe,SAASA,aAAa,CACnCC,CAAsB,EACtBC,CAAsB,EACtB;EACA,IAAID,CAAC,KAAKC,CAAC,EAAE;IACX,OAAO,IAAI;EACb;EAEA,MAAMC,KAAK,GAAGC,MAAM,CAACC,IAAI,CAACJ,CAAC,CAAC;EAC5B,MAAMK,KAAK,GAAGF,MAAM,CAACC,IAAI,CAACH,CAAC,CAAC;EAE5B,IAAIC,KAAK,CAACI,MAAM,KAAKD,KAAK,CAACC,MAAM,EAAE;IACjC,OAAO,KAAK;EACd;EAEA,OAAOJ,KAAK,CAACK,KAAK,CAAEC,GAAG,IAAKR,CAAC,CAACQ,GAAG,CAAC,KAAKP,CAAC,CAACO,GAAG,CAAC,CAAC;AAChD"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/types.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/types.js new file mode 100644 index 00000000..5cc99b6a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/types.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PrivateValueStore = void 0; +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +class PrivateValueStore { + constructor() { + _defineProperty(this, '', void 0); + } +} +exports.PrivateValueStore = PrivateValueStore; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/types.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/types.js.map new file mode 100644 index 00000000..fcc5a0a8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/types.js.map @@ -0,0 +1 @@ +{"version":3,"names":["PrivateValueStore"],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":";;;;;;;;;AAoJO,MAAMA,iBAAiB,CAA4B;EAAA;IAAA,sBAW9C,EAAE;EAAA;AACd;AAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useChildListeners.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useChildListeners.js new file mode 100644 index 00000000..ca8cf89d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useChildListeners.js @@ -0,0 +1,36 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useChildListeners; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Hook which lets child navigators add action listeners. + */ +function useChildListeners() { + const { + current: listeners + } = React.useRef({ + action: [], + focus: [] + }); + const addListener = React.useCallback((type, listener) => { + listeners[type].push(listener); + let removed = false; + return () => { + const index = listeners[type].indexOf(listener); + if (!removed && index > -1) { + removed = true; + listeners[type].splice(index, 1); + } + }; + }, [listeners]); + return { + listeners, + addListener + }; +} +//# sourceMappingURL=useChildListeners.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useChildListeners.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useChildListeners.js.map new file mode 100644 index 00000000..cd4f9d13 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useChildListeners.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useChildListeners","current","listeners","React","useRef","action","focus","addListener","useCallback","type","listener","push","removed","index","indexOf","splice"],"sourceRoot":"../../src","sources":["useChildListeners.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAI/B;AACA;AACA;AACe,SAASA,iBAAiB,GAAG;EAC1C,MAAM;IAAEC,OAAO,EAAEC;EAAU,CAAC,GAAGC,KAAK,CAACC,MAAM,CAExC;IACDC,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE;EACT,CAAC,CAAC;EAEF,MAAMC,WAAW,GAAGJ,KAAK,CAACK,WAAW,CACnC,CAA8BC,IAAO,EAAEC,QAAwB,KAAK;IAClER,SAAS,CAACO,IAAI,CAAC,CAACE,IAAI,CAACD,QAAQ,CAAC;IAE9B,IAAIE,OAAO,GAAG,KAAK;IACnB,OAAO,MAAM;MACX,MAAMC,KAAK,GAAGX,SAAS,CAACO,IAAI,CAAC,CAACK,OAAO,CAACJ,QAAQ,CAAC;MAE/C,IAAI,CAACE,OAAO,IAAIC,KAAK,GAAG,CAAC,CAAC,EAAE;QAC1BD,OAAO,GAAG,IAAI;QACdV,SAAS,CAACO,IAAI,CAAC,CAACM,MAAM,CAACF,KAAK,EAAE,CAAC,CAAC;MAClC;IACF,CAAC;EACH,CAAC,EACD,CAACX,SAAS,CAAC,CACZ;EAED,OAAO;IACLA,SAAS;IACTK;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useComponent.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useComponent.js new file mode 100644 index 00000000..b1091588 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useComponent.js @@ -0,0 +1,40 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useComponent; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const NavigationContent = _ref => { + let { + render, + children + } = _ref; + return render(children); +}; +function useComponent(render) { + const renderRef = React.useRef(render); + + // Normally refs shouldn't be mutated in render + // But we return a component which will be rendered + // So it's just for immediate consumption + renderRef.current = render; + React.useEffect(() => { + renderRef.current = null; + }); + return React.useRef(_ref2 => { + let { + children + } = _ref2; + const render = renderRef.current; + if (render === null) { + throw new Error('The returned component must be rendered in the same render phase as the hook.'); + } + return /*#__PURE__*/React.createElement(NavigationContent, { + render: render + }, children); + }).current; +} +//# sourceMappingURL=useComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useComponent.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useComponent.js.map new file mode 100644 index 00000000..6d0f7d7b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["NavigationContent","render","children","useComponent","renderRef","React","useRef","current","useEffect","Error"],"sourceRoot":"../../src","sources":["useComponent.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAS/B,MAAMA,iBAAiB,GAAG,QAAiC;EAAA,IAAhC;IAAEC,MAAM;IAAEC;EAAgB,CAAC;EACpD,OAAOD,MAAM,CAACC,QAAQ,CAAC;AACzB,CAAC;AAEc,SAASC,YAAY,CAACF,MAAc,EAAE;EACnD,MAAMG,SAAS,GAAGC,KAAK,CAACC,MAAM,CAAgBL,MAAM,CAAC;;EAErD;EACA;EACA;EACAG,SAAS,CAACG,OAAO,GAAGN,MAAM;EAE1BI,KAAK,CAACG,SAAS,CAAC,MAAM;IACpBJ,SAAS,CAACG,OAAO,GAAG,IAAI;EAC1B,CAAC,CAAC;EAEF,OAAOF,KAAK,CAACC,MAAM,CAAC,SAAiD;IAAA,IAAhD;MAAEJ;IAAwC,CAAC;IAC9D,MAAMD,MAAM,GAAGG,SAAS,CAACG,OAAO;IAEhC,IAAIN,MAAM,KAAK,IAAI,EAAE;MACnB,MAAM,IAAIQ,KAAK,CACb,+EAA+E,CAChF;IACH;IAEA,oBAAO,oBAAC,iBAAiB;MAAC,MAAM,EAAER;IAAO,GAAEC,QAAQ,CAAqB;EAC1E,CAAC,CAAC,CAACK,OAAO;AACZ"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useCurrentRender.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useCurrentRender.js new file mode 100644 index 00000000..7e33b649 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useCurrentRender.js @@ -0,0 +1,27 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useCurrentRender; +var React = _interopRequireWildcard(require("react")); +var _CurrentRenderContext = _interopRequireDefault(require("./CurrentRenderContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Write the current options, so that server renderer can get current values + * Mutating values like this is not safe in async mode, but it doesn't apply to SSR + */ +function useCurrentRender(_ref) { + let { + state, + navigation, + descriptors + } = _ref; + const current = React.useContext(_CurrentRenderContext.default); + if (current && navigation.isFocused()) { + current.options = descriptors[state.routes[state.index].key].options; + } +} +//# sourceMappingURL=useCurrentRender.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useCurrentRender.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useCurrentRender.js.map new file mode 100644 index 00000000..24fd39d6 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useCurrentRender.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useCurrentRender","state","navigation","descriptors","current","React","useContext","CurrentRenderContext","isFocused","options","routes","index","key"],"sourceRoot":"../../src","sources":["useCurrentRender.tsx"],"mappings":";;;;;;AACA;AAEA;AAA0D;AAAA;AAAA;AAiB1D;AACA;AACA;AACA;AACe,SAASA,gBAAgB,OAI5B;EAAA,IAJ6B;IACvCC,KAAK;IACLC,UAAU;IACVC;EACO,CAAC;EACR,MAAMC,OAAO,GAAGC,KAAK,CAACC,UAAU,CAACC,6BAAoB,CAAC;EAEtD,IAAIH,OAAO,IAAIF,UAAU,CAACM,SAAS,EAAE,EAAE;IACrCJ,OAAO,CAACK,OAAO,GAAGN,WAAW,CAACF,KAAK,CAACS,MAAM,CAACT,KAAK,CAACU,KAAK,CAAC,CAACC,GAAG,CAAC,CAACH,OAAO;EACtE;AACF"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useDescriptors.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useDescriptors.js new file mode 100644 index 00000000..d756da5a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useDescriptors.js @@ -0,0 +1,132 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useDescriptors; +var React = _interopRequireWildcard(require("react")); +var _NavigationBuilderContext = _interopRequireDefault(require("./NavigationBuilderContext")); +var _NavigationContext = _interopRequireDefault(require("./NavigationContext")); +var _NavigationRouteContext = _interopRequireDefault(require("./NavigationRouteContext")); +var _SceneView = _interopRequireDefault(require("./SceneView")); +var _useNavigationCache = _interopRequireDefault(require("./useNavigationCache")); +var _useRouteCache = _interopRequireDefault(require("./useRouteCache")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Hook to create descriptor objects for the child routes. + * + * A descriptor object provides 3 things: + * - Helper method to render a screen + * - Options specified by the screen for the navigator + * - Navigation object intended for the route + */ +function useDescriptors(_ref) { + let { + state, + screens, + navigation, + screenOptions, + defaultScreenOptions, + onAction, + getState, + setState, + addListener, + addKeyedListener, + onRouteFocus, + router, + emitter + } = _ref; + const [options, setOptions] = React.useState({}); + const { + onDispatchAction, + onOptionsChange, + stackRef + } = React.useContext(_NavigationBuilderContext.default); + const context = React.useMemo(() => ({ + navigation, + onAction, + addListener, + addKeyedListener, + onRouteFocus, + onDispatchAction, + onOptionsChange, + stackRef + }), [navigation, onAction, addListener, addKeyedListener, onRouteFocus, onDispatchAction, onOptionsChange, stackRef]); + const navigations = (0, _useNavigationCache.default)({ + state, + getState, + navigation, + setOptions, + router, + emitter + }); + const routes = (0, _useRouteCache.default)(state.routes); + return routes.reduce((acc, route, i) => { + const config = screens[route.name]; + const screen = config.props; + const navigation = navigations[route.key]; + const optionsList = [ + // The default `screenOptions` passed to the navigator + screenOptions, + // The `screenOptions` props passed to `Group` elements + ...(config.options ? config.options.filter(Boolean) : []), + // The `options` prop passed to `Screen` elements, + screen.options, + // The options set via `navigation.setOptions` + options[route.key]]; + const customOptions = optionsList.reduce((acc, curr) => Object.assign(acc, typeof curr !== 'function' ? curr : curr({ + route, + navigation + })), {}); + const mergedOptions = { + ...(typeof defaultScreenOptions === 'function' ? + // @ts-expect-error: ts gives incorrect error here + defaultScreenOptions({ + route, + navigation, + options: customOptions + }) : defaultScreenOptions), + ...customOptions + }; + const clearOptions = () => setOptions(o => { + if (route.key in o) { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { + [route.key]: _, + ...rest + } = o; + return rest; + } + return o; + }); + acc[route.key] = { + route, + // @ts-expect-error: it's missing action helpers, fix later + navigation, + render() { + return /*#__PURE__*/React.createElement(_NavigationBuilderContext.default.Provider, { + key: route.key, + value: context + }, /*#__PURE__*/React.createElement(_NavigationContext.default.Provider, { + value: navigation + }, /*#__PURE__*/React.createElement(_NavigationRouteContext.default.Provider, { + value: route + }, /*#__PURE__*/React.createElement(_SceneView.default, { + navigation: navigation, + route: route, + screen: screen, + routeState: state.routes[i].state, + getState: getState, + setState: setState, + options: mergedOptions, + clearOptions: clearOptions + })))); + }, + options: mergedOptions + }; + return acc; + }, {}); +} +//# sourceMappingURL=useDescriptors.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useDescriptors.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useDescriptors.js.map new file mode 100644 index 00000000..194260ab --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useDescriptors.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useDescriptors","state","screens","navigation","screenOptions","defaultScreenOptions","onAction","getState","setState","addListener","addKeyedListener","onRouteFocus","router","emitter","options","setOptions","React","useState","onDispatchAction","onOptionsChange","stackRef","useContext","NavigationBuilderContext","context","useMemo","navigations","useNavigationCache","routes","useRouteCache","reduce","acc","route","i","config","name","screen","props","key","optionsList","filter","Boolean","customOptions","curr","Object","assign","mergedOptions","clearOptions","o","_","rest","render"],"sourceRoot":"../../src","sources":["useDescriptors.tsx"],"mappings":";;;;;;AAMA;AAEA;AAIA;AACA;AACA;AAUA;AACA;AAA4C;AAAA;AAAA;AAgD5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,cAAc,OAmBM;EAAA,IAd1C;IACAC,KAAK;IACLC,OAAO;IACPC,UAAU;IACVC,aAAa;IACbC,oBAAoB;IACpBC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,WAAW;IACXC,gBAAgB;IAChBC,YAAY;IACZC,MAAM;IACNC;EACuC,CAAC;EACxC,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAAyB,CAAC,CAAC,CAAC;EACxE,MAAM;IAAEC,gBAAgB;IAAEC,eAAe;IAAEC;EAAS,CAAC,GAAGJ,KAAK,CAACK,UAAU,CACtEC,iCAAwB,CACzB;EAED,MAAMC,OAAO,GAAGP,KAAK,CAACQ,OAAO,CAC3B,OAA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/useEventEmitter.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useEventEmitter.js new file mode 100644 index 00000000..53080dfe --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useEventEmitter.js @@ -0,0 +1,107 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useEventEmitter; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Hook to manage the event system used by the navigator to notify screens of various events. + */ +function useEventEmitter(listen) { + const listenRef = React.useRef(listen); + React.useEffect(() => { + listenRef.current = listen; + }); + const listeners = React.useRef(Object.create(null)); + const create = React.useCallback(target => { + const removeListener = (type, callback) => { + const callbacks = listeners.current[type] ? listeners.current[type][target] : undefined; + if (!callbacks) { + return; + } + const index = callbacks.indexOf(callback); + if (index > -1) { + callbacks.splice(index, 1); + } + }; + const addListener = (type, callback) => { + listeners.current[type] = listeners.current[type] || {}; + listeners.current[type][target] = listeners.current[type][target] || []; + listeners.current[type][target].push(callback); + let removed = false; + return () => { + // Prevent removing other listeners when unsubscribing same listener multiple times + if (!removed) { + removed = true; + removeListener(type, callback); + } + }; + }; + return { + addListener, + removeListener + }; + }, []); + const emit = React.useCallback(_ref => { + var _items$target, _listenRef$current; + let { + type, + data, + target, + canPreventDefault + } = _ref; + const items = listeners.current[type] || {}; + + // Copy the current list of callbacks in case they are mutated during execution + const callbacks = target !== undefined ? (_items$target = items[target]) === null || _items$target === void 0 ? void 0 : _items$target.slice() : [].concat(...Object.keys(items).map(t => items[t])).filter((cb, i, self) => self.lastIndexOf(cb) === i); + const event = { + get type() { + return type; + } + }; + if (target !== undefined) { + Object.defineProperty(event, 'target', { + enumerable: true, + get() { + return target; + } + }); + } + if (data !== undefined) { + Object.defineProperty(event, 'data', { + enumerable: true, + get() { + return data; + } + }); + } + if (canPreventDefault) { + let defaultPrevented = false; + Object.defineProperties(event, { + defaultPrevented: { + enumerable: true, + get() { + return defaultPrevented; + } + }, + preventDefault: { + enumerable: true, + value() { + defaultPrevented = true; + } + } + }); + } + (_listenRef$current = listenRef.current) === null || _listenRef$current === void 0 ? void 0 : _listenRef$current.call(listenRef, event); + callbacks === null || callbacks === void 0 ? void 0 : callbacks.forEach(cb => cb(event)); + return event; + }, []); + return React.useMemo(() => ({ + create, + emit + }), [create, emit]); +} +//# sourceMappingURL=useEventEmitter.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useEventEmitter.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useEventEmitter.js.map new file mode 100644 index 00000000..9c4291d3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useEventEmitter.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useEventEmitter","listen","listenRef","React","useRef","useEffect","current","listeners","Object","create","useCallback","target","removeListener","type","callback","callbacks","undefined","index","indexOf","splice","addListener","push","removed","emit","data","canPreventDefault","items","slice","concat","keys","map","t","filter","cb","i","self","lastIndexOf","event","defineProperty","enumerable","get","defaultPrevented","defineProperties","preventDefault","value","forEach","useMemo"],"sourceRoot":"../../src","sources":["useEventEmitter.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAW/B;AACA;AACA;AACe,SAASA,eAAe,CACrCC,MAAyB,EACE;EAC3B,MAAMC,SAAS,GAAGC,KAAK,CAACC,MAAM,CAACH,MAAM,CAAC;EAEtCE,KAAK,CAACE,SAAS,CAAC,MAAM;IACpBH,SAAS,CAACI,OAAO,GAAGL,MAAM;EAC5B,CAAC,CAAC;EAEF,MAAMM,SAAS,GAAGJ,KAAK,CAACC,MAAM,CAC5BI,MAAM,CAACC,MAAM,CAAC,IAAI,CAAC,CACpB;EAED,MAAMA,MAAM,GAAGN,KAAK,CAACO,WAAW,CAAEC,MAAc,IAAK;IACnD,MAAMC,cAAc,GAAG,CAACC,IAAY,EAAEC,QAA6B,KAAK;MACtE,MAAMC,SAAS,GAAGR,SAAS,CAACD,OAAO,CAACO,IAAI,CAAC,GACrCN,SAAS,CAACD,OAAO,CAACO,IAAI,CAAC,CAACF,MAAM,CAAC,GAC/BK,SAAS;MAEb,IAAI,CAACD,SAAS,EAAE;QACd;MACF;MAEA,MAAME,KAAK,GAAGF,SAAS,CAACG,OAAO,CAACJ,QAAQ,CAAC;MAEzC,IAAIG,KAAK,GAAG,CAAC,CAAC,EAAE;QACdF,SAAS,CAACI,MAAM,CAACF,KAAK,EAAE,CAAC,CAAC;MAC5B;IACF,CAAC;IAED,MAAMG,WAAW,GAAG,CAACP,IAAY,EAAEC,QAA6B,KAAK;MACnEP,SAAS,CAACD,OAAO,CAACO,IAAI,CAAC,GAAGN,SAAS,CAACD,OAAO,CAACO,IAAI,CAAC,IAAI,CAAC,CAAC;MACvDN,SAAS,CAACD,OAAO,CAACO,IAAI,CAAC,CAACF,MAAM,CAAC,GAAGJ,SAAS,CAACD,OAAO,CAACO,IAAI,CAAC,CAACF,MAAM,CAAC,IAAI,EAAE;MACvEJ,SAAS,CAACD,OAAO,CAACO,IAAI,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Ac,CAACD,KAAK,EAAE,MAAM,EAAE;QACnCE,UAAU,EAAE,IAAI;QAChBC,GAAG,GAAG;UACJ,OAAOhB,IAAI;QACb;MACF,CAAC,CAAC;IACJ;IAEA,IAAIC,iBAAiB,EAAE;MACrB,IAAIgB,gBAAgB,GAAG,KAAK;MAE5BjC,MAAM,CAACkC,gBAAgB,CAACL,KAAK,EAAE;QAC7BI,gBAAgB,EAAE;UAChBF,UAAU,EAAE,IAAI;UAChBC,GAAG,GAAG;YACJ,OAAOC,gBAAgB;UACzB;QACF,CAAC;QACDE,cAAc,EAAE;UACdJ,UAAU,EAAE,IAAI;UAChBK,KAAK,GAAG;YACNH,gBAAgB,GAAG,IAAI;UACzB;QACF;MACF,CAAC,CAAC;IACJ;IAEA,sBAAAvC,SAAS,CAACI,OAAO,uDAAjB,wBAAAJ,SAAS,EAAWmC,KAAK,CAAC;IAE1BtB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAE8B,OAAO,CAAEZ,EAAE,IAAKA,EAAE,CAACI,KAAK,CAAC,CAAC;IAErC,OAAOA,KAAK;EACd,CAAC,EACD,EAAE,CACH;EAED,OAAOlC,KAAK,CAAC2C,OAAO,CAAC,OAAO;IAAErC,MAAM;IAAEc;EAAK,CAAC,CAAC,EAAE,CAACd,MAAM,EAAEc,IAAI,CAAC,CAAC;AAChE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEffect.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEffect.js new file mode 100644 index 00000000..c96044b7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEffect.js @@ -0,0 +1,79 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useFocusEffect; +var React = _interopRequireWildcard(require("react")); +var _useNavigation = _interopRequireDefault(require("./useNavigation")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Hook to run an effect in a focused screen, similar to `React.useEffect`. + * This can be used to perform side-effects such as fetching data or subscribing to events. + * The passed callback should be wrapped in `React.useCallback` to avoid running the effect too often. + * + * @param callback Memoized callback containing the effect, should optionally return a cleanup function. + */ +function useFocusEffect(effect) { + const navigation = (0, _useNavigation.default)(); + if (arguments[1] !== undefined) { + const message = "You passed a second argument to 'useFocusEffect', but it only accepts one argument. " + "If you want to pass a dependency array, you can use 'React.useCallback':\n\n" + 'useFocusEffect(\n' + ' React.useCallback(() => {\n' + ' // Your code here\n' + ' }, [depA, depB])\n' + ');\n\n' + 'See usage guide: https://reactnavigation.org/docs/use-focus-effect'; + console.error(message); + } + React.useEffect(() => { + let isFocused = false; + let cleanup; + const callback = () => { + const destroy = effect(); + if (destroy === undefined || typeof destroy === 'function') { + return destroy; + } + if (process.env.NODE_ENV !== 'production') { + let message = 'An effect function must not return anything besides a function, which is used for clean-up.'; + if (destroy === null) { + message += " You returned 'null'. If your effect does not require clean-up, return 'undefined' (or nothing)."; + } else if (typeof destroy.then === 'function') { + message += "\n\nIt looks like you wrote 'useFocusEffect(async () => ...)' or returned a Promise. " + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useFocusEffect(\n' + ' React.useCallback(() => {\n' + ' async function fetchData() {\n' + ' // You can await here\n' + ' const response = await MyAPI.getData(someId);\n' + ' // ...\n' + ' }\n\n' + ' fetchData();\n' + ' }, [someId])\n' + ');\n\n' + 'See usage guide: https://reactnavigation.org/docs/use-focus-effect'; + } else { + message += ` You returned '${JSON.stringify(destroy)}'.`; + } + console.error(message); + } + }; + + // We need to run the effect on intial render/dep changes if the screen is focused + if (navigation.isFocused()) { + cleanup = callback(); + isFocused = true; + } + const unsubscribeFocus = navigation.addListener('focus', () => { + // If callback was already called for focus, avoid calling it again + // The focus event may also fire on intial render, so we guard against runing the effect twice + if (isFocused) { + return; + } + if (cleanup !== undefined) { + cleanup(); + } + cleanup = callback(); + isFocused = true; + }); + const unsubscribeBlur = navigation.addListener('blur', () => { + if (cleanup !== undefined) { + cleanup(); + } + cleanup = undefined; + isFocused = false; + }); + return () => { + if (cleanup !== undefined) { + cleanup(); + } + unsubscribeFocus(); + unsubscribeBlur(); + }; + }, [effect, navigation]); +} +//# sourceMappingURL=useFocusEffect.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEffect.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEffect.js.map new file mode 100644 index 00000000..0463e612 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEffect.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useFocusEffect","effect","navigation","useNavigation","arguments","undefined","message","console","error","React","useEffect","isFocused","cleanup","callback","destroy","process","env","NODE_ENV","then","JSON","stringify","unsubscribeFocus","addListener","unsubscribeBlur"],"sourceRoot":"../../src","sources":["useFocusEffect.tsx"],"mappings":";;;;;;AAAA;AAEA;AAA4C;AAAA;AAAA;AAI5C;AACA;AAC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,SAAS,EAAE,EAAE;MAC1BC,OAAO,GAAGC,QAAQ,EAAE;MACpBF,SAAS,GAAG,IAAI;IAClB;IAEA,MAAMU,gBAAgB,GAAGnB,UAAU,CAACoB,WAAW,CAAC,OAAO,EAAE,MAAM;MAC7D;MACA;MACA,IAAIX,SAAS,EAAE;QACb;MACF;MAEA,IAAIC,OAAO,KAAKP,SAAS,EAAE;QACzBO,OAAO,EAAE;MACX;MAEAA,OAAO,GAAGC,QAAQ,EAAE;MACpBF,SAAS,GAAG,IAAI;IAClB,CAAC,CAAC;IAEF,MAAMY,eAAe,GAAGrB,UAAU,CAACoB,WAAW,CAAC,MAAM,EAAE,MAAM;MAC3D,IAAIV,OAAO,KAAKP,SAAS,EAAE;QACzBO,OAAO,EAAE;MACX;MAEAA,OAAO,GAAGP,SAAS;MACnBM,SAAS,GAAG,KAAK;IACnB,CAAC,CAAC;IAEF,OAAO,MAAM;MACX,IAAIC,OAAO,KAAKP,SAAS,EAAE;QACzBO,OAAO,EAAE;MACX;MAEAS,gBAAgB,EAAE;MAClBE,eAAe,EAAE;IACnB,CAAC;EACH,CAAC,EAAE,CAACtB,MAAM,EAAEC,UAAU,CAAC,CAAC;AAC1B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEvents.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEvents.js new file mode 100644 index 00000000..67606aaa --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEvents.js @@ -0,0 +1,72 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useFocusEvents; +var React = _interopRequireWildcard(require("react")); +var _NavigationContext = _interopRequireDefault(require("./NavigationContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Hook to take care of emitting `focus` and `blur` events. + */ +function useFocusEvents(_ref) { + let { + state, + emitter + } = _ref; + const navigation = React.useContext(_NavigationContext.default); + const lastFocusedKeyRef = React.useRef(); + const currentFocusedKey = state.routes[state.index].key; + + // When the parent screen changes its focus state, we also need to change child's focus + // Coz the child screen can't be focused if the parent screen is out of focus + React.useEffect(() => navigation === null || navigation === void 0 ? void 0 : navigation.addListener('focus', () => { + lastFocusedKeyRef.current = currentFocusedKey; + emitter.emit({ + type: 'focus', + target: currentFocusedKey + }); + }), [currentFocusedKey, emitter, navigation]); + React.useEffect(() => navigation === null || navigation === void 0 ? void 0 : navigation.addListener('blur', () => { + lastFocusedKeyRef.current = undefined; + emitter.emit({ + type: 'blur', + target: currentFocusedKey + }); + }), [currentFocusedKey, emitter, navigation]); + React.useEffect(() => { + const lastFocusedKey = lastFocusedKeyRef.current; + lastFocusedKeyRef.current = currentFocusedKey; + + // We wouldn't have `lastFocusedKey` on initial mount + // Fire focus event for the current route on mount if there's no parent navigator + if (lastFocusedKey === undefined && !navigation) { + emitter.emit({ + type: 'focus', + target: currentFocusedKey + }); + } + + // We should only emit events when the focused key changed and navigator is focused + // When navigator is not focused, screens inside shouldn't receive focused status either + if (lastFocusedKey === currentFocusedKey || !(navigation ? navigation.isFocused() : true)) { + return; + } + if (lastFocusedKey === undefined) { + // Only fire events after initial mount + return; + } + emitter.emit({ + type: 'blur', + target: lastFocusedKey + }); + emitter.emit({ + type: 'focus', + target: currentFocusedKey + }); + }, [currentFocusedKey, emitter, navigation]); +} +//# sourceMappingURL=useFocusEvents.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEvents.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEvents.js.map new file mode 100644 index 00000000..2caf6e70 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusEvents.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useFocusEvents","state","emitter","navigation","React","useContext","NavigationContext","lastFocusedKeyRef","useRef","currentFocusedKey","routes","index","key","useEffect","addListener","current","emit","type","target","undefined","lastFocusedKey","isFocused"],"sourceRoot":"../../src","sources":["useFocusEvents.tsx"],"mappings":";;;;;;AACA;AAEA;AAAoD;AAAA;AAAA;AASpD;AACA;AACA;AACe,SAASA,cAAc,OAGnB;EAAA,IAHmD;IACpEC,KAAK;IACLC;EACc,CAAC;EACf,MAAMC,UAAU,GAAGC,KAAK,CAACC,UAAU,CAACC,0BAAiB,CAAC;EACtD,MAAMC,iBAAiB,GAAGH,KAAK,CAACI,MAAM,EAAsB;EAE5D,MAAMC,iBAAiB,GAAGR,KAAK,CAACS,MAAM,CAACT,KAAK,CAACU,KAAK,CAAC,CAACC,GAAG;;EAEvD;EACA;EACAR,KAAK,CAACS,SAAS,CACb,MACEV,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEW,WAAW,CAAC,OAAO,EAAE,MAAM;IACrCP,iBAAiB,CAACQ,OAAO,GAAGN,iBAAiB;IAC7CP,OAAO,CAACc,IAAI,CAAC;MAAEC,IAAI,EAAE,OAAO;MAAEC,MAAM,EAAET;IAA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s/useFocusedListenersChildrenAdapter.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusedListenersChildrenAdapter.js new file mode 100644 index 00000000..108c45a7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusedListenersChildrenAdapter.js @@ -0,0 +1,50 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useFocusedListenersChildrenAdapter; +var React = _interopRequireWildcard(require("react")); +var _NavigationBuilderContext = _interopRequireDefault(require("./NavigationBuilderContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Hook for passing focus callback to children + */ +function useFocusedListenersChildrenAdapter(_ref) { + let { + navigation, + focusedListeners + } = _ref; + const { + addListener + } = React.useContext(_NavigationBuilderContext.default); + const listener = React.useCallback(callback => { + if (navigation.isFocused()) { + for (const listener of focusedListeners) { + const { + handled, + result + } = listener(callback); + if (handled) { + return { + handled, + result + }; + } + } + return { + handled: true, + result: callback(navigation) + }; + } else { + return { + handled: false, + result: null + }; + } + }, [focusedListeners, navigation]); + React.useEffect(() => addListener === null || addListener === void 0 ? void 0 : addListener('focus', listener), [addListener, listener]); +} +//# sourceMappingURL=useFocusedListenersChildrenAdapter.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusedListenersChildrenAdapter.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusedListenersChildrenAdapter.js.map new file mode 100644 index 00000000..46dedc56 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useFocusedListenersChildrenAdapter.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useFocusedListenersChildrenAdapter","navigation","focusedListeners","addListener","React","useContext","NavigationBuilderContext","listener","useCallback","callback","isFocused","handled","result","useEffect"],"sourceRoot":"../../src","sources":["useFocusedListenersChildrenAdapter.tsx"],"mappings":";;;;;;AACA;AAEA;AAGoC;AAAA;AAAA;AAQpC;AACA;AACA;AACe,SAASA,kCAAkC,OAG9C;EAAA,IAH+C;IACzDC,UAAU;IACVC;EACO,CAAC;EACR,MAAM;IAAEC;EAAY,CAAC,GAAGC,KAAK,CAACC,UAAU,CAACC,iCAAwB,CAAC;EAElE,MAAMC,QAAQ,GAAGH,KAAK,CAACI,WAAW,CAC/BC,QAAwC,IAAK;IAC5C,IAAIR,UAAU,CAACS,SAAS,EAAE,EAAE;MAC1B,KAAK,MAAMH,QAAQ,IAAIL,gBAAgB,EAAE;QACvC,MAAM;UAAES,OAAO;UAAEC;QAAO,CAAC,GAAGL,QAAQ,CAACE,QAAQ,CAAC;QAE9C,IAAIE,OAAO,EAAE;UACX,OAAO;YAAEA,OAAO;YAAEC;UAAO,CAAC;QAC5B;MACF;MAEA,OAAO;QAAED,OAAO,EAAE,IAAI;QAAEC,MAAM,EAAEH,QAAQ,CAACR,UAAU;MAAE,CAAC;IACxD,CAAC,MAAM;MACL,OAAO;QAAEU,OAAO,EAAE,KAAK;QAAEC,MAAM,EAAE;MAAK,CAAC;IACzC;EACF,CAAC,EACD,CAACV,gBAAgB,EAAED,UAAU,CAAC,CAC/B;EAEDG,KAAK,CAACS,SAAS,CACb,MAAMV,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAG,OAAO,EAAEI,QAAQ,CAAC,EACtC,CAACJ,WAAW,EAAEI,QAAQ,CAAC,CACxB;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useIsFocused.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useIsFocused.js new file mode 100644 index 00000000..33536bd4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useIsFocused.js @@ -0,0 +1,39 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useIsFocused; +var React = _interopRequireWildcard(require("react")); +var _useNavigation = _interopRequireDefault(require("./useNavigation")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Hook to get the current focus state of the screen. Returns a `true` if screen is focused, otherwise `false`. + * This can be used if a component needs to render something based on the focus state. + */ +function useIsFocused() { + const navigation = (0, _useNavigation.default)(); + const [isFocused, setIsFocused] = (0, React.useState)(navigation.isFocused); + const valueToReturn = navigation.isFocused(); + if (isFocused !== valueToReturn) { + // If the value has changed since the last render, we need to update it. + // This could happen if we missed an update from the event listeners during re-render. + // React will process this update immediately, so the old subscription value won't be committed. + // It is still nice to avoid returning a mismatched value though, so let's override the return value. + // This is the same logic as in https://github.com/facebook/react/tree/master/packages/use-subscription + setIsFocused(valueToReturn); + } + React.useEffect(() => { + const unsubscribeFocus = navigation.addListener('focus', () => setIsFocused(true)); + const unsubscribeBlur = navigation.addListener('blur', () => setIsFocused(false)); + return () => { + unsubscribeFocus(); + unsubscribeBlur(); + }; + }, [navigation]); + React.useDebugValue(valueToReturn); + return valueToReturn; +} +//# sourceMappingURL=useIsFocused.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useIsFocused.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useIsFocused.js.map new file mode 100644 index 00000000..eab0c76d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useIsFocused.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useIsFocused","navigation","useNavigation","isFocused","setIsFocused","useState","valueToReturn","React","useEffect","unsubscribeFocus","addListener","unsubscribeBlur","useDebugValue"],"sourceRoot":"../../src","sources":["useIsFocused.tsx"],"mappings":";;;;;;AAAA;AAGA;AAA4C;AAAA;AAAA;AAE5C;AACA;AACA;AACA;AACe,SAASA,YAAY,GAAY;EAC9C,MAAMC,UAAU,GAAG,IAAAC,sBAAa,GAAE;EAClC,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAG,IAAAC,cAAQ,EAACJ,UAAU,CAACE,SAAS,CAAC;EAEhE,MAAMG,aAAa,GAAGL,UAAU,CAACE,SAAS,EAAE;EAE5C,IAAIA,SAAS,KAAKG,aAAa,EAAE;IAC/B;IACA;IACA;IACA;IACA;IACAF,YAAY,CAACE,aAAa,CAAC;EAC7B;EAEAC,KAAK,CAACC,SAAS,CAAC,MAAM;IACpB,MAAMC,gBAAgB,GAAGR,UAAU,CAACS,WAAW,CAAC,OAAO,EAAE,MACvDN,YAAY,CAAC,IAAI,CAAC,CACnB;IAED,MAAMO,eAAe,GAAGV,UAAU,CAACS,WAAW,CAAC,MAAM,EAAE,MACrDN,YAAY,CAAC,KAAK,CAAC,CACpB;IAED,OAAO,MAAM;MACXK,gBAAgB,EAAE;MAClBE,eAAe,EAAE;IACnB,CAAC;EACH,CAAC,EAAE,CAACV,UAAU,CAAC,CAAC;EAEhBM,KAAK,CAACK,aAAa,CAACN,aAAa,CAAC;EAElC,OAAOA,aAAa;AACtB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useKeyedChildListeners.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useKeyedChildListeners.js new file mode 100644 index 00000000..793332ea --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useKeyedChildListeners.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useKeyedChildListeners; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Hook which lets child navigators add getters to be called for obtaining rehydrated state. + */ +function useKeyedChildListeners() { + const { + current: keyedListeners + } = React.useRef(Object.assign(Object.create(null), { + getState: {}, + beforeRemove: {} + })); + const addKeyedListener = React.useCallback((type, key, listener) => { + // @ts-expect-error: according to ref stated above you can use `key` to index type + keyedListeners[type][key] = listener; + return () => { + // @ts-expect-error: according to ref stated above you can use `key` to index type + keyedListeners[type][key] = undefined; + }; + }, [keyedListeners]); + return { + keyedListeners, + addKeyedListener + }; +} +//# sourceMappingURL=useKeyedChildListeners.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useKeyedChildListeners.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useKeyedChildListeners.js.map new file mode 100644 index 00000000..0fac73b3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useKeyedChildListeners.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useKeyedChildListeners","current","keyedListeners","React","useRef","Object","assign","create","getState","beforeRemove","addKeyedListener","useCallback","type","key","listener","undefined"],"sourceRoot":"../../src","sources":["useKeyedChildListeners.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAI/B;AACA;AACA;AACe,SAASA,sBAAsB,GAAG;EAC/C,MAAM;IAAEC,OAAO,EAAEC;EAAe,CAAC,GAAGC,KAAK,CAACC,MAAM,CAM9CC,MAAM,CAACC,MAAM,CAACD,MAAM,CAACE,MAAM,CAAC,IAAI,CAAC,EAAE;IACjCC,QAAQ,EAAE,CAAC,CAAC;IACZC,YAAY,EAAE,CAAC;EACjB,CAAC,CAAC,CACH;EAED,MAAMC,gBAAgB,GAAGP,KAAK,CAACQ,WAAW,CACxC,CACEC,IAAO,EACPC,GAAW,EACXC,QAA6B,KAC1B;IACH;IACAZ,cAAc,CAACU,IAAI,CAAC,CAACC,GAAG,CAAC,GAAGC,QAAQ;IAEpC,OAAO,MAAM;MACX;MACAZ,cAAc,CAACU,IAAI,CAAC,CAACC,GAAG,CAAC,GAAGE,SAAS;IACvC,CAAC;EACH,CAAC,EACD,CAACb,cAAc,CAAC,CACjB;EAED,OAAO;IACLA,cAAc;IACdQ;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigation.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigation.js new file mode 100644 index 00000000..cea1f6af --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigation.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useNavigation; +var React = _interopRequireWildcard(require("react")); +var _NavigationContainerRefContext = _interopRequireDefault(require("./NavigationContainerRefContext")); +var _NavigationContext = _interopRequireDefault(require("./NavigationContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Hook to access the navigation prop of the parent screen anywhere. + * + * @returns Navigation prop of the parent screen. + */ +function useNavigation() { + const root = React.useContext(_NavigationContainerRefContext.default); + const navigation = React.useContext(_NavigationContext.default); + if (navigation === undefined && root === undefined) { + throw new Error("Couldn't find a navigation object. Is your component inside NavigationContainer?"); + } + + // FIXME: Figure out a better way to do this + return navigation ?? root; +} +//# sourceMappingURL=useNavigation.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigation.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigation.js.map new file mode 100644 index 00000000..c7439d40 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigation.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useNavigation","root","React","useContext","NavigationContainerRefContext","navigation","NavigationContext","undefined","Error"],"sourceRoot":"../../src","sources":["useNavigation.tsx"],"mappings":";;;;;;AAAA;AAEA;AACA;AAAoD;AAAA;AAAA;AAGpD;AACA;AACA;AACA;AACA;AACe,SAASA,aAAa,GAE9B;EACL,MAAMC,IAAI,GAAGC,KAAK,CAACC,UAAU,CAACC,sCAA6B,CAAC;EAC5D,MAAMC,UAAU,GAAGH,KAAK,CAACC,UAAU,CAACG,0BAAiB,CAAC;EAEtD,IAAID,UAAU,KAAKE,SAAS,IAAIN,IAAI,KAAKM,SAAS,EAAE;IAClD,MAAM,IAAIC,KAAK,CACb,kFAAkF,CACnF;EACH;;EAEA;EACA,OAAQH,UAAU,IAAIJ,IAAI;AAC5B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js new file mode 100644 index 00000000..524ea0b0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js @@ -0,0 +1,457 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useNavigationBuilder; +var _routers = require("@react-navigation/routers"); +var React = _interopRequireWildcard(require("react")); +var _reactIs = require("react-is"); +var _Group = _interopRequireDefault(require("./Group")); +var _isArrayEqual = _interopRequireDefault(require("./isArrayEqual")); +var _isRecordEqual = _interopRequireDefault(require("./isRecordEqual")); +var _NavigationHelpersContext = _interopRequireDefault(require("./NavigationHelpersContext")); +var _NavigationRouteContext = _interopRequireDefault(require("./NavigationRouteContext")); +var _NavigationStateContext = _interopRequireDefault(require("./NavigationStateContext")); +var _PreventRemoveProvider = _interopRequireDefault(require("./PreventRemoveProvider")); +var _Screen = _interopRequireDefault(require("./Screen")); +var _types = require("./types"); +var _useChildListeners = _interopRequireDefault(require("./useChildListeners")); +var _useComponent = _interopRequireDefault(require("./useComponent")); +var _useCurrentRender = _interopRequireDefault(require("./useCurrentRender")); +var _useDescriptors = _interopRequireDefault(require("./useDescriptors")); +var _useEventEmitter = _interopRequireDefault(require("./useEventEmitter")); +var _useFocusedListenersChildrenAdapter = _interopRequireDefault(require("./useFocusedListenersChildrenAdapter")); +var _useFocusEvents = _interopRequireDefault(require("./useFocusEvents")); +var _useKeyedChildListeners = _interopRequireDefault(require("./useKeyedChildListeners")); +var _useNavigationHelpers = _interopRequireDefault(require("./useNavigationHelpers")); +var _useOnAction = _interopRequireDefault(require("./useOnAction")); +var _useOnGetState = _interopRequireDefault(require("./useOnGetState")); +var _useOnRouteFocus = _interopRequireDefault(require("./useOnRouteFocus")); +var _useRegisterNavigator = _interopRequireDefault(require("./useRegisterNavigator")); +var _useScheduleUpdate = _interopRequireDefault(require("./useScheduleUpdate")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +// This is to make TypeScript compiler happy +// eslint-disable-next-line babel/no-unused-expressions +_types.PrivateValueStore; +const isValidKey = key => key === undefined || typeof key === 'string' && key !== ''; + +/** + * Extract route config object from React children elements. + * + * @param children React Elements to extract the config from. + */ +const getRouteConfigsFromChildren = (children, groupKey, groupOptions) => { + const configs = React.Children.toArray(children).reduce((acc, child) => { + var _child$type, _child$props; + if ( /*#__PURE__*/React.isValidElement(child)) { + if (child.type === _Screen.default) { + // We can only extract the config from `Screen` elements + // If something else was rendered, it's probably a bug + + if (!isValidKey(child.props.navigationKey)) { + throw new Error(`Got an invalid 'navigationKey' prop (${JSON.stringify(child.props.navigationKey)}) for the screen '${child.props.name}'. It must be a non-empty string or 'undefined'.`); + } + acc.push({ + keys: [groupKey, child.props.navigationKey], + options: groupOptions, + props: child.props + }); + return acc; + } + if (child.type === React.Fragment || child.type === _Group.default) { + if (!isValidKey(child.props.navigationKey)) { + throw new Error(`Got an invalid 'navigationKey' prop (${JSON.stringify(child.props.navigationKey)}) for the group. It must be a non-empty string or 'undefined'.`); + } + + // When we encounter a fragment or group, we need to dive into its children to extract the configs + // This is handy to conditionally define a group of screens + acc.push(...getRouteConfigsFromChildren(child.props.children, child.props.navigationKey, child.type !== _Group.default ? groupOptions : groupOptions != null ? [...groupOptions, child.props.screenOptions] : [child.props.screenOptions])); + return acc; + } + } + throw new Error(`A navigator can only contain 'Screen', 'Group' or 'React.Fragment' as its direct children (found ${/*#__PURE__*/React.isValidElement(child) ? `'${typeof child.type === 'string' ? child.type : (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.name}'${(_child$props = child.props) !== null && _child$props !== void 0 && _child$props.name ? ` for the screen '${child.props.name}'` : ''}` : typeof child === 'object' ? JSON.stringify(child) : `'${String(child)}'`}). To render this component in the navigator, pass it in the 'component' prop to 'Screen'.`); + }, []); + if (process.env.NODE_ENV !== 'production') { + configs.forEach(config => { + const { + name, + children, + component, + getComponent + } = config.props; + if (typeof name !== 'string' || !name) { + throw new Error(`Got an invalid name (${JSON.stringify(name)}) for the screen. It must be a non-empty string.`); + } + if (children != null || component !== undefined || getComponent !== undefined) { + if (children != null && component !== undefined) { + throw new Error(`Got both 'component' and 'children' props for the screen '${name}'. You must pass only one of them.`); + } + if (children != null && getComponent !== undefined) { + throw new Error(`Got both 'getComponent' and 'children' props for the screen '${name}'. You must pass only one of them.`); + } + if (component !== undefined && getComponent !== undefined) { + throw new Error(`Got both 'component' and 'getComponent' props for the screen '${name}'. You must pass only one of them.`); + } + if (children != null && typeof children !== 'function') { + throw new Error(`Got an invalid value for 'children' prop for the screen '${name}'. It must be a function returning a React Element.`); + } + if (component !== undefined && !(0, _reactIs.isValidElementType)(component)) { + throw new Error(`Got an invalid value for 'component' prop for the screen '${name}'. It must be a valid React Component.`); + } + if (getComponent !== undefined && typeof getComponent !== 'function') { + throw new Error(`Got an invalid value for 'getComponent' prop for the screen '${name}'. It must be a function returning a React Component.`); + } + if (typeof component === 'function') { + if (component.name === 'component') { + // Inline anonymous functions passed in the `component` prop will have the name of the prop + // It's relatively safe to assume that it's not a component since it should also have PascalCase name + // We won't catch all scenarios here, but this should catch a good chunk of incorrect use. + console.warn(`Looks like you're passing an inline function for 'component' prop for the screen '${name}' (e.g. component={() => }). Passing an inline function will cause the component state to be lost on re-render and cause perf issues since it's re-created every render. You can pass the function as children to 'Screen' instead to achieve the desired behaviour.`); + } else if (/^[a-z]/.test(component.name)) { + console.warn(`Got a component with the name '${component.name}' for the screen '${name}'. React Components must start with an uppercase letter. If you're passing a regular function and not a component, pass it as children to 'Screen' instead. Otherwise capitalize your component's name.`); + } + } + } else { + throw new Error(`Couldn't find a 'component', 'getComponent' or 'children' prop for the screen '${name}'. This can happen if you passed 'undefined'. You likely forgot to export your component from the file it's defined in, or mixed up default import and named import when importing.`); + } + }); + } + return configs; +}; + +/** + * Hook for building navigators. + * + * @param createRouter Factory method which returns router object. + * @param options Options object containing `children` and additional options for the router. + * @returns An object containing `state`, `navigation`, `descriptors` objects. + */ +function useNavigationBuilder(createRouter, options) { + const navigatorKey = (0, _useRegisterNavigator.default)(); + const route = React.useContext(_NavigationRouteContext.default); + const { + children, + screenListeners, + ...rest + } = options; + const { + current: router + } = React.useRef(createRouter({ + ...rest, + ...(route !== null && route !== void 0 && route.params && route.params.state == null && route.params.initial !== false && typeof route.params.screen === 'string' ? { + initialRouteName: route.params.screen + } : null) + })); + const routeConfigs = getRouteConfigsFromChildren(children); + const screens = routeConfigs.reduce((acc, config) => { + if (config.props.name in acc) { + throw new Error(`A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '${config.props.name}')`); + } + acc[config.props.name] = config; + return acc; + }, {}); + const routeNames = routeConfigs.map(config => config.props.name); + const routeKeyList = routeNames.reduce((acc, curr) => { + acc[curr] = screens[curr].keys.map(key => key ?? '').join(':'); + return acc; + }, {}); + const routeParamList = routeNames.reduce((acc, curr) => { + const { + initialParams + } = screens[curr].props; + acc[curr] = initialParams; + return acc; + }, {}); + const routeGetIdList = routeNames.reduce((acc, curr) => Object.assign(acc, { + [curr]: screens[curr].props.getId + }), {}); + if (!routeNames.length) { + throw new Error("Couldn't find any screens for the navigator. Have you defined any screens as its children?"); + } + const isStateValid = React.useCallback(state => state.type === undefined || state.type === router.type, [router.type]); + const isStateInitialized = React.useCallback(state => state !== undefined && state.stale === false && isStateValid(state), [isStateValid]); + const { + state: currentState, + getState: getCurrentState, + setState: setCurrentState, + setKey, + getKey, + getIsInitial + } = React.useContext(_NavigationStateContext.default); + const stateCleanedUp = React.useRef(false); + const cleanUpState = React.useCallback(() => { + setCurrentState(undefined); + stateCleanedUp.current = true; + }, [setCurrentState]); + const setState = React.useCallback(state => { + if (stateCleanedUp.current) { + // State might have been already cleaned up due to unmount + // We do not want to expose API allowing to override this + // This would lead to old data preservation on main navigator unmount + return; + } + setCurrentState(state); + }, [setCurrentState]); + const [initializedState, isFirstStateInitialization] = React.useMemo(() => { + var _route$params4; + const initialRouteParamList = routeNames.reduce((acc, curr) => { + var _route$params, _route$params2, _route$params3; + const { + initialParams + } = screens[curr].props; + const initialParamsFromParams = (route === null || route === void 0 ? void 0 : (_route$params = route.params) === null || _route$params === void 0 ? void 0 : _route$params.state) == null && (route === null || route === void 0 ? void 0 : (_route$params2 = route.params) === null || _route$params2 === void 0 ? void 0 : _route$params2.initial) !== false && (route === null || route === void 0 ? void 0 : (_route$params3 = route.params) === null || _route$params3 === void 0 ? void 0 : _route$params3.screen) === curr ? route.params.params : undefined; + acc[curr] = initialParams !== undefined || initialParamsFromParams !== undefined ? { + ...initialParams, + ...initialParamsFromParams + } : undefined; + return acc; + }, {}); + + // If the current state isn't initialized on first render, we initialize it + // We also need to re-initialize it if the state passed from parent was changed (maybe due to reset) + // Otherwise assume that the state was provided as initial state + // So we need to rehydrate it to make it usable + if ((currentState === undefined || !isStateValid(currentState)) && (route === null || route === void 0 ? void 0 : (_route$params4 = route.params) === null || _route$params4 === void 0 ? void 0 : _route$params4.state) == null) { + return [router.getInitialState({ + routeNames, + routeParamList: initialRouteParamList, + routeGetIdList + }), true]; + } else { + var _route$params5; + return [router.getRehydratedState((route === null || route === void 0 ? void 0 : (_route$params5 = route.params) === null || _route$params5 === void 0 ? void 0 : _route$params5.state) ?? currentState, { + routeNames, + routeParamList: initialRouteParamList, + routeGetIdList + }), false]; + } + // We explicitly don't include routeNames, route.params etc. in the dep list + // below. We want to avoid forcing a new state to be calculated in those cases + // Instead, we handle changes to these in the nextState code below. Note + // that some changes to routeConfigs are explicitly ignored, such as changes + // to initialParams + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [currentState, router, isStateValid]); + const previousRouteKeyListRef = React.useRef(routeKeyList); + React.useEffect(() => { + previousRouteKeyListRef.current = routeKeyList; + }); + const previousRouteKeyList = previousRouteKeyListRef.current; + let state = + // If the state isn't initialized, or stale, use the state we initialized instead + // The state won't update until there's a change needed in the state we have initalized locally + // So it'll be `undefined` or stale until the first navigation event happens + isStateInitialized(currentState) ? currentState : initializedState; + let nextState = state; + if (!(0, _isArrayEqual.default)(state.routeNames, routeNames) || !(0, _isRecordEqual.default)(routeKeyList, previousRouteKeyList)) { + // When the list of route names change, the router should handle it to remove invalid routes + nextState = router.getStateForRouteNamesChange(state, { + routeNames, + routeParamList, + routeGetIdList, + routeKeyChanges: Object.keys(routeKeyList).filter(name => previousRouteKeyList.hasOwnProperty(name) && routeKeyList[name] !== previousRouteKeyList[name]) + }); + } + const previousNestedParamsRef = React.useRef(route === null || route === void 0 ? void 0 : route.params); + React.useEffect(() => { + previousNestedParamsRef.current = route === null || route === void 0 ? void 0 : route.params; + }, [route === null || route === void 0 ? void 0 : route.params]); + if (route !== null && route !== void 0 && route.params) { + const previousParams = previousNestedParamsRef.current; + let action; + if (typeof route.params.state === 'object' && route.params.state != null && route.params !== previousParams) { + // If the route was updated with new state, we should reset to it + action = _routers.CommonActions.reset(route.params.state); + } else if (typeof route.params.screen === 'string' && (route.params.initial === false && isFirstStateInitialization || route.params !== previousParams)) { + // If the route was updated with new screen name and/or params, we should navigate there + action = _routers.CommonActions.navigate({ + name: route.params.screen, + params: route.params.params, + path: route.params.path + }); + } + + // The update should be limited to current navigator only, so we call the router manually + const updatedState = action ? router.getStateForAction(nextState, action, { + routeNames, + routeParamList, + routeGetIdList + }) : null; + nextState = updatedState !== null ? router.getRehydratedState(updatedState, { + routeNames, + routeParamList, + routeGetIdList + }) : nextState; + } + const shouldUpdate = state !== nextState; + (0, _useScheduleUpdate.default)(() => { + if (shouldUpdate) { + // If the state needs to be updated, we'll schedule an update + setState(nextState); + } + }); + + // The up-to-date state will come in next render, but we don't need to wait for it + // We can't use the outdated state since the screens have changed, which will cause error due to mismatched config + // So we override the state object we return to use the latest state as soon as possible + state = nextState; + React.useEffect(() => { + setKey(navigatorKey); + if (!getIsInitial()) { + // If it's not initial render, we need to update the state + // This will make sure that our container gets notifier of state changes due to new mounts + // This is necessary for proper screen tracking, URL updates etc. + setState(nextState); + } + return () => { + // We need to clean up state for this navigator on unmount + // We do it in a timeout because we need to detect if another navigator mounted in the meantime + // For example, if another navigator has started rendering, we should skip cleanup + // Otherwise, our cleanup step will cleanup state for the other navigator and re-initialize it + setTimeout(() => { + if (getCurrentState() !== undefined && getKey() === navigatorKey) { + cleanUpState(); + } + }, 0); + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + // We initialize this ref here to avoid a new getState getting initialized + // whenever initializedState changes. We want getState to have access to the + // latest initializedState, but don't need it to change when that happens + const initializedStateRef = React.useRef(); + initializedStateRef.current = initializedState; + const getState = React.useCallback(() => { + const currentState = getCurrentState(); + return isStateInitialized(currentState) ? currentState : initializedStateRef.current; + }, [getCurrentState, isStateInitialized]); + const emitter = (0, _useEventEmitter.default)(e => { + let routeNames = []; + let route; + if (e.target) { + var _route; + route = state.routes.find(route => route.key === e.target); + if ((_route = route) !== null && _route !== void 0 && _route.name) { + routeNames.push(route.name); + } + } else { + route = state.routes[state.index]; + routeNames.push(...Object.keys(screens).filter(name => { + var _route2; + return ((_route2 = route) === null || _route2 === void 0 ? void 0 : _route2.name) === name; + })); + } + if (route == null) { + return; + } + const navigation = descriptors[route.key].navigation; + const listeners = [].concat( + // Get an array of listeners for all screens + common listeners on navigator + ...[screenListeners, ...routeNames.map(name => { + const { + listeners + } = screens[name].props; + return listeners; + })].map(listeners => { + const map = typeof listeners === 'function' ? listeners({ + route: route, + navigation + }) : listeners; + return map ? Object.keys(map).filter(type => type === e.type).map(type => map === null || map === void 0 ? void 0 : map[type]) : undefined; + })) + // We don't want same listener to be called multiple times for same event + // So we remove any duplicate functions from the array + .filter((cb, i, self) => cb && self.lastIndexOf(cb) === i); + listeners.forEach(listener => listener === null || listener === void 0 ? void 0 : listener(e)); + }); + (0, _useFocusEvents.default)({ + state, + emitter + }); + React.useEffect(() => { + emitter.emit({ + type: 'state', + data: { + state + } + }); + }, [emitter, state]); + const { + listeners: childListeners, + addListener + } = (0, _useChildListeners.default)(); + const { + keyedListeners, + addKeyedListener + } = (0, _useKeyedChildListeners.default)(); + const onAction = (0, _useOnAction.default)({ + router, + getState, + setState, + key: route === null || route === void 0 ? void 0 : route.key, + actionListeners: childListeners.action, + beforeRemoveListeners: keyedListeners.beforeRemove, + routerConfigOptions: { + routeNames, + routeParamList, + routeGetIdList + }, + emitter + }); + const onRouteFocus = (0, _useOnRouteFocus.default)({ + router, + key: route === null || route === void 0 ? void 0 : route.key, + getState, + setState + }); + const navigation = (0, _useNavigationHelpers.default)({ + id: options.id, + onAction, + getState, + emitter, + router + }); + (0, _useFocusedListenersChildrenAdapter.default)({ + navigation, + focusedListeners: childListeners.focus + }); + (0, _useOnGetState.default)({ + getState, + getStateListeners: keyedListeners.getState + }); + const descriptors = (0, _useDescriptors.default)({ + state, + screens, + navigation, + screenOptions: options.screenOptions, + defaultScreenOptions: options.defaultScreenOptions, + onAction, + getState, + setState, + onRouteFocus, + addListener, + addKeyedListener, + router, + // @ts-expect-error: this should have both core and custom events, but too much work right now + emitter + }); + (0, _useCurrentRender.default)({ + state, + navigation, + descriptors + }); + const NavigationContent = (0, _useComponent.default)(children => /*#__PURE__*/React.createElement(_NavigationHelpersContext.default.Provider, { + value: navigation + }, /*#__PURE__*/React.createElement(_PreventRemoveProvider.default, null, children))); + return { + state, + navigation, + descriptors, + NavigationContent + }; +} +//# sourceMappingURL=useNavigationBuilder.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js.map new file mode 100644 index 00000000..44726e57 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js.map @@ -0,0 +1 @@ +{"version":3,"names":["PrivateValueStore","isValidKey","key","undefined","getRouteConfigsFromChildren","children","groupKey","groupOptions","configs","React","Children","toArray","reduce","acc","child","isValidElement","type","Screen","props","navigationKey","Error","JSON","stringify","name","push","keys","options","Fragment","Group","screenOptions","String","process","env","NODE_ENV","forEach","config","component","getComponent","isValidElementType","console","warn","test","useNavigationBuilder","createRouter","navigatorKey","useRegisterNavigator","route","useContext","NavigationRouteContext","screenListeners","rest","current","router","useRef","params","state","initial","screen","initialRouteName","routeConfigs","screens","routeNames","map","routeKeyList","curr","join","routeParamList","initialParams","routeGetIdList","Object","assign","getId","length","isStateValid","useCallback","isStateInitialized","stale","currentState","getState","getCurrentState","setState","setCurrentState","setKey","getKey","getIsInitial","NavigationStateContext","stateCleanedUp","cleanUpState","initializedState","isFirstStateInitialization","useMemo","initialRouteParamList","initialParamsFromParams","getInitialState","getRehydratedState","previousRouteKeyListRef","useEffect","previousRouteKeyList","nextState","isArrayEqual","isRecordEqual","getStateForRouteNamesChange","routeKeyChanges","filter","hasOwnProperty","previousNestedParamsRef","previousParams","action","CommonActions","reset","navigate","path","updatedState","getStateForAction","shouldUpdate","useScheduleUpdate","setTimeout","initializedStateRef","emitter","useEventEmitter","e","target","routes","find","index","navigation","descriptors","listeners","concat","cb","i","self","lastIndexOf","listener","useFocusEvents","emit","data","childListeners","addListener","useChildListeners","keyedListeners","addKeyedListener","useKeyedChildListeners","onAction","useOnAction","actionListeners","beforeRemoveListeners","beforeRemove","routerConfigOptions","onRouteFocus","useOnRouteFocus","useNavigationHelpers","id","useFocusedListenersChildrenAdapter","focusedListeners","focus","useOnGetState","getStateListeners","useDescriptors","defaultScreenOptions","useCurrentRender","NavigationContent","useComponent"],"sourceRoot":"../../src","sources":["useNavigationBuilder.tsx"],"mappings":";;;;;;AAAA;AAYA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAoD;AAAA;AAAA;AAEpD;AACA;AACAA,wBAAiB;AAqBjB,MAAMC,UAAU,GAAIC,GAAY,IAC9BA,GAAG,KAAKC,SAAS,IAAK,OAAOD,GAAG,KAAK,QAAQ,IAAIA,GAAG,KAAK,EAAG;;AAE9D;AACA;AACA;AACA;AACA;AACA,MAAME,2BAA2B,GAAG,CAKlCC,QAAyB,EACzBC,QAAiB,EACjBC,YAIY,KACT;EACH,MAAMC,OAAO,GAAGC,KAAK,CAACC,QAAQ,CAACC,OAAO,CAACN,QAAQ,CAAC,CAACO,MAAM,CAErD,CAACC,GAAG,EAAEC,KAAK,KAAK;IAAA;IAChB,kBAAIL,KAAK,CAACM,cAAc,CAACD,KAAK,CAAC,EAAE;MAC/B,IAAIA,KAAK,CAACE,IAAI,KAAKC,eAAM,EAAE;QACzB;QACA;;QAEA,IAAI,CAAChB,UAAU,CAACa,KAAK,CAACI,KAAK,CAACC,aAAa,CAAC,EAAE;UAC1C,MAAM,IAAIC,KAAK,CACZ,wCAAuCC,IAAI,CAACC,SAAS,CACpDR,KAAK,CAACI,KAAK,CAACC,aAAa,CACzB,qBACAL,KAAK,CAACI,KAAK,CAACK,IACb,kDAAiD,CACnD;QACH;QAEAV,GAAG,CAACW,IAAI,CAAC;UACPC,IAAI,EAAE,CAACnB,QAAQ,EAAEQ,KAAK,CAACI,KAAK,CAACC,aAAa,CA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F,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationCache.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationCache.js new file mode 100644 index 00000000..c7f1df6f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationCache.js @@ -0,0 +1,126 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useNavigationCache; +var _routers = require("@react-navigation/routers"); +var React = _interopRequireWildcard(require("react")); +var _NavigationBuilderContext = _interopRequireDefault(require("./NavigationBuilderContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Hook to cache navigation objects for each screen in the navigator. + * It's important to cache them to make sure navigation objects don't change between renders. + * This lets us apply optimizations like `React.memo` to minimize re-rendering screens. + */ +function useNavigationCache(_ref) { + let { + state, + getState, + navigation, + setOptions, + router, + emitter + } = _ref; + const { + stackRef + } = React.useContext(_NavigationBuilderContext.default); + + // Cache object which holds navigation objects for each screen + // We use `React.useMemo` instead of `React.useRef` coz we want to invalidate it when deps change + // In reality, these deps will rarely change, if ever + const cache = React.useMemo(() => ({ + current: {} + }), + // eslint-disable-next-line react-hooks/exhaustive-deps + [getState, navigation, setOptions, router, emitter]); + const actions = { + ...router.actionCreators, + ..._routers.CommonActions + }; + cache.current = state.routes.reduce((acc, route) => { + const previous = cache.current[route.key]; + if (previous) { + // If a cached navigation object already exists, reuse it + acc[route.key] = previous; + } else { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { + emit, + ...rest + } = navigation; + const dispatch = thunk => { + const action = typeof thunk === 'function' ? thunk(getState()) : thunk; + if (action != null) { + navigation.dispatch({ + source: route.key, + ...action + }); + } + }; + const withStack = callback => { + let isStackSet = false; + try { + if (process.env.NODE_ENV !== 'production' && stackRef && !stackRef.current) { + // Capture the stack trace for devtools + stackRef.current = new Error().stack; + isStackSet = true; + } + callback(); + } finally { + if (isStackSet && stackRef) { + stackRef.current = undefined; + } + } + }; + const helpers = Object.keys(actions).reduce((acc, name) => { + acc[name] = function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + return withStack(() => + // @ts-expect-error: name is a valid key, but TypeScript is dumb + dispatch(actions[name](...args))); + }; + return acc; + }, {}); + acc[route.key] = { + ...rest, + ...helpers, + // FIXME: too much work to fix the types for now + ...emitter.create(route.key), + dispatch: thunk => withStack(() => dispatch(thunk)), + getParent: id => { + if (id !== undefined && id === rest.getId()) { + // If the passed id is the same as the current navigation id, + // we return the cached navigation object for the relevant route + return acc[route.key]; + } + return rest.getParent(id); + }, + setOptions: options => setOptions(o => ({ + ...o, + [route.key]: { + ...o[route.key], + ...options + } + })), + isFocused: () => { + const state = getState(); + if (state.routes[state.index].key !== route.key) { + return false; + } + + // If the current screen is focused, we also need to check if parent navigator is focused + // This makes sure that we return the focus state in the whole tree, not just this navigator + return navigation ? navigation.isFocused() : true; + } + }; + } + return acc; + }, {}); + return cache.current; +} +//# sourceMappingURL=useNavigationCache.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationCache.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationCache.js.map new file mode 100644 index 00000000..680ddf70 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationCache.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useNavigationCache","state","getState","navigation","setOptions","router","emitter","stackRef","React","useContext","NavigationBuilderContext","cache","useMemo","current","actions","actionCreators","CommonActions","routes","reduce","acc","route","previous","key","emit","rest","dispatch","thunk","action","source","withStack","callback","isStackSet","process","env","NODE_ENV","Error","stack","undefined","helpers","Object","keys","name","args","create","getParent","id","getId","options","o","isFocused","index"],"sourceRoot":"../../src","sources":["useNavigationCache.tsx"],"mappings":";;;;;;AAAA;AAOA;AAEA;AAAkE;AAAA;AAAA;AAmClE;AACA;AACA;AACA;AACA;AACe,SAASA,kBAAkB,OAWb;EAAA,IAP3B;IACAC,KAAK;IACLC,QAAQ;IACRC,UAAU;IACVC,UAAU;IACVC,MAAM;IACNC;EACwB,CAAC;EACzB,MAAM;IAAEC;EAAS,CAAC,GAAGC,KAAK,CAACC,UAAU,CAACC,iCAAwB,CAAC;;EAE/D;EACA;EACA;EACA,MAAMC,KAAK,GAAGH,KAAK,CAACI,OAAO,CACzB,OAAO;IAAEC,OAAO,EAAE,CAAC;EAAqD,CAAC,CAAC;EAC1E;EACA,CAACX,QAAQ,EAAEC,UAAU,EAAEC,UAAU,EAAEC,MAAM,EAAEC,OAAO,CAAC,CACpD;EAED,MAAMQ,OAAO,GAAG;IACd,GAAGT,MAAM,CAACU,cAAc;IACxB,GAAGC;EACL,CAAC;EAEDL,KAAK,CAACE,OAAO,GAAGZ,KAAK,CAACgB,MAAM,CAACC,MAAM,CAEjC,CAACC,GAAG,EAAEC,KAAK,KAAK;IAChB,MAAMC,QAAQ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iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationContainerRef.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationContainerRef.js new file mode 100644 index 00000000..6b5f15db --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationContainerRef.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useNavigationContainerRef; +var React = _interopRequireWildcard(require("react")); +var _createNavigationContainerRef = _interopRequireDefault(require("./createNavigationContainerRef")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function useNavigationContainerRef() { + const navigation = React.useRef(null); + if (navigation.current == null) { + navigation.current = (0, _createNavigationContainerRef.default)(); + } + return navigation.current; +} +//# sourceMappingURL=useNavigationContainerRef.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationContainerRef.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationContainerRef.js.map new file mode 100644 index 00000000..92054e9f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationContainerRef.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useNavigationContainerRef","navigation","React","useRef","current","createNavigationContainerRef"],"sourceRoot":"../../src","sources":["useNavigationContainerRef.tsx"],"mappings":";;;;;;AAAA;AAEA;AAA0E;AAAA;AAAA;AAG3D,SAASA,yBAAyB,GAEC;EAChD,MAAMC,UAAU,GACdC,KAAK,CAACC,MAAM,CAAsD,IAAI,CAAC;EAEzE,IAAIF,UAAU,CAACG,OAAO,IAAI,IAAI,EAAE;IAC9BH,UAAU,CAACG,OAAO,GAAG,IAAAC,qCAA4B,GAAa;EAChE;EAEA,OAAOJ,UAAU,CAACG,OAAO;AAC3B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationHelpers.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationHelpers.js new file mode 100644 index 00000000..07de42d4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationHelpers.js @@ -0,0 +1,81 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useNavigationHelpers; +var _routers = require("@react-navigation/routers"); +var React = _interopRequireWildcard(require("react")); +var _NavigationContext = _interopRequireDefault(require("./NavigationContext")); +var _types = require("./types"); +var _UnhandledActionContext = _interopRequireDefault(require("./UnhandledActionContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +// This is to make TypeScript compiler happy +// eslint-disable-next-line babel/no-unused-expressions +_types.PrivateValueStore; +/** + * Navigation object with helper methods to be used by a navigator. + * This object includes methods for common actions as well as methods the parent screen's navigation object. + */ +function useNavigationHelpers(_ref) { + let { + id: navigatorId, + onAction, + getState, + emitter, + router + } = _ref; + const onUnhandledAction = React.useContext(_UnhandledActionContext.default); + const parentNavigationHelpers = React.useContext(_NavigationContext.default); + return React.useMemo(() => { + const dispatch = op => { + const action = typeof op === 'function' ? op(getState()) : op; + const handled = onAction(action); + if (!handled) { + onUnhandledAction === null || onUnhandledAction === void 0 ? void 0 : onUnhandledAction(action); + } + }; + const actions = { + ...router.actionCreators, + ..._routers.CommonActions + }; + const helpers = Object.keys(actions).reduce((acc, name) => { + // @ts-expect-error: name is a valid key, but TypeScript is dumb + acc[name] = function () { + return dispatch(actions[name](...arguments)); + }; + return acc; + }, {}); + const navigationHelpers = { + ...parentNavigationHelpers, + ...helpers, + dispatch, + emit: emitter.emit, + isFocused: parentNavigationHelpers ? parentNavigationHelpers.isFocused : () => true, + canGoBack: () => { + const state = getState(); + return router.getStateForAction(state, _routers.CommonActions.goBack(), { + routeNames: state.routeNames, + routeParamList: {}, + routeGetIdList: {} + }) !== null || (parentNavigationHelpers === null || parentNavigationHelpers === void 0 ? void 0 : parentNavigationHelpers.canGoBack()) || false; + }, + getId: () => navigatorId, + getParent: id => { + if (id !== undefined) { + let current = navigationHelpers; + while (current && id !== current.getId()) { + current = current.getParent(); + } + return current; + } + return parentNavigationHelpers; + }, + getState + }; + return navigationHelpers; + }, [navigatorId, emitter.emit, getState, onAction, onUnhandledAction, parentNavigationHelpers, router]); +} +//# sourceMappingURL=useNavigationHelpers.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationHelpers.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationHelpers.js.map new file mode 100644 index 00000000..fa6da44f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationHelpers.js.map @@ -0,0 +1 @@ +{"version":3,"names":["PrivateValueStore","useNavigationHelpers","id","navigatorId","onAction","getState","emitter","router","onUnhandledAction","React","useContext","UnhandledActionContext","parentNavigationHelpers","NavigationContext","useMemo","dispatch","op","action","handled","actions","actionCreators","CommonActions","helpers","Object","keys","reduce","acc","name","navigationHelpers","emit","isFocused","canGoBack","state","getStateForAction","goBack","routeNames","routeParamList","routeGetIdList","getId","getParent","undefined","current"],"sourceRoot":"../../src","sources":["useNavigationHelpers.tsx"],"mappings":";;;;;;AAAA;AAOA;AAEA;AACA;AACA;AAA8D;AAAA;AAAA;AAG9D;AACA;AACAA,wBAAiB;AAUjB;AACA;AACA;AACA;AACe,SAASC,oBAAoB,OAWjB;EAAA,IANzB;IACAC,EAAE,EAAEC,WAAW;IACfC,QAAQ;IACRC,QAAQ;IACRC,OAAO;IACPC;EACsB,CAAC;EACvB,MAAMC,iBAAiB,GAAGC,KAAK,CAACC,UAAU,CAACC,+BAAsB,CAAC;EAClE,MAAMC,uBAAuB,GAAGH,KAAK,CAACC,UAAU,CAACG,0BAAiB,CAAC;EAEnE,OAAOJ,KAAK,CAACK,OAAO,CAAC,MAAM;IACzB,MAAMC,QAAQ,GAAIC,EAAuC,IAAK;MAC5D,MAAMC,MAAM,GAAG,OAAOD,EAAE,KAAK,UAAU,GAAGA,EAAE,CAACX,Q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KAAKsC,SAAS,EAAE;UACpB,IAAIC,OAAO,GAAGb,iBAAiB;UAE/B,OAAOa,OAAO,IAAIvC,EAAE,KAAKuC,OAAO,CAACH,KAAK,EAAE,EAAE;YACxCG,OAAO,GAAGA,OAAO,CAACF,SAAS,EAAE;UAC/B;UAEA,OAAOE,OAAO;QAChB;QAEA,OAAO7B,uBAAuB;MAChC,CAAC;MACDP;IACF,CAA+D;IAE/D,OAAOuB,iBAAiB;EAC1B,CAAC,EAAE,CACDzB,WAAW,EACXG,OAAO,CAACuB,IAAI,EACZxB,QAAQ,EACRD,QAAQ,EACRI,iBAAiB,EACjBI,uBAAuB,EACvBL,MAAM,CACP,CAAC;AACJ"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationState.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationState.js new file mode 100644 index 00000000..edbebff1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationState.js @@ -0,0 +1,37 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useNavigationState; +var React = _interopRequireWildcard(require("react")); +var _useNavigation = _interopRequireDefault(require("./useNavigation")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Hook to get a value from the current navigation state using a selector. + * + * @param selector Selector function to get a value from the state. + */ +function useNavigationState(selector) { + const navigation = (0, _useNavigation.default)(); + + // We don't care about the state value, we run the selector again at the end + // The state is only to make sure that there's a re-render when we have a new value + const [, setResult] = React.useState(() => selector(navigation.getState())); + + // We store the selector in a ref to avoid re-subscribing listeners every render + const selectorRef = React.useRef(selector); + React.useEffect(() => { + selectorRef.current = selector; + }); + React.useEffect(() => { + const unsubscribe = navigation.addListener('state', e => { + setResult(selectorRef.current(e.data.state)); + }); + return unsubscribe; + }, [navigation]); + return selector(navigation.getState()); +} +//# sourceMappingURL=useNavigationState.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationState.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationState.js.map new file mode 100644 index 00000000..c2048191 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useNavigationState.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useNavigationState","selector","navigation","useNavigation","setResult","React","useState","getState","selectorRef","useRef","useEffect","current","unsubscribe","addListener","e","data","state"],"sourceRoot":"../../src","sources":["useNavigationState.tsx"],"mappings":";;;;;;AACA;AAGA;AAA4C;AAAA;AAAA;AAM5C;AACA;AACA;AACA;AACA;AACe,SAASA,kBAAkB,CACxCC,QAAgC,EAC7B;EACH,MAAMC,UAAU,GAAG,IAAAC,sBAAa,GAA6B;;EAE7D;EACA;EACA,MAAM,GAAGC,SAAS,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAAC,MAAML,QAAQ,CAACC,UAAU,CAACK,QAAQ,EAAE,CAAC,CAAC;;EAE3E;EACA,MAAMC,WAAW,GAAGH,KAAK,CAACI,MAAM,CAACR,QAAQ,CAAC;EAE1CI,KAAK,CAACK,SAAS,CAAC,MAAM;IACpBF,WAAW,CAACG,OAAO,GAAGV,QAAQ;EAChC,CAAC,CAAC;EAEFI,KAAK,CAACK,SAAS,CAAC,MAAM;IACpB,MAAME,WAAW,GAAGV,UAAU,CAACW,WAAW,CAAC,OAAO,EAAGC,CAAC,IAAK;MACzDV,SAAS,CAACI,WAAW,CAACG,OAAO,CAACG,CAAC,CAACC,IAAI,CAACC,KAAK,CAAC,CAAC;IAC9C,CAAC,CAAC;IAEF,OAAOJ,WAAW;EACpB,CAAC,EAAE,CAACV,UAAU,CAAC,CAAC;EAEhB,OAAOD,QAAQ,CAACC,UAAU,CAACK,QAAQ,EAAE,CAAC;AACxC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnAction.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnAction.js new file mode 100644 index 00000000..958b6ca2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnAction.js @@ -0,0 +1,103 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useOnAction; +var React = _interopRequireWildcard(require("react")); +var _NavigationBuilderContext = _interopRequireDefault(require("./NavigationBuilderContext")); +var _useOnPreventRemove = _interopRequireWildcard(require("./useOnPreventRemove")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Hook to handle actions for a navigator, including state updates and bubbling. + * + * Bubbling an action is achieved in 2 ways: + * 1. To bubble action to parent, we expose the action handler in context and then access the parent context + * 2. To bubble action to child, child adds event listeners subscribing to actions from parent + * + * When the action handler handles as action, it returns `true`, otherwise `false`. + */ +function useOnAction(_ref) { + let { + router, + getState, + setState, + key, + actionListeners, + beforeRemoveListeners, + routerConfigOptions, + emitter + } = _ref; + const { + onAction: onActionParent, + onRouteFocus: onRouteFocusParent, + addListener: addListenerParent, + onDispatchAction + } = React.useContext(_NavigationBuilderContext.default); + const routerConfigOptionsRef = React.useRef(routerConfigOptions); + React.useEffect(() => { + routerConfigOptionsRef.current = routerConfigOptions; + }); + const onAction = React.useCallback(function (action) { + let visitedNavigators = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Set(); + const state = getState(); + + // Since actions can bubble both up and down, they could come to the same navigator again + // We keep track of navigators which have already tried to handle the action and return if it's already visited + if (visitedNavigators.has(state.key)) { + return false; + } + visitedNavigators.add(state.key); + if (typeof action.target !== 'string' || action.target === state.key) { + let result = router.getStateForAction(state, action, routerConfigOptionsRef.current); + + // If a target is specified and set to current navigator, the action shouldn't bubble + // So instead of `null`, we use the state object for such cases to signal that action was handled + result = result === null && action.target === state.key ? state : result; + if (result !== null) { + onDispatchAction(action, state === result); + if (state !== result) { + const isPrevented = (0, _useOnPreventRemove.shouldPreventRemove)(emitter, beforeRemoveListeners, state.routes, result.routes, action); + if (isPrevented) { + return true; + } + setState(result); + } + if (onRouteFocusParent !== undefined) { + // Some actions such as `NAVIGATE` also want to bring the navigated route to focus in the whole tree + // This means we need to focus all of the parent navigators of this navigator as well + const shouldFocus = router.shouldActionChangeFocus(action); + if (shouldFocus && key !== undefined) { + onRouteFocusParent(key); + } + } + return true; + } + } + if (onActionParent !== undefined) { + // Bubble action to the parent if the current navigator didn't handle it + if (onActionParent(action, visitedNavigators)) { + return true; + } + } + + // If the action wasn't handled by current navigator or a parent navigator, let children handle it + for (let i = actionListeners.length - 1; i >= 0; i--) { + const listener = actionListeners[i]; + if (listener(action, visitedNavigators)) { + return true; + } + } + return false; + }, [actionListeners, beforeRemoveListeners, emitter, getState, key, onActionParent, onDispatchAction, onRouteFocusParent, router, setState]); + (0, _useOnPreventRemove.default)({ + getState, + emitter, + beforeRemoveListeners + }); + React.useEffect(() => addListenerParent === null || addListenerParent === void 0 ? void 0 : addListenerParent('action', onAction), [addListenerParent, onAction]); + return onAction; +} +//# sourceMappingURL=useOnAction.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnAction.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnAction.js.map new file mode 100644 index 00000000..8dc3f129 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnAction.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useOnAction","router","getState","setState","key","actionListeners","beforeRemoveListeners","routerConfigOptions","emitter","onAction","onActionParent","onRouteFocus","onRouteFocusParent","addListener","addListenerParent","onDispatchAction","React","useContext","NavigationBuilderContext","routerConfigOptionsRef","useRef","useEffect","current","useCallback","action","visitedNavigators","Set","state","has","add","target","result","getStateForAction","isPrevented","shouldPreventRemove","routes","undefined","shouldFocus","shouldActionChangeFocus","i","length","listener","useOnPreventRemove"],"sourceRoot":"../../src","sources":["useOnAction.tsx"],"mappings":";;;;;;AAOA;AAEA;AAMA;AAA+E;AAAA;AAAA;AAa/E;AACA;AACA;AACA;AACA;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b,MAAMP,iBAAiB,aAAjBA,iBAAiB,uBAAjBA,iBAAiB,CAAG,QAAQ,EAAEL,QAAQ,CAAC,EAC7C,CAACK,iBAAiB,EAAEL,QAAQ,CAAC,CAC9B;EAED,OAAOA,QAAQ;AACjB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnGetState.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnGetState.js new file mode 100644 index 00000000..294fc8ab --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnGetState.js @@ -0,0 +1,51 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useOnGetState; +var React = _interopRequireWildcard(require("react")); +var _isArrayEqual = _interopRequireDefault(require("./isArrayEqual")); +var _NavigationBuilderContext = _interopRequireDefault(require("./NavigationBuilderContext")); +var _NavigationRouteContext = _interopRequireDefault(require("./NavigationRouteContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function useOnGetState(_ref) { + let { + getState, + getStateListeners + } = _ref; + const { + addKeyedListener + } = React.useContext(_NavigationBuilderContext.default); + const route = React.useContext(_NavigationRouteContext.default); + const key = route ? route.key : 'root'; + const getRehydratedState = React.useCallback(() => { + const state = getState(); + + // Avoid returning new route objects if we don't need to + const routes = state.routes.map(route => { + var _getStateListeners$ro; + const childState = (_getStateListeners$ro = getStateListeners[route.key]) === null || _getStateListeners$ro === void 0 ? void 0 : _getStateListeners$ro.call(getStateListeners); + if (route.state === childState) { + return route; + } + return { + ...route, + state: childState + }; + }); + if ((0, _isArrayEqual.default)(state.routes, routes)) { + return state; + } + return { + ...state, + routes + }; + }, [getState, getStateListeners]); + React.useEffect(() => { + return addKeyedListener === null || addKeyedListener === void 0 ? void 0 : addKeyedListener('getState', key, getRehydratedState); + }, [addKeyedListener, getRehydratedState, key]); +} +//# sourceMappingURL=useOnGetState.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnGetState.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnGetState.js.map new file mode 100644 index 00000000..eba24edc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnGetState.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useOnGetState","getState","getStateListeners","addKeyedListener","React","useContext","NavigationBuilderContext","route","NavigationRouteContext","key","getRehydratedState","useCallback","state","routes","map","childState","isArrayEqual","useEffect"],"sourceRoot":"../../src","sources":["useOnGetState.tsx"],"mappings":";;;;;;AACA;AAEA;AACA;AAGA;AAA8D;AAAA;AAAA;AAO/C,SAASA,aAAa,OAGzB;EAAA,IAH0B;IACpCC,QAAQ;IACRC;EACO,CAAC;EACR,MAAM;IAAEC;EAAiB,CAAC,GAAGC,KAAK,CAACC,UAAU,CAACC,iCAAwB,CAAC;EACvE,MAAMC,KAAK,GAAGH,KAAK,CAACC,UAAU,CAACG,+BAAsB,CAAC;EACtD,MAAMC,GAAG,GAAGF,KAAK,GAAGA,KAAK,CAACE,GAAG,GAAG,MAAM;EAEtC,MAAMC,kBAAkB,GAAGN,KAAK,CAACO,WAAW,CAAC,MAAM;IACjD,MAAMC,KAAK,GAAGX,QAAQ,EAAE;;IAExB;IACA,MAAMY,MAAM,GAAGD,KAAK,CAACC,MAAM,CAACC,GAAG,CAAEP,KAAK,IAAK;MAAA;MACzC,MAAMQ,UAAU,4BAAGb,iBAAiB,CAACK,KAAK,CAACE,GAAG,CAAC,0DAA5B,2BAAAP,iBAAiB,CAAe;MAEnD,IAAIK,KAAK,CAACK,KAAK,KAAKG,UAAU,EAAE;QAC9B,OAAOR,KAAK;MACd;MAEA,OAAO;QAAE,GAAGA,KAAK;QAAEK,KAAK,EAAEG;MAAW,CAAC;IACxC,CAAC,CAAC;IAEF,IAAI,IAAAC,qBAAY,EAACJ,KAAK,CAACC,MAAM,EAAEA,MAAM,CAAC,EAAE;MACtC,OAAOD,KAAK;IACd;IAEA,OAAO;MAAE,GAAGA,KAAK;MAAEC;IAAO,CAAC;EAC7B,CAAC,EAAE,CAACZ,QAAQ,EAAEC,iBAAiB,CAAC,CAAC;EAEjCE,KAAK,CAACa,SAAS,CAAC,MAAM;IACpB,OAAOd,gBAAgB,aAAhBA,gBAAgB,uBAAhBA,gBAAgB,CAAG,UAAU,EAAEM,GAAG,EAAEC,kBAAkB,CAAC;EAChE,CAAC,EAAE,CAACP,gBAAgB,EAAEO,kBAAkB,EAAED,GAAG,CAAC,CAAC;AACjD"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnPreventRemove.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnPreventRemove.js new file mode 100644 index 00000000..cdeee69c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnPreventRemove.js @@ -0,0 +1,75 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useOnPreventRemove; +exports.shouldPreventRemove = void 0; +var React = _interopRequireWildcard(require("react")); +var _NavigationBuilderContext = _interopRequireDefault(require("./NavigationBuilderContext")); +var _NavigationRouteContext = _interopRequireDefault(require("./NavigationRouteContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const VISITED_ROUTE_KEYS = Symbol('VISITED_ROUTE_KEYS'); +const shouldPreventRemove = (emitter, beforeRemoveListeners, currentRoutes, nextRoutes, action) => { + const nextRouteKeys = nextRoutes.map(route => route.key); + + // Call these in reverse order so last screens handle the event first + const removedRoutes = currentRoutes.filter(route => !nextRouteKeys.includes(route.key)).reverse(); + const visitedRouteKeys = + // @ts-expect-error: add this property to mark that we've already emitted this action + action[VISITED_ROUTE_KEYS] ?? new Set(); + const beforeRemoveAction = { + ...action, + [VISITED_ROUTE_KEYS]: visitedRouteKeys + }; + for (const route of removedRoutes) { + var _beforeRemoveListener; + if (visitedRouteKeys.has(route.key)) { + // Skip if we've already emitted this action for this screen + continue; + } + + // First, we need to check if any child screens want to prevent it + const isPrevented = (_beforeRemoveListener = beforeRemoveListeners[route.key]) === null || _beforeRemoveListener === void 0 ? void 0 : _beforeRemoveListener.call(beforeRemoveListeners, beforeRemoveAction); + if (isPrevented) { + return true; + } + visitedRouteKeys.add(route.key); + const event = emitter.emit({ + type: 'beforeRemove', + target: route.key, + data: { + action: beforeRemoveAction + }, + canPreventDefault: true + }); + if (event.defaultPrevented) { + return true; + } + } + return false; +}; +exports.shouldPreventRemove = shouldPreventRemove; +function useOnPreventRemove(_ref) { + let { + getState, + emitter, + beforeRemoveListeners + } = _ref; + const { + addKeyedListener + } = React.useContext(_NavigationBuilderContext.default); + const route = React.useContext(_NavigationRouteContext.default); + const routeKey = route === null || route === void 0 ? void 0 : route.key; + React.useEffect(() => { + if (routeKey) { + return addKeyedListener === null || addKeyedListener === void 0 ? void 0 : addKeyedListener('beforeRemove', routeKey, action => { + const state = getState(); + return shouldPreventRemove(emitter, beforeRemoveListeners, state.routes, [], action); + }); + } + }, [addKeyedListener, beforeRemoveListeners, emitter, getState, routeKey]); +} +//# sourceMappingURL=useOnPreventRemove.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnPreventRemove.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnPreventRemove.js.map new file mode 100644 index 00000000..04048959 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnPreventRemove.js.map @@ -0,0 +1 @@ +{"version":3,"names":["VISITED_ROUTE_KEYS","Symbol","shouldPreventRemove","emitter","beforeRemoveListeners","currentRoutes","nextRoutes","action","nextRouteKeys","map","route","key","removedRoutes","filter","includes","reverse","visitedRouteKeys","Set","beforeRemoveAction","has","isPrevented","add","event","emit","type","target","data","canPreventDefault","defaultPrevented","useOnPreventRemove","getState","addKeyedListener","React","useContext","NavigationBuilderContext","NavigationRouteContext","routeKey","useEffect","state","routes"],"sourceRoot":"../../src","sources":["useOnPreventRemove.tsx"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AACM,gBAAgB,EAAE;MAC1B,OAAO,IAAI;IACb;EACF;EAEA,OAAO,KAAK;AACd,CAAC;AAAC;AAEa,SAASC,kBAAkB,OAI9B;EAAA,IAJ+B;IACzCC,QAAQ;IACR3B,OAAO;IACPC;EACO,CAAC;EACR,MAAM;IAAE2B;EAAiB,CAAC,GAAGC,KAAK,CAACC,UAAU,CAACC,iCAAwB,CAAC;EACvE,MAAMxB,KAAK,GAAGsB,KAAK,CAACC,UAAU,CAACE,+BAAsB,CAAC;EACtD,MAAMC,QAAQ,GAAG1B,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEC,GAAG;EAE3BqB,KAAK,CAACK,SAAS,CAAC,MAAM;IACpB,IAAID,QAAQ,EAAE;MACZ,OAAOL,gBAAgB,aAAhBA,gBAAgB,uBAAhBA,gBAAgB,CAAG,cAAc,EAAEK,QAAQ,EAAG7B,MAAM,IAAK;QAC9D,MAAM+B,KAAK,GAAGR,QAAQ,EAAE;QAExB,OAAO5B,mBAAmB,CACxBC,OAAO,EACPC,qBAAqB,EACrBkC,KAAK,CAACC,MAAM,EACZ,EAAE,EACFhC,MAAM,CACP;MACH,CAAC,CAAC;IACJ;EACF,CAAC,EAAE,CAACwB,gBAAgB,EAAE3B,qBAAqB,EAAED,OAAO,EAAE2B,QAAQ,EAAEM,QAAQ,CAAC,CAAC;AAC5E"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnRouteFocus.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnRouteFocus.js new file mode 100644 index 00000000..dfa5db70 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnRouteFocus.js @@ -0,0 +1,38 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useOnRouteFocus; +var React = _interopRequireWildcard(require("react")); +var _NavigationBuilderContext = _interopRequireDefault(require("./NavigationBuilderContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Hook to handle focus actions for a route. + * Focus action needs to be treated specially, coz when a nested route is focused, + * the parent navigators also needs to be focused. + */ +function useOnRouteFocus(_ref) { + let { + router, + getState, + key: sourceRouteKey, + setState + } = _ref; + const { + onRouteFocus: onRouteFocusParent + } = React.useContext(_NavigationBuilderContext.default); + return React.useCallback(key => { + const state = getState(); + const result = router.getStateForRouteFocus(state, key); + if (result !== state) { + setState(result); + } + if (onRouteFocusParent !== undefined && sourceRouteKey !== undefined) { + onRouteFocusParent(sourceRouteKey); + } + }, [getState, onRouteFocusParent, router, setState, sourceRouteKey]); +} +//# sourceMappingURL=useOnRouteFocus.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnRouteFocus.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnRouteFocus.js.map new file mode 100644 index 00000000..713e4964 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOnRouteFocus.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useOnRouteFocus","router","getState","key","sourceRouteKey","setState","onRouteFocus","onRouteFocusParent","React","useContext","NavigationBuilderContext","useCallback","state","result","getStateForRouteFocus","undefined"],"sourceRoot":"../../src","sources":["useOnRouteFocus.tsx"],"mappings":";;;;;;AAKA;AAEA;AAAkE;AAAA;AAAA;AASlE;AACA;AACA;AACA;AACA;AACe,SAASA,eAAe,OAKnB;EAAA,IALqD;IACvEC,MAAM;IACNC,QAAQ;IACRC,GAAG,EAAEC,cAAc;IACnBC;EACe,CAAC;EAChB,MAAM;IAAEC,YAAY,EAAEC;EAAmB,CAAC,GAAGC,KAAK,CAACC,UAAU,CAC3DC,iCAAwB,CACzB;EAED,OAAOF,KAAK,CAACG,WAAW,CACrBR,GAAW,IAAK;IACf,MAAMS,KAAK,GAAGV,QAAQ,EAAE;IACxB,MAAMW,MAAM,GAAGZ,MAAM,CAACa,qBAAqB,CAACF,KAAK,EAAET,GAAG,CAAC;IAEvD,IAAIU,MAAM,KAAKD,KAAK,EAAE;MACpBP,QAAQ,CAACQ,MAAM,CAAC;IAClB;IAEA,IAAIN,kBAAkB,KAAKQ,SAAS,IAAIX,cAAc,KAAKW,SAAS,EAAE;MACpER,kBAAkB,CAACH,cAAc,CAAC;IACpC;EACF,CAAC,EACD,CAACF,QAAQ,EAAEK,kBAAkB,EAAEN,MAAM,EAAEI,QAAQ,EAAED,cAAc,CAAC,CACjE;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOptionsGetters.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOptionsGetters.js new file mode 100644 index 00000000..3de27475 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOptionsGetters.js @@ -0,0 +1,81 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useOptionsGetters; +var React = _interopRequireWildcard(require("react")); +var _NavigationBuilderContext = _interopRequireDefault(require("./NavigationBuilderContext")); +var _NavigationStateContext = _interopRequireDefault(require("./NavigationStateContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function useOptionsGetters(_ref) { + let { + key, + options, + navigation + } = _ref; + const optionsRef = React.useRef(options); + const optionsGettersFromChildRef = React.useRef({}); + const { + onOptionsChange + } = React.useContext(_NavigationBuilderContext.default); + const { + addOptionsGetter: parentAddOptionsGetter + } = React.useContext(_NavigationStateContext.default); + const optionsChangeListener = React.useCallback(() => { + const isFocused = (navigation === null || navigation === void 0 ? void 0 : navigation.isFocused()) ?? true; + const hasChildren = Object.keys(optionsGettersFromChildRef.current).length; + if (isFocused && !hasChildren) { + onOptionsChange(optionsRef.current ?? {}); + } + }, [navigation, onOptionsChange]); + React.useEffect(() => { + optionsRef.current = options; + optionsChangeListener(); + return navigation === null || navigation === void 0 ? void 0 : navigation.addListener('focus', optionsChangeListener); + }, [navigation, options, optionsChangeListener]); + const getOptionsFromListener = React.useCallback(() => { + for (let key in optionsGettersFromChildRef.current) { + if (optionsGettersFromChildRef.current.hasOwnProperty(key)) { + var _optionsGettersFromCh, _optionsGettersFromCh2; + const result = (_optionsGettersFromCh = (_optionsGettersFromCh2 = optionsGettersFromChildRef.current)[key]) === null || _optionsGettersFromCh === void 0 ? void 0 : _optionsGettersFromCh.call(_optionsGettersFromCh2); + + // null means unfocused route + if (result !== null) { + return result; + } + } + } + return null; + }, []); + const getCurrentOptions = React.useCallback(() => { + const isFocused = (navigation === null || navigation === void 0 ? void 0 : navigation.isFocused()) ?? true; + if (!isFocused) { + return null; + } + const optionsFromListener = getOptionsFromListener(); + if (optionsFromListener !== null) { + return optionsFromListener; + } + return optionsRef.current; + }, [navigation, getOptionsFromListener]); + React.useEffect(() => { + return parentAddOptionsGetter === null || parentAddOptionsGetter === void 0 ? void 0 : parentAddOptionsGetter(key, getCurrentOptions); + }, [getCurrentOptions, parentAddOptionsGetter, key]); + const addOptionsGetter = React.useCallback((key, getter) => { + optionsGettersFromChildRef.current[key] = getter; + optionsChangeListener(); + return () => { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete optionsGettersFromChildRef.current[key]; + optionsChangeListener(); + }; + }, [optionsChangeListener]); + return { + addOptionsGetter, + getCurrentOptions + }; +} +//# sourceMappingURL=useOptionsGetters.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOptionsGetters.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOptionsGetters.js.map new file mode 100644 index 00000000..5657b6e8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useOptionsGetters.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useOptionsGetters","key","options","navigation","optionsRef","React","useRef","optionsGettersFromChildRef","onOptionsChange","useContext","NavigationBuilderContext","addOptionsGetter","parentAddOptionsGetter","NavigationStateContext","optionsChangeListener","useCallback","isFocused","hasChildren","Object","keys","current","length","useEffect","addListener","getOptionsFromListener","hasOwnProperty","result","getCurrentOptions","optionsFromListener","getter"],"sourceRoot":"../../src","sources":["useOptionsGetters.tsx"],"mappings":";;;;;;AACA;AAEA;AACA;AAA8D;AAAA;AAAA;AAS/C,SAASA,iBAAiB,OAI7B;EAAA,IAJ8B;IACxCC,GAAG;IACHC,OAAO;IACPC;EACO,CAAC;EACR,MAAMC,UAAU,GAAGC,KAAK,CAACC,MAAM,CAAqBJ,OAAO,CAAC;EAC5D,MAAMK,0BAA0B,GAAGF,KAAK,CAACC,MAAM,CAE7C,CAAC,CAAC,CAAC;EAEL,MAAM;IAAEE;EAAgB,CAAC,GAAGH,KAAK,CAACI,UAAU,CAACC,iCAAwB,CAAC;EACtE,MAAM;IAAEC,gBAAgB,EAAEC;EAAuB,CAAC,GAAGP,KAAK,CAACI,UAAU,CACnEI,+BAAsB,CACvB;EAED,MAAMC,qBAAqB,GAAGT,KAAK,CAACU,WAAW,CAAC,MAAM;IACpD,MAAMC,SAAS,GAAG,CAAAb,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEa,SAAS,EAAE,KAAI,IAAI;IACjD,MAAMC,WAAW,GAAGC,MAAM,CAACC,IAAI,CAACZ,0BAA0B,CAACa,OAAO,CAAC,CAACC,MAAM;IAE1E,IAAIL,SAAS,IAAI,CAACC,WAAW,EAAE;MAC7BT,eAAe,CAACJ,UAAU,CAACgB,OAAO,IAAI,CAAC,CAAC,CAAC;IAC3C;EACF,CAAC,EAAE,CAACjB,UAAU,EAAEK,eAAe,CAAC,CAAC;EAEjCH,KAAK,CAACiB,SAAS,CAAC,MAAM;IACpBlB,UAAU,CAACgB,OAAO,GAAGlB,OAAO;IAC5BY,qBAAqB,EAAE;IAEvB,OAAOX,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEoB,WAAW,CAAC,OAAO,EAAET,qBAAqB,CAAC;EAChE,CAAC,EAAE,CAACX,UAAU,EAAED,OAAO,EAAEY,qBAAqB,CAAC,CAAC;EAEhD,MAAMU,sBAAsB,GA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B,CAACa,OAAO,CAACnB,GAAG,CAAC;MAC9Ca,qBAAqB,EAAE;IACzB,CAAC;EACH,CAAC,EACD,CAACA,qBAAqB,CAAC,CACxB;EAED,OAAO;IACLH,gBAAgB;IAChBgB;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemove.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemove.js new file mode 100644 index 00000000..c8e9a8eb --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemove.js @@ -0,0 +1,48 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = usePreventRemove; +var _nonSecure = require("nanoid/non-secure"); +var React = _interopRequireWildcard(require("react")); +var _useLatestCallback = _interopRequireDefault(require("use-latest-callback")); +var _useNavigation = _interopRequireDefault(require("./useNavigation")); +var _usePreventRemoveContext = _interopRequireDefault(require("./usePreventRemoveContext")); +var _useRoute = _interopRequireDefault(require("./useRoute")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Hook to prevent screen from being removed. Can be used to prevent users from leaving the screen. + * + * @param preventRemove Boolean indicating whether to prevent screen from being removed. + * @param callback Function which is executed when screen was prevented from being removed. + */ +function usePreventRemove(preventRemove, callback) { + const [id] = React.useState(() => (0, _nonSecure.nanoid)()); + const navigation = (0, _useNavigation.default)(); + const { + key: routeKey + } = (0, _useRoute.default)(); + const { + setPreventRemove + } = (0, _usePreventRemoveContext.default)(); + React.useEffect(() => { + setPreventRemove(id, routeKey, preventRemove); + return () => { + setPreventRemove(id, routeKey, false); + }; + }, [setPreventRemove, id, routeKey, preventRemove]); + const beforeRemoveListener = (0, _useLatestCallback.default)(e => { + if (!preventRemove) { + return; + } + e.preventDefault(); + callback({ + data: e.data + }); + }); + React.useEffect(() => navigation === null || navigation === void 0 ? void 0 : navigation.addListener('beforeRemove', beforeRemoveListener), [navigation, beforeRemoveListener]); +} +//# sourceMappingURL=usePreventRemove.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemove.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemove.js.map new file mode 100644 index 00000000..552c4630 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemove.js.map @@ -0,0 +1 @@ +{"version":3,"names":["usePreventRemove","preventRemove","callback","id","React","useState","nanoid","navigation","useNavigation","key","routeKey","useRoute","setPreventRemove","usePreventRemoveContext","useEffect","beforeRemoveListener","useLatestCallback","e","preventDefault","data","addListener"],"sourceRoot":"../../src","sources":["usePreventRemove.tsx"],"mappings":";;;;;;AACA;AACA;AACA;AAGA;AACA;AACA;AAAkC;AAAA;AAAA;AAElC;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,gBAAgB,CACtCC,aAAsB,EACtBC,QAAmE,EACnE;EACA,MAAM,CAACC,EAAE,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAAC,MAAM,IAAAC,iBAAM,GAAE,CAAC;EAE3C,MAAMC,UAAU,GAAG,IAAAC,sBAAa,GAAE;EAClC,MAAM;IAAEC,GAAG,EAAEC;EAAS,CAAC,GAAG,IAAAC,iBAAQ,GAAE;EAEpC,MAAM;IAAEC;EAAiB,CAAC,GAAG,IAAAC,gCAAuB,GAAE;EAEtDT,KAAK,CAACU,SAAS,CAAC,MAAM;IACpBF,gBAAgB,CAACT,EAAE,EAAEO,QAAQ,EAAET,aAAa,CAAC;IAC7C,OAAO,MAAM;MACXW,gBAAgB,CAACT,EAAE,EAAEO,QAAQ,EAAE,KAAK,CAAC;IACvC,CAAC;EACH,CAAC,EAAE,CAACE,gBAAgB,EAAET,EAAE,EAAEO,QAAQ,EAAET,aAAa,CAAC,CAAC;EAEnD,MAAMc,oBAAoB,GAAG,IAAAC,0BAAiB,EAE3CC,CAAC,IAAK;IACP,IAAI,CAAChB,aAAa,EAAE;MAClB;IACF;IAEAgB,CAAC,CAACC,cAAc,EAAE;IAElBhB,QAAQ,CAAC;MAAEiB,IAAI,EAAEF,CAAC,CAACE;IAAK,CAAC,CAAC;EAC5B,CAAC,CAAC;EAEFf,KAAK,CAACU,SAAS,CACb,MAAMP,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEa,WAAW,CAAC,cAAc,EAAEL,oBAAoB,CAAC,EACnE,CAACR,UAAU,EAAEQ,oBAAoB,CAAC,CACnC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemoveContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemoveContext.js new file mode 100644 index 00000000..d38073ff --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemoveContext.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = usePreventRemoveContext; +var React = _interopRequireWildcard(require("react")); +var _PreventRemoveContext = _interopRequireDefault(require("./PreventRemoveContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function usePreventRemoveContext() { + const value = React.useContext(_PreventRemoveContext.default); + if (value == null) { + throw new Error("Couldn't find the prevent remove context. Is your component inside NavigationContent?"); + } + return value; +} +//# sourceMappingURL=usePreventRemoveContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemoveContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemoveContext.js.map new file mode 100644 index 00000000..f650aeea --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/usePreventRemoveContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["usePreventRemoveContext","value","React","useContext","PreventRemoveContext","Error"],"sourceRoot":"../../src","sources":["usePreventRemoveContext.tsx"],"mappings":";;;;;;AAAA;AAEA;AAA0D;AAAA;AAAA;AAE3C,SAASA,uBAAuB,GAAG;EAChD,MAAMC,KAAK,GAAGC,KAAK,CAACC,UAAU,CAACC,6BAAoB,CAAC;EAEpD,IAAIH,KAAK,IAAI,IAAI,EAAE;IACjB,MAAM,IAAII,KAAK,CACb,uFAAuF,CACxF;EACH;EAEA,OAAOJ,KAAK;AACd"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRegisterNavigator.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRegisterNavigator.js new file mode 100644 index 00000000..f557b8a8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRegisterNavigator.js @@ -0,0 +1,32 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useRegisterNavigator; +var _nonSecure = require("nanoid/non-secure"); +var React = _interopRequireWildcard(require("react")); +var _EnsureSingleNavigator = require("./EnsureSingleNavigator"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Register a navigator in the parent context (either a navigation container or a screen). + * This is used to prevent multiple navigators under a single container or screen. + */ +function useRegisterNavigator() { + const [key] = React.useState(() => (0, _nonSecure.nanoid)()); + const container = React.useContext(_EnsureSingleNavigator.SingleNavigatorContext); + if (container === undefined) { + throw new Error("Couldn't register the navigator. Have you wrapped your app with 'NavigationContainer'?\n\nThis can also happen if there are multiple copies of '@react-navigation' packages installed."); + } + React.useEffect(() => { + const { + register, + unregister + } = container; + register(key); + return () => unregister(key); + }, [container, key]); + return key; +} +//# sourceMappingURL=useRegisterNavigator.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRegisterNavigator.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRegisterNavigator.js.map new file mode 100644 index 00000000..c9fff077 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRegisterNavigator.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useRegisterNavigator","key","React","useState","nanoid","container","useContext","SingleNavigatorContext","undefined","Error","useEffect","register","unregister"],"sourceRoot":"../../src","sources":["useRegisterNavigator.tsx"],"mappings":";;;;;;AAAA;AACA;AAEA;AAAiE;AAAA;AAEjE;AACA;AACA;AACA;AACe,SAASA,oBAAoB,GAAG;EAC7C,MAAM,CAACC,GAAG,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAAC,MAAM,IAAAC,iBAAM,GAAE,CAAC;EAC5C,MAAMC,SAAS,GAAGH,KAAK,CAACI,UAAU,CAACC,6CAAsB,CAAC;EAE1D,IAAIF,SAAS,KAAKG,SAAS,EAAE;IAC3B,MAAM,IAAIC,KAAK,CACb,wLAAwL,CACzL;EACH;EAEAP,KAAK,CAACQ,SAAS,CAAC,MAAM;IACpB,MAAM;MAAEC,QAAQ;MAAEC;IAAW,CAAC,GAAGP,SAAS;IAE1CM,QAAQ,CAACV,GAAG,CAAC;IAEb,OAAO,MAAMW,UAAU,CAACX,GAAG,CAAC;EAC9B,CAAC,EAAE,CAACI,SAAS,EAAEJ,GAAG,CAAC,CAAC;EAEpB,OAAOA,GAAG;AACZ"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRoute.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRoute.js new file mode 100644 index 00000000..fc5bd092 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRoute.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useRoute; +var React = _interopRequireWildcard(require("react")); +var _NavigationRouteContext = _interopRequireDefault(require("./NavigationRouteContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Hook to access the route prop of the parent screen anywhere. + * + * @returns Route prop of the parent screen. + */ +function useRoute() { + const route = React.useContext(_NavigationRouteContext.default); + if (route === undefined) { + throw new Error("Couldn't find a route object. Is your component inside a screen in a navigator?"); + } + return route; +} +//# sourceMappingURL=useRoute.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRoute.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRoute.js.map new file mode 100644 index 00000000..c9bf1061 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRoute.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useRoute","route","React","useContext","NavigationRouteContext","undefined","Error"],"sourceRoot":"../../src","sources":["useRoute.tsx"],"mappings":";;;;;;AACA;AAEA;AAA8D;AAAA;AAAA;AAG9D;AACA;AACA;AACA;AACA;AACe,SAASA,QAAQ,GAA0C;EACxE,MAAMC,KAAK,GAAGC,KAAK,CAACC,UAAU,CAACC,+BAAsB,CAAC;EAEtD,IAAIH,KAAK,KAAKI,SAAS,EAAE;IACvB,MAAM,IAAIC,KAAK,CACb,iFAAiF,CAClF;EACH;EAEA,OAAOL,KAAK;AACd"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRouteCache.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRouteCache.js new file mode 100644 index 00000000..752ee14d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRouteCache.js @@ -0,0 +1,52 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.CHILD_STATE = void 0; +exports.default = useRouteCache; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Utilites such as `getFocusedRouteNameFromRoute` need to access state. + * So we need a way to suppress the warning for those use cases. + * This is fine since they are internal utilities and this is not public API. + */ +const CHILD_STATE = Symbol('CHILD_STATE'); + +/** + * Hook to cache route props for each screen in the navigator. + * This lets add warnings and modifications to the route object but keep references between renders. + */ +exports.CHILD_STATE = CHILD_STATE; +function useRouteCache(routes) { + // Cache object which holds route objects for each screen + const cache = React.useMemo(() => ({ + current: new Map() + }), []); + if (process.env.NODE_ENV === 'production') { + // We don't want the overhead of creating extra maps every render in prod + return routes; + } + cache.current = routes.reduce((acc, route) => { + const previous = cache.current.get(route); + if (previous) { + // If a cached route object already exists, reuse it + acc.set(route, previous); + } else { + const { + state, + ...proxy + } = route; + Object.defineProperty(proxy, CHILD_STATE, { + enumerable: false, + value: state + }); + acc.set(route, proxy); + } + return acc; + }, new Map()); + return Array.from(cache.current.values()); +} +//# sourceMappingURL=useRouteCache.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRouteCache.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRouteCache.js.map new file mode 100644 index 00000000..f747f8ca --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useRouteCache.js.map @@ -0,0 +1 @@ +{"version":3,"names":["CHILD_STATE","Symbol","useRouteCache","routes","cache","React","useMemo","current","Map","process","env","NODE_ENV","reduce","acc","route","previous","get","set","state","proxy","Object","defineProperty","enumerable","value","Array","from","values"],"sourceRoot":"../../src","sources":["useRouteCache.tsx"],"mappings":";;;;;;;AAKA;AAA+B;AAAA;AAM/B;AACA;AACA;AACA;AACA;AACO,MAAMA,WAAW,GAAGC,MAAM,CAAC,aAAa,CAAC;;AAEhD;AACA;AACA;AACA;AAHA;AAIe,SAASC,aAAa,CACnCC,MAAuB,EACvB;EACA;EACA,MAAMC,KAAK,GAAGC,KAAK,CAACC,OAAO,CAAC,OAAO;IAAEC,OAAO,EAAE,IAAIC,GAAG;EAAiB,CAAC,CAAC,EAAE,EAAE,CAAC;EAE7E,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC;IACA,OAAOR,MAAM;EACf;EAEAC,KAAK,CAACG,OAAO,GAAGJ,MAAM,CAACS,MAAM,CAAC,CAACC,GAAG,EAAEC,KAAK,KAAK;IAC5C,MAAMC,QAAQ,GAAGX,KAAK,CAACG,OAAO,CAACS,GAAG,CAACF,KAAK,CAAC;IAEzC,IAAIC,QAAQ,EAAE;MACZ;MACAF,GAAG,CAACI,GAAG,CAACH,KAAK,EAAEC,QAAQ,CAAC;IAC1B,CAAC,MAAM;MACL,MAAM;QAAEG,KAAK;QAAE,GAAGC;MAAM,CAAC,GAAGL,KAAK;MAEjCM,MAAM,CAACC,cAAc,CAACF,KAAK,EAAEnB,WAAW,EAAE;QACxCsB,UAAU,EAAE,KAAK;QACjBC,KAAK,EAAEL;MACT,CAAC,CAAC;MAEFL,GAAG,CAACI,GAAG,CAACH,KAAK,EAAEK,KAAK,CAAC;IACvB;IAEA,OAAON,GAAG;EACZ,CAAC,EAAE,IAAIL,GAAG,EAAE,CAAe;EAE3B,OAAOgB,KAAK,CAACC,IAAI,CAACrB,KAAK,CAACG,OAAO,CAACmB,MAAM,EAAE,CAAC;AAC3C"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useScheduleUpdate.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useScheduleUpdate.js new file mode 100644 index 00000000..93310e68 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useScheduleUpdate.js @@ -0,0 +1,37 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ScheduleUpdateContext = void 0; +exports.default = useScheduleUpdate; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const MISSING_CONTEXT_ERROR = "Couldn't find a schedule context."; +const ScheduleUpdateContext = /*#__PURE__*/React.createContext({ + scheduleUpdate() { + throw new Error(MISSING_CONTEXT_ERROR); + }, + flushUpdates() { + throw new Error(MISSING_CONTEXT_ERROR); + } +}); + +/** + * When screen config changes, we want to update the navigator in the same update phase. + * However, navigation state is in the root component and React won't let us update it from a child. + * This is a workaround for that, the scheduled update is stored in the ref without actually calling setState. + * It lets all subsequent updates access the latest state so it stays correct. + * Then we call setState during after the component updates. + */ +exports.ScheduleUpdateContext = ScheduleUpdateContext; +function useScheduleUpdate(callback) { + const { + scheduleUpdate, + flushUpdates + } = React.useContext(ScheduleUpdateContext); + scheduleUpdate(callback); + React.useEffect(flushUpdates); +} +//# sourceMappingURL=useScheduleUpdate.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useScheduleUpdate.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useScheduleUpdate.js.map new file mode 100644 index 00000000..7c5fd13e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useScheduleUpdate.js.map @@ -0,0 +1 @@ +{"version":3,"names":["MISSING_CONTEXT_ERROR","ScheduleUpdateContext","React","createContext","scheduleUpdate","Error","flushUpdates","useScheduleUpdate","callback","useContext","useEffect"],"sourceRoot":"../../src","sources":["useScheduleUpdate.tsx"],"mappings":";;;;;;;AAAA;AAA+B;AAAA;AAE/B,MAAMA,qBAAqB,GAAG,mCAAmC;AAE1D,MAAMC,qBAAqB,gBAAGC,KAAK,CAACC,aAAa,CAGrD;EACDC,cAAc,GAAG;IACf,MAAM,IAAIC,KAAK,CAACL,qBAAqB,CAAC;EACxC,CAAC;EACDM,YAAY,GAAG;IACb,MAAM,IAAID,KAAK,CAACL,qBAAqB,CAAC;EACxC;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AAOe,SAASO,iBAAiB,CAACC,QAAoB,EAAE;EAC9D,MAAM;IAAEJ,cAAc;IAAEE;EAAa,CAAC,GAAGJ,KAAK,CAACO,UAAU,CACvDR,qBAAqB,CACtB;EAEDG,cAAc,CAACI,QAAQ,CAAC;EAExBN,KAAK,CAACQ,SAAS,CAACJ,YAAY,CAAC;AAC/B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useSyncState.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useSyncState.js new file mode 100644 index 00000000..1b87d4fa --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useSyncState.js @@ -0,0 +1,68 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useSyncState; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const UNINTIALIZED_STATE = {}; + +/** + * This is definitely not compatible with concurrent mode, but we don't have a solution for sync state yet. + */ +function useSyncState(initialState) { + const stateRef = React.useRef(UNINTIALIZED_STATE); + const isSchedulingRef = React.useRef(false); + const isMountedRef = React.useRef(true); + React.useEffect(() => { + isMountedRef.current = true; + return () => { + isMountedRef.current = false; + }; + }, []); + if (stateRef.current === UNINTIALIZED_STATE) { + stateRef.current = + // @ts-expect-error: initialState is a function, but TypeScript doesn't think so + typeof initialState === 'function' ? initialState() : initialState; + } + const [trackingState, setTrackingState] = React.useState(stateRef.current); + const getState = React.useCallback(() => stateRef.current, []); + const setState = React.useCallback(state => { + if (state === stateRef.current || !isMountedRef.current) { + return; + } + stateRef.current = state; + if (!isSchedulingRef.current) { + setTrackingState(state); + } + }, []); + const scheduleUpdate = React.useCallback(callback => { + isSchedulingRef.current = true; + try { + callback(); + } finally { + isSchedulingRef.current = false; + } + }, []); + const flushUpdates = React.useCallback(() => { + if (!isMountedRef.current) { + return; + } + + // Make sure that the tracking state is up-to-date. + // We call it unconditionally, but React should skip the update if state is unchanged. + setTrackingState(stateRef.current); + }, []); + + // If we're rendering and the tracking state is out of date, update it immediately + // This will make sure that our updates are applied as early as possible. + if (trackingState !== stateRef.current) { + setTrackingState(stateRef.current); + } + const state = stateRef.current; + React.useDebugValue(state); + return [state, getState, setState, scheduleUpdate, flushUpdates]; +} +//# sourceMappingURL=useSyncState.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useSyncState.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useSyncState.js.map new file mode 100644 index 00000000..66236a7c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/useSyncState.js.map @@ -0,0 +1 @@ +{"version":3,"names":["UNINTIALIZED_STATE","useSyncState","initialState","stateRef","React","useRef","isSchedulingRef","isMountedRef","useEffect","current","trackingState","setTrackingState","useState","getState","useCallback","setState","state","scheduleUpdate","callback","flushUpdates","useDebugValue"],"sourceRoot":"../../src","sources":["useSyncState.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAE/B,MAAMA,kBAAkB,GAAG,CAAC,CAAC;;AAE7B;AACA;AACA;AACe,SAASC,YAAY,CAAIC,YAA4B,EAAE;EACpE,MAAMC,QAAQ,GAAGC,KAAK,CAACC,MAAM,CAAIL,kBAAkB,CAAQ;EAC3D,MAAMM,eAAe,GAAGF,KAAK,CAACC,MAAM,CAAC,KAAK,CAAC;EAC3C,MAAME,YAAY,GAAGH,KAAK,CAACC,MAAM,CAAC,IAAI,CAAC;EAEvCD,KAAK,CAACI,SAAS,CAAC,MAAM;IACpBD,YAAY,CAACE,OAAO,GAAG,IAAI;IAE3B,OAAO,MAAM;MACXF,YAAY,CAACE,OAAO,GAAG,KAAK;IAC9B,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,IAAIN,QAAQ,CAACM,OAAO,KAAKT,kBAAkB,EAAE;IAC3CG,QAAQ,CAACM,OAAO;IACd;IACA,OAAOP,YAAY,KAAK,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,EAAEE,QAAQ,EAAEE,cAAc,EAAEE,YAAY,CAAC;AAClE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/validatePathConfig.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/validatePathConfig.js new file mode 100644 index 00000000..717fb808 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/validatePathConfig.js @@ -0,0 +1,27 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = validatePathConfig; +const formatToList = items => items.map(key => `- ${key}`).join('\n'); +function validatePathConfig(config) { + let root = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + const validKeys = ['initialRouteName', 'screens']; + if (!root) { + validKeys.push('path', 'exact', 'stringify', 'parse'); + } + const invalidKeys = Object.keys(config).filter(key => !validKeys.includes(key)); + if (invalidKeys.length) { + throw new Error(`Found invalid properties in the configuration:\n${formatToList(invalidKeys)}\n\nDid you forget to specify them under a 'screens' property?\n\nYou can only specify the following properties:\n${formatToList(validKeys)}\n\nSee https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.`); + } + if (config.screens) { + Object.entries(config.screens).forEach(_ref => { + let [_, value] = _ref; + if (typeof value !== 'string') { + validatePathConfig(value, false); + } + }); + } +} +//# sourceMappingURL=validatePathConfig.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/validatePathConfig.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/validatePathConfig.js.map new file mode 100644 index 00000000..5c66eb5b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/commonjs/validatePathConfig.js.map @@ -0,0 +1 @@ +{"version":3,"names":["formatToList","items","map","key","join","validatePathConfig","config","root","validKeys","push","invalidKeys","Object","keys","filter","includes","length","Error","screens","entries","forEach","_","value"],"sourceRoot":"../../src","sources":["validatePathConfig.tsx"],"mappings":";;;;;;AAAA,MAAMA,YAAY,GAAIC,KAAe,IACnCA,KAAK,CAACC,GAAG,CAAEC,GAAG,IAAM,KAAIA,GAAI,EAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;AAE5B,SAASC,kBAAkB,CAACC,MAAW,EAAe;EAAA,IAAbC,IAAI,uEAAG,IAAI;EACjE,MAAMC,SAAS,GAAG,CAAC,kBAAkB,EAAE,SAAS,CAAC;EAEjD,IAAI,CAACD,IAAI,EAAE;IACTC,SAAS,CAACC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC;EACvD;EAEA,MAAMC,WAAW,GAAGC,MAAM,CAACC,IAAI,CAACN,MAAM,CAAC,CAACO,MAAM,CAC3CV,GAAG,IAAK,CAACK,SAAS,CAACM,QAAQ,CAACX,GAAG,CAAC,CAClC;EAED,IAAIO,WAAW,CAACK,MAAM,EAAE;IACtB,MAAM,IAAIC,KAAK,CACZ,mDAAkDhB,YAAY,CAC7DU,WAAW,CACX,qHAAoHV,YAAY,CAChIQ,SAAS,CACT,wHAAuH,CAC1H;EACH;EAEA,IAAIF,MAAM,CAACW,OAAO,EAAE;IAClBN,MAAM,CAACO,OAAO,CAACZ,MAAM,CAACW,OAAO,CAAC,CAACE,OAAO,CAAC,QAAgB;MAAA,IAAf,CAACC,CAAC,EAAEC,KAAK,CAAC;MAChD,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;QAC7BhB,kBAAkB,CAACgB,KAAK,EAAE,KAAK,CAAC;MAClC;IACF,CAAC,CAAC;EACJ;AACF"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/BaseNavigationContainer.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/BaseNavigationContainer.js new file mode 100644 index 00000000..9d2bda18 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/BaseNavigationContainer.js @@ -0,0 +1,335 @@ +import { CommonActions } from '@react-navigation/routers'; +import * as React from 'react'; +import checkDuplicateRouteNames from './checkDuplicateRouteNames'; +import checkSerializable from './checkSerializable'; +import { NOT_INITIALIZED_ERROR } from './createNavigationContainerRef'; +import EnsureSingleNavigator from './EnsureSingleNavigator'; +import findFocusedRoute from './findFocusedRoute'; +import NavigationBuilderContext from './NavigationBuilderContext'; +import NavigationContainerRefContext from './NavigationContainerRefContext'; +import NavigationContext from './NavigationContext'; +import NavigationRouteContext from './NavigationRouteContext'; +import NavigationStateContext from './NavigationStateContext'; +import UnhandledActionContext from './UnhandledActionContext'; +import useChildListeners from './useChildListeners'; +import useEventEmitter from './useEventEmitter'; +import useKeyedChildListeners from './useKeyedChildListeners'; +import useOptionsGetters from './useOptionsGetters'; +import { ScheduleUpdateContext } from './useScheduleUpdate'; +import useSyncState from './useSyncState'; +const serializableWarnings = []; +const duplicateNameWarnings = []; + +/** + * Remove `key` and `routeNames` from the state objects recursively to get partial state. + * + * @param state Initial state object. + */ +const getPartialState = state => { + if (state === undefined) { + return; + } + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { + key, + routeNames, + ...partialState + } = state; + return { + ...partialState, + stale: true, + routes: state.routes.map(route => { + if (route.state === undefined) { + return route; + } + return { + ...route, + state: getPartialState(route.state) + }; + }) + }; +}; + +/** + * Container component which holds the navigation state. + * This should be rendered at the root wrapping the whole app. + * + * @param props.initialState Initial state object for the navigation tree. + * @param props.onStateChange Callback which is called with the latest navigation state when it changes. + * @param props.children Child elements to render the content. + * @param props.ref Ref object which refers to the navigation object containing helper methods. + */ +const BaseNavigationContainer = /*#__PURE__*/React.forwardRef(function BaseNavigationContainer(_ref, ref) { + let { + initialState, + onStateChange, + onUnhandledAction, + independent, + children + } = _ref; + const parent = React.useContext(NavigationStateContext); + if (!parent.isDefault && !independent) { + throw new Error("Looks like you have nested a 'NavigationContainer' inside another. Normally you need only one container at the root of the app, so this was probably an error. If this was intentional, pass 'independent={true}' explicitly. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them."); + } + const [state, getState, setState, scheduleUpdate, flushUpdates] = useSyncState(() => getPartialState(initialState == null ? undefined : initialState)); + const isFirstMountRef = React.useRef(true); + const navigatorKeyRef = React.useRef(); + const getKey = React.useCallback(() => navigatorKeyRef.current, []); + const setKey = React.useCallback(key => { + navigatorKeyRef.current = key; + }, []); + const { + listeners, + addListener + } = useChildListeners(); + const { + keyedListeners, + addKeyedListener + } = useKeyedChildListeners(); + const dispatch = React.useCallback(action => { + if (listeners.focus[0] == null) { + console.error(NOT_INITIALIZED_ERROR); + } else { + listeners.focus[0](navigation => navigation.dispatch(action)); + } + }, [listeners.focus]); + const canGoBack = React.useCallback(() => { + if (listeners.focus[0] == null) { + return false; + } + const { + result, + handled + } = listeners.focus[0](navigation => navigation.canGoBack()); + if (handled) { + return result; + } else { + return false; + } + }, [listeners.focus]); + const resetRoot = React.useCallback(state => { + var _keyedListeners$getSt, _keyedListeners$getSt2; + const target = (state === null || state === void 0 ? void 0 : state.key) ?? ((_keyedListeners$getSt = (_keyedListeners$getSt2 = keyedListeners.getState).root) === null || _keyedListeners$getSt === void 0 ? void 0 : _keyedListeners$getSt.call(_keyedListeners$getSt2).key); + if (target == null) { + console.error(NOT_INITIALIZED_ERROR); + } else { + listeners.focus[0](navigation => navigation.dispatch({ + ...CommonActions.reset(state), + target + })); + } + }, [keyedListeners.getState, listeners.focus]); + const getRootState = React.useCallback(() => { + var _keyedListeners$getSt3, _keyedListeners$getSt4; + return (_keyedListeners$getSt3 = (_keyedListeners$getSt4 = keyedListeners.getState).root) === null || _keyedListeners$getSt3 === void 0 ? void 0 : _keyedListeners$getSt3.call(_keyedListeners$getSt4); + }, [keyedListeners.getState]); + const getCurrentRoute = React.useCallback(() => { + const state = getRootState(); + if (state == null) { + return undefined; + } + const route = findFocusedRoute(state); + return route; + }, [getRootState]); + const emitter = useEventEmitter(); + const { + addOptionsGetter, + getCurrentOptions + } = useOptionsGetters({}); + const navigation = React.useMemo(() => ({ + ...Object.keys(CommonActions).reduce((acc, name) => { + acc[name] = function () { + return ( + // @ts-expect-error: this is ok + dispatch(CommonActions[name](...arguments)) + ); + }; + return acc; + }, {}), + ...emitter.create('root'), + dispatch, + resetRoot, + isFocused: () => true, + canGoBack, + getParent: () => undefined, + getState: () => stateRef.current, + getRootState, + getCurrentRoute, + getCurrentOptions, + isReady: () => listeners.focus[0] != null + }), [canGoBack, dispatch, emitter, getCurrentOptions, getCurrentRoute, getRootState, listeners.focus, resetRoot]); + React.useImperativeHandle(ref, () => navigation, [navigation]); + const onDispatchAction = React.useCallback((action, noop) => { + emitter.emit({ + type: '__unsafe_action__', + data: { + action, + noop, + stack: stackRef.current + } + }); + }, [emitter]); + const lastEmittedOptionsRef = React.useRef(); + const onOptionsChange = React.useCallback(options => { + if (lastEmittedOptionsRef.current === options) { + return; + } + lastEmittedOptionsRef.current = options; + emitter.emit({ + type: 'options', + data: { + options + } + }); + }, [emitter]); + const stackRef = React.useRef(); + const builderContext = React.useMemo(() => ({ + addListener, + addKeyedListener, + onDispatchAction, + onOptionsChange, + stackRef + }), [addListener, addKeyedListener, onDispatchAction, onOptionsChange]); + const scheduleContext = React.useMemo(() => ({ + scheduleUpdate, + flushUpdates + }), [scheduleUpdate, flushUpdates]); + const isInitialRef = React.useRef(true); + const getIsInitial = React.useCallback(() => isInitialRef.current, []); + const context = React.useMemo(() => ({ + state, + getState, + setState, + getKey, + setKey, + getIsInitial, + addOptionsGetter + }), [state, getState, setState, getKey, setKey, getIsInitial, addOptionsGetter]); + const onStateChangeRef = React.useRef(onStateChange); + const stateRef = React.useRef(state); + React.useEffect(() => { + isInitialRef.current = false; + onStateChangeRef.current = onStateChange; + stateRef.current = state; + }); + React.useEffect(() => { + const hydratedState = getRootState(); + if (process.env.NODE_ENV !== 'production') { + if (hydratedState !== undefined) { + const serializableResult = checkSerializable(hydratedState); + if (!serializableResult.serializable) { + const { + location, + reason + } = serializableResult; + let path = ''; + let pointer = hydratedState; + let params = false; + for (let i = 0; i < location.length; i++) { + const curr = location[i]; + const prev = location[i - 1]; + pointer = pointer[curr]; + if (!params && curr === 'state') { + continue; + } else if (!params && curr === 'routes') { + if (path) { + path += ' > '; + } + } else if (!params && typeof curr === 'number' && prev === 'routes') { + var _pointer; + path += (_pointer = pointer) === null || _pointer === void 0 ? void 0 : _pointer.name; + } else if (!params) { + path += ` > ${curr}`; + params = true; + } else { + if (typeof curr === 'number' || /^[0-9]+$/.test(curr)) { + path += `[${curr}]`; + } else if (/^[a-z$_]+$/i.test(curr)) { + path += `.${curr}`; + } else { + path += `[${JSON.stringify(curr)}]`; + } + } + } + const message = `Non-serializable values were found in the navigation state. Check:\n\n${path} (${reason})\n\nThis can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.`; + if (!serializableWarnings.includes(message)) { + serializableWarnings.push(message); + console.warn(message); + } + } + const duplicateRouteNamesResult = checkDuplicateRouteNames(hydratedState); + if (duplicateRouteNamesResult.length) { + const message = `Found screens with the same name nested inside one another. Check:\n${duplicateRouteNamesResult.map(locations => `\n${locations.join(', ')}`)}\n\nThis can cause confusing behavior during navigation. Consider using unique names for each screen instead.`; + if (!duplicateNameWarnings.includes(message)) { + duplicateNameWarnings.push(message); + console.warn(message); + } + } + } + } + emitter.emit({ + type: 'state', + data: { + state + } + }); + if (!isFirstMountRef.current && onStateChangeRef.current) { + onStateChangeRef.current(hydratedState); + } + isFirstMountRef.current = false; + }, [getRootState, emitter, state]); + const defaultOnUnhandledAction = React.useCallback(action => { + if (process.env.NODE_ENV === 'production') { + return; + } + const payload = action.payload; + let message = `The action '${action.type}'${payload ? ` with payload ${JSON.stringify(action.payload)}` : ''} was not handled by any navigator.`; + switch (action.type) { + case 'NAVIGATE': + case 'PUSH': + case 'REPLACE': + case 'JUMP_TO': + if (payload !== null && payload !== void 0 && payload.name) { + message += `\n\nDo you have a screen named '${payload.name}'?\n\nIf you're trying to navigate to a screen in a nested navigator, see https://reactnavigation.org/docs/nesting-navigators#navigating-to-a-screen-in-a-nested-navigator.`; + } else { + message += `\n\nYou need to pass the name of the screen to navigate to.\n\nSee https://reactnavigation.org/docs/navigation-actions for usage.`; + } + break; + case 'GO_BACK': + case 'POP': + case 'POP_TO_TOP': + message += `\n\nIs there any screen to go back to?`; + break; + case 'OPEN_DRAWER': + case 'CLOSE_DRAWER': + case 'TOGGLE_DRAWER': + message += `\n\nIs your screen inside a Drawer navigator?`; + break; + } + message += `\n\nThis is a development-only warning and won't be shown in production.`; + console.error(message); + }, []); + let element = /*#__PURE__*/React.createElement(NavigationContainerRefContext.Provider, { + value: navigation + }, /*#__PURE__*/React.createElement(ScheduleUpdateContext.Provider, { + value: scheduleContext + }, /*#__PURE__*/React.createElement(NavigationBuilderContext.Provider, { + value: builderContext + }, /*#__PURE__*/React.createElement(NavigationStateContext.Provider, { + value: context + }, /*#__PURE__*/React.createElement(UnhandledActionContext.Provider, { + value: onUnhandledAction ?? defaultOnUnhandledAction + }, /*#__PURE__*/React.createElement(EnsureSingleNavigator, null, children)))))); + if (independent) { + // We need to clear any existing contexts for nested independent container to work correctly + element = /*#__PURE__*/React.createElement(NavigationRouteContext.Provider, { + value: undefined + }, /*#__PURE__*/React.createElement(NavigationContext.Provider, { + value: undefined + }, element)); + } + return element; +}); +export default BaseNavigationContainer; +//# sourceMappingURL=BaseNavigationContainer.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/BaseNavigationContainer.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/BaseNavigationContainer.js.map new file mode 100644 index 00000000..e19a0b4a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/BaseNavigationContainer.js.map @@ -0,0 +1 @@ +{"version":3,"names":["CommonActions","React","checkDuplicateRouteNames","checkSerializable","NOT_INITIALIZED_ERROR","EnsureSingleNavigator","findFocusedRoute","NavigationBuilderContext","NavigationContainerRefContext","NavigationContext","NavigationRouteContext","NavigationStateContext","UnhandledActionContext","useChildListeners","useEventEmitter","useKeyedChildListeners","useOptionsGetters","ScheduleUpdateContext","useSyncState","serializableWarnings","duplicateNameWarnings","getPartialState","state","undefined","key","routeNames","partialState","stale","routes","map","route","BaseNavigationContainer","forwardRef","ref","initialState","onStateChange","onUnhandledAction","independent","children","parent","useContext","isDefault","Error","getState","setState","scheduleUpdate","flushUpdates","isFirstMountRef","useRef","navigatorKeyRef","getKey","useCallback","current","setKey","listeners","addListener","keyedListeners","addKeyedListener","dispatch","action","focus","console","error","navigation","canGoBack","result","handled","resetRoot","target","root","reset","getRootState","getCurrentRoute","emitter","addOptionsGetter","getCurrentOptions","useMemo","Object","keys","reduce","acc","name","create","isFocused","getParent","stateRef","isReady","useImperativeHandle","onDispatchAction","noop","emit","type","data","stack","stackRef","lastEmittedOptionsRef","onOptionsChange","options","builderContext","scheduleContext","isInitialRef","getIsInitial","context","onStateChangeRef","useEffect","hydratedState","process","env","NODE_ENV","serializableResult","serializable","location","reason","path","pointer","params","i","length","curr","prev","test","JSON","stringify","message","includes","push","warn","duplicateRouteNamesResult","locations","join","defaultOnUnhandledAction","payload","element"],"sourceRoot":"../../src","sources":["BaseNavigationContainer.tsx"],"mappings":"AAAA,SACEA,aAAa,QAOR,2BAA2B;AAClC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,OAAOC,wBAAwB,MAAM,4BAA4B;AACjE,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,SAASC,qBAAqB,QAAQ,gCAAgC;AACtE,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,wBAAwB,MAAM,4BAA4B;AACjE,OAAOC,6BAA6B,MAAM,iCAAiC;AAC3E,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,sBAAsB,MAAM,0BAA0B;AAM7D,OAAOC,s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C,OAAO,IAAK,mIAAkI;QAChJ;QAEA;MACF,KAAK,SAAS;MACd,KAAK,KAAK;MACV,KAAK,YAAY;QACfA,OAAO,IAAK,wCAAuC;QACnD;MACF,KAAK,aAAa;MAClB,KAAK,cAAc;MACnB,KAAK,eAAe;QAClBA,OAAO,IAAK,+CAA8C;QAC1D;IAAM;IAGVA,OAAO,IAAK,0EAAyE;IAErF9D,OAAO,CAACC,KAAK,CAAC6D,OAAO,CAAC;EACxB,CAAC,EACD,EAAE,CACH;EAED,IAAIS,OAAO,gBACT,oBAAC,6BAA6B,CAAC,QAAQ;IAAC,KAAK,EAAErE;EAAW,gBACxD,oBAAC,qBAAqB,CAAC,QAAQ;IAAC,KAAK,EAAEoC;EAAgB,gBACrD,oBAAC,wBAAwB,CAAC,QAAQ;IAAC,KAAK,EAAED;EAAe,gBACvD,oBAAC,sBAAsB,CAAC,QAAQ;IAAC,KAAK,EAAEI;EAAQ,gBAC9C,oBAAC,sBAAsB,CAAC,QAAQ;IAC9B,KAAK,EAAElE,iBAAiB,IAAI8F;EAAyB,gBAErD,oBAAC,qBAAqB,QAAE5F,QAAQ,CAAyB,CACzB,CACF,CACA,CACL,CAEpC;EAED,IAAID,WAAW,EAAE;IACf;IACA+F,OAAO,gBACL,oBAAC,sBAAsB,CAAC,QAAQ;MAAC,KAAK,EAAE7G;IAAU,gBAChD,oBAAC,iBAAiB,CAAC,QAAQ;MAAC,KAAK,EAAEA;IAAU,GAC1C6G,OAAO,CACmB,CAEhC;EACH;EAEA,OAAOA,OAAO;AAChB,CAAC,CACF;AAED,eAAerG,uBAAuB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/CurrentRenderContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/CurrentRenderContext.js new file mode 100644 index 00000000..18e5ac3f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/CurrentRenderContext.js @@ -0,0 +1,9 @@ +import * as React from 'react'; + +/** + * Context which holds the values for the current navigation tree. + * Intended for use in SSR. This is not safe to use on the client. + */ +const CurrentRenderContext = /*#__PURE__*/React.createContext(undefined); +export default CurrentRenderContext; +//# sourceMappingURL=CurrentRenderContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/CurrentRenderContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/CurrentRenderContext.js.map new file mode 100644 index 00000000..909c4c89 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/CurrentRenderContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","CurrentRenderContext","createContext","undefined"],"sourceRoot":"../../src","sources":["CurrentRenderContext.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;;AAE9B;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,gBAAGD,KAAK,CAACE,aAAa,CAE9CC,SAAS,CAAC;AAEZ,eAAeF,oBAAoB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/EnsureSingleNavigator.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/EnsureSingleNavigator.js new file mode 100644 index 00000000..d2aa3041 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/EnsureSingleNavigator.js @@ -0,0 +1,33 @@ +import * as React from 'react'; +const MULTIPLE_NAVIGATOR_ERROR = `Another navigator is already registered for this container. You likely have multiple navigators under a single "NavigationContainer" or "Screen". Make sure each navigator is under a separate "Screen" container. See https://reactnavigation.org/docs/nesting-navigators for a guide on nesting.`; +export const SingleNavigatorContext = /*#__PURE__*/React.createContext(undefined); + +/** + * Component which ensures that there's only one navigator nested under it. + */ +export default function EnsureSingleNavigator(_ref) { + let { + children + } = _ref; + const navigatorKeyRef = React.useRef(); + const value = React.useMemo(() => ({ + register(key) { + const currentKey = navigatorKeyRef.current; + if (currentKey !== undefined && key !== currentKey) { + throw new Error(MULTIPLE_NAVIGATOR_ERROR); + } + navigatorKeyRef.current = key; + }, + unregister(key) { + const currentKey = navigatorKeyRef.current; + if (key !== currentKey) { + return; + } + navigatorKeyRef.current = undefined; + } + }), []); + return /*#__PURE__*/React.createElement(SingleNavigatorContext.Provider, { + value: value + }, children); +} +//# sourceMappingURL=EnsureSingleNavigator.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/EnsureSingleNavigator.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/EnsureSingleNavigator.js.map new file mode 100644 index 00000000..8bfb71ea --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/EnsureSingleNavigator.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","MULTIPLE_NAVIGATOR_ERROR","SingleNavigatorContext","createContext","undefined","EnsureSingleNavigator","children","navigatorKeyRef","useRef","value","useMemo","register","key","currentKey","current","Error","unregister"],"sourceRoot":"../../src","sources":["EnsureSingleNavigator.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAM9B,MAAMC,wBAAwB,GAAI,oSAAmS;AAErU,OAAO,MAAMC,sBAAsB,gBAAGF,KAAK,CAACG,aAAa,CAMvDC,SAAS,CAAC;;AAEZ;AACA;AACA;AACA,eAAe,SAASC,qBAAqB,OAAsB;EAAA,IAArB;IAAEC;EAAgB,CAAC;EAC/D,MAAMC,eAAe,GAAGP,KAAK,CAACQ,MAAM,EAAsB;EAE1D,MAAMC,KAAK,GAAGT,KAAK,CAACU,OAAO,CACzB,OAAO;IACLC,QAAQ,CAACC,GAAW,EAAE;MACpB,MAAMC,UAAU,GAAGN,eAAe,CAACO,OAAO;MAE1C,IAAID,UAAU,KAAKT,SAAS,IAAIQ,GAAG,KAAKC,UAAU,EAAE;QAClD,MAAM,IAAIE,KAAK,CAACd,wBAAwB,CAAC;MAC3C;MAEAM,eAAe,CAACO,OAAO,GAAGF,GAAG;IAC/B,CAAC;IACDI,UAAU,CAACJ,GAAW,EAAE;MACtB,MAAMC,UAAU,GAAGN,eAAe,CAACO,OAAO;MAE1C,IAAIF,GAAG,KAAKC,UAAU,EAAE;QACtB;MACF;MAEAN,eAAe,CAACO,OAAO,GAAGV,SAAS;IACrC;EACF,CAAC,CAAC,EACF,EAAE,CACH;EAED,oBACE,oBAAC,sBAAsB,CAAC,QAAQ;IAAC,KAAK,EAAEK;EAAM,GAC3CH,QAAQ,CACuB;AAEtC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/Group.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/Group.js new file mode 100644 index 00000000..b4f0c5e1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/Group.js @@ -0,0 +1,8 @@ +/** + * Empty component used for grouping screen configs. + */ +export default function Group(_) { + /* istanbul ignore next */ + return null; +} +//# sourceMappingURL=Group.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/Group.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/Group.js.map new file mode 100644 index 00000000..488ab11c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/Group.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Group","_"],"sourceRoot":"../../src","sources":["Group.tsx"],"mappings":"AAIA;AACA;AACA;AACA,eAAe,SAASA,KAAK,CAG3BC,CAA6C,EAAE;EAC/C;EACA,OAAO,IAAI;AACb"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationBuilderContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationBuilderContext.js new file mode 100644 index 00000000..614d486f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationBuilderContext.js @@ -0,0 +1,10 @@ +import * as React from 'react'; +/** + * Context which holds the required helpers needed to build nested navigators. + */ +const NavigationBuilderContext = /*#__PURE__*/React.createContext({ + onDispatchAction: () => undefined, + onOptionsChange: () => undefined +}); +export default NavigationBuilderContext; +//# sourceMappingURL=NavigationBuilderContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationBuilderContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationBuilderContext.js.map new file mode 100644 index 00000000..21629d49 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationBuilderContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","NavigationBuilderContext","createContext","onDispatchAction","undefined","onOptionsChange"],"sourceRoot":"../../src","sources":["NavigationBuilderContext.tsx"],"mappings":"AAKA,OAAO,KAAKA,KAAK,MAAM,OAAO;AA6C9B;AACA;AACA;AACA,MAAMC,wBAAwB,gBAAGD,KAAK,CAACE,aAAa,CAWjD;EACDC,gBAAgB,EAAE,MAAMC,SAAS;EACjCC,eAAe,EAAE,MAAMD;AACzB,CAAC,CAAC;AAEF,eAAeH,wBAAwB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContainerRefContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContainerRefContext.js new file mode 100644 index 00000000..1d45614e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContainerRefContext.js @@ -0,0 +1,7 @@ +import * as React from 'react'; +/** + * Context which holds the route prop for a screen. + */ +const NavigationContainerRefContext = /*#__PURE__*/React.createContext(undefined); +export default NavigationContainerRefContext; +//# sourceMappingURL=NavigationContainerRefContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContainerRefContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContainerRefContext.js.map new file mode 100644 index 00000000..e486a43e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContainerRefContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","NavigationContainerRefContext","createContext","undefined"],"sourceRoot":"../../src","sources":["NavigationContainerRefContext.tsx"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAI9B;AACA;AACA;AACA,MAAMC,6BAA6B,gBAAGD,KAAK,CAACE,aAAa,CAEvDC,SAAS,CAAC;AAEZ,eAAeF,6BAA6B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContext.js new file mode 100644 index 00000000..3139efce --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContext.js @@ -0,0 +1,7 @@ +import * as React from 'react'; +/** + * Context which holds the navigation prop for a screen. + */ +const NavigationContext = /*#__PURE__*/React.createContext(undefined); +export default NavigationContext; +//# sourceMappingURL=NavigationContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContext.js.map new file mode 100644 index 00000000..9a5622ce --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","NavigationContext","createContext","undefined"],"sourceRoot":"../../src","sources":["NavigationContext.tsx"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAI9B;AACA;AACA;AACA,MAAMC,iBAAiB,gBAAGD,KAAK,CAACE,aAAa,CAE3CC,SAAS,CAAC;AAEZ,eAAeF,iBAAiB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationHelpersContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationHelpersContext.js new file mode 100644 index 00000000..0b1ce4fa --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationHelpersContext.js @@ -0,0 +1,8 @@ +import * as React from 'react'; +/** + * Context which holds the navigation helpers of the parent navigator. + * Navigators should use this context in their view component. + */ +const NavigationHelpersContext = /*#__PURE__*/React.createContext(undefined); +export default NavigationHelpersContext; +//# sourceMappingURL=NavigationHelpersContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationHelpersContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationHelpersContext.js.map new file mode 100644 index 00000000..90d25eda --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationHelpersContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","NavigationHelpersContext","createContext","undefined"],"sourceRoot":"../../src","sources":["NavigationHelpersContext.tsx"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAI9B;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,gBAAGD,KAAK,CAACE,aAAa,CAElDC,SAAS,CAAC;AAEZ,eAAeF,wBAAwB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationRouteContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationRouteContext.js new file mode 100644 index 00000000..58cb81e2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationRouteContext.js @@ -0,0 +1,8 @@ +import * as React from 'react'; + +/** + * Context which holds the route prop for a screen. + */ +const NavigationRouteContext = /*#__PURE__*/React.createContext(undefined); +export default NavigationRouteContext; +//# sourceMappingURL=NavigationRouteContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationRouteContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationRouteContext.js.map new file mode 100644 index 00000000..2eae33d3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationRouteContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","NavigationRouteContext","createContext","undefined"],"sourceRoot":"../../src","sources":["NavigationRouteContext.tsx"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;;AAE9B;AACA;AACA;AACA,MAAMC,sBAAsB,gBAAGD,KAAK,CAACE,aAAa,CAChDC,SAAS,CACV;AAED,eAAeF,sBAAsB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationStateContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationStateContext.js new file mode 100644 index 00000000..c65d9558 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationStateContext.js @@ -0,0 +1,21 @@ +import * as React from 'react'; +const MISSING_CONTEXT_ERROR = "Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'? See https://reactnavigation.org/docs/getting-started for setup instructions."; +export default /*#__PURE__*/React.createContext({ + isDefault: true, + get getKey() { + throw new Error(MISSING_CONTEXT_ERROR); + }, + get setKey() { + throw new Error(MISSING_CONTEXT_ERROR); + }, + get getState() { + throw new Error(MISSING_CONTEXT_ERROR); + }, + get setState() { + throw new Error(MISSING_CONTEXT_ERROR); + }, + get getIsInitial() { + throw new Error(MISSING_CONTEXT_ERROR); + } +}); +//# sourceMappingURL=NavigationStateContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationStateContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationStateContext.js.map new file mode 100644 index 00000000..8c975383 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/NavigationStateContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","MISSING_CONTEXT_ERROR","createContext","isDefault","getKey","Error","setKey","getState","setState","getIsInitial"],"sourceRoot":"../../src","sources":["NavigationStateContext.tsx"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,MAAMC,qBAAqB,GACzB,wKAAwK;AAE1K,4BAAeD,KAAK,CAACE,aAAa,CAc/B;EACDC,SAAS,EAAE,IAAI;EAEf,IAAIC,MAAM,GAAQ;IAChB,MAAM,IAAIC,KAAK,CAACJ,qBAAqB,CAAC;EACxC,CAAC;EACD,IAAIK,MAAM,GAAQ;IAChB,MAAM,IAAID,KAAK,CAACJ,qBAAqB,CAAC;EACxC,CAAC;EACD,IAAIM,QAAQ,GAAQ;IAClB,MAAM,IAAIF,KAAK,CAACJ,qBAAqB,CAAC;EACxC,CAAC;EACD,IAAIO,QAAQ,GAAQ;IAClB,MAAM,IAAIH,KAAK,CAACJ,qBAAqB,CAAC;EACxC,CAAC;EACD,IAAIQ,YAAY,GAAQ;IACtB,MAAM,IAAIJ,KAAK,CAACJ,qBAAqB,CAAC;EACxC;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveContext.js new file mode 100644 index 00000000..cc89be79 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveContext.js @@ -0,0 +1,10 @@ +import * as React from 'react'; + +/** + * A type of an object that have a route key as an object key + * and a value whether to prevent that route. + */ + +const PreventRemoveContext = /*#__PURE__*/React.createContext(undefined); +export default PreventRemoveContext; +//# sourceMappingURL=PreventRemoveContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveContext.js.map new file mode 100644 index 00000000..c6b4b9f8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","PreventRemoveContext","createContext","undefined"],"sourceRoot":"../../src","sources":["PreventRemoveContext.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;;AAE9B;AACA;AACA;AACA;;AAGA,MAAMC,oBAAoB,gBAAGD,KAAK,CAACE,aAAa,CAU9CC,SAAS,CAAC;AAEZ,eAAeF,oBAAoB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveProvider.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveProvider.js new file mode 100644 index 00000000..ff40379d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveProvider.js @@ -0,0 +1,87 @@ +import { nanoid } from 'nanoid/non-secure'; +import * as React from 'react'; +import useLatestCallback from 'use-latest-callback'; +import NavigationHelpersContext from './NavigationHelpersContext'; +import NavigationRouteContext from './NavigationRouteContext'; +import PreventRemoveContext from './PreventRemoveContext'; +/** + * Util function to transform map of prevented routes to a simpler object. + */ +const transformPreventedRoutes = preventedRoutesMap => { + const preventedRoutesToTransform = [...preventedRoutesMap.values()]; + const preventedRoutes = preventedRoutesToTransform.reduce((acc, _ref) => { + var _acc$routeKey; + let { + routeKey, + preventRemove + } = _ref; + acc[routeKey] = { + preventRemove: ((_acc$routeKey = acc[routeKey]) === null || _acc$routeKey === void 0 ? void 0 : _acc$routeKey.preventRemove) || preventRemove + }; + return acc; + }, {}); + return preventedRoutes; +}; + +/** + * Component used for managing which routes have to be prevented from removal in native-stack. + */ +export default function PreventRemoveProvider(_ref2) { + let { + children + } = _ref2; + const [parentId] = React.useState(() => nanoid()); + const [preventedRoutesMap, setPreventedRoutesMap] = React.useState(new Map()); + const navigation = React.useContext(NavigationHelpersContext); + const route = React.useContext(NavigationRouteContext); + const preventRemoveContextValue = React.useContext(PreventRemoveContext); + // take `setPreventRemove` from parent context - if exist it means we're in a nested context + const setParentPrevented = preventRemoveContextValue === null || preventRemoveContextValue === void 0 ? void 0 : preventRemoveContextValue.setPreventRemove; + const setPreventRemove = useLatestCallback((id, routeKey, preventRemove) => { + if (preventRemove && (navigation == null || navigation !== null && navigation !== void 0 && navigation.getState().routes.every(route => route.key !== routeKey))) { + throw new Error(`Couldn't find a route with the key ${routeKey}. Is your component inside NavigationContent?`); + } + setPreventedRoutesMap(prevPrevented => { + var _prevPrevented$get, _prevPrevented$get2; + // values haven't changed - do nothing + if (routeKey === ((_prevPrevented$get = prevPrevented.get(id)) === null || _prevPrevented$get === void 0 ? void 0 : _prevPrevented$get.routeKey) && preventRemove === ((_prevPrevented$get2 = prevPrevented.get(id)) === null || _prevPrevented$get2 === void 0 ? void 0 : _prevPrevented$get2.preventRemove)) { + return prevPrevented; + } + const nextPrevented = new Map(prevPrevented); + if (preventRemove) { + nextPrevented.set(id, { + routeKey, + preventRemove + }); + } else { + nextPrevented.delete(id); + } + return nextPrevented; + }); + }); + const isPrevented = [...preventedRoutesMap.values()].some(_ref3 => { + let { + preventRemove + } = _ref3; + return preventRemove; + }); + React.useEffect(() => { + if ((route === null || route === void 0 ? void 0 : route.key) !== undefined && setParentPrevented !== undefined) { + // when route is defined (and setParentPrevented) it means we're in a nested stack + // route.key then will be the route key of parent + setParentPrevented(parentId, route.key, isPrevented); + return () => { + setParentPrevented(parentId, route.key, false); + }; + } + return; + }, [parentId, isPrevented, route === null || route === void 0 ? void 0 : route.key, setParentPrevented]); + const value = React.useMemo(() => ({ + setPreventRemove, + preventedRoutes: transformPreventedRoutes(preventedRoutesMap) + }), [setPreventRemove, preventedRoutesMap]); + return /*#__PURE__*/React.createElement(PreventRemoveContext.Provider, { + value: value + }, children); +} +//# sourceMappingURL=PreventRemoveProvider.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveProvider.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveProvider.js.map new file mode 100644 index 00000000..3f09cade --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/PreventRemoveProvider.js.map @@ -0,0 +1 @@ +{"version":3,"names":["nanoid","React","useLatestCallback","NavigationHelpersContext","NavigationRouteContext","PreventRemoveContext","transformPreventedRoutes","preventedRoutesMap","preventedRoutesToTransform","values","preventedRoutes","reduce","acc","routeKey","preventRemove","PreventRemoveProvider","children","parentId","useState","setPreventedRoutesMap","Map","navigation","useContext","route","preventRemoveContextValue","setParentPrevented","setPreventRemove","id","getState","routes","every","key","Error","prevPrevented","get","nextPrevented","set","delete","isPrevented","some","useEffect","undefined","value","useMemo"],"sourceRoot":"../../src","sources":["PreventRemoveProvider.tsx"],"mappings":"AAAA,SAASA,MAAM,QAAQ,mBAAmB;AAC1C,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,iBAAiB,MAAM,qBAAqB;AAEnD,OAAOC,wBAAwB,MAAM,4BAA4B;AACjE,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,oBAAoB,MAA2B,wBAAwB;AAc9E;AACA;AACA;AACA,MAAMC,wBAAwB,GAC5BC,kBAAsC,IAClB;EACpB,MAAMC,0BAA0B,GAAG,CAAC,GAAGD,kBAAkB,CAACE,MAAM,EAAE,CAAC;EAEnE,MAAMC,eAAe,GAAGF,0BAA0B,CAACG,MAAM,CACvD,CAACC,GAAG,WAAkC;IAAA;IAAA,IAAhC;MAAEC,QAAQ;MAAEC;IAAc,CAAC;IAC/BF,GAAG,CAACC,QAAQ,CAAC,GAAG;MACdC,aAAa,EAAE,kBAAAF,GAAG,CAACC,QAAQ,CAAC,kDAAb,cAAeC,aAAa,KAAIA;IACjD,CAAC;IACD,OAAOF,GAAG;EACZ,CAAC,EACD,CAAC,CAAC,CACH;EAED,OAAOF,eAAe;AACxB,CAAC;;AAED;AACA;AACA;AACA,eAAe,SAASK,qBAAqB,QAAsB;EAAA,IAArB;IAAEC;EAAgB,CAAC;EAC/D,MAAM,CAACC,QAAQ,CAAC,GAAGhB,KAAK,CAACiB,QAAQ,CAAC,MAAMlB,MAAM,EAAE,CAAC;EACjD,MAAM,CAACO,kBAAkB,EAAEY,qBAAqB,CAAC,GAC/ClB,KAAK,CAACiB,QAAQ,CAAqB,IAAIE,GAAG,EAAE,CAAC;EAE/C,MAAMC,UAAU,GAAGpB,KAAK,CAACqB,UAAU,CAACnB,wBAAwB,CAAC;EAC7D,MAAMoB,KAAK,GAAGtB,KAAK,CAACqB,UAAU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EAAA,EACrC;EAEDb,KAAK,CAACuC,SAAS,CAAC,MAAM;IACpB,IAAI,CAAAjB,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEQ,GAAG,MAAKU,SAAS,IAAIhB,kBAAkB,KAAKgB,SAAS,EAAE;MAChE;MACA;MACAhB,kBAAkB,CAACR,QAAQ,EAAEM,KAAK,CAACQ,GAAG,EAAEO,WAAW,CAAC;MACpD,OAAO,MAAM;QACXb,kBAAkB,CAACR,QAAQ,EAAEM,KAAK,CAACQ,GAAG,EAAE,KAAK,CAAC;MAChD,CAAC;IACH;IAEA;EACF,CAAC,EAAE,CAACd,QAAQ,EAAEqB,WAAW,EAAEf,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEQ,GAAG,EAAEN,kBAAkB,CAAC,CAAC;EAE3D,MAAMiB,KAAK,GAAGzC,KAAK,CAAC0C,OAAO,CACzB,OAAO;IACLjB,gBAAgB;IAChBhB,eAAe,EAAEJ,wBAAwB,CAACC,kBAAkB;EAC9D,CAAC,CAAC,EACF,CAACmB,gBAAgB,EAAEnB,kBAAkB,CAAC,CACvC;EAED,oBACE,oBAAC,oBAAoB,CAAC,QAAQ;IAAC,KAAK,EAAEmC;EAAM,GACzC1B,QAAQ,CACqB;AAEpC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/SceneView.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/SceneView.js new file mode 100644 index 00000000..5f0e344c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/SceneView.js @@ -0,0 +1,84 @@ +import * as React from 'react'; +import EnsureSingleNavigator from './EnsureSingleNavigator'; +import NavigationStateContext from './NavigationStateContext'; +import StaticContainer from './StaticContainer'; +import useOptionsGetters from './useOptionsGetters'; +/** + * Component which takes care of rendering the screen for a route. + * It provides all required contexts and applies optimizations when applicable. + */ +export default function SceneView(_ref) { + let { + screen, + route, + navigation, + routeState, + getState, + setState, + options, + clearOptions + } = _ref; + const navigatorKeyRef = React.useRef(); + const getKey = React.useCallback(() => navigatorKeyRef.current, []); + const { + addOptionsGetter + } = useOptionsGetters({ + key: route.key, + options, + navigation + }); + const setKey = React.useCallback(key => { + navigatorKeyRef.current = key; + }, []); + const getCurrentState = React.useCallback(() => { + const state = getState(); + const currentRoute = state.routes.find(r => r.key === route.key); + return currentRoute ? currentRoute.state : undefined; + }, [getState, route.key]); + const setCurrentState = React.useCallback(child => { + const state = getState(); + setState({ + ...state, + routes: state.routes.map(r => r.key === route.key ? { + ...r, + state: child + } : r) + }); + }, [getState, route.key, setState]); + const isInitialRef = React.useRef(true); + React.useEffect(() => { + isInitialRef.current = false; + }); + + // Clear options set by this screen when it is unmounted + React.useEffect(() => { + return clearOptions; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + const getIsInitial = React.useCallback(() => isInitialRef.current, []); + const context = React.useMemo(() => ({ + state: routeState, + getState: getCurrentState, + setState: setCurrentState, + getKey, + setKey, + getIsInitial, + addOptionsGetter + }), [routeState, getCurrentState, setCurrentState, getKey, setKey, getIsInitial, addOptionsGetter]); + const ScreenComponent = screen.getComponent ? screen.getComponent() : screen.component; + return /*#__PURE__*/React.createElement(NavigationStateContext.Provider, { + value: context + }, /*#__PURE__*/React.createElement(EnsureSingleNavigator, null, /*#__PURE__*/React.createElement(StaticContainer, { + name: screen.name, + render: ScreenComponent || screen.children, + navigation: navigation, + route: route + }, ScreenComponent !== undefined ? /*#__PURE__*/React.createElement(ScreenComponent, { + navigation: navigation, + route: route + }) : screen.children !== undefined ? screen.children({ + navigation, + route + }) : null))); +} +//# sourceMappingURL=SceneView.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/SceneView.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/SceneView.js.map new file mode 100644 index 00000000..82a528fe --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/SceneView.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","EnsureSingleNavigator","NavigationStateContext","StaticContainer","useOptionsGetters","SceneView","screen","route","navigation","routeState","getState","setState","options","clearOptions","navigatorKeyRef","useRef","getKey","useCallback","current","addOptionsGetter","key","setKey","getCurrentState","state","currentRoute","routes","find","r","undefined","setCurrentState","child","map","isInitialRef","useEffect","getIsInitial","context","useMemo","ScreenComponent","getComponent","component","name","children"],"sourceRoot":"../../src","sources":["SceneView.tsx"],"mappings":"AAMA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,eAAe,MAAM,mBAAmB;AAE/C,OAAOC,iBAAiB,MAAM,qBAAqB;AAmBnD;AACA;AACA;AACA;AACA,eAAe,SAASC,SAAS,OAYD;EAAA,IAT9B;IACAC,MAAM;IACNC,KAAK;IACLC,UAAU;IACVC,UAAU;IACVC,QAAQ;IACRC,QAAQ;IACRC,OAAO;IACPC;EAC2B,CAAC;EAC5B,MAAMC,eAAe,GAAGd,KAAK,CAACe,MAAM,EAAsB;EAC1D,MAAMC,MAAM,GAAGhB,KAAK,CAACiB,WAAW,CAAC,MAAMH,eAAe,CAACI,OAAO,EAAE,EAAE,CAAC;EAEnE,MAAM;IAAEC;EAAiB,CAAC,GAAGf,iBAAiB,CAAC;IAC7CgB,GAAG,EAAEb,KAAK,CAACa,GAAG;IACdR,OAAO;IACPJ;EACF,CAAC,CAAC;EAEF,MAAMa,MAAM,GAAGrB,KAAK,CAACiB,WAAW,CAAEG,GAAW,IAAK;IAChDN,eAAe,CAACI,OAAO,GAAGE,GAAG;EAC/B,CAAC,EAAE,EAAE,CAAC;EAEN,MAAME,eAAe,GAAGtB,KAAK,CAACiB,WAAW,CAAC,MAAM;IAC9C,MAAMM,KAAK,GAAGb,QAAQ,EAAE;IACxB,MAAMc,YAAY,GAAGD,KAAK,CAACE,MAAM,CAACC,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACP,GAAG,K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EACZf,gBAAgB,CACjB,CACF;EAED,MAAMkB,eAAe,GAAG/B,MAAM,CAACgC,YAAY,GACvChC,MAAM,CAACgC,YAAY,EAAE,GACrBhC,MAAM,CAACiC,SAAS;EAEpB,oBACE,oBAAC,sBAAsB,CAAC,QAAQ;IAAC,KAAK,EAAEJ;EAAQ,gBAC9C,oBAAC,qBAAqB,qBACpB,oBAAC,eAAe;IACd,IAAI,EAAE7B,MAAM,CAACkC,IAAK;IAClB,MAAM,EAAEH,eAAe,IAAI/B,MAAM,CAACmC,QAAS;IAC3C,UAAU,EAAEjC,UAAW;IACvB,KAAK,EAAED;EAAM,GAEZ8B,eAAe,KAAKT,SAAS,gBAC5B,oBAAC,eAAe;IAAC,UAAU,EAAEpB,UAAW;IAAC,KAAK,EAAED;EAAM,EAAG,GACvDD,MAAM,CAACmC,QAAQ,KAAKb,SAAS,GAC/BtB,MAAM,CAACmC,QAAQ,CAAC;IAAEjC,UAAU;IAAED;EAAM,CAAC,CAAC,GACpC,IAAI,CACQ,CACI,CACQ;AAEtC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/Screen.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/Screen.js new file mode 100644 index 00000000..4993f9ae --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/Screen.js @@ -0,0 +1,8 @@ +/** + * Empty component used for specifying route configuration. + */ +export default function Screen(_) { + /* istanbul ignore next */ + return null; +} +//# sourceMappingURL=Screen.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/Screen.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/Screen.js.map new file mode 100644 index 00000000..13959b35 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/Screen.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Screen","_"],"sourceRoot":"../../src","sources":["Screen.tsx"],"mappings":"AAIA;AACA;AACA;AACA,eAAe,SAASA,MAAM,CAM5BC,CAAoE,EAAE;EACtE;EACA,OAAO,IAAI;AACb"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/StaticContainer.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/StaticContainer.js new file mode 100644 index 00000000..b8a26fec --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/StaticContainer.js @@ -0,0 +1,25 @@ +import * as React from 'react'; + +/** + * Component which prevents updates for children if no props changed + */ +function StaticContainer(props) { + return props.children; +} +export default /*#__PURE__*/React.memo(StaticContainer, (prevProps, nextProps) => { + const prevPropKeys = Object.keys(prevProps); + const nextPropKeys = Object.keys(nextProps); + if (prevPropKeys.length !== nextPropKeys.length) { + return false; + } + for (const key of prevPropKeys) { + if (key === 'children') { + continue; + } + if (prevProps[key] !== nextProps[key]) { + return false; + } + } + return true; +}); +//# sourceMappingURL=StaticContainer.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/StaticContainer.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/StaticContainer.js.map new file mode 100644 index 00000000..f8291652 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/StaticContainer.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","StaticContainer","props","children","memo","prevProps","nextProps","prevPropKeys","Object","keys","nextPropKeys","length","key"],"sourceRoot":"../../src","sources":["StaticContainer.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;;AAE9B;AACA;AACA;AACA,SAASC,eAAe,CAACC,KAAU,EAAE;EACnC,OAAOA,KAAK,CAACC,QAAQ;AACvB;AAEA,4BAAeH,KAAK,CAACI,IAAI,CAACH,eAAe,EAAE,CAACI,SAAc,EAAEC,SAAc,KAAK;EAC7E,MAAMC,YAAY,GAAGC,MAAM,CAACC,IAAI,CAACJ,SAAS,CAAC;EAC3C,MAAMK,YAAY,GAAGF,MAAM,CAACC,IAAI,CAACH,SAAS,CAAC;EAE3C,IAAIC,YAAY,CAACI,MAAM,KAAKD,YAAY,CAACC,MAAM,EAAE;IAC/C,OAAO,KAAK;EACd;EAEA,KAAK,MAAMC,GAAG,IAAIL,YAAY,EAAE;IAC9B,IAAIK,GAAG,KAAK,UAAU,EAAE;MACtB;IACF;IAEA,IAAIP,SAAS,CAACO,GAAG,CAAC,KAAKN,SAAS,CAACM,GAAG,CAAC,EAAE;MACrC,OAAO,KAAK;IACd;EACF;EAEA,OAAO,IAAI;AACb,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/UnhandledActionContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/UnhandledActionContext.js new file mode 100644 index 00000000..27a70bd1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/UnhandledActionContext.js @@ -0,0 +1,4 @@ +import * as React from 'react'; +const UnhandledActionContext = /*#__PURE__*/React.createContext(undefined); +export default UnhandledActionContext; +//# sourceMappingURL=UnhandledActionContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/UnhandledActionContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/UnhandledActionContext.js.map new file mode 100644 index 00000000..9214643c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/UnhandledActionContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","UnhandledActionContext","createContext","undefined"],"sourceRoot":"../../src","sources":["UnhandledActionContext.tsx"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,MAAMC,sBAAsB,gBAAGD,KAAK,CAACE,aAAa,CAEhDC,SAAS,CAAC;AAEZ,eAAeF,sBAAsB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkDuplicateRouteNames.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkDuplicateRouteNames.js new file mode 100644 index 00000000..cfd3f0b1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkDuplicateRouteNames.js @@ -0,0 +1,20 @@ +export default function checkDuplicateRouteNames(state) { + const duplicates = []; + const getRouteNames = (location, state) => { + state.routes.forEach(route => { + var _route$state, _route$state$routeNam; + const currentLocation = location ? `${location} > ${route.name}` : route.name; + (_route$state = route.state) === null || _route$state === void 0 ? void 0 : (_route$state$routeNam = _route$state.routeNames) === null || _route$state$routeNam === void 0 ? void 0 : _route$state$routeNam.forEach(routeName => { + if (routeName === route.name) { + duplicates.push([currentLocation, `${currentLocation} > ${route.name}`]); + } + }); + if (route.state) { + getRouteNames(currentLocation, route.state); + } + }); + }; + getRouteNames('', state); + return duplicates; +} +//# sourceMappingURL=checkDuplicateRouteNames.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkDuplicateRouteNames.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkDuplicateRouteNames.js.map new file mode 100644 index 00000000..4904d8f4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkDuplicateRouteNames.js.map @@ -0,0 +1 @@ +{"version":3,"names":["checkDuplicateRouteNames","state","duplicates","getRouteNames","location","routes","forEach","route","currentLocation","name","routeNames","routeName","push"],"sourceRoot":"../../src","sources":["checkDuplicateRouteNames.tsx"],"mappings":"AAEA,eAAe,SAASA,wBAAwB,CAACC,KAAsB,EAAE;EACvE,MAAMC,UAAsB,GAAG,EAAE;EAEjC,MAAMC,aAAa,GAAG,CACpBC,QAAgB,EAChBH,KAAsD,KACnD;IACHA,KAAK,CAACI,MAAM,CAACC,OAAO,CAAEC,KAA6B,IAAK;MAAA;MACtD,MAAMC,eAAe,GAAGJ,QAAQ,GAC3B,GAAEA,QAAS,MAAKG,KAAK,CAACE,IAAK,EAAC,GAC7BF,KAAK,CAACE,IAAI;MAEd,gBAAAF,KAAK,CAACN,KAAK,0EAAX,aAAaS,UAAU,0DAAvB,sBAAyBJ,OAAO,CAAEK,SAAS,IAAK;QAC9C,IAAIA,SAAS,KAAKJ,KAAK,CAACE,IAAI,EAAE;UAC5BP,UAAU,CAACU,IAAI,CAAC,CACdJ,eAAe,EACd,GAAEA,eAAgB,MAAKD,KAAK,CAACE,IAAK,EAAC,CACrC,CAAC;QACJ;MACF,CAAC,CAAC;MAEF,IAAIF,KAAK,CAACN,KAAK,EAAE;QACfE,aAAa,CAACK,eAAe,EAAED,KAAK,CAACN,KAAK,CAAC;MAC7C;IACF,CAAC,CAAC;EACJ,CAAC;EAEDE,aAAa,CAAC,EAAE,EAAEF,KAAK,CAAC;EAExB,OAAOC,UAAU;AACnB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkSerializable.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkSerializable.js new file mode 100644 index 00000000..4e765fae --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkSerializable.js @@ -0,0 +1,44 @@ +const checkSerializableWithoutCircularReference = (o, seen, location) => { + if (o === undefined || o === null || typeof o === 'boolean' || typeof o === 'number' || typeof o === 'string') { + return { + serializable: true + }; + } + if (Object.prototype.toString.call(o) !== '[object Object]' && !Array.isArray(o)) { + return { + serializable: false, + location, + reason: typeof o === 'function' ? 'Function' : String(o) + }; + } + if (seen.has(o)) { + return { + serializable: false, + reason: 'Circular reference', + location + }; + } + seen.add(o); + if (Array.isArray(o)) { + for (let i = 0; i < o.length; i++) { + const childResult = checkSerializableWithoutCircularReference(o[i], new Set(seen), [...location, i]); + if (!childResult.serializable) { + return childResult; + } + } + } else { + for (const key in o) { + const childResult = checkSerializableWithoutCircularReference(o[key], new Set(seen), [...location, key]); + if (!childResult.serializable) { + return childResult; + } + } + } + return { + serializable: true + }; +}; +export default function checkSerializable(o) { + return checkSerializableWithoutCircularReference(o, new Set(), []); +} +//# sourceMappingURL=checkSerializable.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkSerializable.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkSerializable.js.map new file mode 100644 index 00000000..85c695fe --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/checkSerializable.js.map @@ -0,0 +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,GAAG,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,QAAQ,EACrB;IACA,OAAO;MAAEI,YAAY,EAAE;IAAK,CAAC;EAC/B;EAEA,IACEC,MAAM,CAACC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACR,CAAC,CAAC,KAAK,iBAAiB,IACvD,CAACS,KAAK,CAACC,OAAO,CAACV,CAAC,CAAC,EACjB;IACA,OAAO;MACLI,YAAY,EAAE,KAAK;MACnBF,QAAQ;MACRS,MAAM,EAAE,OAAOX,CAAC,KAAK,UAAU,GAAG,UAAU,GAAGY,MAAM,CAACZ,CAAC;IACzD,CAAC;EACH;EAEA,IAAIC,IAAI,CAACY,GAAG,CAACb,CAAC,CAAC,EAAE;IACf,OAAO;MACLI,YAAY,EAAE,KAAK;MACnBO,MAAM,EAAE,oBAAoB;MAC5BT;IACF,CAAC;EACH;EAEAD,IAAI,CAACa,GAAG,CAACd,CAAC,CAAC;EAEX,IAAIS,KAAK,CAACC,OAAO,CAACV,CAAC,CAAC,EAAE;IACpB,KAAK,IAAIe,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGf,CAAC,CAACgB,MAAM,EAAED,CAAC,EAAE,EAAE;MACjC,MAAME,WAAW,GAAGlB,yCAAyC,CAC3DC,CAAC,CAACe,CAAC,CAAC,EACJ,IAAIG,GAAG,CAAMjB,IAAI,CAAC,EAClB,CAAC,GAAGC,QAAQ,EAAEa,CAAC,CAAC,CACjB;MAED,IAAI,CAACE,WAAW,CAACb,YAAY,EAAE;QAC7B,OAAOa,WAAW;MACpB;IACF;EACF,CAAC,MAAM;IACL,KAAK,MAAME,GAAG,IAAInB,CAAC,EAAE;MACnB,MAAMiB,WAAW,GAAGlB,yCAAyC,CAC3DC,CAAC,CAACmB,GAAG,CAAC,EACN,IAAID,GAAG,CAAMjB,IAAI,CAAC,EAClB,CAAC,GAAGC,QAAQ,EAAEiB,GAAG,CAAC,CACnB;MAED,IAAI,CAACF,WAAW,CAACb,YAAY,EAAE;QAC7B,OAAOa,WAAW;MACpB;IACF;EACF;EAEA,OAAO;IAAEb,YAAY,EAAE;EAAK,CAAC;AAC/B,CAAC;AAED,eAAe,SAASgB,iBAAiB,CAACpB,CAAyB,EAAE;EACnE,OAAOD,yCAAyC,CAACC,CAAC,EAAE,IAAIkB,GAAG,EAAO,EAAE,EAAE,CAAC;AACzE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigationContainerRef.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigationContainerRef.js new file mode 100644 index 00000000..e4fe04e3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigationContainerRef.js @@ -0,0 +1,66 @@ +import { CommonActions } from '@react-navigation/routers'; +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."; +export default function createNavigationContainerRef() { + const methods = [...Object.keys(CommonActions), 'addListener', 'removeListener', 'resetRoot', 'dispatch', 'isFocused', 'canGoBack', 'getRootState', 'getState', 'getParent', 'getCurrentRoute', 'getCurrentOptions']; + const listeners = {}; + const removeListener = (event, callback) => { + if (listeners[event]) { + listeners[event] = listeners[event].filter(cb => cb !== callback); + } + }; + let current = null; + const ref = { + get current() { + return current; + }, + set current(value) { + current = value; + if (value != null) { + Object.entries(listeners).forEach(_ref => { + let [event, callbacks] = _ref; + callbacks.forEach(callback => { + value.addListener(event, callback); + }); + }); + } + }, + isReady: () => { + if (current == null) { + return false; + } + return current.isReady(); + }, + ...methods.reduce((acc, name) => { + acc[name] = function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + if (current == null) { + switch (name) { + case 'addListener': + { + const [event, callback] = args; + listeners[event] = listeners[event] || []; + listeners[event].push(callback); + return () => removeListener(event, callback); + } + case 'removeListener': + { + const [event, callback] = args; + removeListener(event, callback); + break; + } + default: + console.error(NOT_INITIALIZED_ERROR); + } + } else { + // @ts-expect-error: this is ok + return current[name](...args); + } + }; + return acc; + }, {}) + }; + return ref; +} +//# sourceMappingURL=createNavigationContainerRef.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigationContainerRef.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigationContainerRef.js.map new file mode 100644 index 00000000..9f6a7439 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigationContainerRef.js.map @@ -0,0 +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,eAAe,SAASC,4BAA4B,GAEF;EAChD,MAAMC,OAAO,GAAG,CACd,GAAGC,MAAM,CAACC,IAAI,CAACL,aA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UACnB,QAAQU,IAAI;YACV,KAAK,aAAa;cAAE;gBAClB,MAAM,CAACd,KAAK,EAAEC,QAAQ,CAAC,GAAGc,IAAI;gBAE9BjB,SAAS,CAACE,KAAK,CAAC,GAAGF,SAAS,CAACE,KAAK,CAAC,IAAI,EAAE;gBACzCF,SAAS,CAACE,KAAK,CAAC,CAACgB,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;UAAC;QAE3C,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"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js new file mode 100644 index 00000000..f6f02cae --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js @@ -0,0 +1,22 @@ +import Group from './Group'; +import Screen from './Screen'; +/** + * Higher order component to create a `Navigator` and `Screen` pair. + * Custom navigators should wrap the navigator component in `createNavigator` before exporting. + * + * @param Navigator The navigtor component to wrap. + * @returns Factory method to create a `Navigator` and `Screen` pair. + */ +export default function createNavigatorFactory(Navigator) { + return function () { + if (arguments[0] !== undefined) { + throw new Error("Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API? See https://reactnavigation.org/docs/hello-react-navigation for the latest API and guides."); + } + return { + Navigator, + Group, + Screen + }; + }; +} +//# sourceMappingURL=createNavigatorFactory.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js.map new file mode 100644 index 00000000..0054bc4f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Group","Screen","createNavigatorFactory","Navigator","arguments","undefined","Error"],"sourceRoot":"../../src","sources":["createNavigatorFactory.tsx"],"mappings":"AAGA,OAAOA,KAAK,MAAM,SAAS;AAC3B,OAAOC,MAAM,MAAM,UAAU;AAG7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,sBAAsB,CAK5CC,SAA6B,EAAE;EAC/B,OAAO,YAML;IACA,IAAIC,SAAS,CAAC,CAAC,CAAC,KAAKC,SAAS,EAAE;MAC9B,MAAM,IAAIC,KAAK,CACb,+LAA+L,CAChM;IACH;IAEA,OAAO;MACLH,SAAS;MACTH,KAAK;MACLC;IACF,CAAC;EACH,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/findFocusedRoute.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/findFocusedRoute.js new file mode 100644 index 00000000..ff7e7f61 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/findFocusedRoute.js @@ -0,0 +1,11 @@ +export default function findFocusedRoute(state) { + var _current2, _current3; + let current = state; + while (((_current = current) === null || _current === void 0 ? void 0 : _current.routes[current.index ?? 0].state) != null) { + var _current; + current = current.routes[current.index ?? 0].state; + } + const route = (_current2 = current) === null || _current2 === void 0 ? void 0 : _current2.routes[((_current3 = current) === null || _current3 === void 0 ? void 0 : _current3.index) ?? 0]; + return route; +} +//# sourceMappingURL=findFocusedRoute.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/findFocusedRoute.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/findFocusedRoute.js.map new file mode 100644 index 00000000..de4fbb8c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/findFocusedRoute.js.map @@ -0,0 +1 @@ +{"version":3,"names":["findFocusedRoute","state","current","routes","index","route"],"sourceRoot":"../../src","sources":["findFocusedRoute.tsx"],"mappings":"AAEA,eAAe,SAASA,gBAAgB,CAACC,KAAmB,EAAE;EAAA;EAC5D,IAAIC,OAAiC,GAAGD,KAAK;EAE7C,OAAO,aAAAC,OAAO,6CAAP,SAASC,MAAM,CAACD,OAAO,CAACE,KAAK,IAAI,CAAC,CAAC,CAACH,KAAK,KAAI,IAAI,EAAE;IAAA;IACxDC,OAAO,GAAGA,OAAO,CAACC,MAAM,CAACD,OAAO,CAACE,KAAK,IAAI,CAAC,CAAC,CAACH,KAAK;EACpD;EAEA,MAAMI,KAAK,gBAAGH,OAAO,8CAAP,UAASC,MAAM,CAAC,cAAAD,OAAO,8CAAP,UAASE,KAAK,KAAI,CAAC,CAAC;EAElD,OAAOC,KAAK;AACd"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/fromEntries.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/fromEntries.js new file mode 100644 index 00000000..e1a3670b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/fromEntries.js @@ -0,0 +1,12 @@ +// Object.fromEntries is not available in older iOS versions +export default function fromEntries(entries) { + return entries.reduce((acc, _ref) => { + let [k, v] = _ref; + if (acc.hasOwnProperty(k)) { + throw new Error(`A value for key '${k}' already exists in the object.`); + } + acc[k] = v; + return acc; + }, {}); +} +//# sourceMappingURL=fromEntries.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/fromEntries.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/fromEntries.js.map new file mode 100644 index 00000000..99c61500 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/fromEntries.js.map @@ -0,0 +1 @@ +{"version":3,"names":["fromEntries","entries","reduce","acc","k","v","hasOwnProperty","Error"],"sourceRoot":"../../src","sources":["fromEntries.tsx"],"mappings":"AAAA;AACA,eAAe,SAASA,WAAW,CACjCC,OAA4B,EAC5B;EACA,OAAOA,OAAO,CAACC,MAAM,CAAC,CAACC,GAAG,WAAa;IAAA,IAAX,CAACC,CAAC,EAAEC,CAAC,CAAC;IAChC,IAAIF,GAAG,CAACG,cAAc,CAACF,CAAC,CAAC,EAAE;MACzB,MAAM,IAAIG,KAAK,CAAE,oBAAmBH,CAAE,iCAAgC,CAAC;IACzE;IAEAD,GAAG,CAACC,CAAC,CAAC,GAAGC,CAAC;IACV,OAAOF,GAAG;EACZ,CAAC,EAAE,CAAC,CAAC,CAAiB;AACxB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getActionFromState.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getActionFromState.js new file mode 100644 index 00000000..07a9e4d0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getActionFromState.js @@ -0,0 +1,83 @@ +export default function getActionFromState(state, options) { + var _normalizedConfig$scr; + // Create a normalized configs object which will be easier to use + const normalizedConfig = options ? createNormalizedConfigItem(options) : {}; + const routes = state.index != null ? state.routes.slice(0, state.index + 1) : state.routes; + if (routes.length === 0) { + return undefined; + } + if (!(routes.length === 1 && routes[0].key === undefined || routes.length === 2 && routes[0].key === undefined && routes[0].name === (normalizedConfig === null || normalizedConfig === void 0 ? void 0 : normalizedConfig.initialRouteName) && routes[1].key === undefined)) { + return { + type: 'RESET', + payload: state + }; + } + const route = state.routes[state.index ?? state.routes.length - 1]; + let current = route === null || route === void 0 ? void 0 : route.state; + let config = normalizedConfig === null || normalizedConfig === void 0 ? void 0 : (_normalizedConfig$scr = normalizedConfig.screens) === null || _normalizedConfig$scr === void 0 ? void 0 : _normalizedConfig$scr[route === null || route === void 0 ? void 0 : route.name]; + let params = { + ...route.params + }; + let payload = route ? { + name: route.name, + path: route.path, + params + } : undefined; + while (current) { + var _config, _config2, _config2$screens; + if (current.routes.length === 0) { + return undefined; + } + const routes = current.index != null ? current.routes.slice(0, current.index + 1) : current.routes; + const route = routes[routes.length - 1]; + + // Explicitly set to override existing value when merging params + Object.assign(params, { + initial: undefined, + screen: undefined, + params: undefined, + state: undefined + }); + if (routes.length === 1 && routes[0].key === undefined) { + params.initial = true; + params.screen = route.name; + } else if (routes.length === 2 && routes[0].key === undefined && routes[0].name === ((_config = config) === null || _config === void 0 ? void 0 : _config.initialRouteName) && routes[1].key === undefined) { + params.initial = false; + params.screen = route.name; + } else { + params.state = current; + break; + } + if (route.state) { + params.params = { + ...route.params + }; + params = params.params; + } else { + params.path = route.path; + params.params = route.params; + } + current = route.state; + config = (_config2 = config) === null || _config2 === void 0 ? void 0 : (_config2$screens = _config2.screens) === null || _config2$screens === void 0 ? void 0 : _config2$screens[route.name]; + } + if (!payload) { + return; + } + + // Try to construct payload for a `NAVIGATE` action from the state + // This lets us preserve the navigation state and not lose it + return { + type: 'NAVIGATE', + payload + }; +} +const createNormalizedConfigItem = config => typeof config === 'object' && config != null ? { + initialRouteName: config.initialRouteName, + screens: config.screens != null ? createNormalizedConfigs(config.screens) : undefined +} : {}; +const createNormalizedConfigs = options => Object.entries(options).reduce((acc, _ref) => { + let [k, v] = _ref; + acc[k] = createNormalizedConfigItem(v); + return acc; +}, {}); +//# sourceMappingURL=getActionFromState.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getActionFromState.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getActionFromState.js.map new file mode 100644 index 00000000..dde83a0d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getActionFromState.js.map @@ -0,0 +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,eAAe,SAASA,kBAAkB,CACxCC,KAAoC,EACpCC,OAAiB,EACmD;EAAA;EACpE;EACA,MAAMC,gBAAgB,GAAGD,OAAO,GAC5BE,0BAA0B,CAACF,OAAO,CAAgC,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,CAAC,CAAC,CAACM,IAAI,MAAKR,gBAAgB,aAAhBA,gBAAgB,uBAAhBA,gBAAgB,CAAES,gBAAgB,KACrDP,MAAM,CAAC,CAAC,CAAC,CAACK,GAAG,KAAKD,SAAU,CAC/B,EACD;IACA,OAAO;MACLI,IAAI,EAAE,OAAO;MACbC,OAAO,EAAEb;IACX,CAAC;EACH;EAEA,MAAMc,KAAK,GAAGd,KAAK,CAACI,MAAM,CAACJ,KAAK,CAACK,KAAK,IAAIL,KAAK,CAACI,MAAM,CAACG,MAAM,GAAG,CAAC,CAAC;EAElE,IAAIQ,OAAkD,GAAGD,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEd,KAAK;EACrE,IAAIgB,MAA8B,GAAGd,gBA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AAC,CAAC,GAAGzB,0BAA0B,CAAC0B,CAAC,CAAC;EACtC,OAAOF,GAAG;AACZ,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getFocusedRouteNameFromRoute.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getFocusedRouteNameFromRoute.js new file mode 100644 index 00000000..d60444b0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getFocusedRouteNameFromRoute.js @@ -0,0 +1,16 @@ +import { CHILD_STATE } from './useRouteCache'; +export default function getFocusedRouteNameFromRoute(route) { + // @ts-expect-error: this isn't in type definitions coz we want this private + const state = route[CHILD_STATE] ?? route.state; + const params = route.params; + const routeName = state ? + // Get the currently active route name in the nested navigator + state.routes[ + // If we have a partial state without index, for tab/drawer, first screen will be focused one, and last for stack + // The type property will only exist for rehydrated state and not for state from deep link + state.index ?? (typeof state.type === 'string' && state.type !== 'stack' ? 0 : state.routes.length - 1)].name : + // If state doesn't exist, we need to default to `screen` param if available + typeof (params === null || params === void 0 ? void 0 : params.screen) === 'string' ? params.screen : undefined; + return routeName; +} +//# sourceMappingURL=getFocusedRouteNameFromRoute.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getFocusedRouteNameFromRoute.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getFocusedRouteNameFromRoute.js.map new file mode 100644 index 00000000..69cd6714 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getFocusedRouteNameFromRoute.js.map @@ -0,0 +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,iBAAiB;AAE7C,eAAe,SAASC,4BAA4B,CAClDC,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;EACF,QAAON,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEO,MAAM,MAAK,QAAQ,GAChCP,MAAM,CAACO,MAAM,GACbC,SAAS;EAEb,OAAOP,SAAS;AAClB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getPathFromState.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getPathFromState.js new file mode 100644 index 00000000..1cf84f27 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getPathFromState.js @@ -0,0 +1,209 @@ +import * as queryString from 'query-string'; +import fromEntries from './fromEntries'; +import validatePathConfig from './validatePathConfig'; +const getActiveRoute = state => { + const route = typeof state.index === 'number' ? state.routes[state.index] : state.routes[state.routes.length - 1]; + if (route.state) { + return getActiveRoute(route.state); + } + return route; +}; + +/** + * Utility to serialize a navigation state object to a path string. + * + * @example + * ```js + * getPathFromState( + * { + * routes: [ + * { + * name: 'Chat', + * params: { author: 'Jane', id: 42 }, + * }, + * ], + * }, + * { + * screens: { + * Chat: { + * path: 'chat/:author/:id', + * stringify: { author: author => author.toLowerCase() } + * } + * } + * } + * ) + * ``` + * + * @param state Navigation state to serialize. + * @param options Extra options to fine-tune how to serialize the path. + * @returns Path representing the state, e.g. /foo/bar?count=42. + */ +export default function getPathFromState(state, options) { + if (state == null) { + throw Error("Got 'undefined' for the navigation state. You must pass a valid state object."); + } + if (options) { + validatePathConfig(options); + } + + // Create a normalized configs object which will be easier to use + const configs = options !== null && options !== void 0 && options.screens ? createNormalizedConfigs(options === null || options === void 0 ? void 0 : options.screens) : {}; + let path = '/'; + let current = state; + const allParams = {}; + while (current) { + let index = typeof current.index === 'number' ? current.index : 0; + let route = current.routes[index]; + let pattern; + let focusedParams; + let focusedRoute = getActiveRoute(state); + let currentOptions = configs; + + // Keep all the route names that appeared during going deeper in config in case the pattern is resolved to undefined + let nestedRouteNames = []; + let hasNext = true; + while (route.name in currentOptions && hasNext) { + pattern = currentOptions[route.name].pattern; + nestedRouteNames.push(route.name); + if (route.params) { + var _currentOptions$route; + const stringify = (_currentOptions$route = currentOptions[route.name]) === null || _currentOptions$route === void 0 ? void 0 : _currentOptions$route.stringify; + const currentParams = fromEntries(Object.entries(route.params).map(_ref => { + let [key, value] = _ref; + return [key, stringify !== null && stringify !== void 0 && stringify[key] ? stringify[key](value) : String(value)]; + })); + if (pattern) { + Object.assign(allParams, currentParams); + } + if (focusedRoute === route) { + var _pattern; + // If this is the focused route, keep the params for later use + // We save it here since it's been stringified already + focusedParams = { + ...currentParams + }; + (_pattern = pattern) === null || _pattern === void 0 ? void 0 : _pattern.split('/').filter(p => p.startsWith(':')) + // eslint-disable-next-line no-loop-func + .forEach(p => { + const name = getParamName(p); + + // Remove the params present in the pattern since we'll only use the rest for query string + if (focusedParams) { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete focusedParams[name]; + } + }); + } + } + + // If there is no `screens` property or no nested state, we return pattern + if (!currentOptions[route.name].screens || route.state === undefined) { + hasNext = false; + } else { + index = typeof route.state.index === 'number' ? route.state.index : route.state.routes.length - 1; + const nextRoute = route.state.routes[index]; + const nestedConfig = currentOptions[route.name].screens; + + // if there is config for next route name, we go deeper + if (nestedConfig && nextRoute.name in nestedConfig) { + route = nextRoute; + currentOptions = nestedConfig; + } else { + // If not, there is no sense in going deeper in config + hasNext = false; + } + } + } + if (pattern === undefined) { + pattern = nestedRouteNames.join('/'); + } + if (currentOptions[route.name] !== undefined) { + path += pattern.split('/').map(p => { + const name = getParamName(p); + + // We don't know what to show for wildcard patterns + // Showing the route name seems ok, though whatever we show here will be incorrect + // Since the page doesn't actually exist + if (p === '*') { + return route.name; + } + + // If the path has a pattern for a param, put the param in the path + if (p.startsWith(':')) { + const value = allParams[name]; + if (value === undefined && p.endsWith('?')) { + // Optional params without value assigned in route.params should be ignored + return ''; + } + return encodeURIComponent(value); + } + return encodeURIComponent(p); + }).join('/'); + } else { + path += encodeURIComponent(route.name); + } + if (!focusedParams) { + focusedParams = focusedRoute.params; + } + if (route.state) { + path += '/'; + } else if (focusedParams) { + for (let param in focusedParams) { + if (focusedParams[param] === 'undefined') { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete focusedParams[param]; + } + } + const query = queryString.stringify(focusedParams, { + sort: false + }); + if (query) { + path += `?${query}`; + } + } + current = route.state; + } + + // Remove multiple as well as trailing slashes + path = path.replace(/\/+/g, '/'); + path = path.length > 1 ? path.replace(/\/$/, '') : path; + return path; +} +const getParamName = pattern => pattern.replace(/^:/, '').replace(/\?$/, ''); +const joinPaths = function () { + for (var _len = arguments.length, paths = new Array(_len), _key = 0; _key < _len; _key++) { + paths[_key] = arguments[_key]; + } + return [].concat(...paths.map(p => p.split('/'))).filter(Boolean).join('/'); +}; +const createConfigItem = (config, parentPattern) => { + var _pattern2; + if (typeof config === 'string') { + // If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern + const pattern = parentPattern ? joinPaths(parentPattern, config) : config; + return { + pattern + }; + } + + // If an object is specified as the value (e.g. Foo: { ... }), + // It can have `path` property and `screens` prop which has nested configs + let pattern; + if (config.exact && config.path === undefined) { + 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: ''`."); + } + pattern = config.exact !== true ? joinPaths(parentPattern || '', config.path || '') : config.path || ''; + const screens = config.screens ? createNormalizedConfigs(config.screens, pattern) : undefined; + return { + // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc. + pattern: (_pattern2 = pattern) === null || _pattern2 === void 0 ? void 0 : _pattern2.split('/').filter(Boolean).join('/'), + stringify: config.stringify, + screens + }; +}; +const createNormalizedConfigs = (options, pattern) => fromEntries(Object.entries(options).map(_ref2 => { + let [name, c] = _ref2; + const result = createConfigItem(c, pattern); + return [name, result]; +})); +//# sourceMappingURL=getPathFromState.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getPathFromState.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getPathFromState.js.map new file mode 100644 index 00000000..978bc0c3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getPathFromState.js.map @@ -0,0 +1 @@ +{"version":3,"names":["queryString","fromEntries","validatePathConfig","getActiveRoute","state","route","index","routes","length","getPathFromState","options","Error","configs","screens","createNormalizedConfigs","path","current","allParams","pattern","focusedParams","focusedRoute","currentOptions","nestedRouteNames","hasNext","name","push","params","stringify","currentParams","Object","entries","map","key","value","String","assign","split","filter","p","startsWith","forEach","getParamName","undefined","nextRoute","nestedConfig","join","endsWith","encodeURIComponent","param","query","sort","replace","joinPaths","paths","concat","Boolean","createConfigItem","config","parentPattern","exact","c","result"],"sourceRoot":"../../src","sources":["getPathFromState.tsx"],"mappings":"AAKA,OAAO,KAAKA,WAAW,MAAM,cAAc;AAE3C,OAAOC,WAAW,MAAM,eAAe;AAEvC,OAAOC,kBAAkB,MAAM,sBAAsB;AAiBrD,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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MAAMC,MAAM,GAAGL,gBAAgB,CAACI,CAAC,EAAE1C,OAAO,CAAC;EAE3C,OAAO,CAACM,IAAI,EAAEqC,MAAM,CAAC;AACvB,CAAC,CAAC,CACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getStateFromPath.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getStateFromPath.js new file mode 100644 index 00000000..ea96342c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getStateFromPath.js @@ -0,0 +1,394 @@ +import escape from 'escape-string-regexp'; +import * as queryString from 'query-string'; +import findFocusedRoute from './findFocusedRoute'; +import validatePathConfig from './validatePathConfig'; +/** + * Utility to parse a path string to initial state object accepted by the container. + * This is useful for deep linking when we need to handle the incoming URL. + * + * @example + * ```js + * getStateFromPath( + * '/chat/jane/42', + * { + * screens: { + * Chat: { + * path: 'chat/:author/:id', + * parse: { id: Number } + * } + * } + * } + * ) + * ``` + * @param path Path string to parse and convert, e.g. /foo/bar?count=42. + * @param options Extra options to fine-tune how to parse the path. + */ +export default function getStateFromPath(path, options) { + if (options) { + validatePathConfig(options); + } + let initialRoutes = []; + if (options !== null && options !== void 0 && options.initialRouteName) { + initialRoutes.push({ + initialRouteName: options.initialRouteName, + parentScreens: [] + }); + } + const screens = options === null || options === void 0 ? void 0 : options.screens; + let remaining = path.replace(/\/+/g, '/') // Replace multiple slash (//) with single ones + .replace(/^\//, '') // Remove extra leading slash + .replace(/\?.*$/, ''); // Remove query params which we will handle later + + // Make sure there is a trailing slash + remaining = remaining.endsWith('/') ? remaining : `${remaining}/`; + if (screens === undefined) { + // When no config is specified, use the path segments as route names + const routes = remaining.split('/').filter(Boolean).map(segment => { + const name = decodeURIComponent(segment); + return { + name + }; + }); + if (routes.length) { + return createNestedStateObject(path, routes, initialRoutes); + } + return undefined; + } + + // Create a normalized configs array which will be easier to use + const configs = [].concat(...Object.keys(screens).map(key => createNormalizedConfigs(key, screens, [], initialRoutes, []))).sort((a, b) => { + // Sort config so that: + // - the most exhaustive ones are always at the beginning + // - patterns with wildcard are always at the end + + // If 2 patterns are same, move the one with less route names up + // This is an error state, so it's only useful for consistent error messages + if (a.pattern === b.pattern) { + return b.routeNames.join('>').localeCompare(a.routeNames.join('>')); + } + + // If one of the patterns starts with the other, it's more exhaustive + // So move it up + if (a.pattern.startsWith(b.pattern)) { + return -1; + } + if (b.pattern.startsWith(a.pattern)) { + return 1; + } + const aParts = a.pattern.split('/'); + const bParts = b.pattern.split('/'); + for (let i = 0; i < Math.max(aParts.length, bParts.length); i++) { + // if b is longer, b get higher priority + if (aParts[i] == null) { + return 1; + } + // if a is longer, a get higher priority + if (bParts[i] == null) { + return -1; + } + const aWildCard = aParts[i] === '*' || aParts[i].startsWith(':'); + const bWildCard = bParts[i] === '*' || bParts[i].startsWith(':'); + // if both are wildcard we compare next component + if (aWildCard && bWildCard) { + continue; + } + // if only a is wild card, b get higher priority + if (aWildCard) { + return 1; + } + // if only b is wild card, a get higher priority + if (bWildCard) { + return -1; + } + } + return bParts.length - aParts.length; + }); + + // Check for duplicate patterns in the config + configs.reduce((acc, config) => { + if (acc[config.pattern]) { + const a = acc[config.pattern].routeNames; + const b = config.routeNames; + + // It's not a problem if the path string omitted from a inner most screen + // For example, it's ok if a path resolves to `A > B > C` or `A > B` + const intersects = a.length > b.length ? b.every((it, i) => a[i] === it) : a.every((it, i) => b[i] === it); + if (!intersects) { + throw new Error(`Found conflicting screens with the same pattern. The pattern '${config.pattern}' resolves to both '${a.join(' > ')}' and '${b.join(' > ')}'. Patterns must be unique and cannot resolve to more than one screen.`); + } + } + return Object.assign(acc, { + [config.pattern]: config + }); + }, {}); + if (remaining === '/') { + // We need to add special handling of empty path so navigation to empty path also works + // When handling empty path, we should only look at the root level config + const match = configs.find(config => config.path === '' && config.routeNames.every( + // Make sure that none of the parent configs have a non-empty path defined + name => { + var _configs$find; + return !((_configs$find = configs.find(c => c.screen === name)) !== null && _configs$find !== void 0 && _configs$find.path); + })); + if (match) { + return createNestedStateObject(path, match.routeNames.map(name => ({ + name + })), initialRoutes, configs); + } + return undefined; + } + let result; + let current; + + // We match the whole path against the regex instead of segments + // This makes sure matches such as wildcard will catch any unmatched routes, even if nested + const { + routes, + remainingPath + } = matchAgainstConfigs(remaining, configs.map(c => ({ + ...c, + // Add `$` to the regex to make sure it matches till end of the path and not just beginning + regex: c.regex ? new RegExp(c.regex.source + '$') : undefined + }))); + if (routes !== undefined) { + // This will always be empty if full path matched + current = createNestedStateObject(path, routes, initialRoutes, configs); + remaining = remainingPath; + result = current; + } + if (current == null || result == null) { + return undefined; + } + return result; +} +const joinPaths = function () { + for (var _len = arguments.length, paths = new Array(_len), _key = 0; _key < _len; _key++) { + paths[_key] = arguments[_key]; + } + return [].concat(...paths.map(p => p.split('/'))).filter(Boolean).join('/'); +}; +const matchAgainstConfigs = (remaining, configs) => { + let routes; + let remainingPath = remaining; + + // Go through all configs, and see if the next path segment matches our regex + for (const config of configs) { + if (!config.regex) { + continue; + } + const match = remainingPath.match(config.regex); + + // If our regex matches, we need to extract params from the path + if (match) { + var _config$pattern; + const matchedParams = (_config$pattern = config.pattern) === null || _config$pattern === void 0 ? void 0 : _config$pattern.split('/').filter(p => p.startsWith(':')).reduce((acc, p, i) => Object.assign(acc, { + // The param segments appear every second item starting from 2 in the regex match result + [p]: match[(i + 1) * 2].replace(/\//, '') + }), {}); + routes = config.routeNames.map(name => { + var _config$path; + const config = configs.find(c => c.screen === name); + const params = config === null || config === void 0 ? void 0 : (_config$path = config.path) === null || _config$path === void 0 ? void 0 : _config$path.split('/').filter(p => p.startsWith(':')).reduce((acc, p) => { + const value = matchedParams[p]; + if (value) { + var _config$parse; + const key = p.replace(/^:/, '').replace(/\?$/, ''); + acc[key] = (_config$parse = config.parse) !== null && _config$parse !== void 0 && _config$parse[key] ? config.parse[key](value) : value; + } + return acc; + }, {}); + if (params && Object.keys(params).length) { + return { + name, + params + }; + } + return { + name + }; + }); + remainingPath = remainingPath.replace(match[1], ''); + break; + } + } + return { + routes, + remainingPath + }; +}; +const createNormalizedConfigs = function (screen, routeConfig) { + let routeNames = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; + let initials = arguments.length > 3 ? arguments[3] : undefined; + let parentScreens = arguments.length > 4 ? arguments[4] : undefined; + let parentPattern = arguments.length > 5 ? arguments[5] : undefined; + const configs = []; + routeNames.push(screen); + parentScreens.push(screen); + + // @ts-expect-error: we can't strongly typecheck this for now + const config = routeConfig[screen]; + if (typeof config === 'string') { + // If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern + const pattern = parentPattern ? joinPaths(parentPattern, config) : config; + configs.push(createConfigItem(screen, routeNames, pattern, config)); + } else if (typeof config === 'object') { + let pattern; + + // if an object is specified as the value (e.g. Foo: { ... }), + // it can have `path` property and + // it could have `screens` prop which has nested configs + if (typeof config.path === 'string') { + if (config.exact && config.path === undefined) { + 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: ''`."); + } + pattern = config.exact !== true ? joinPaths(parentPattern || '', config.path || '') : config.path || ''; + configs.push(createConfigItem(screen, routeNames, pattern, config.path, config.parse)); + } + if (config.screens) { + // property `initialRouteName` without `screens` has no purpose + if (config.initialRouteName) { + initials.push({ + initialRouteName: config.initialRouteName, + parentScreens + }); + } + Object.keys(config.screens).forEach(nestedConfig => { + const result = createNormalizedConfigs(nestedConfig, config.screens, routeNames, initials, [...parentScreens], pattern ?? parentPattern); + configs.push(...result); + }); + } + } + routeNames.pop(); + return configs; +}; +const createConfigItem = (screen, routeNames, pattern, path, parse) => { + // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc. + pattern = pattern.split('/').filter(Boolean).join('/'); + const regex = pattern ? new RegExp(`^(${pattern.split('/').map(it => { + if (it.startsWith(':')) { + return `(([^/]+\\/)${it.endsWith('?') ? '?' : ''})`; + } + return `${it === '*' ? '.*' : escape(it)}\\/`; + }).join('')})`) : undefined; + return { + screen, + regex, + pattern, + path, + // The routeNames array is mutated, so copy it to keep the current state + routeNames: [...routeNames], + parse + }; +}; +const findParseConfigForRoute = (routeName, flatConfig) => { + for (const config of flatConfig) { + if (routeName === config.routeNames[config.routeNames.length - 1]) { + return config.parse; + } + } + return undefined; +}; + +// Try to find an initial route connected with the one passed +const findInitialRoute = (routeName, parentScreens, initialRoutes) => { + for (const config of initialRoutes) { + if (parentScreens.length === config.parentScreens.length) { + let sameParents = true; + for (let i = 0; i < parentScreens.length; i++) { + if (parentScreens[i].localeCompare(config.parentScreens[i]) !== 0) { + sameParents = false; + break; + } + } + if (sameParents) { + return routeName !== config.initialRouteName ? config.initialRouteName : undefined; + } + } + } + return undefined; +}; + +// returns state object with values depending on whether +// it is the end of state and if there is initialRoute for this level +const createStateObject = (initialRoute, route, isEmpty) => { + if (isEmpty) { + if (initialRoute) { + return { + index: 1, + routes: [{ + name: initialRoute + }, route] + }; + } else { + return { + routes: [route] + }; + } + } else { + if (initialRoute) { + return { + index: 1, + routes: [{ + name: initialRoute + }, { + ...route, + state: { + routes: [] + } + }] + }; + } else { + return { + routes: [{ + ...route, + state: { + routes: [] + } + }] + }; + } + } +}; +const createNestedStateObject = (path, routes, initialRoutes, flatConfig) => { + let state; + let route = routes.shift(); + const parentScreens = []; + let initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes); + parentScreens.push(route.name); + state = createStateObject(initialRoute, route, routes.length === 0); + if (routes.length > 0) { + let nestedState = state; + while (route = routes.shift()) { + initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes); + const nestedStateIndex = nestedState.index || nestedState.routes.length - 1; + nestedState.routes[nestedStateIndex].state = createStateObject(initialRoute, route, routes.length === 0); + if (routes.length > 0) { + nestedState = nestedState.routes[nestedStateIndex].state; + } + parentScreens.push(route.name); + } + } + route = findFocusedRoute(state); + route.path = path; + const params = parseQueryParams(path, flatConfig ? findParseConfigForRoute(route.name, flatConfig) : undefined); + if (params) { + route.params = { + ...route.params, + ...params + }; + } + return state; +}; +const parseQueryParams = (path, parseConfig) => { + const query = path.split('?')[1]; + const params = queryString.parse(query); + if (parseConfig) { + Object.keys(params).forEach(name => { + if (Object.hasOwnProperty.call(parseConfig, name) && typeof params[name] === 'string') { + params[name] = parseConfig[name](params[name]); + } + }); + } + return Object.keys(params).length ? params : undefined; +}; +//# sourceMappingURL=getStateFromPath.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getStateFromPath.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getStateFromPath.js.map new file mode 100644 index 00000000..8f719754 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/getStateFromPath.js.map @@ -0,0 +1 @@ +{"version":3,"names":["escape","queryString","findFocusedRoute","validatePathConfig","getStateFromPath","path","options","initialRoutes","initialRouteName","push","parentScreens","screens","remaining","replace","endsWith","undefined","routes","split","filter","Boolean","map","segment","name","decodeURIComponent","length","createNestedStateObject","configs","concat","Object","keys","key","createNormalizedConfigs","sort","a","b","pattern","routeNames","join","localeCompare","startsWith","aParts","bParts","i","Math","max","aWildCard","bWildCard","reduce","acc","config","intersects","every","it","Error","assign","match","find","c","screen","result","current","remainingPath","matchAgainstConfigs","regex","RegExp","source","joinPaths","paths","p","matchedParams","params","value","parse","routeConfig","initials","parentPattern","createConfigItem","exact","forEach","nestedConfig","pop","findParseConfigForRoute","routeName","flatConfig","findInitialRoute","sameParents","createStateObject","initialRoute","route","isEmpty","index","state","shift","nestedState","nestedStateIndex","parseQueryParams","parseConfig","query","hasOwnProperty","call"],"sourceRoot":"../../src","sources":["getStateFromPath.tsx"],"mappings":"AAKA,OAAOA,MAAM,MAAM,sBAAsB;AACzC,OAAO,KAAKC,WAAW,MAAM,cAAc;AAE3C,OAAOC,gBAAgB,MAAM,oBAAoB;AAEjD,OAAOC,kBAAkB,MAAM,sBAAsB;AAiCrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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MAAM,CAAChD,IAAI,CAAC,KAAK,QAAQ,EAChC;QACAgD,MAAM,CAAChD,IAAI,CAAC,GAAG0E,WAAW,CAAC1E,IAAI,CAAC,CAACgD,MAAM,CAAChD,IAAI,CAAC,CAAW;MAC1D;IACF,CAAC,CAAC;EACJ;EAEA,OAAOM,MAAM,CAACC,IAAI,CAACyC,MAAM,CAAC,CAAC9C,MAAM,GAAG8C,MAAM,GAAGvD,SAAS;AACxD,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/index.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/index.js new file mode 100644 index 00000000..1d42c3aa --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/index.js @@ -0,0 +1,28 @@ +export { default as BaseNavigationContainer } from './BaseNavigationContainer'; +export { default as createNavigationContainerRef } from './createNavigationContainerRef'; +export { default as createNavigatorFactory } from './createNavigatorFactory'; +export { default as CurrentRenderContext } from './CurrentRenderContext'; +export { default as findFocusedRoute } from './findFocusedRoute'; +export { default as getActionFromState } from './getActionFromState'; +export { default as getFocusedRouteNameFromRoute } from './getFocusedRouteNameFromRoute'; +export { default as getPathFromState } from './getPathFromState'; +export { default as getStateFromPath } from './getStateFromPath'; +export { default as NavigationContainerRefContext } from './NavigationContainerRefContext'; +export { default as NavigationContext } from './NavigationContext'; +export { default as NavigationHelpersContext } from './NavigationHelpersContext'; +export { default as NavigationRouteContext } from './NavigationRouteContext'; +export { default as PreventRemoveContext } from './PreventRemoveContext'; +export { default as PreventRemoveProvider } from './PreventRemoveProvider'; +export * from './types'; +export { default as useFocusEffect } from './useFocusEffect'; +export { default as useIsFocused } from './useIsFocused'; +export { default as useNavigation } from './useNavigation'; +export { default as useNavigationBuilder } from './useNavigationBuilder'; +export { default as useNavigationContainerRef } from './useNavigationContainerRef'; +export { default as useNavigationState } from './useNavigationState'; +export { default as UNSTABLE_usePreventRemove } from './usePreventRemove'; +export { default as usePreventRemoveContext } from './usePreventRemoveContext'; +export { default as useRoute } from './useRoute'; +export { default as validatePathConfig } from './validatePathConfig'; +export * from '@react-navigation/routers'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/index.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/index.js.map new file mode 100644 index 00000000..ed01400a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["default","BaseNavigationContainer","createNavigationContainerRef","createNavigatorFactory","CurrentRenderContext","findFocusedRoute","getActionFromState","getFocusedRouteNameFromRoute","getPathFromState","getStateFromPath","NavigationContainerRefContext","NavigationContext","NavigationHelpersContext","NavigationRouteContext","PreventRemoveContext","PreventRemoveProvider","useFocusEffect","useIsFocused","useNavigation","useNavigationBuilder","useNavigationContainerRef","useNavigationState","UNSTABLE_usePreventRemove","usePreventRemoveContext","useRoute","validatePathConfig"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,OAAO,IAAIC,uBAAuB,QAAQ,2BAA2B;AAC9E,SAASD,OAAO,IAAIE,4BAA4B,QAAQ,gCAAgC;AACxF,SAASF,OAAO,IAAIG,sBAAsB,QAAQ,0BAA0B;AAC5E,SAASH,OAAO,IAAII,oBAAoB,QAAQ,wBAAwB;AACxE,SAASJ,OAAO,IAAIK,gBAAgB,QAAQ,oBAAoB;AAChE,SAASL,OAAO,IAAIM,kBAAkB,QAAQ,sBAAsB;AACpE,SAASN,OAAO,IAAIO,4BAA4B,QAAQ,gCAAgC;AACxF,SAASP,OAAO,IAAIQ,gBAAgB,QAAQ,oBAAoB;AAChE,SAASR,OAAO,IAAIS,gBAAgB,QAAQ,oBAAoB;AAChE,SAAST,OAAO,IAAIU,6BAA6B,QAAQ,iCAAiC;AAC1F,SAASV,OAAO,IAAIW,iBAAiB,QAAQ,qBAAqB;AAClE,SAASX,OAAO,IAAIY,wBAAwB,QAAQ,4BAA4B;AAChF,SAASZ,OAAO,IAAIa,sBAAsB,QAAQ,0BAA0B;AAC5E,SAASb,OAAO,IAAIc,oBAAoB,QAAQ,wBAAwB;AACxE,SAASd,OAAO,IAAIe,qBAAqB,QAAQ,yBAAyB;AAC1E,cAAc,SAAS;AACvB,SAASf,OAAO,IAAIgB,cAAc,QAAQ,kBAAkB;AAC5D,SAAShB,OAAO,IAAIiB,YAAY,QAAQ,gBAAgB;AACxD,SAASjB,OAAO,IAAIkB,aAAa,QAAQ,iBAAiB;AAC1D,SAASlB,OAAO,IAAImB,oBAAoB,QAAQ,wBAAwB;AACxE,SAASnB,OAAO,IAAIoB,yBAAyB,QAAQ,6BAA6B;AAClF,SAASpB,OAAO,IAAIqB,kBAAkB,QAAQ,sBAAsB;AACpE,SAASrB,OAAO,IAAIsB,yBAAyB,QAAQ,oBAAoB;AACzE,SAAStB,OAAO,IAAIuB,uBAAuB,QAAQ,2BAA2B;AAC9E,SAASvB,OAAO,IAAIwB,QAAQ,QAAQ,YAAY;AAChD,SAASxB,OAAO,IAAIyB,kBAAkB,QAAQ,sBAAsB;AACpE,cAAc,2BAA2B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/isArrayEqual.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/isArrayEqual.js new file mode 100644 index 00000000..93b3911a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/isArrayEqual.js @@ -0,0 +1,14 @@ +/** + * Compare two arrays with primitive values as the content. + * We need to make sure that both values and order match. + */ +export default function isArrayEqual(a, b) { + if (a === b) { + return true; + } + if (a.length !== b.length) { + return false; + } + return a.every((it, index) => it === b[index]); +} +//# sourceMappingURL=isArrayEqual.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/isArrayEqual.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/isArrayEqual.js.map new file mode 100644 index 00000000..721cede1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/isArrayEqual.js.map @@ -0,0 +1 @@ +{"version":3,"names":["isArrayEqual","a","b","length","every","it","index"],"sourceRoot":"../../src","sources":["isArrayEqual.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA,eAAe,SAASA,YAAY,CAACC,CAAQ,EAAEC,CAAQ,EAAE;EACvD,IAAID,CAAC,KAAKC,CAAC,EAAE;IACX,OAAO,IAAI;EACb;EAEA,IAAID,CAAC,CAACE,MAAM,KAAKD,CAAC,CAACC,MAAM,EAAE;IACzB,OAAO,KAAK;EACd;EAEA,OAAOF,CAAC,CAACG,KAAK,CAAC,CAACC,EAAE,EAAEC,KAAK,KAAKD,EAAE,KAAKH,CAAC,CAACI,KAAK,CAAC,CAAC;AAChD"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/isRecordEqual.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/isRecordEqual.js new file mode 100644 index 00000000..a356cac6 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/isRecordEqual.js @@ -0,0 +1,15 @@ +/** + * Compare two records with primitive values as the content. + */ +export default function isRecordEqual(a, b) { + if (a === b) { + return true; + } + const aKeys = Object.keys(a); + const bKeys = Object.keys(b); + if (aKeys.length !== bKeys.length) { + return false; + } + return aKeys.every(key => a[key] === b[key]); +} +//# sourceMappingURL=isRecordEqual.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/isRecordEqual.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/isRecordEqual.js.map new file mode 100644 index 00000000..f30b86f4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/isRecordEqual.js.map @@ -0,0 +1 @@ +{"version":3,"names":["isRecordEqual","a","b","aKeys","Object","keys","bKeys","length","every","key"],"sourceRoot":"../../src","sources":["isRecordEqual.tsx"],"mappings":"AAAA;AACA;AACA;AACA,eAAe,SAASA,aAAa,CACnCC,CAAsB,EACtBC,CAAsB,EACtB;EACA,IAAID,CAAC,KAAKC,CAAC,EAAE;IACX,OAAO,IAAI;EACb;EAEA,MAAMC,KAAK,GAAGC,MAAM,CAACC,IAAI,CAACJ,CAAC,CAAC;EAC5B,MAAMK,KAAK,GAAGF,MAAM,CAACC,IAAI,CAACH,CAAC,CAAC;EAE5B,IAAIC,KAAK,CAACI,MAAM,KAAKD,KAAK,CAACC,MAAM,EAAE;IACjC,OAAO,KAAK;EACd;EAEA,OAAOJ,KAAK,CAACK,KAAK,CAAEC,GAAG,IAAKR,CAAC,CAACQ,GAAG,CAAC,KAAKP,CAAC,CAACO,GAAG,CAAC,CAAC;AAChD"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/types.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/types.js new file mode 100644 index 00000000..faa62a67 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/types.js @@ -0,0 +1,9 @@ +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +export class PrivateValueStore { + constructor() { + _defineProperty(this, '', void 0); + } +} +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/types.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/types.js.map new file mode 100644 index 00000000..caf37994 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/types.js.map @@ -0,0 +1 @@ +{"version":3,"names":["PrivateValueStore"],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":";;;AAoJA,OAAO,MAAMA,iBAAiB,CAA4B;EAAA;IAAA,sBAW9C,EAAE;EAAA;AACd"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useChildListeners.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useChildListeners.js new file mode 100644 index 00000000..a4e65ccc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useChildListeners.js @@ -0,0 +1,28 @@ +import * as React from 'react'; +/** + * Hook which lets child navigators add action listeners. + */ +export default function useChildListeners() { + const { + current: listeners + } = React.useRef({ + action: [], + focus: [] + }); + const addListener = React.useCallback((type, listener) => { + listeners[type].push(listener); + let removed = false; + return () => { + const index = listeners[type].indexOf(listener); + if (!removed && index > -1) { + removed = true; + listeners[type].splice(index, 1); + } + }; + }, [listeners]); + return { + listeners, + addListener + }; +} +//# sourceMappingURL=useChildListeners.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useChildListeners.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useChildListeners.js.map new file mode 100644 index 00000000..3e1f0485 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useChildListeners.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","useChildListeners","current","listeners","useRef","action","focus","addListener","useCallback","type","listener","push","removed","index","indexOf","splice"],"sourceRoot":"../../src","sources":["useChildListeners.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAI9B;AACA;AACA;AACA,eAAe,SAASC,iBAAiB,GAAG;EAC1C,MAAM;IAAEC,OAAO,EAAEC;EAAU,CAAC,GAAGH,KAAK,CAACI,MAAM,CAExC;IACDC,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE;EACT,CAAC,CAAC;EAEF,MAAMC,WAAW,GAAGP,KAAK,CAACQ,WAAW,CACnC,CAA8BC,IAAO,EAAEC,QAAwB,KAAK;IAClEP,SAAS,CAACM,IAAI,CAAC,CAACE,IAAI,CAACD,QAAQ,CAAC;IAE9B,IAAIE,OAAO,GAAG,KAAK;IACnB,OAAO,MAAM;MACX,MAAMC,KAAK,GAAGV,SAAS,CAACM,IAAI,CAAC,CAACK,OAAO,CAACJ,QAAQ,CAAC;MAE/C,IAAI,CAACE,OAAO,IAAIC,KAAK,GAAG,CAAC,CAAC,EAAE;QAC1BD,OAAO,GAAG,IAAI;QACdT,SAAS,CAACM,IAAI,CAAC,CAACM,MAAM,CAACF,KAAK,EAAE,CAAC,CAAC;MAClC;IACF,CAAC;EACH,CAAC,EACD,CAACV,SAAS,CAAC,CACZ;EAED,OAAO;IACLA,SAAS;IACTI;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useComponent.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useComponent.js new file mode 100644 index 00000000..047a89c8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useComponent.js @@ -0,0 +1,32 @@ +import * as React from 'react'; +const NavigationContent = _ref => { + let { + render, + children + } = _ref; + return render(children); +}; +export default function useComponent(render) { + const renderRef = React.useRef(render); + + // Normally refs shouldn't be mutated in render + // But we return a component which will be rendered + // So it's just for immediate consumption + renderRef.current = render; + React.useEffect(() => { + renderRef.current = null; + }); + return React.useRef(_ref2 => { + let { + children + } = _ref2; + const render = renderRef.current; + if (render === null) { + throw new Error('The returned component must be rendered in the same render phase as the hook.'); + } + return /*#__PURE__*/React.createElement(NavigationContent, { + render: render + }, children); + }).current; +} +//# sourceMappingURL=useComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useComponent.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useComponent.js.map new file mode 100644 index 00000000..52a9ef35 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","NavigationContent","render","children","useComponent","renderRef","useRef","current","useEffect","Error"],"sourceRoot":"../../src","sources":["useComponent.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAS9B,MAAMC,iBAAiB,GAAG,QAAiC;EAAA,IAAhC;IAAEC,MAAM;IAAEC;EAAgB,CAAC;EACpD,OAAOD,MAAM,CAACC,QAAQ,CAAC;AACzB,CAAC;AAED,eAAe,SAASC,YAAY,CAACF,MAAc,EAAE;EACnD,MAAMG,SAAS,GAAGL,KAAK,CAACM,MAAM,CAAgBJ,MAAM,CAAC;;EAErD;EACA;EACA;EACAG,SAAS,CAACE,OAAO,GAAGL,MAAM;EAE1BF,KAAK,CAACQ,SAAS,CAAC,MAAM;IACpBH,SAAS,CAACE,OAAO,GAAG,IAAI;EAC1B,CAAC,CAAC;EAEF,OAAOP,KAAK,CAACM,MAAM,CAAC,SAAiD;IAAA,IAAhD;MAAEH;IAAwC,CAAC;IAC9D,MAAMD,MAAM,GAAGG,SAAS,CAACE,OAAO;IAEhC,IAAIL,MAAM,KAAK,IAAI,EAAE;MACnB,MAAM,IAAIO,KAAK,CACb,+EAA+E,CAChF;IACH;IAEA,oBAAO,oBAAC,iBAAiB;MAAC,MAAM,EAAEP;IAAO,GAAEC,QAAQ,CAAqB;EAC1E,CAAC,CAAC,CAACI,OAAO;AACZ"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useCurrentRender.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useCurrentRender.js new file mode 100644 index 00000000..8d6f23fb --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useCurrentRender.js @@ -0,0 +1,18 @@ +import * as React from 'react'; +import CurrentRenderContext from './CurrentRenderContext'; +/** + * Write the current options, so that server renderer can get current values + * Mutating values like this is not safe in async mode, but it doesn't apply to SSR + */ +export default function useCurrentRender(_ref) { + let { + state, + navigation, + descriptors + } = _ref; + const current = React.useContext(CurrentRenderContext); + if (current && navigation.isFocused()) { + current.options = descriptors[state.routes[state.index].key].options; + } +} +//# sourceMappingURL=useCurrentRender.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useCurrentRender.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useCurrentRender.js.map new file mode 100644 index 00000000..134b5f28 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useCurrentRender.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","CurrentRenderContext","useCurrentRender","state","navigation","descriptors","current","useContext","isFocused","options","routes","index","key"],"sourceRoot":"../../src","sources":["useCurrentRender.tsx"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,oBAAoB,MAAM,wBAAwB;AAiBzD;AACA;AACA;AACA;AACA,eAAe,SAASC,gBAAgB,OAI5B;EAAA,IAJ6B;IACvCC,KAAK;IACLC,UAAU;IACVC;EACO,CAAC;EACR,MAAMC,OAAO,GAAGN,KAAK,CAACO,UAAU,CAACN,oBAAoB,CAAC;EAEtD,IAAIK,OAAO,IAAIF,UAAU,CAACI,SAAS,EAAE,EAAE;IACrCF,OAAO,CAACG,OAAO,GAAGJ,WAAW,CAACF,KAAK,CAACO,MAAM,CAACP,KAAK,CAACQ,KAAK,CAAC,CAACC,GAAG,CAAC,CAACH,OAAO;EACtE;AACF"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useDescriptors.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useDescriptors.js new file mode 100644 index 00000000..9af6e439 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useDescriptors.js @@ -0,0 +1,123 @@ +import * as React from 'react'; +import NavigationBuilderContext from './NavigationBuilderContext'; +import NavigationContext from './NavigationContext'; +import NavigationRouteContext from './NavigationRouteContext'; +import SceneView from './SceneView'; +import useNavigationCache from './useNavigationCache'; +import useRouteCache from './useRouteCache'; +/** + * Hook to create descriptor objects for the child routes. + * + * A descriptor object provides 3 things: + * - Helper method to render a screen + * - Options specified by the screen for the navigator + * - Navigation object intended for the route + */ +export default function useDescriptors(_ref) { + let { + state, + screens, + navigation, + screenOptions, + defaultScreenOptions, + onAction, + getState, + setState, + addListener, + addKeyedListener, + onRouteFocus, + router, + emitter + } = _ref; + const [options, setOptions] = React.useState({}); + const { + onDispatchAction, + onOptionsChange, + stackRef + } = React.useContext(NavigationBuilderContext); + const context = React.useMemo(() => ({ + navigation, + onAction, + addListener, + addKeyedListener, + onRouteFocus, + onDispatchAction, + onOptionsChange, + stackRef + }), [navigation, onAction, addListener, addKeyedListener, onRouteFocus, onDispatchAction, onOptionsChange, stackRef]); + const navigations = useNavigationCache({ + state, + getState, + navigation, + setOptions, + router, + emitter + }); + const routes = useRouteCache(state.routes); + return routes.reduce((acc, route, i) => { + const config = screens[route.name]; + const screen = config.props; + const navigation = navigations[route.key]; + const optionsList = [ + // The default `screenOptions` passed to the navigator + screenOptions, + // The `screenOptions` props passed to `Group` elements + ...(config.options ? config.options.filter(Boolean) : []), + // The `options` prop passed to `Screen` elements, + screen.options, + // The options set via `navigation.setOptions` + options[route.key]]; + const customOptions = optionsList.reduce((acc, curr) => Object.assign(acc, typeof curr !== 'function' ? curr : curr({ + route, + navigation + })), {}); + const mergedOptions = { + ...(typeof defaultScreenOptions === 'function' ? + // @ts-expect-error: ts gives incorrect error here + defaultScreenOptions({ + route, + navigation, + options: customOptions + }) : defaultScreenOptions), + ...customOptions + }; + const clearOptions = () => setOptions(o => { + if (route.key in o) { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { + [route.key]: _, + ...rest + } = o; + return rest; + } + return o; + }); + acc[route.key] = { + route, + // @ts-expect-error: it's missing action helpers, fix later + navigation, + render() { + return /*#__PURE__*/React.createElement(NavigationBuilderContext.Provider, { + key: route.key, + value: context + }, /*#__PURE__*/React.createElement(NavigationContext.Provider, { + value: navigation + }, /*#__PURE__*/React.createElement(NavigationRouteContext.Provider, { + value: route + }, /*#__PURE__*/React.createElement(SceneView, { + navigation: navigation, + route: route, + screen: screen, + routeState: state.routes[i].state, + getState: getState, + setState: setState, + options: mergedOptions, + clearOptions: clearOptions + })))); + }, + options: mergedOptions + }; + return acc; + }, {}); +} +//# sourceMappingURL=useDescriptors.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useDescriptors.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useDescriptors.js.map new file mode 100644 index 00000000..c577aebc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useDescriptors.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","NavigationBuilderContext","NavigationContext","NavigationRouteContext","SceneView","useNavigationCache","useRouteCache","useDescriptors","state","screens","navigation","screenOptions","defaultScreenOptions","onAction","getState","setState","addListener","addKeyedListener","onRouteFocus","router","emitter","options","setOptions","useState","onDispatchAction","onOptionsChange","stackRef","useContext","context","useMemo","navigations","routes","reduce","acc","route","i","config","name","screen","props","key","optionsList","filter","Boolean","customOptions","curr","Object","assign","mergedOptions","clearOptions","o","_","rest","render"],"sourceRoot":"../../src","sources":["useDescriptors.tsx"],"mappings":"AAMA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,wBAAwB,MAGxB,4BAA4B;AACnC,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,SAAS,MAAM,aAAa;AAUnC,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,OAAOC,aAAa,MAAM,iBAAiB;AAgD3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,cAAc,OAmBM;EAAA,IAd1C;IACAC,KAAK;IACLC,OAAO;IACPC,UAAU;IACVC,aAAa;IACbC,oBAAoB;IACpBC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,WAAW;IACXC,g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KAAM;UAClC,QAAQ,EAAEM,QAAS;UACnB,QAAQ,EAAEC,QAAS;UACnB,OAAO,EAAEiC,aAAc;UACvB,YAAY,EAAEC;QAAa,EAC3B,CAC8B,CACP,CACK;MAExC,CAAC;MACD5B,OAAO,EAAE2B;IACX,CAAC;IAED,OAAOf,GAAG;EACZ,CAAC,EAAE,CAAC,CAAC,CAAC;AACR"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useEventEmitter.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useEventEmitter.js new file mode 100644 index 00000000..bd6c33bb --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useEventEmitter.js @@ -0,0 +1,99 @@ +import * as React from 'react'; +/** + * Hook to manage the event system used by the navigator to notify screens of various events. + */ +export default function useEventEmitter(listen) { + const listenRef = React.useRef(listen); + React.useEffect(() => { + listenRef.current = listen; + }); + const listeners = React.useRef(Object.create(null)); + const create = React.useCallback(target => { + const removeListener = (type, callback) => { + const callbacks = listeners.current[type] ? listeners.current[type][target] : undefined; + if (!callbacks) { + return; + } + const index = callbacks.indexOf(callback); + if (index > -1) { + callbacks.splice(index, 1); + } + }; + const addListener = (type, callback) => { + listeners.current[type] = listeners.current[type] || {}; + listeners.current[type][target] = listeners.current[type][target] || []; + listeners.current[type][target].push(callback); + let removed = false; + return () => { + // Prevent removing other listeners when unsubscribing same listener multiple times + if (!removed) { + removed = true; + removeListener(type, callback); + } + }; + }; + return { + addListener, + removeListener + }; + }, []); + const emit = React.useCallback(_ref => { + var _items$target, _listenRef$current; + let { + type, + data, + target, + canPreventDefault + } = _ref; + const items = listeners.current[type] || {}; + + // Copy the current list of callbacks in case they are mutated during execution + const callbacks = target !== undefined ? (_items$target = items[target]) === null || _items$target === void 0 ? void 0 : _items$target.slice() : [].concat(...Object.keys(items).map(t => items[t])).filter((cb, i, self) => self.lastIndexOf(cb) === i); + const event = { + get type() { + return type; + } + }; + if (target !== undefined) { + Object.defineProperty(event, 'target', { + enumerable: true, + get() { + return target; + } + }); + } + if (data !== undefined) { + Object.defineProperty(event, 'data', { + enumerable: true, + get() { + return data; + } + }); + } + if (canPreventDefault) { + let defaultPrevented = false; + Object.defineProperties(event, { + defaultPrevented: { + enumerable: true, + get() { + return defaultPrevented; + } + }, + preventDefault: { + enumerable: true, + value() { + defaultPrevented = true; + } + } + }); + } + (_listenRef$current = listenRef.current) === null || _listenRef$current === void 0 ? void 0 : _listenRef$current.call(listenRef, event); + callbacks === null || callbacks === void 0 ? void 0 : callbacks.forEach(cb => cb(event)); + return event; + }, []); + return React.useMemo(() => ({ + create, + emit + }), [create, emit]); +} +//# sourceMappingURL=useEventEmitter.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useEventEmitter.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useEventEmitter.js.map new file mode 100644 index 00000000..2a0698df --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useEventEmitter.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","useEventEmitter","listen","listenRef","useRef","useEffect","current","listeners","Object","create","useCallback","target","removeListener","type","callback","callbacks","undefined","index","indexOf","splice","addListener","push","removed","emit","data","canPreventDefault","items","slice","concat","keys","map","t","filter","cb","i","self","lastIndexOf","event","defineProperty","enumerable","get","defaultPrevented","defineProperties","preventDefault","value","forEach","useMemo"],"sourceRoot":"../../src","sources":["useEventEmitter.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAW9B;AACA;AACA;AACA,eAAe,SAASC,eAAe,CACrCC,MAAyB,EACE;EAC3B,MAAMC,SAAS,GAAGH,KAAK,CAACI,MAAM,CAACF,MAAM,CAAC;EAEtCF,KAAK,CAACK,SAAS,CAAC,MAAM;IACpBF,SAAS,CAACG,OAAO,GAAGJ,MAAM;EAC5B,CAAC,CAAC;EAEF,MAAMK,SAAS,GAAGP,KAAK,CAACI,MAAM,CAC5BI,MA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AE,IAAI;UAChBK,KAAK,GAAG;YACNH,gBAAgB,GAAG,IAAI;UACzB;QACF;MACF,CAAC,CAAC;IACJ;IAEA,sBAAAtC,SAAS,CAACG,OAAO,uDAAjB,wBAAAH,SAAS,EAAWkC,KAAK,CAAC;IAE1BtB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAE8B,OAAO,CAAEZ,EAAE,IAAKA,EAAE,CAACI,KAAK,CAAC,CAAC;IAErC,OAAOA,KAAK;EACd,CAAC,EACD,EAAE,CACH;EAED,OAAOrC,KAAK,CAAC8C,OAAO,CAAC,OAAO;IAAErC,MAAM;IAAEc;EAAK,CAAC,CAAC,EAAE,CAACd,MAAM,EAAEc,IAAI,CAAC,CAAC;AAChE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEffect.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEffect.js new file mode 100644 index 00000000..8bb72477 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEffect.js @@ -0,0 +1,70 @@ +import * as React from 'react'; +import useNavigation from './useNavigation'; +/** + * Hook to run an effect in a focused screen, similar to `React.useEffect`. + * This can be used to perform side-effects such as fetching data or subscribing to events. + * The passed callback should be wrapped in `React.useCallback` to avoid running the effect too often. + * + * @param callback Memoized callback containing the effect, should optionally return a cleanup function. + */ +export default function useFocusEffect(effect) { + const navigation = useNavigation(); + if (arguments[1] !== undefined) { + const message = "You passed a second argument to 'useFocusEffect', but it only accepts one argument. " + "If you want to pass a dependency array, you can use 'React.useCallback':\n\n" + 'useFocusEffect(\n' + ' React.useCallback(() => {\n' + ' // Your code here\n' + ' }, [depA, depB])\n' + ');\n\n' + 'See usage guide: https://reactnavigation.org/docs/use-focus-effect'; + console.error(message); + } + React.useEffect(() => { + let isFocused = false; + let cleanup; + const callback = () => { + const destroy = effect(); + if (destroy === undefined || typeof destroy === 'function') { + return destroy; + } + if (process.env.NODE_ENV !== 'production') { + let message = 'An effect function must not return anything besides a function, which is used for clean-up.'; + if (destroy === null) { + message += " You returned 'null'. If your effect does not require clean-up, return 'undefined' (or nothing)."; + } else if (typeof destroy.then === 'function') { + message += "\n\nIt looks like you wrote 'useFocusEffect(async () => ...)' or returned a Promise. " + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useFocusEffect(\n' + ' React.useCallback(() => {\n' + ' async function fetchData() {\n' + ' // You can await here\n' + ' const response = await MyAPI.getData(someId);\n' + ' // ...\n' + ' }\n\n' + ' fetchData();\n' + ' }, [someId])\n' + ');\n\n' + 'See usage guide: https://reactnavigation.org/docs/use-focus-effect'; + } else { + message += ` You returned '${JSON.stringify(destroy)}'.`; + } + console.error(message); + } + }; + + // We need to run the effect on intial render/dep changes if the screen is focused + if (navigation.isFocused()) { + cleanup = callback(); + isFocused = true; + } + const unsubscribeFocus = navigation.addListener('focus', () => { + // If callback was already called for focus, avoid calling it again + // The focus event may also fire on intial render, so we guard against runing the effect twice + if (isFocused) { + return; + } + if (cleanup !== undefined) { + cleanup(); + } + cleanup = callback(); + isFocused = true; + }); + const unsubscribeBlur = navigation.addListener('blur', () => { + if (cleanup !== undefined) { + cleanup(); + } + cleanup = undefined; + isFocused = false; + }); + return () => { + if (cleanup !== undefined) { + cleanup(); + } + unsubscribeFocus(); + unsubscribeBlur(); + }; + }, [effect, navigation]); +} +//# sourceMappingURL=useFocusEffect.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEffect.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEffect.js.map new file mode 100644 index 00000000..512a7c3c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEffect.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","useNavigation","useFocusEffect","effect","navigation","arguments","undefined","message","console","error","useEffect","isFocused","cleanup","callback","destroy","process","env","NODE_ENV","then","JSON","stringify","unsubscribeFocus","addListener","unsubscribeBlur"],"s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,CAACN,OAAO,CAAE,IAAG;QAC1D;QAEAN,OAAO,CAACC,KAAK,CAACF,OAAO,CAAC;MACxB;IACF,CAAC;;IAED;IACA,IAAIH,UAAU,CAACO,SAAS,EAAE,EAAE;MAC1BC,OAAO,GAAGC,QAAQ,EAAE;MACpBF,SAAS,GAAG,IAAI;IAClB;IAEA,MAAMU,gBAAgB,GAAGjB,UAAU,CAACkB,WAAW,CAAC,OAAO,EAAE,MAAM;MAC7D;MACA;MACA,IAAIX,SAAS,EAAE;QACb;MACF;MAEA,IAAIC,OAAO,KAAKN,SAAS,EAAE;QACzBM,OAAO,EAAE;MACX;MAEAA,OAAO,GAAGC,QAAQ,EAAE;MACpBF,SAAS,GAAG,IAAI;IAClB,CAAC,CAAC;IAEF,MAAMY,eAAe,GAAGnB,UAAU,CAACkB,WAAW,CAAC,MAAM,EAAE,MAAM;MAC3D,IAAIV,OAAO,KAAKN,SAAS,EAAE;QACzBM,OAAO,EAAE;MACX;MAEAA,OAAO,GAAGN,SAAS;MACnBK,SAAS,GAAG,KAAK;IACnB,CAAC,CAAC;IAEF,OAAO,MAAM;MACX,IAAIC,OAAO,KAAKN,SAAS,EAAE;QACzBM,OAAO,EAAE;MACX;MAEAS,gBAAgB,EAAE;MAClBE,eAAe,EAAE;IACnB,CAAC;EACH,CAAC,EAAE,CAACpB,MAAM,EAAEC,UAAU,CAAC,CAAC;AAC1B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEvents.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEvents.js new file mode 100644 index 00000000..2634f07f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEvents.js @@ -0,0 +1,63 @@ +import * as React from 'react'; +import NavigationContext from './NavigationContext'; +/** + * Hook to take care of emitting `focus` and `blur` events. + */ +export default function useFocusEvents(_ref) { + let { + state, + emitter + } = _ref; + const navigation = React.useContext(NavigationContext); + const lastFocusedKeyRef = React.useRef(); + const currentFocusedKey = state.routes[state.index].key; + + // When the parent screen changes its focus state, we also need to change child's focus + // Coz the child screen can't be focused if the parent screen is out of focus + React.useEffect(() => navigation === null || navigation === void 0 ? void 0 : navigation.addListener('focus', () => { + lastFocusedKeyRef.current = currentFocusedKey; + emitter.emit({ + type: 'focus', + target: currentFocusedKey + }); + }), [currentFocusedKey, emitter, navigation]); + React.useEffect(() => navigation === null || navigation === void 0 ? void 0 : navigation.addListener('blur', () => { + lastFocusedKeyRef.current = undefined; + emitter.emit({ + type: 'blur', + target: currentFocusedKey + }); + }), [currentFocusedKey, emitter, navigation]); + React.useEffect(() => { + const lastFocusedKey = lastFocusedKeyRef.current; + lastFocusedKeyRef.current = currentFocusedKey; + + // We wouldn't have `lastFocusedKey` on initial mount + // Fire focus event for the current route on mount if there's no parent navigator + if (lastFocusedKey === undefined && !navigation) { + emitter.emit({ + type: 'focus', + target: currentFocusedKey + }); + } + + // We should only emit events when the focused key changed and navigator is focused + // When navigator is not focused, screens inside shouldn't receive focused status either + if (lastFocusedKey === currentFocusedKey || !(navigation ? navigation.isFocused() : true)) { + return; + } + if (lastFocusedKey === undefined) { + // Only fire events after initial mount + return; + } + emitter.emit({ + type: 'blur', + target: lastFocusedKey + }); + emitter.emit({ + type: 'focus', + target: currentFocusedKey + }); + }, [currentFocusedKey, emitter, navigation]); +} +//# sourceMappingURL=useFocusEvents.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEvents.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEvents.js.map new file mode 100644 index 00000000..bbbe3671 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusEvents.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","NavigationContext","useFocusEvents","state","emitter","navigation","useContext","lastFocusedKeyRef","useRef","currentFocusedKey","routes","index","key","useEffect","addListener","current","emit","type","target","undefined","lastFocusedKey","isFocused"],"sourceRoot":"../../src","sources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AAI,CAACd,UAAU,EAAE;MAC/CD,OAAO,CAACY,IAAI,CAAC;QAAEC,IAAI,EAAE,OAAO;QAAEC,MAAM,EAAET;MAAkB,CAAC,CAAC;IAC5D;;IAEA;IACA;IACA,IACEW,cAAc,KAAKX,iBAAiB,IACpC,EAAEJ,UAAU,GAAGA,UAAU,CAACgB,SAAS,EAAE,GAAG,IAAI,CAAC,EAC7C;MACA;IACF;IAEA,IAAID,cAAc,KAAKD,SAAS,EAAE;MAChC;MACA;IACF;IAEAf,OAAO,CAACY,IAAI,CAAC;MAAEC,IAAI,EAAE,MAAM;MAAEC,MAAM,EAAEE;IAAe,CAAC,CAAC;IACtDhB,OAAO,CAACY,IAAI,CAAC;MAAEC,IAAI,EAAE,OAAO;MAAEC,MAAM,EAAET;IAAkB,CAAC,CAAC;EAC5D,CAAC,EAAE,CAACA,iBAAiB,EAAEL,OAAO,EAAEC,UAAU,CAAC,CAAC;AAC9C"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusedListenersChildrenAdapter.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusedListenersChildrenAdapter.js new file mode 100644 index 00000000..470f51eb --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusedListenersChildrenAdapter.js @@ -0,0 +1,41 @@ +import * as React from 'react'; +import NavigationBuilderContext from './NavigationBuilderContext'; +/** + * Hook for passing focus callback to children + */ +export default function useFocusedListenersChildrenAdapter(_ref) { + let { + navigation, + focusedListeners + } = _ref; + const { + addListener + } = React.useContext(NavigationBuilderContext); + const listener = React.useCallback(callback => { + if (navigation.isFocused()) { + for (const listener of focusedListeners) { + const { + handled, + result + } = listener(callback); + if (handled) { + return { + handled, + result + }; + } + } + return { + handled: true, + result: callback(navigation) + }; + } else { + return { + handled: false, + result: null + }; + } + }, [focusedListeners, navigation]); + React.useEffect(() => addListener === null || addListener === void 0 ? void 0 : addListener('focus', listener), [addListener, listener]); +} +//# sourceMappingURL=useFocusedListenersChildrenAdapter.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusedListenersChildrenAdapter.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusedListenersChildrenAdapter.js.map new file mode 100644 index 00000000..4e6f4c57 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useFocusedListenersChildrenAdapter.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","NavigationBuilderContext","useFocusedListenersChildrenAdapter","navigation","focusedListeners","addListener","useContext","listener","useCallback","callback","isFocused","handled","result","useEffect"],"sourceRoot":"../../src","sources":["useFocusedListenersChildrenAdapter.tsx"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,wBAAwB,MAGxB,4BAA4B;AAQnC;AACA;AACA;AACA,eAAe,SAASC,kCAAkC,OAG9C;EAAA,IAH+C;IACzDC,UAAU;IACVC;EACO,CAAC;EACR,MAAM;IAAEC;EAAY,CAAC,GAAGL,KAAK,CAACM,UAAU,CAACL,wBAAwB,CAAC;EAElE,MAAMM,QAAQ,GAAGP,KAAK,CAACQ,WAAW,CAC/BC,QAAwC,IAAK;IAC5C,IAAIN,UAAU,CAACO,SAAS,EAAE,EAAE;MAC1B,KAAK,MAAMH,QAAQ,IAAIH,gBAAgB,EAAE;QACvC,MAAM;UAAEO,OAAO;UAAEC;QAAO,CAAC,GAAGL,QAAQ,CAACE,QAAQ,CAAC;QAE9C,IAAIE,OAAO,EAAE;UACX,OAAO;YAAEA,OAAO;YAAEC;UAAO,CAAC;QAC5B;MACF;MAEA,OAAO;QAAED,OAAO,EAAE,IAAI;QAAEC,MAAM,EAAEH,QAAQ,CAACN,UAAU;MAAE,CAAC;IACxD,CAAC,MAAM;MACL,OAAO;QAAEQ,OAAO,EAAE,KAAK;QAAEC,MAAM,EAAE;MAAK,CAAC;IACzC;EACF,CAAC,EACD,CAACR,gBAAgB,EAAED,UAAU,CAAC,CAC/B;EAEDH,KAAK,CAACa,SAAS,CACb,MAAMR,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAG,OAAO,EAAEE,QAAQ,CAAC,EACtC,CAACF,WAAW,EAAEE,QAAQ,CAAC,CACxB;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useIsFocused.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useIsFocused.js new file mode 100644 index 00000000..df834cef --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useIsFocused.js @@ -0,0 +1,32 @@ +import * as React from 'react'; +import { useState } from 'react'; +import useNavigation from './useNavigation'; + +/** + * Hook to get the current focus state of the screen. Returns a `true` if screen is focused, otherwise `false`. + * This can be used if a component needs to render something based on the focus state. + */ +export default function useIsFocused() { + const navigation = useNavigation(); + const [isFocused, setIsFocused] = useState(navigation.isFocused); + const valueToReturn = navigation.isFocused(); + if (isFocused !== valueToReturn) { + // If the value has changed since the last render, we need to update it. + // This could happen if we missed an update from the event listeners during re-render. + // React will process this update immediately, so the old subscription value won't be committed. + // It is still nice to avoid returning a mismatched value though, so let's override the return value. + // This is the same logic as in https://github.com/facebook/react/tree/master/packages/use-subscription + setIsFocused(valueToReturn); + } + React.useEffect(() => { + const unsubscribeFocus = navigation.addListener('focus', () => setIsFocused(true)); + const unsubscribeBlur = navigation.addListener('blur', () => setIsFocused(false)); + return () => { + unsubscribeFocus(); + unsubscribeBlur(); + }; + }, [navigation]); + React.useDebugValue(valueToReturn); + return valueToReturn; +} +//# sourceMappingURL=useIsFocused.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useIsFocused.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useIsFocused.js.map new file mode 100644 index 00000000..2ec306a0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useIsFocused.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","useState","useNavigation","useIsFocused","navigation","isFocused","setIsFocused","valueToReturn","useEffect","unsubscribeFocus","addListener","unsubscribeBlur","useDebugValue"],"sourceRoot":"../../src","sources":["useIsFocused.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,OAAO;AAEhC,OAAOC,aAAa,MAAM,iBAAiB;;AAE3C;AACA;AACA;AACA;AACA,eAAe,SAASC,YAAY,GAAY;EAC9C,MAAMC,UAAU,GAAGF,aAAa,EAAE;EAClC,MAAM,CAACG,SAAS,EAAEC,YAAY,CAAC,GAAGL,QAAQ,CAACG,UAAU,CAACC,SAAS,CAAC;EAEhE,MAAME,aAAa,GAAGH,UAAU,CAACC,SAAS,EAAE;EAE5C,IAAIA,SAAS,KAAKE,aAAa,EAAE;IAC/B;IACA;IACA;IACA;IACA;IACAD,YAAY,CAACC,aAAa,CAAC;EAC7B;EAEAP,KAAK,CAACQ,SAAS,CAAC,MAAM;IACpB,MAAMC,gBAAgB,GAAGL,UAAU,CAACM,WAAW,CAAC,OAAO,EAAE,MACvDJ,YAAY,CAAC,IAAI,CAAC,CACnB;IAED,MAAMK,eAAe,GAAGP,UAAU,CAACM,WAAW,CAAC,MAAM,EAAE,MACrDJ,YAAY,CAAC,KAAK,CAAC,CACpB;IAED,OAAO,MAAM;MACXG,gBAAgB,EAAE;MAClBE,eAAe,EAAE;IACnB,CAAC;EACH,CAAC,EAAE,CAACP,UAAU,CAAC,CAAC;EAEhBJ,KAAK,CAACY,aAAa,CAACL,aAAa,CAAC;EAElC,OAAOA,aAAa;AACtB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useKeyedChildListeners.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useKeyedChildListeners.js new file mode 100644 index 00000000..d8d417fe --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useKeyedChildListeners.js @@ -0,0 +1,25 @@ +import * as React from 'react'; +/** + * Hook which lets child navigators add getters to be called for obtaining rehydrated state. + */ +export default function useKeyedChildListeners() { + const { + current: keyedListeners + } = React.useRef(Object.assign(Object.create(null), { + getState: {}, + beforeRemove: {} + })); + const addKeyedListener = React.useCallback((type, key, listener) => { + // @ts-expect-error: according to ref stated above you can use `key` to index type + keyedListeners[type][key] = listener; + return () => { + // @ts-expect-error: according to ref stated above you can use `key` to index type + keyedListeners[type][key] = undefined; + }; + }, [keyedListeners]); + return { + keyedListeners, + addKeyedListener + }; +} +//# sourceMappingURL=useKeyedChildListeners.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useKeyedChildListeners.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useKeyedChildListeners.js.map new file mode 100644 index 00000000..3613f10d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useKeyedChildListeners.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","useKeyedChildListeners","current","keyedListeners","useRef","Object","assign","create","getState","beforeRemove","addKeyedListener","useCallback","type","key","listener","undefined"],"sourceRoot":"../../src","sources":["useKeyedChildListeners.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAI9B;AACA;AACA;AACA,eAAe,SAASC,sBAAsB,GAAG;EAC/C,MAAM;IAAEC,OAAO,EAAEC;EAAe,CAAC,GAAGH,KAAK,CAACI,MAAM,CAM9CC,MAAM,CAACC,MAAM,CAACD,MAAM,CAACE,MAAM,CAAC,IAAI,CAAC,EAAE;IACjCC,QAAQ,EAAE,CAAC,CAAC;IACZC,YAAY,EAAE,CAAC;EACjB,CAAC,CAAC,CACH;EAED,MAAMC,gBAAgB,GAAGV,KAAK,CAACW,WAAW,CACxC,CACEC,IAAO,EACPC,GAAW,EACXC,QAA6B,KAC1B;IACH;IACAX,cAAc,CAACS,IAAI,CAAC,CAACC,GAAG,CAAC,GAAGC,QAAQ;IAEpC,OAAO,MAAM;MACX;MACAX,cAAc,CAACS,IAAI,CAAC,CAACC,GAAG,CAAC,GAAGE,SAAS;IACvC,CAAC;EACH,CAAC,EACD,CAACZ,cAAc,CAAC,CACjB;EAED,OAAO;IACLA,cAAc;IACdO;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigation.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigation.js new file mode 100644 index 00000000..c86bbecc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigation.js @@ -0,0 +1,19 @@ +import * as React from 'react'; +import NavigationContainerRefContext from './NavigationContainerRefContext'; +import NavigationContext from './NavigationContext'; +/** + * Hook to access the navigation prop of the parent screen anywhere. + * + * @returns Navigation prop of the parent screen. + */ +export default function useNavigation() { + const root = React.useContext(NavigationContainerRefContext); + const navigation = React.useContext(NavigationContext); + if (navigation === undefined && root === undefined) { + throw new Error("Couldn't find a navigation object. Is your component inside NavigationContainer?"); + } + + // FIXME: Figure out a better way to do this + return navigation ?? root; +} +//# sourceMappingURL=useNavigation.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigation.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigation.js.map new file mode 100644 index 00000000..434709f0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigation.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","NavigationContainerRefContext","NavigationContext","useNavigation","root","useContext","navigation","undefined","Error"],"sourceRoot":"../../src","sources":["useNavigation.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,6BAA6B,MAAM,iCAAiC;AAC3E,OAAOC,iBAAiB,MAAM,qBAAqB;AAGnD;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,aAAa,GAE9B;EACL,MAAMC,IAAI,GAAGJ,KAAK,CAACK,UAAU,CAACJ,6BAA6B,CAAC;EAC5D,MAAMK,UAAU,GAAGN,KAAK,CAACK,UAAU,CAACH,iBAAiB,CAAC;EAEtD,IAAII,UAAU,KAAKC,SAAS,IAAIH,IAAI,KAAKG,SAAS,EAAE;IAClD,MAAM,IAAIC,KAAK,CACb,kFAAkF,CACnF;EACH;;EAEA;EACA,OAAQF,UAAU,IAAIF,IAAI;AAC5B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js new file mode 100644 index 00000000..276ec9f0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js @@ -0,0 +1,449 @@ +import { CommonActions } from '@react-navigation/routers'; +import * as React from 'react'; +import { isValidElementType } from 'react-is'; +import Group from './Group'; +import isArrayEqual from './isArrayEqual'; +import isRecordEqual from './isRecordEqual'; +import NavigationHelpersContext from './NavigationHelpersContext'; +import NavigationRouteContext from './NavigationRouteContext'; +import NavigationStateContext from './NavigationStateContext'; +import PreventRemoveProvider from './PreventRemoveProvider'; +import Screen from './Screen'; +import { PrivateValueStore } from './types'; +import useChildListeners from './useChildListeners'; +import useComponent from './useComponent'; +import useCurrentRender from './useCurrentRender'; +import useDescriptors from './useDescriptors'; +import useEventEmitter from './useEventEmitter'; +import useFocusedListenersChildrenAdapter from './useFocusedListenersChildrenAdapter'; +import useFocusEvents from './useFocusEvents'; +import useKeyedChildListeners from './useKeyedChildListeners'; +import useNavigationHelpers from './useNavigationHelpers'; +import useOnAction from './useOnAction'; +import useOnGetState from './useOnGetState'; +import useOnRouteFocus from './useOnRouteFocus'; +import useRegisterNavigator from './useRegisterNavigator'; +import useScheduleUpdate from './useScheduleUpdate'; + +// This is to make TypeScript compiler happy +// eslint-disable-next-line babel/no-unused-expressions +PrivateValueStore; +const isValidKey = key => key === undefined || typeof key === 'string' && key !== ''; + +/** + * Extract route config object from React children elements. + * + * @param children React Elements to extract the config from. + */ +const getRouteConfigsFromChildren = (children, groupKey, groupOptions) => { + const configs = React.Children.toArray(children).reduce((acc, child) => { + var _child$type, _child$props; + if ( /*#__PURE__*/React.isValidElement(child)) { + if (child.type === Screen) { + // We can only extract the config from `Screen` elements + // If something else was rendered, it's probably a bug + + if (!isValidKey(child.props.navigationKey)) { + throw new Error(`Got an invalid 'navigationKey' prop (${JSON.stringify(child.props.navigationKey)}) for the screen '${child.props.name}'. It must be a non-empty string or 'undefined'.`); + } + acc.push({ + keys: [groupKey, child.props.navigationKey], + options: groupOptions, + props: child.props + }); + return acc; + } + if (child.type === React.Fragment || child.type === Group) { + if (!isValidKey(child.props.navigationKey)) { + throw new Error(`Got an invalid 'navigationKey' prop (${JSON.stringify(child.props.navigationKey)}) for the group. It must be a non-empty string or 'undefined'.`); + } + + // When we encounter a fragment or group, we need to dive into its children to extract the configs + // This is handy to conditionally define a group of screens + acc.push(...getRouteConfigsFromChildren(child.props.children, child.props.navigationKey, child.type !== Group ? groupOptions : groupOptions != null ? [...groupOptions, child.props.screenOptions] : [child.props.screenOptions])); + return acc; + } + } + throw new Error(`A navigator can only contain 'Screen', 'Group' or 'React.Fragment' as its direct children (found ${/*#__PURE__*/React.isValidElement(child) ? `'${typeof child.type === 'string' ? child.type : (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.name}'${(_child$props = child.props) !== null && _child$props !== void 0 && _child$props.name ? ` for the screen '${child.props.name}'` : ''}` : typeof child === 'object' ? JSON.stringify(child) : `'${String(child)}'`}). To render this component in the navigator, pass it in the 'component' prop to 'Screen'.`); + }, []); + if (process.env.NODE_ENV !== 'production') { + configs.forEach(config => { + const { + name, + children, + component, + getComponent + } = config.props; + if (typeof name !== 'string' || !name) { + throw new Error(`Got an invalid name (${JSON.stringify(name)}) for the screen. It must be a non-empty string.`); + } + if (children != null || component !== undefined || getComponent !== undefined) { + if (children != null && component !== undefined) { + throw new Error(`Got both 'component' and 'children' props for the screen '${name}'. You must pass only one of them.`); + } + if (children != null && getComponent !== undefined) { + throw new Error(`Got both 'getComponent' and 'children' props for the screen '${name}'. You must pass only one of them.`); + } + if (component !== undefined && getComponent !== undefined) { + throw new Error(`Got both 'component' and 'getComponent' props for the screen '${name}'. You must pass only one of them.`); + } + if (children != null && typeof children !== 'function') { + throw new Error(`Got an invalid value for 'children' prop for the screen '${name}'. It must be a function returning a React Element.`); + } + if (component !== undefined && !isValidElementType(component)) { + throw new Error(`Got an invalid value for 'component' prop for the screen '${name}'. It must be a valid React Component.`); + } + if (getComponent !== undefined && typeof getComponent !== 'function') { + throw new Error(`Got an invalid value for 'getComponent' prop for the screen '${name}'. It must be a function returning a React Component.`); + } + if (typeof component === 'function') { + if (component.name === 'component') { + // Inline anonymous functions passed in the `component` prop will have the name of the prop + // It's relatively safe to assume that it's not a component since it should also have PascalCase name + // We won't catch all scenarios here, but this should catch a good chunk of incorrect use. + console.warn(`Looks like you're passing an inline function for 'component' prop for the screen '${name}' (e.g. component={() => }). Passing an inline function will cause the component state to be lost on re-render and cause perf issues since it's re-created every render. You can pass the function as children to 'Screen' instead to achieve the desired behaviour.`); + } else if (/^[a-z]/.test(component.name)) { + console.warn(`Got a component with the name '${component.name}' for the screen '${name}'. React Components must start with an uppercase letter. If you're passing a regular function and not a component, pass it as children to 'Screen' instead. Otherwise capitalize your component's name.`); + } + } + } else { + throw new Error(`Couldn't find a 'component', 'getComponent' or 'children' prop for the screen '${name}'. This can happen if you passed 'undefined'. You likely forgot to export your component from the file it's defined in, or mixed up default import and named import when importing.`); + } + }); + } + return configs; +}; + +/** + * Hook for building navigators. + * + * @param createRouter Factory method which returns router object. + * @param options Options object containing `children` and additional options for the router. + * @returns An object containing `state`, `navigation`, `descriptors` objects. + */ +export default function useNavigationBuilder(createRouter, options) { + const navigatorKey = useRegisterNavigator(); + const route = React.useContext(NavigationRouteContext); + const { + children, + screenListeners, + ...rest + } = options; + const { + current: router + } = React.useRef(createRouter({ + ...rest, + ...(route !== null && route !== void 0 && route.params && route.params.state == null && route.params.initial !== false && typeof route.params.screen === 'string' ? { + initialRouteName: route.params.screen + } : null) + })); + const routeConfigs = getRouteConfigsFromChildren(children); + const screens = routeConfigs.reduce((acc, config) => { + if (config.props.name in acc) { + throw new Error(`A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '${config.props.name}')`); + } + acc[config.props.name] = config; + return acc; + }, {}); + const routeNames = routeConfigs.map(config => config.props.name); + const routeKeyList = routeNames.reduce((acc, curr) => { + acc[curr] = screens[curr].keys.map(key => key ?? '').join(':'); + return acc; + }, {}); + const routeParamList = routeNames.reduce((acc, curr) => { + const { + initialParams + } = screens[curr].props; + acc[curr] = initialParams; + return acc; + }, {}); + const routeGetIdList = routeNames.reduce((acc, curr) => Object.assign(acc, { + [curr]: screens[curr].props.getId + }), {}); + if (!routeNames.length) { + throw new Error("Couldn't find any screens for the navigator. Have you defined any screens as its children?"); + } + const isStateValid = React.useCallback(state => state.type === undefined || state.type === router.type, [router.type]); + const isStateInitialized = React.useCallback(state => state !== undefined && state.stale === false && isStateValid(state), [isStateValid]); + const { + state: currentState, + getState: getCurrentState, + setState: setCurrentState, + setKey, + getKey, + getIsInitial + } = React.useContext(NavigationStateContext); + const stateCleanedUp = React.useRef(false); + const cleanUpState = React.useCallback(() => { + setCurrentState(undefined); + stateCleanedUp.current = true; + }, [setCurrentState]); + const setState = React.useCallback(state => { + if (stateCleanedUp.current) { + // State might have been already cleaned up due to unmount + // We do not want to expose API allowing to override this + // This would lead to old data preservation on main navigator unmount + return; + } + setCurrentState(state); + }, [setCurrentState]); + const [initializedState, isFirstStateInitialization] = React.useMemo(() => { + var _route$params4; + const initialRouteParamList = routeNames.reduce((acc, curr) => { + var _route$params, _route$params2, _route$params3; + const { + initialParams + } = screens[curr].props; + const initialParamsFromParams = (route === null || route === void 0 ? void 0 : (_route$params = route.params) === null || _route$params === void 0 ? void 0 : _route$params.state) == null && (route === null || route === void 0 ? void 0 : (_route$params2 = route.params) === null || _route$params2 === void 0 ? void 0 : _route$params2.initial) !== false && (route === null || route === void 0 ? void 0 : (_route$params3 = route.params) === null || _route$params3 === void 0 ? void 0 : _route$params3.screen) === curr ? route.params.params : undefined; + acc[curr] = initialParams !== undefined || initialParamsFromParams !== undefined ? { + ...initialParams, + ...initialParamsFromParams + } : undefined; + return acc; + }, {}); + + // If the current state isn't initialized on first render, we initialize it + // We also need to re-initialize it if the state passed from parent was changed (maybe due to reset) + // Otherwise assume that the state was provided as initial state + // So we need to rehydrate it to make it usable + if ((currentState === undefined || !isStateValid(currentState)) && (route === null || route === void 0 ? void 0 : (_route$params4 = route.params) === null || _route$params4 === void 0 ? void 0 : _route$params4.state) == null) { + return [router.getInitialState({ + routeNames, + routeParamList: initialRouteParamList, + routeGetIdList + }), true]; + } else { + var _route$params5; + return [router.getRehydratedState((route === null || route === void 0 ? void 0 : (_route$params5 = route.params) === null || _route$params5 === void 0 ? void 0 : _route$params5.state) ?? currentState, { + routeNames, + routeParamList: initialRouteParamList, + routeGetIdList + }), false]; + } + // We explicitly don't include routeNames, route.params etc. in the dep list + // below. We want to avoid forcing a new state to be calculated in those cases + // Instead, we handle changes to these in the nextState code below. Note + // that some changes to routeConfigs are explicitly ignored, such as changes + // to initialParams + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [currentState, router, isStateValid]); + const previousRouteKeyListRef = React.useRef(routeKeyList); + React.useEffect(() => { + previousRouteKeyListRef.current = routeKeyList; + }); + const previousRouteKeyList = previousRouteKeyListRef.current; + let state = + // If the state isn't initialized, or stale, use the state we initialized instead + // The state won't update until there's a change needed in the state we have initalized locally + // So it'll be `undefined` or stale until the first navigation event happens + isStateInitialized(currentState) ? currentState : initializedState; + let nextState = state; + if (!isArrayEqual(state.routeNames, routeNames) || !isRecordEqual(routeKeyList, previousRouteKeyList)) { + // When the list of route names change, the router should handle it to remove invalid routes + nextState = router.getStateForRouteNamesChange(state, { + routeNames, + routeParamList, + routeGetIdList, + routeKeyChanges: Object.keys(routeKeyList).filter(name => previousRouteKeyList.hasOwnProperty(name) && routeKeyList[name] !== previousRouteKeyList[name]) + }); + } + const previousNestedParamsRef = React.useRef(route === null || route === void 0 ? void 0 : route.params); + React.useEffect(() => { + previousNestedParamsRef.current = route === null || route === void 0 ? void 0 : route.params; + }, [route === null || route === void 0 ? void 0 : route.params]); + if (route !== null && route !== void 0 && route.params) { + const previousParams = previousNestedParamsRef.current; + let action; + if (typeof route.params.state === 'object' && route.params.state != null && route.params !== previousParams) { + // If the route was updated with new state, we should reset to it + action = CommonActions.reset(route.params.state); + } else if (typeof route.params.screen === 'string' && (route.params.initial === false && isFirstStateInitialization || route.params !== previousParams)) { + // If the route was updated with new screen name and/or params, we should navigate there + action = CommonActions.navigate({ + name: route.params.screen, + params: route.params.params, + path: route.params.path + }); + } + + // The update should be limited to current navigator only, so we call the router manually + const updatedState = action ? router.getStateForAction(nextState, action, { + routeNames, + routeParamList, + routeGetIdList + }) : null; + nextState = updatedState !== null ? router.getRehydratedState(updatedState, { + routeNames, + routeParamList, + routeGetIdList + }) : nextState; + } + const shouldUpdate = state !== nextState; + useScheduleUpdate(() => { + if (shouldUpdate) { + // If the state needs to be updated, we'll schedule an update + setState(nextState); + } + }); + + // The up-to-date state will come in next render, but we don't need to wait for it + // We can't use the outdated state since the screens have changed, which will cause error due to mismatched config + // So we override the state object we return to use the latest state as soon as possible + state = nextState; + React.useEffect(() => { + setKey(navigatorKey); + if (!getIsInitial()) { + // If it's not initial render, we need to update the state + // This will make sure that our container gets notifier of state changes due to new mounts + // This is necessary for proper screen tracking, URL updates etc. + setState(nextState); + } + return () => { + // We need to clean up state for this navigator on unmount + // We do it in a timeout because we need to detect if another navigator mounted in the meantime + // For example, if another navigator has started rendering, we should skip cleanup + // Otherwise, our cleanup step will cleanup state for the other navigator and re-initialize it + setTimeout(() => { + if (getCurrentState() !== undefined && getKey() === navigatorKey) { + cleanUpState(); + } + }, 0); + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + // We initialize this ref here to avoid a new getState getting initialized + // whenever initializedState changes. We want getState to have access to the + // latest initializedState, but don't need it to change when that happens + const initializedStateRef = React.useRef(); + initializedStateRef.current = initializedState; + const getState = React.useCallback(() => { + const currentState = getCurrentState(); + return isStateInitialized(currentState) ? currentState : initializedStateRef.current; + }, [getCurrentState, isStateInitialized]); + const emitter = useEventEmitter(e => { + let routeNames = []; + let route; + if (e.target) { + var _route; + route = state.routes.find(route => route.key === e.target); + if ((_route = route) !== null && _route !== void 0 && _route.name) { + routeNames.push(route.name); + } + } else { + route = state.routes[state.index]; + routeNames.push(...Object.keys(screens).filter(name => { + var _route2; + return ((_route2 = route) === null || _route2 === void 0 ? void 0 : _route2.name) === name; + })); + } + if (route == null) { + return; + } + const navigation = descriptors[route.key].navigation; + const listeners = [].concat( + // Get an array of listeners for all screens + common listeners on navigator + ...[screenListeners, ...routeNames.map(name => { + const { + listeners + } = screens[name].props; + return listeners; + })].map(listeners => { + const map = typeof listeners === 'function' ? listeners({ + route: route, + navigation + }) : listeners; + return map ? Object.keys(map).filter(type => type === e.type).map(type => map === null || map === void 0 ? void 0 : map[type]) : undefined; + })) + // We don't want same listener to be called multiple times for same event + // So we remove any duplicate functions from the array + .filter((cb, i, self) => cb && self.lastIndexOf(cb) === i); + listeners.forEach(listener => listener === null || listener === void 0 ? void 0 : listener(e)); + }); + useFocusEvents({ + state, + emitter + }); + React.useEffect(() => { + emitter.emit({ + type: 'state', + data: { + state + } + }); + }, [emitter, state]); + const { + listeners: childListeners, + addListener + } = useChildListeners(); + const { + keyedListeners, + addKeyedListener + } = useKeyedChildListeners(); + const onAction = useOnAction({ + router, + getState, + setState, + key: route === null || route === void 0 ? void 0 : route.key, + actionListeners: childListeners.action, + beforeRemoveListeners: keyedListeners.beforeRemove, + routerConfigOptions: { + routeNames, + routeParamList, + routeGetIdList + }, + emitter + }); + const onRouteFocus = useOnRouteFocus({ + router, + key: route === null || route === void 0 ? void 0 : route.key, + getState, + setState + }); + const navigation = useNavigationHelpers({ + id: options.id, + onAction, + getState, + emitter, + router + }); + useFocusedListenersChildrenAdapter({ + navigation, + focusedListeners: childListeners.focus + }); + useOnGetState({ + getState, + getStateListeners: keyedListeners.getState + }); + const descriptors = useDescriptors({ + state, + screens, + navigation, + screenOptions: options.screenOptions, + defaultScreenOptions: options.defaultScreenOptions, + onAction, + getState, + setState, + onRouteFocus, + addListener, + addKeyedListener, + router, + // @ts-expect-error: this should have both core and custom events, but too much work right now + emitter + }); + useCurrentRender({ + state, + navigation, + descriptors + }); + const NavigationContent = useComponent(children => /*#__PURE__*/React.createElement(NavigationHelpersContext.Provider, { + value: navigation + }, /*#__PURE__*/React.createElement(PreventRemoveProvider, null, children))); + return { + state, + navigation, + descriptors, + NavigationContent + }; +} +//# sourceMappingURL=useNavigationBuilder.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js.map new file mode 100644 index 00000000..e153eb12 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js.map @@ -0,0 +1 @@ +{"version":3,"names":["CommonActions","React","isValidElementType","Group","isArrayEqual","isRecordEqual","NavigationHelpersContext","NavigationRouteContext","NavigationStateContext","PreventRemoveProvider","Screen","PrivateValueStore","useChildListeners","useComponent","useCurrentRender","useDescriptors","useEventEmitter","useFocusedListenersChildrenAdapter","useFocusEvents","useKeyedChildListeners","useNavigationHelpers","useOnAction","useOnGetState","useOnRouteFocus","useRegisterNavigator","useScheduleUpdate","isValidKey","key","undefined","getRouteConfigsFromChildren","children","groupKey","groupOptions","configs","Children","toArray","reduce","acc","child","isValidElement","type","props","navigationKey","Error","JSON","stringify","name","push","keys","options","Fragment","screenOptions","String","process","env","NODE_ENV","forEach","config","component","getComponent","console","warn","test","useNavigationBuilder","createRouter","navigatorKey","route","useContext","screenListeners","rest","current","router","useRef","params","state","initial","screen","initialRouteName","routeConfigs","screens","routeNames","map","routeKeyList","curr","join","routeParamList","initialParams","routeGetIdList","Object","assign","getId","length","isStateValid","useCallback","isStateInitialized","stale","currentState","getState","getCurrentState","setState","setCurrentState","setKey","getKey","getIsInitial","stateCleanedUp","cleanUpState","initializedState","isFirstStateInitialization","useMemo","initialRouteParamList","initialParamsFromParams","getInitialState","getRehydratedState","previousRouteKeyListRef","useEffect","previousRouteKeyList","nextState","getStateForRouteNamesChange","routeKeyChanges","filter","hasOwnProperty","previousNestedParamsRef","previousParams","action","reset","navigate","path","updatedState","getStateForAction","shouldUpdate","setTimeout","initializedStateRef","emitter","e","target","routes","find","index","navigation","descriptors","listeners","concat","cb","i","self","lastIndexOf","listener","emit","data","childListeners","addListener","keyedListeners","addKeyedListener","onAction","actionListeners","beforeRemoveListeners","beforeRemove","routerConfigOptions","onRouteFocus","id","focusedListeners","focus","getStateListeners","defaultScreenOptions","NavigationContent"],"sourceRoot":"../../src","sources":["useNavigationBuilder.tsx"],"mappings":"AAAA,SACEA,aAAa,QAUR,2BAA2B;AAClC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,kBAAkB,QAAQ,UAAU;AAE7C,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,wBAAwB,MAAM,4BAA4B;AACjE,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,OAAOC,MAAM,MAAM,UAAU;AAC7B,SAKEC,iBAAiB,QAGZ,SAAS;AAChB,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,cAAc,MAAkC,kBAAkB;AACzE,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,OAAOC,kCAAkC,MAAM,sCAAsC;AACrF,OAAOC,cAAc,MAAM,kBAAkB;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A,KAAK,CAAEvC,GAAG;IACfsE,QAAQ;IACRE;EACF,CAAC,CAAC;EAEF,MAAMuC,UAAU,GAAGtH,oBAAoB,CAKrC;IACA2I,EAAE,EAAE9G,OAAO,CAAC8G,EAAE;IACdN,QAAQ;IACRxD,QAAQ;IACRmC,OAAO;IACP7D;EACF,CAAC,CAAC;EAEFtD,kCAAkC,CAAC;IACjCyH,UAAU;IACVsB,gBAAgB,EAAEX,cAAc,CAACY;EACnC,CAAC,CAAC;EAEF3I,aAAa,CAAC;IACZ2E,QAAQ;IACRiE,iBAAiB,EAAEX,cAAc,CAACtD;EACpC,CAAC,CAAC;EAEF,MAAM0C,WAAW,GAAG5H,cAAc,CAKhC;IACA2D,KAAK;IACLK,OAAO;IACP2D,UAAU;IACVvF,aAAa,EAAEF,OAAO,CAACE,aAAa;IACpCgH,oBAAoB,EAAElH,OAAO,CAACkH,oBAAoB;IAClDV,QAAQ;IACRxD,QAAQ;IACRE,QAAQ;IACR2D,YAAY;IACZR,WAAW;IACXE,gBAAgB;IAChBjF,MAAM;IACN;IACA6D;EACF,CAAC,CAAC;EAEFtH,gBAAgB,CAAC;IACf4D,KAAK;IACLgE,UAAU;IACVC;EACF,CAAC,CAAC;EAEF,MAAMyB,iBAAiB,GAAGvJ,YAAY,CAAEiB,QAAyB,iBAC/D,oBAAC,wBAAwB,CAAC,QAAQ;IAAC,KAAK,EAAE4G;EAAW,gBACnD,oBAAC,qBAAqB,QAAE5G,QAAQ,CAAyB,CAE5D,CAAC;EAEF,OAAO;IACL4C,KAAK;IACLgE,UAAU;IACVC,WAAW;IACXyB;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationCache.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationCache.js new file mode 100644 index 00000000..c4d65c65 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationCache.js @@ -0,0 +1,117 @@ +import { CommonActions } from '@react-navigation/routers'; +import * as React from 'react'; +import NavigationBuilderContext from './NavigationBuilderContext'; +/** + * Hook to cache navigation objects for each screen in the navigator. + * It's important to cache them to make sure navigation objects don't change between renders. + * This lets us apply optimizations like `React.memo` to minimize re-rendering screens. + */ +export default function useNavigationCache(_ref) { + let { + state, + getState, + navigation, + setOptions, + router, + emitter + } = _ref; + const { + stackRef + } = React.useContext(NavigationBuilderContext); + + // Cache object which holds navigation objects for each screen + // We use `React.useMemo` instead of `React.useRef` coz we want to invalidate it when deps change + // In reality, these deps will rarely change, if ever + const cache = React.useMemo(() => ({ + current: {} + }), + // eslint-disable-next-line react-hooks/exhaustive-deps + [getState, navigation, setOptions, router, emitter]); + const actions = { + ...router.actionCreators, + ...CommonActions + }; + cache.current = state.routes.reduce((acc, route) => { + const previous = cache.current[route.key]; + if (previous) { + // If a cached navigation object already exists, reuse it + acc[route.key] = previous; + } else { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { + emit, + ...rest + } = navigation; + const dispatch = thunk => { + const action = typeof thunk === 'function' ? thunk(getState()) : thunk; + if (action != null) { + navigation.dispatch({ + source: route.key, + ...action + }); + } + }; + const withStack = callback => { + let isStackSet = false; + try { + if (process.env.NODE_ENV !== 'production' && stackRef && !stackRef.current) { + // Capture the stack trace for devtools + stackRef.current = new Error().stack; + isStackSet = true; + } + callback(); + } finally { + if (isStackSet && stackRef) { + stackRef.current = undefined; + } + } + }; + const helpers = Object.keys(actions).reduce((acc, name) => { + acc[name] = function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + return withStack(() => + // @ts-expect-error: name is a valid key, but TypeScript is dumb + dispatch(actions[name](...args))); + }; + return acc; + }, {}); + acc[route.key] = { + ...rest, + ...helpers, + // FIXME: too much work to fix the types for now + ...emitter.create(route.key), + dispatch: thunk => withStack(() => dispatch(thunk)), + getParent: id => { + if (id !== undefined && id === rest.getId()) { + // If the passed id is the same as the current navigation id, + // we return the cached navigation object for the relevant route + return acc[route.key]; + } + return rest.getParent(id); + }, + setOptions: options => setOptions(o => ({ + ...o, + [route.key]: { + ...o[route.key], + ...options + } + })), + isFocused: () => { + const state = getState(); + if (state.routes[state.index].key !== route.key) { + return false; + } + + // If the current screen is focused, we also need to check if parent navigator is focused + // This makes sure that we return the focus state in the whole tree, not just this navigator + return navigation ? navigation.isFocused() : true; + } + }; + } + return acc; + }, {}); + return cache.current; +} +//# sourceMappingURL=useNavigationCache.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationCache.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationCache.js.map new file mode 100644 index 00000000..7c986301 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationCache.js.map @@ -0,0 +1 @@ +{"version":3,"names":["CommonActions","React","NavigationBuilderContext","useNavigationCache","state","getState","navigation","setOptions","router","emitter","stackRef","useContext","cache","useMemo","current","actions","actionCreators","routes","reduce","acc","route","previous","key","emit","rest","dispatch","thunk","action","source","withStack","callback","isStackSet","process","env","NODE_ENV","Error","stack","undefined","helpers","Object","keys","name","args","create","getParent","id","getId","options","o","isFocused","index"],"sourceRoot":"../../src","sources":["useNavigationCache.tsx"],"mappings":"AAAA,SACEA,aAAa,QAKR,2BAA2B;AAClC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,OAAOC,wBAAwB,MAAM,4BAA4B;AAmCjE;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,kBAAkB,OAWb;EAAA,IAP3B;IACAC,KAAK;IACLC,QAAQ;IACRC,UAAU;IACVC,UAAU;IACVC,MAAM;IACNC;EACwB,CAAC;EACzB,MAAM;IAAEC;EAAS,CAAC,GAAGT,KAAK,CAACU,UAAU,CAACT,wBAAwB,CAAC;;EAE/D;EACA;EACA;EACA,MAAMU,KAAK,GAAGX,KAAK,CAACY,OAAO,CACzB,OAAO;IAAEC,OAAO,EAAE,CAAC;EAAqD,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AAC8C,KAAK,CAAC,CAAC5B,GAAG,KAAKF,KAAK,CAACE,GAAG,EAAE;YAC/C,OAAO,KAAK;UACd;;UAEA;UACA;UACA,OAAOhB,UAAU,GAAGA,UAAU,CAAC2C,SAAS,EAAE,GAAG,IAAI;QACnD;MACF,CAAC;IACH;IAEA,OAAO9B,GAAG;EACZ,CAAC,EAAE,CAAC,CAAC,CAAC;EAEN,OAAOP,KAAK,CAACE,OAAO;AACtB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationContainerRef.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationContainerRef.js new file mode 100644 index 00000000..82b8aa1e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationContainerRef.js @@ -0,0 +1,10 @@ +import * as React from 'react'; +import createNavigationContainerRef from './createNavigationContainerRef'; +export default function useNavigationContainerRef() { + const navigation = React.useRef(null); + if (navigation.current == null) { + navigation.current = createNavigationContainerRef(); + } + return navigation.current; +} +//# sourceMappingURL=useNavigationContainerRef.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationContainerRef.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationContainerRef.js.map new file mode 100644 index 00000000..9bb4ea0f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationContainerRef.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","createNavigationContainerRef","useNavigationContainerRef","navigation","useRef","current"],"sourceRoot":"../../src","sources":["useNavigationContainerRef.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,4BAA4B,MAAM,gCAAgC;AAGzE,eAAe,SAASC,yBAAyB,GAEC;EAChD,MAAMC,UAAU,GACdH,KAAK,CAACI,MAAM,CAAsD,IAAI,CAAC;EAEzE,IAAID,UAAU,CAACE,OAAO,IAAI,IAAI,EAAE;IAC9BF,UAAU,CAACE,OAAO,GAAGJ,4BAA4B,EAAa;EAChE;EAEA,OAAOE,UAAU,CAACE,OAAO;AAC3B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationHelpers.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationHelpers.js new file mode 100644 index 00000000..946f49dd --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationHelpers.js @@ -0,0 +1,72 @@ +import { CommonActions } from '@react-navigation/routers'; +import * as React from 'react'; +import NavigationContext from './NavigationContext'; +import { PrivateValueStore } from './types'; +import UnhandledActionContext from './UnhandledActionContext'; +// This is to make TypeScript compiler happy +// eslint-disable-next-line babel/no-unused-expressions +PrivateValueStore; +/** + * Navigation object with helper methods to be used by a navigator. + * This object includes methods for common actions as well as methods the parent screen's navigation object. + */ +export default function useNavigationHelpers(_ref) { + let { + id: navigatorId, + onAction, + getState, + emitter, + router + } = _ref; + const onUnhandledAction = React.useContext(UnhandledActionContext); + const parentNavigationHelpers = React.useContext(NavigationContext); + return React.useMemo(() => { + const dispatch = op => { + const action = typeof op === 'function' ? op(getState()) : op; + const handled = onAction(action); + if (!handled) { + onUnhandledAction === null || onUnhandledAction === void 0 ? void 0 : onUnhandledAction(action); + } + }; + const actions = { + ...router.actionCreators, + ...CommonActions + }; + const helpers = Object.keys(actions).reduce((acc, name) => { + // @ts-expect-error: name is a valid key, but TypeScript is dumb + acc[name] = function () { + return dispatch(actions[name](...arguments)); + }; + return acc; + }, {}); + const navigationHelpers = { + ...parentNavigationHelpers, + ...helpers, + dispatch, + emit: emitter.emit, + isFocused: parentNavigationHelpers ? parentNavigationHelpers.isFocused : () => true, + canGoBack: () => { + const state = getState(); + return router.getStateForAction(state, CommonActions.goBack(), { + routeNames: state.routeNames, + routeParamList: {}, + routeGetIdList: {} + }) !== null || (parentNavigationHelpers === null || parentNavigationHelpers === void 0 ? void 0 : parentNavigationHelpers.canGoBack()) || false; + }, + getId: () => navigatorId, + getParent: id => { + if (id !== undefined) { + let current = navigationHelpers; + while (current && id !== current.getId()) { + current = current.getParent(); + } + return current; + } + return parentNavigationHelpers; + }, + getState + }; + return navigationHelpers; + }, [navigatorId, emitter.emit, getState, onAction, onUnhandledAction, parentNavigationHelpers, router]); +} +//# sourceMappingURL=useNavigationHelpers.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationHelpers.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationHelpers.js.map new file mode 100644 index 00000000..26cdaa30 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationHelpers.js.map @@ -0,0 +1 @@ +{"version":3,"names":["CommonActions","React","NavigationContext","PrivateValueStore","UnhandledActionContext","useNavigationHelpers","id","navigatorId","onAction","getState","emitter","router","onUnhandledAction","useContext","parentNavigationHelpers","useMemo","dispatch","op","action","handled","actions","actionCreators","helpers","Object","keys","reduce","acc","name","navigationHelpers","emit","isFocused","canGoBack","state","getStateForAction","goBack","routeNames","routeParamList","routeGetIdList","getId","getParent","undefined","current"],"sourceRoot":"../../src","sources":["useNavigationHelpers.tsx"],"mappings":"AAAA,SACEA,aAAa,QAKR,2BAA2B;AAClC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,SAA4BC,iBAAiB,QAAQ,SAAS;AAC9D,OAAOC,sBAAsB,MAAM,0BAA0B;AAG7D;AACA;AACAD,iBAAiB;AAUjB;AACA;AACA;AACA;AACA,eAAe,SAASE,oBAAoB,OAWjB;EAAA,IANzB;IACAC,EAAE,EAAEC,WAAW;IACfC,QAAQ;IACRC,QAAQ;IACRC,OAAO;IACPC;EACsB,CAAC;EACvB,MAAMC,iBAAiB,GAAGX,KAAK,CAACY,UAAU,CAACT,sBAAsB,CAAC;EAClE,MAAMU,uBAAuB,GAAGb,KAAK,CAACY,UAAU,CAACX,iBAAiB,CAA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vBA,uBAAuB,uBAAvBA,uBAAuB,CAAEiB,SAAS,EAAE,KACpC,KAAK;MAET,CAAC;MACDO,KAAK,EAAE,MAAM/B,WAAW;MACxBgC,SAAS,EAAGjC,EAAW,IAAK;QAC1B,IAAIA,EAAE,KAAKkC,SAAS,EAAE;UACpB,IAAIC,OAAO,GAAGb,iBAAiB;UAE/B,OAAOa,OAAO,IAAInC,EAAE,KAAKmC,OAAO,CAACH,KAAK,EAAE,EAAE;YACxCG,OAAO,GAAGA,OAAO,CAACF,SAAS,EAAE;UAC/B;UAEA,OAAOE,OAAO;QAChB;QAEA,OAAO3B,uBAAuB;MAChC,CAAC;MACDL;IACF,CAA+D;IAE/D,OAAOmB,iBAAiB;EAC1B,CAAC,EAAE,CACDrB,WAAW,EACXG,OAAO,CAACmB,IAAI,EACZpB,QAAQ,EACRD,QAAQ,EACRI,iBAAiB,EACjBE,uBAAuB,EACvBH,MAAM,CACP,CAAC;AACJ"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationState.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationState.js new file mode 100644 index 00000000..d9f71472 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationState.js @@ -0,0 +1,28 @@ +import * as React from 'react'; +import useNavigation from './useNavigation'; +/** + * Hook to get a value from the current navigation state using a selector. + * + * @param selector Selector function to get a value from the state. + */ +export default function useNavigationState(selector) { + const navigation = useNavigation(); + + // We don't care about the state value, we run the selector again at the end + // The state is only to make sure that there's a re-render when we have a new value + const [, setResult] = React.useState(() => selector(navigation.getState())); + + // We store the selector in a ref to avoid re-subscribing listeners every render + const selectorRef = React.useRef(selector); + React.useEffect(() => { + selectorRef.current = selector; + }); + React.useEffect(() => { + const unsubscribe = navigation.addListener('state', e => { + setResult(selectorRef.current(e.data.state)); + }); + return unsubscribe; + }, [navigation]); + return selector(navigation.getState()); +} +//# sourceMappingURL=useNavigationState.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationState.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationState.js.map new file mode 100644 index 00000000..5244baa1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useNavigationState.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","useNavigation","useNavigationState","selector","navigation","setResult","useState","getState","selectorRef","useRef","useEffect","current","unsubscribe","addListener","e","data","state"],"sourceRoot":"../../src","sources":["useNavigationState.tsx"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,OAAOC,aAAa,MAAM,iBAAiB;AAM3C;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,kBAAkB,CACxCC,QAAgC,EAC7B;EACH,MAAMC,UAAU,GAAGH,aAAa,EAA6B;;EAE7D;EACA;EACA,MAAM,GAAGI,SAAS,CAAC,GAAGL,KAAK,CAACM,QAAQ,CAAC,MAAMH,QAAQ,CAACC,UAAU,CAACG,QAAQ,EAAE,CAAC,CAAC;;EAE3E;EACA,MAAMC,WAAW,GAAGR,KAAK,CAACS,MAAM,CAACN,QAAQ,CAAC;EAE1CH,KAAK,CAACU,SAAS,CAAC,MAAM;IACpBF,WAAW,CAACG,OAAO,GAAGR,QAAQ;EAChC,CAAC,CAAC;EAEFH,KAAK,CAACU,SAAS,CAAC,MAAM;IACpB,MAAME,WAAW,GAAGR,UAAU,CAACS,WAAW,CAAC,OAAO,EAAGC,CAAC,IAAK;MACzDT,SAAS,CAACG,WAAW,CAACG,OAAO,CAACG,CAAC,CAACC,IAAI,CAACC,KAAK,CAAC,CAAC;IAC9C,CAAC,CAAC;IAEF,OAAOJ,WAAW;EACpB,CAAC,EAAE,CAACR,UAAU,CAAC,CAAC;EAEhB,OAAOD,QAAQ,CAACC,UAAU,CAACG,QAAQ,EAAE,CAAC;AACxC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnAction.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnAction.js new file mode 100644 index 00000000..1ac00789 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnAction.js @@ -0,0 +1,94 @@ +import * as React from 'react'; +import NavigationBuilderContext from './NavigationBuilderContext'; +import useOnPreventRemove, { shouldPreventRemove } from './useOnPreventRemove'; +/** + * Hook to handle actions for a navigator, including state updates and bubbling. + * + * Bubbling an action is achieved in 2 ways: + * 1. To bubble action to parent, we expose the action handler in context and then access the parent context + * 2. To bubble action to child, child adds event listeners subscribing to actions from parent + * + * When the action handler handles as action, it returns `true`, otherwise `false`. + */ +export default function useOnAction(_ref) { + let { + router, + getState, + setState, + key, + actionListeners, + beforeRemoveListeners, + routerConfigOptions, + emitter + } = _ref; + const { + onAction: onActionParent, + onRouteFocus: onRouteFocusParent, + addListener: addListenerParent, + onDispatchAction + } = React.useContext(NavigationBuilderContext); + const routerConfigOptionsRef = React.useRef(routerConfigOptions); + React.useEffect(() => { + routerConfigOptionsRef.current = routerConfigOptions; + }); + const onAction = React.useCallback(function (action) { + let visitedNavigators = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Set(); + const state = getState(); + + // Since actions can bubble both up and down, they could come to the same navigator again + // We keep track of navigators which have already tried to handle the action and return if it's already visited + if (visitedNavigators.has(state.key)) { + return false; + } + visitedNavigators.add(state.key); + if (typeof action.target !== 'string' || action.target === state.key) { + let result = router.getStateForAction(state, action, routerConfigOptionsRef.current); + + // If a target is specified and set to current navigator, the action shouldn't bubble + // So instead of `null`, we use the state object for such cases to signal that action was handled + result = result === null && action.target === state.key ? state : result; + if (result !== null) { + onDispatchAction(action, state === result); + if (state !== result) { + const isPrevented = shouldPreventRemove(emitter, beforeRemoveListeners, state.routes, result.routes, action); + if (isPrevented) { + return true; + } + setState(result); + } + if (onRouteFocusParent !== undefined) { + // Some actions such as `NAVIGATE` also want to bring the navigated route to focus in the whole tree + // This means we need to focus all of the parent navigators of this navigator as well + const shouldFocus = router.shouldActionChangeFocus(action); + if (shouldFocus && key !== undefined) { + onRouteFocusParent(key); + } + } + return true; + } + } + if (onActionParent !== undefined) { + // Bubble action to the parent if the current navigator didn't handle it + if (onActionParent(action, visitedNavigators)) { + return true; + } + } + + // If the action wasn't handled by current navigator or a parent navigator, let children handle it + for (let i = actionListeners.length - 1; i >= 0; i--) { + const listener = actionListeners[i]; + if (listener(action, visitedNavigators)) { + return true; + } + } + return false; + }, [actionListeners, beforeRemoveListeners, emitter, getState, key, onActionParent, onDispatchAction, onRouteFocusParent, router, setState]); + useOnPreventRemove({ + getState, + emitter, + beforeRemoveListeners + }); + React.useEffect(() => addListenerParent === null || addListenerParent === void 0 ? void 0 : addListenerParent('action', onAction), [addListenerParent, onAction]); + return onAction; +} +//# sourceMappingURL=useOnAction.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnAction.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnAction.js.map new file mode 100644 index 00000000..af6c308b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnAction.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","NavigationBuilderContext","useOnPreventRemove","shouldPreventRemove","useOnAction","router","getState","setState","key","actionListeners","beforeRemoveListeners","routerConfigOptions","emitter","onAction","onActionParent","onRouteFocus","onRouteFocusParent","addListener","addListenerParent","onDispatchAction","useContext","routerConfigOptionsRef","useRef","useEffect","current","useCallback","action","visitedNavigators","Set","state","has","add","target","result","getStateForAction","isPrevented","routes","undefined","shouldFocus","shouldActionChangeFocus","i","length","listener"],"sourceRoot":"../../src","sources":["useOnAction.tsx"],"mappings":"AAOA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,wBAAwB,MAGxB,4BAA4B;AAGnC,OAAOC,kBAAkB,IAAIC,mBAAmB,QAAQ,sBAAsB;AAa9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,S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iB,uBAAjBA,iBAAiB,CAAG,QAAQ,EAAEL,QAAQ,CAAC,EAC7C,CAACK,iBAAiB,EAAEL,QAAQ,CAAC,CAC9B;EAED,OAAOA,QAAQ;AACjB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnGetState.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnGetState.js new file mode 100644 index 00000000..d58ef798 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnGetState.js @@ -0,0 +1,42 @@ +import * as React from 'react'; +import isArrayEqual from './isArrayEqual'; +import NavigationBuilderContext from './NavigationBuilderContext'; +import NavigationRouteContext from './NavigationRouteContext'; +export default function useOnGetState(_ref) { + let { + getState, + getStateListeners + } = _ref; + const { + addKeyedListener + } = React.useContext(NavigationBuilderContext); + const route = React.useContext(NavigationRouteContext); + const key = route ? route.key : 'root'; + const getRehydratedState = React.useCallback(() => { + const state = getState(); + + // Avoid returning new route objects if we don't need to + const routes = state.routes.map(route => { + var _getStateListeners$ro; + const childState = (_getStateListeners$ro = getStateListeners[route.key]) === null || _getStateListeners$ro === void 0 ? void 0 : _getStateListeners$ro.call(getStateListeners); + if (route.state === childState) { + return route; + } + return { + ...route, + state: childState + }; + }); + if (isArrayEqual(state.routes, routes)) { + return state; + } + return { + ...state, + routes + }; + }, [getState, getStateListeners]); + React.useEffect(() => { + return addKeyedListener === null || addKeyedListener === void 0 ? void 0 : addKeyedListener('getState', key, getRehydratedState); + }, [addKeyedListener, getRehydratedState, key]); +} +//# sourceMappingURL=useOnGetState.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnGetState.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnGetState.js.map new file mode 100644 index 00000000..3f155ed6 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnGetState.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","isArrayEqual","NavigationBuilderContext","NavigationRouteContext","useOnGetState","getState","getStateListeners","addKeyedListener","useContext","route","key","getRehydratedState","useCallback","state","routes","map","childState","useEffect"],"sourceRoot":"../../src","sources":["useOnGetState.tsx"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,wBAAwB,MAExB,4BAA4B;AACnC,OAAOC,sBAAsB,MAAM,0BAA0B;AAO7D,eAAe,SAASC,aAAa,OAGzB;EAAA,IAH0B;IACpCC,QAAQ;IACRC;EACO,CAAC;EACR,MAAM;IAAEC;EAAiB,CAAC,GAAGP,KAAK,CAACQ,UAAU,CAACN,wBAAwB,CAAC;EACvE,MAAMO,KAAK,GAAGT,KAAK,CAACQ,UAAU,CAACL,sBAAsB,CAAC;EACtD,MAAMO,GAAG,GAAGD,KAAK,GAAGA,KAAK,CAACC,GAAG,GAAG,MAAM;EAEtC,MAAMC,kBAAkB,GAAGX,KAAK,CAACY,WAAW,CAAC,MAAM;IACjD,MAAMC,KAAK,GAAGR,QAAQ,EAAE;;IAExB;IACA,MAAMS,MAAM,GAAGD,KAAK,CAACC,MAAM,CAACC,GAAG,CAAEN,KAAK,IAAK;MAAA;MACzC,MAAMO,UAAU,4BAAGV,iBAAiB,CAACG,KAAK,CAACC,GAAG,CAAC,0DAA5B,2BAAAJ,iBAAiB,CAAe;MAEnD,IAAIG,KAAK,CAACI,KAAK,KAAKG,UAAU,EAAE;QAC9B,OAAOP,KAAK;MACd;MAEA,OAAO;QAAE,GAAGA,KAAK;QAAEI,KAAK,EAAEG;MAAW,CAAC;IACxC,CAAC,CAAC;IAEF,IAAIf,YAAY,CAACY,KAAK,CAACC,MAAM,EAAEA,MAAM,CAAC,EAAE;MACtC,OAAOD,KAAK;IACd;IAEA,OAAO;MAAE,GAAGA,KAAK;MAAEC;IAAO,CAAC;EAC7B,CAAC,EAAE,CAACT,QAAQ,EAAEC,iBAAiB,CAAC,CAAC;EAEjCN,KAAK,CAACiB,SAAS,CAAC,MAAM;IACpB,OAAOV,gBAAgB,aAAhBA,gBAAgB,uBAAhBA,gBAAgB,CAAG,UAAU,EAAEG,GAAG,EAAEC,kBAAkB,CAAC;EAChE,CAAC,EAAE,CAACJ,gBAAgB,EAAEI,kBAAkB,EAAED,GAAG,CAAC,CAAC;AACjD"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnPreventRemove.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnPreventRemove.js new file mode 100644 index 00000000..cd379488 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnPreventRemove.js @@ -0,0 +1,64 @@ +import * as React from 'react'; +import NavigationBuilderContext from './NavigationBuilderContext'; +import NavigationRouteContext from './NavigationRouteContext'; +const VISITED_ROUTE_KEYS = Symbol('VISITED_ROUTE_KEYS'); +export const shouldPreventRemove = (emitter, beforeRemoveListeners, currentRoutes, nextRoutes, action) => { + const nextRouteKeys = nextRoutes.map(route => route.key); + + // Call these in reverse order so last screens handle the event first + const removedRoutes = currentRoutes.filter(route => !nextRouteKeys.includes(route.key)).reverse(); + const visitedRouteKeys = + // @ts-expect-error: add this property to mark that we've already emitted this action + action[VISITED_ROUTE_KEYS] ?? new Set(); + const beforeRemoveAction = { + ...action, + [VISITED_ROUTE_KEYS]: visitedRouteKeys + }; + for (const route of removedRoutes) { + var _beforeRemoveListener; + if (visitedRouteKeys.has(route.key)) { + // Skip if we've already emitted this action for this screen + continue; + } + + // First, we need to check if any child screens want to prevent it + const isPrevented = (_beforeRemoveListener = beforeRemoveListeners[route.key]) === null || _beforeRemoveListener === void 0 ? void 0 : _beforeRemoveListener.call(beforeRemoveListeners, beforeRemoveAction); + if (isPrevented) { + return true; + } + visitedRouteKeys.add(route.key); + const event = emitter.emit({ + type: 'beforeRemove', + target: route.key, + data: { + action: beforeRemoveAction + }, + canPreventDefault: true + }); + if (event.defaultPrevented) { + return true; + } + } + return false; +}; +export default function useOnPreventRemove(_ref) { + let { + getState, + emitter, + beforeRemoveListeners + } = _ref; + const { + addKeyedListener + } = React.useContext(NavigationBuilderContext); + const route = React.useContext(NavigationRouteContext); + const routeKey = route === null || route === void 0 ? void 0 : route.key; + React.useEffect(() => { + if (routeKey) { + return addKeyedListener === null || addKeyedListener === void 0 ? void 0 : addKeyedListener('beforeRemove', routeKey, action => { + const state = getState(); + return shouldPreventRemove(emitter, beforeRemoveListeners, state.routes, [], action); + }); + } + }, [addKeyedListener, beforeRemoveListeners, emitter, getState, routeKey]); +} +//# sourceMappingURL=useOnPreventRemove.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnPreventRemove.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnPreventRemove.js.map new file mode 100644 index 00000000..3df8a03a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnPreventRemove.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","NavigationBuilderContext","NavigationRouteContext","VISITED_ROUTE_KEYS","Symbol","shouldPreventRemove","emitter","beforeRemoveListeners","currentRoutes","nextRoutes","action","nextRouteKeys","map","route","key","removedRoutes","filter","includes","reverse","visitedRouteKeys","Set","beforeRemoveAction","has","isPrevented","add","event","emit","type","target","data","canPreventDefault","defaultPrevented","useOnPreventRemove","getState","addKeyedListener","useContext","routeKey","useEffect","state","routes"],"sourceRoot":"../../src","sources":["useOnPreventRemove.tsx"],"mappings":"AAIA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,wBAAwB,MAExB,4BAA4B;AACnC,OAAOC,sBAAsB,MAAM,0BAA0B;AAU7D,MAAMC,kBAAkB,GAAGC,MAAM,CAAC,oBAAoB,CAAC;AAEvD,OAAO,MAAMC,mBAAmB,GAAG,CACjCC,OAAkD,EAClDC,qBAA4E,EAC5EC,aAAgC,EAChCC,UAA0C,EAC1CC,MAAwB,KACrB;EACH,MAAMC,aAAa,GAAGF,UAAU,C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vE,MAAMY,KAAK,GAAGb,KAAK,CAACmC,UAAU,CAACjC,sBAAsB,CAAC;EACtD,MAAMkC,QAAQ,GAAGvB,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEC,GAAG;EAE3Bd,KAAK,CAACqC,SAAS,CAAC,MAAM;IACpB,IAAID,QAAQ,EAAE;MACZ,OAAOF,gBAAgB,aAAhBA,gBAAgB,uBAAhBA,gBAAgB,CAAG,cAAc,EAAEE,QAAQ,EAAG1B,MAAM,IAAK;QAC9D,MAAM4B,KAAK,GAAGL,QAAQ,EAAE;QAExB,OAAO5B,mBAAmB,CACxBC,OAAO,EACPC,qBAAqB,EACrB+B,KAAK,CAACC,MAAM,EACZ,EAAE,EACF7B,MAAM,CACP;MACH,CAAC,CAAC;IACJ;EACF,CAAC,EAAE,CAACwB,gBAAgB,EAAE3B,qBAAqB,EAAED,OAAO,EAAE2B,QAAQ,EAAEG,QAAQ,CAAC,CAAC;AAC5E"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnRouteFocus.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnRouteFocus.js new file mode 100644 index 00000000..8fc807f5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnRouteFocus.js @@ -0,0 +1,29 @@ +import * as React from 'react'; +import NavigationBuilderContext from './NavigationBuilderContext'; +/** + * Hook to handle focus actions for a route. + * Focus action needs to be treated specially, coz when a nested route is focused, + * the parent navigators also needs to be focused. + */ +export default function useOnRouteFocus(_ref) { + let { + router, + getState, + key: sourceRouteKey, + setState + } = _ref; + const { + onRouteFocus: onRouteFocusParent + } = React.useContext(NavigationBuilderContext); + return React.useCallback(key => { + const state = getState(); + const result = router.getStateForRouteFocus(state, key); + if (result !== state) { + setState(result); + } + if (onRouteFocusParent !== undefined && sourceRouteKey !== undefined) { + onRouteFocusParent(sourceRouteKey); + } + }, [getState, onRouteFocusParent, router, setState, sourceRouteKey]); +} +//# sourceMappingURL=useOnRouteFocus.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnRouteFocus.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnRouteFocus.js.map new file mode 100644 index 00000000..b1445267 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOnRouteFocus.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","NavigationBuilderContext","useOnRouteFocus","router","getState","key","sourceRouteKey","setState","onRouteFocus","onRouteFocusParent","useContext","useCallback","state","result","getStateForRouteFocus","undefined"],"sourceRoot":"../../src","sources":["useOnRouteFocus.tsx"],"mappings":"AAKA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,wBAAwB,MAAM,4BAA4B;AASjE;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,eAAe,OAKnB;EAAA,IALqD;IACvEC,MAAM;IACNC,QAAQ;IACRC,GAAG,EAAEC,cAAc;IACnBC;EACe,CAAC;EAChB,MAAM;IAAEC,YAAY,EAAEC;EAAmB,CAAC,GAAGT,KAAK,CAACU,UAAU,CAC3DT,wBAAwB,CACzB;EAED,OAAOD,KAAK,CAACW,WAAW,CACrBN,GAAW,IAAK;IACf,MAAMO,KAAK,GAAGR,QAAQ,EAAE;IACxB,MAAMS,MAAM,GAAGV,MAAM,CAACW,qBAAqB,CAACF,KAAK,EAAEP,GAAG,CAAC;IAEvD,IAAIQ,MAAM,KAAKD,KAAK,EAAE;MACpBL,QAAQ,CAACM,MAAM,CAAC;IAClB;IAEA,IAAIJ,kBAAkB,KAAKM,SAAS,IAAIT,cAAc,KAAKS,SAAS,EAAE;MACpEN,kBAAkB,CAACH,cAAc,CAAC;IACpC;EACF,CAAC,EACD,CAACF,QAAQ,EAAEK,kBAAkB,EAAEN,MAAM,EAAEI,QAAQ,EAAED,cAAc,CAAC,CACjE;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOptionsGetters.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOptionsGetters.js new file mode 100644 index 00000000..76414f00 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOptionsGetters.js @@ -0,0 +1,72 @@ +import * as React from 'react'; +import NavigationBuilderContext from './NavigationBuilderContext'; +import NavigationStateContext from './NavigationStateContext'; +export default function useOptionsGetters(_ref) { + let { + key, + options, + navigation + } = _ref; + const optionsRef = React.useRef(options); + const optionsGettersFromChildRef = React.useRef({}); + const { + onOptionsChange + } = React.useContext(NavigationBuilderContext); + const { + addOptionsGetter: parentAddOptionsGetter + } = React.useContext(NavigationStateContext); + const optionsChangeListener = React.useCallback(() => { + const isFocused = (navigation === null || navigation === void 0 ? void 0 : navigation.isFocused()) ?? true; + const hasChildren = Object.keys(optionsGettersFromChildRef.current).length; + if (isFocused && !hasChildren) { + onOptionsChange(optionsRef.current ?? {}); + } + }, [navigation, onOptionsChange]); + React.useEffect(() => { + optionsRef.current = options; + optionsChangeListener(); + return navigation === null || navigation === void 0 ? void 0 : navigation.addListener('focus', optionsChangeListener); + }, [navigation, options, optionsChangeListener]); + const getOptionsFromListener = React.useCallback(() => { + for (let key in optionsGettersFromChildRef.current) { + if (optionsGettersFromChildRef.current.hasOwnProperty(key)) { + var _optionsGettersFromCh, _optionsGettersFromCh2; + const result = (_optionsGettersFromCh = (_optionsGettersFromCh2 = optionsGettersFromChildRef.current)[key]) === null || _optionsGettersFromCh === void 0 ? void 0 : _optionsGettersFromCh.call(_optionsGettersFromCh2); + + // null means unfocused route + if (result !== null) { + return result; + } + } + } + return null; + }, []); + const getCurrentOptions = React.useCallback(() => { + const isFocused = (navigation === null || navigation === void 0 ? void 0 : navigation.isFocused()) ?? true; + if (!isFocused) { + return null; + } + const optionsFromListener = getOptionsFromListener(); + if (optionsFromListener !== null) { + return optionsFromListener; + } + return optionsRef.current; + }, [navigation, getOptionsFromListener]); + React.useEffect(() => { + return parentAddOptionsGetter === null || parentAddOptionsGetter === void 0 ? void 0 : parentAddOptionsGetter(key, getCurrentOptions); + }, [getCurrentOptions, parentAddOptionsGetter, key]); + const addOptionsGetter = React.useCallback((key, getter) => { + optionsGettersFromChildRef.current[key] = getter; + optionsChangeListener(); + return () => { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete optionsGettersFromChildRef.current[key]; + optionsChangeListener(); + }; + }, [optionsChangeListener]); + return { + addOptionsGetter, + getCurrentOptions + }; +} +//# sourceMappingURL=useOptionsGetters.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOptionsGetters.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOptionsGetters.js.map new file mode 100644 index 00000000..198a4c5b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useOptionsGetters.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","NavigationBuilderContext","NavigationStateContext","useOptionsGetters","key","options","navigation","optionsRef","useRef","optionsGettersFromChildRef","onOptionsChange","useContext","addOptionsGetter","parentAddOptionsGetter","optionsChangeListener","useCallback","isFocused","hasChildren","Object","keys","current","length","useEffect","addListener","getOptionsFromListener","hasOwnProperty","result","getCurrentOptions","optionsFromListener","getter"],"sourceRoot":"../../src","sources":["useOptionsGetters.tsx"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,wBAAwB,MAAM,4BAA4B;AACjE,OAAOC,sBAAsB,MAAM,0BAA0B;AAS7D,eAAe,SAASC,iBAAiB,OAI7B;EAAA,IAJ8B;IACxCC,GAAG;IACHC,OAAO;IACPC;EACO,CAAC;EACR,MAAMC,UAAU,GAAGP,KAAK,CAACQ,MAAM,CAAqBH,OAAO,CAAC;EAC5D,MAAMI,0BAA0B,GAAGT,KAAK,CAACQ,MAAM,CAE7C,CAAC,CAAC,CAAC;EAEL,MAAM;IAAEE;EAAgB,CAAC,GAAGV,KAAK,CAACW,UAAU,CAACV,wBAAwB,CAAC;EACtE,MA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AC,MAAM;IAChD,MAAMC,SAAS,GAAG,CAAAV,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEU,SAAS,EAAE,KAAI,IAAI;IAEjD,IAAI,CAACA,SAAS,EAAE;MACd,OAAO,IAAI;IACb;IAEA,MAAMY,mBAAmB,GAAGJ,sBAAsB,EAAE;IAEpD,IAAII,mBAAmB,KAAK,IAAI,EAAE;MAChC,OAAOA,mBAAmB;IAC5B;IAEA,OAAOrB,UAAU,CAACa,OAAO;EAC3B,CAAC,EAAE,CAACd,UAAU,EAAEkB,sBAAsB,CAAC,CAAC;EAExCxB,KAAK,CAACsB,SAAS,CAAC,MAAM;IACpB,OAAOT,sBAAsB,aAAtBA,sBAAsB,uBAAtBA,sBAAsB,CAAGT,GAAG,EAAGuB,iBAAiB,CAAC;EAC1D,CAAC,EAAE,CAACA,iBAAiB,EAAEd,sBAAsB,EAAET,GAAG,CAAC,CAAC;EAEpD,MAAMQ,gBAAgB,GAAGZ,KAAK,CAACe,WAAW,CACxC,CAACX,GAAW,EAAEyB,MAAuC,KAAK;IACxDpB,0BAA0B,CAACW,OAAO,CAAChB,GAAG,CAAC,GAAGyB,MAAM;IAChDf,qBAAqB,EAAE;IAEvB,OAAO,MAAM;MACX;MACA,OAAOL,0BAA0B,CAACW,OAAO,CAAChB,GAAG,CAAC;MAC9CU,qBAAqB,EAAE;IACzB,CAAC;EACH,CAAC,EACD,CAACA,qBAAqB,CAAC,CACxB;EAED,OAAO;IACLF,gBAAgB;IAChBe;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemove.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemove.js new file mode 100644 index 00000000..18d1bbcf --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemove.js @@ -0,0 +1,40 @@ +import { nanoid } from 'nanoid/non-secure'; +import * as React from 'react'; +import useLatestCallback from 'use-latest-callback'; +import useNavigation from './useNavigation'; +import usePreventRemoveContext from './usePreventRemoveContext'; +import useRoute from './useRoute'; + +/** + * Hook to prevent screen from being removed. Can be used to prevent users from leaving the screen. + * + * @param preventRemove Boolean indicating whether to prevent screen from being removed. + * @param callback Function which is executed when screen was prevented from being removed. + */ +export default function usePreventRemove(preventRemove, callback) { + const [id] = React.useState(() => nanoid()); + const navigation = useNavigation(); + const { + key: routeKey + } = useRoute(); + const { + setPreventRemove + } = usePreventRemoveContext(); + React.useEffect(() => { + setPreventRemove(id, routeKey, preventRemove); + return () => { + setPreventRemove(id, routeKey, false); + }; + }, [setPreventRemove, id, routeKey, preventRemove]); + const beforeRemoveListener = useLatestCallback(e => { + if (!preventRemove) { + return; + } + e.preventDefault(); + callback({ + data: e.data + }); + }); + React.useEffect(() => navigation === null || navigation === void 0 ? void 0 : navigation.addListener('beforeRemove', beforeRemoveListener), [navigation, beforeRemoveListener]); +} +//# sourceMappingURL=usePreventRemove.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemove.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemove.js.map new file mode 100644 index 00000000..4cca437a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemove.js.map @@ -0,0 +1 @@ +{"version":3,"names":["nanoid","React","useLatestCallback","useNavigation","usePreventRemoveContext","useRoute","usePreventRemove","preventRemove","callback","id","useState","navigation","key","routeKey","setPreventRemove","useEffect","beforeRemoveListener","e","preventDefault","data","addListener"],"sourceRoot":"../../src","sources":["usePreventRemove.tsx"],"mappings":"AACA,SAASA,MAAM,QAAQ,mBAAmB;AAC1C,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,iBAAiB,MAAM,qBAAqB;AAGnD,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,uBAAuB,MAAM,2BAA2B;AAC/D,OAAOC,QAAQ,MAAM,YAAY;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,gBAAgB,CACtCC,aAAsB,EACtBC,QAAmE,EACnE;EACA,MAAM,CAACC,EAAE,CAAC,GAAGR,KAAK,CAACS,QAAQ,CAAC,MAAMV,MAAM,EAAE,CAAC;EAE3C,MAAMW,UAAU,GAAGR,aAAa,EAAE;EAClC,MAAM;IAAES,GAAG,EAAEC;EAAS,CAAC,GAAGR,QAAQ,EAAE;EAEpC,MAAM;IAAES;EAAiB,CAAC,GAAGV,uBAAuB,EAAE;EAEtDH,KAAK,CAACc,SAAS,CAAC,MAAM;IACpBD,gBAAgB,CAACL,EAAE,EAAEI,QAAQ,EAAEN,aAAa,CAAC;IAC7C,OAAO,MAAM;MACXO,gBAAgB,CAACL,EAAE,EAAEI,QAAQ,EAAE,KAAK,CAAC;IACvC,CAAC;EACH,CAAC,EAAE,CAACC,gBAAgB,EAAEL,EAAE,EAAEI,QAAQ,EAAEN,aAAa,CAAC,CAAC;EAEnD,MAAMS,oBAAoB,GAAGd,iBAAiB,CAE3Ce,CAAC,IAAK;IACP,IAAI,CAACV,aAAa,EAAE;MAClB;IACF;IAEAU,CAAC,CAACC,cAAc,EAAE;IAElBV,QAAQ,CAAC;MAAEW,IAAI,EAAEF,CAAC,CAACE;IAAK,CAAC,CAAC;EAC5B,CAAC,CAAC;EAEFlB,KAAK,CAACc,SAAS,CACb,MAAMJ,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAES,WAAW,CAAC,cAAc,EAAEJ,oBAAoB,CAAC,EACnE,CAACL,UAAU,EAAEK,oBAAoB,CAAC,CACnC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemoveContext.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemoveContext.js new file mode 100644 index 00000000..c20aaea1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemoveContext.js @@ -0,0 +1,10 @@ +import * as React from 'react'; +import PreventRemoveContext from './PreventRemoveContext'; +export default function usePreventRemoveContext() { + const value = React.useContext(PreventRemoveContext); + if (value == null) { + throw new Error("Couldn't find the prevent remove context. Is your component inside NavigationContent?"); + } + return value; +} +//# sourceMappingURL=usePreventRemoveContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemoveContext.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemoveContext.js.map new file mode 100644 index 00000000..561bde2a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/usePreventRemoveContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","PreventRemoveContext","usePreventRemoveContext","value","useContext","Error"],"sourceRoot":"../../src","sources":["usePreventRemoveContext.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,oBAAoB,MAAM,wBAAwB;AAEzD,eAAe,SAASC,uBAAuB,GAAG;EAChD,MAAMC,KAAK,GAAGH,KAAK,CAACI,UAAU,CAACH,oBAAoB,CAAC;EAEpD,IAAIE,KAAK,IAAI,IAAI,EAAE;IACjB,MAAM,IAAIE,KAAK,CACb,uFAAuF,CACxF;EACH;EAEA,OAAOF,KAAK;AACd"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRegisterNavigator.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRegisterNavigator.js new file mode 100644 index 00000000..0659ebb5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRegisterNavigator.js @@ -0,0 +1,25 @@ +import { nanoid } from 'nanoid/non-secure'; +import * as React from 'react'; +import { SingleNavigatorContext } from './EnsureSingleNavigator'; + +/** + * Register a navigator in the parent context (either a navigation container or a screen). + * This is used to prevent multiple navigators under a single container or screen. + */ +export default function useRegisterNavigator() { + const [key] = React.useState(() => nanoid()); + const container = React.useContext(SingleNavigatorContext); + if (container === undefined) { + throw new Error("Couldn't register the navigator. Have you wrapped your app with 'NavigationContainer'?\n\nThis can also happen if there are multiple copies of '@react-navigation' packages installed."); + } + React.useEffect(() => { + const { + register, + unregister + } = container; + register(key); + return () => unregister(key); + }, [container, key]); + return key; +} +//# sourceMappingURL=useRegisterNavigator.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRegisterNavigator.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRegisterNavigator.js.map new file mode 100644 index 00000000..4b4cb85a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRegisterNavigator.js.map @@ -0,0 +1 @@ +{"version":3,"names":["nanoid","React","SingleNavigatorContext","useRegisterNavigator","key","useState","container","useContext","undefined","Error","useEffect","register","unregister"],"sourceRoot":"../../src","sources":["useRegisterNavigator.tsx"],"mappings":"AAAA,SAASA,MAAM,QAAQ,mBAAmB;AAC1C,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,SAASC,sBAAsB,QAAQ,yBAAyB;;AAEhE;AACA;AACA;AACA;AACA,eAAe,SAASC,oBAAoB,GAAG;EAC7C,MAAM,CAACC,GAAG,CAAC,GAAGH,KAAK,CAACI,QAAQ,CAAC,MAAML,MAAM,EAAE,CAAC;EAC5C,MAAMM,SAAS,GAAGL,KAAK,CAACM,UAAU,CAACL,sBAAsB,CAAC;EAE1D,IAAII,SAAS,KAAKE,SAAS,EAAE;IAC3B,MAAM,IAAIC,KAAK,CACb,wLAAwL,CACzL;EACH;EAEAR,KAAK,CAACS,SAAS,CAAC,MAAM;IACpB,MAAM;MAAEC,QAAQ;MAAEC;IAAW,CAAC,GAAGN,SAAS;IAE1CK,QAAQ,CAACP,GAAG,CAAC;IAEb,OAAO,MAAMQ,UAAU,CAACR,GAAG,CAAC;EAC9B,CAAC,EAAE,CAACE,SAAS,EAAEF,GAAG,CAAC,CAAC;EAEpB,OAAOA,GAAG;AACZ"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRoute.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRoute.js new file mode 100644 index 00000000..3a6499b6 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRoute.js @@ -0,0 +1,15 @@ +import * as React from 'react'; +import NavigationRouteContext from './NavigationRouteContext'; +/** + * Hook to access the route prop of the parent screen anywhere. + * + * @returns Route prop of the parent screen. + */ +export default function useRoute() { + const route = React.useContext(NavigationRouteContext); + if (route === undefined) { + throw new Error("Couldn't find a route object. Is your component inside a screen in a navigator?"); + } + return route; +} +//# sourceMappingURL=useRoute.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRoute.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRoute.js.map new file mode 100644 index 00000000..9995b4c1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRoute.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","NavigationRouteContext","useRoute","route","useContext","undefined","Error"],"sourceRoot":"../../src","sources":["useRoute.tsx"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,sBAAsB,MAAM,0BAA0B;AAG7D;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,QAAQ,GAA0C;EACxE,MAAMC,KAAK,GAAGH,KAAK,CAACI,UAAU,CAACH,sBAAsB,CAAC;EAEtD,IAAIE,KAAK,KAAKE,SAAS,EAAE;IACvB,MAAM,IAAIC,KAAK,CACb,iFAAiF,CAClF;EACH;EAEA,OAAOH,KAAK;AACd"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRouteCache.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRouteCache.js new file mode 100644 index 00000000..51638b44 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRouteCache.js @@ -0,0 +1,42 @@ +import * as React from 'react'; +/** + * Utilites such as `getFocusedRouteNameFromRoute` need to access state. + * So we need a way to suppress the warning for those use cases. + * This is fine since they are internal utilities and this is not public API. + */ +export const CHILD_STATE = Symbol('CHILD_STATE'); + +/** + * Hook to cache route props for each screen in the navigator. + * This lets add warnings and modifications to the route object but keep references between renders. + */ +export default function useRouteCache(routes) { + // Cache object which holds route objects for each screen + const cache = React.useMemo(() => ({ + current: new Map() + }), []); + if (process.env.NODE_ENV === 'production') { + // We don't want the overhead of creating extra maps every render in prod + return routes; + } + cache.current = routes.reduce((acc, route) => { + const previous = cache.current.get(route); + if (previous) { + // If a cached route object already exists, reuse it + acc.set(route, previous); + } else { + const { + state, + ...proxy + } = route; + Object.defineProperty(proxy, CHILD_STATE, { + enumerable: false, + value: state + }); + acc.set(route, proxy); + } + return acc; + }, new Map()); + return Array.from(cache.current.values()); +} +//# sourceMappingURL=useRouteCache.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRouteCache.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRouteCache.js.map new file mode 100644 index 00000000..571e5568 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useRouteCache.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","CHILD_STATE","Symbol","useRouteCache","routes","cache","useMemo","current","Map","process","env","NODE_ENV","reduce","acc","route","previous","get","set","state","proxy","Object","defineProperty","enumerable","value","Array","from","values"],"sourceRoot":"../../src","sources":["useRouteCache.tsx"],"mappings":"AAKA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAM9B;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAGC,MAAM,CAAC,aAAa,CAAC;;AAEhD;AACA;AACA;AACA;AACA,eAAe,SAASC,aAAa,CACnCC,MAAuB,EACvB;EACA;EACA,MAAMC,KAAK,GAAGL,KAAK,CAACM,OAAO,CAAC,OAAO;IAAEC,OAAO,EAAE,IAAIC,GAAG;EAAiB,CAAC,CAAC,EAAE,EAAE,CAAC;EAE7E,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC;IACA,OAAOP,MAAM;EACf;EAEAC,KAAK,CAACE,OAAO,GAAGH,MAAM,CAACQ,MAAM,CAAC,CAACC,GAAG,EAAEC,KAAK,KAAK;IAC5C,MAAMC,QAAQ,GAAGV,KAAK,CAACE,OAAO,CAACS,GAAG,CAACF,KAAK,CAAC;IAEzC,IAAIC,QAAQ,EAAE;MACZ;MACAF,GAAG,CAACI,GAAG,CAACH,KAAK,EAAEC,QAAQ,CAAC;IAC1B,CAAC,MAAM;MACL,MAAM;QAAEG,KAAK;QAAE,GAAGC;MAAM,CAAC,GAAGL,KAAK;MAEjCM,MAAM,CAACC,cAAc,CAACF,KAAK,EAAElB,WAAW,EAAE;QACxCqB,UAAU,EAAE,KAAK;QACjBC,KAAK,EAAEL;MACT,CAAC,CAAC;MAEFL,GAAG,CAACI,GAAG,CAACH,KAAK,EAAEK,KAAK,CAAC;IACvB;IAEA,OAAON,GAAG;EACZ,CAAC,EAAE,IAAIL,GAAG,EAAE,CAAe;EAE3B,OAAOgB,KAAK,CAACC,IAAI,CAACpB,KAAK,CAACE,OAAO,CAACmB,MAAM,EAAE,CAAC;AAC3C"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useScheduleUpdate.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useScheduleUpdate.js new file mode 100644 index 00000000..13a66774 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useScheduleUpdate.js @@ -0,0 +1,27 @@ +import * as React from 'react'; +const MISSING_CONTEXT_ERROR = "Couldn't find a schedule context."; +export const ScheduleUpdateContext = /*#__PURE__*/React.createContext({ + scheduleUpdate() { + throw new Error(MISSING_CONTEXT_ERROR); + }, + flushUpdates() { + throw new Error(MISSING_CONTEXT_ERROR); + } +}); + +/** + * When screen config changes, we want to update the navigator in the same update phase. + * However, navigation state is in the root component and React won't let us update it from a child. + * This is a workaround for that, the scheduled update is stored in the ref without actually calling setState. + * It lets all subsequent updates access the latest state so it stays correct. + * Then we call setState during after the component updates. + */ +export default function useScheduleUpdate(callback) { + const { + scheduleUpdate, + flushUpdates + } = React.useContext(ScheduleUpdateContext); + scheduleUpdate(callback); + React.useEffect(flushUpdates); +} +//# sourceMappingURL=useScheduleUpdate.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useScheduleUpdate.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useScheduleUpdate.js.map new file mode 100644 index 00000000..88129709 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useScheduleUpdate.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","MISSING_CONTEXT_ERROR","ScheduleUpdateContext","createContext","scheduleUpdate","Error","flushUpdates","useScheduleUpdate","callback","useContext","useEffect"],"sourceRoot":"../../src","sources":["useScheduleUpdate.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,MAAMC,qBAAqB,GAAG,mCAAmC;AAEjE,OAAO,MAAMC,qBAAqB,gBAAGF,KAAK,CAACG,aAAa,CAGrD;EACDC,cAAc,GAAG;IACf,MAAM,IAAIC,KAAK,CAACJ,qBAAqB,CAAC;EACxC,CAAC;EACDK,YAAY,GAAG;IACb,MAAM,IAAID,KAAK,CAACJ,qBAAqB,CAAC;EACxC;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASM,iBAAiB,CAACC,QAAoB,EAAE;EAC9D,MAAM;IAAEJ,cAAc;IAAEE;EAAa,CAAC,GAAGN,KAAK,CAACS,UAAU,CACvDP,qBAAqB,CACtB;EAEDE,cAAc,CAACI,QAAQ,CAAC;EAExBR,KAAK,CAACU,SAAS,CAACJ,YAAY,CAAC;AAC/B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useSyncState.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useSyncState.js new file mode 100644 index 00000000..71f7f3ef --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useSyncState.js @@ -0,0 +1,60 @@ +import * as React from 'react'; +const UNINTIALIZED_STATE = {}; + +/** + * This is definitely not compatible with concurrent mode, but we don't have a solution for sync state yet. + */ +export default function useSyncState(initialState) { + const stateRef = React.useRef(UNINTIALIZED_STATE); + const isSchedulingRef = React.useRef(false); + const isMountedRef = React.useRef(true); + React.useEffect(() => { + isMountedRef.current = true; + return () => { + isMountedRef.current = false; + }; + }, []); + if (stateRef.current === UNINTIALIZED_STATE) { + stateRef.current = + // @ts-expect-error: initialState is a function, but TypeScript doesn't think so + typeof initialState === 'function' ? initialState() : initialState; + } + const [trackingState, setTrackingState] = React.useState(stateRef.current); + const getState = React.useCallback(() => stateRef.current, []); + const setState = React.useCallback(state => { + if (state === stateRef.current || !isMountedRef.current) { + return; + } + stateRef.current = state; + if (!isSchedulingRef.current) { + setTrackingState(state); + } + }, []); + const scheduleUpdate = React.useCallback(callback => { + isSchedulingRef.current = true; + try { + callback(); + } finally { + isSchedulingRef.current = false; + } + }, []); + const flushUpdates = React.useCallback(() => { + if (!isMountedRef.current) { + return; + } + + // Make sure that the tracking state is up-to-date. + // We call it unconditionally, but React should skip the update if state is unchanged. + setTrackingState(stateRef.current); + }, []); + + // If we're rendering and the tracking state is out of date, update it immediately + // This will make sure that our updates are applied as early as possible. + if (trackingState !== stateRef.current) { + setTrackingState(stateRef.current); + } + const state = stateRef.current; + React.useDebugValue(state); + return [state, getState, setState, scheduleUpdate, flushUpdates]; +} +//# sourceMappingURL=useSyncState.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useSyncState.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useSyncState.js.map new file mode 100644 index 00000000..875e977e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/useSyncState.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","UNINTIALIZED_STATE","useSyncState","initialState","stateRef","useRef","isSchedulingRef","isMountedRef","useEffect","current","trackingState","setTrackingState","useState","getState","useCallback","setState","state","scheduleUpdate","callback","flushUpdates","useDebugValue"],"sourceRoot":"../../src","sources":["useSyncState.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,MAAMC,kBAAkB,GAAG,CAAC,CAAC;;AAE7B;AACA;AACA;AACA,eAAe,SAASC,YAAY,CAAIC,YAA4B,EAAE;EACpE,MAAMC,QAAQ,GAAGJ,KAAK,CAACK,MAAM,CAAIJ,kBAAkB,CAAQ;EAC3D,MAAMK,eAAe,GAAGN,KAAK,CAACK,MAAM,CAAC,KAAK,CAAC;EAC3C,MAAME,YAAY,GAAGP,KAAK,CAACK,MAAM,CAAC,IAAI,CAAC;EAEvCL,KAAK,CAACQ,SAAS,CAAC,MAAM;IACpBD,YAAY,CAACE,OAAO,GAAG,IAAI;IAE3B,OAAO,MAAM;MACXF,YAAY,CAACE,OAAO,GAAG,KAAK;IAC9B,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,IAAIL,QAAQ,CAACK,OAAO,KAAKR,kBAAkB,EAAE;IAC3CG,QAAQ,CAACK,OAAO;IACd;IACA,OAAON,YAAY,KAAK,UAAU,GAAGA,YAAY,EAAE,GAAGA,YAAY;EACtE;EAEA,MAAM,CAACO,aAAa,EAAEC,gBAAgB,CAAC,GAAGX,KAAK,CAACY,QAAQ,CAACR,QAAQ,CAACK,OAAO,CAAC;EAE1E,MAAMI,QAAQ,GAAGb,KAAK,CAACc,WAAW,CAAC,MAAMV,QAAQ,CAACK,OAAO,EAAE,EAAE,CAAC;EAE9D,MAAMM,QAAQ,GAAGf,KAAK,CAACc,WAAW,CAAEE,KAAQ,IAAK;IAC/C,IAAIA,KAAK,KAAKZ,QAAQ,CAACK,OAAO,IAAI,CAACF,YAAY,CAACE,OAAO,EAAE;MACvD;IACF;IAEAL,QAAQ,CAACK,OAAO,GAAGO,KAAK;IAExB,IAAI,CAACV,eAAe,CAACG,OAAO,EAAE;MAC5BE,gBAAgB,CAACK,KAAK,CAAC;IACzB;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMC,cAAc,GAAGjB,KAAK,CAACc,WAAW,CAAEI,QAAoB,IAAK;IACjEZ,eAAe,CAACG,OAAO,GAAG,IAAI;IAE9B,IAAI;MACFS,QAAQ,EAAE;IACZ,CAAC,SAAS;MACRZ,eAAe,CAACG,OAAO,GAAG,KAAK;IACjC;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMU,YAAY,GAAGnB,KAAK,CAACc,WAAW,CAAC,MAAM;IAC3C,IAAI,CAACP,YAAY,CAACE,OAAO,EAAE;MACzB;IACF;;IAEA;IACA;IACAE,gBAAgB,CAACP,QAAQ,CAACK,OAAO,CAAC;EACpC,CAAC,EAAE,EAAE,CAAC;;EAEN;EACA;EACA,IAAIC,aAAa,KAAKN,QAAQ,CAACK,OAAO,EAAE;IACtCE,gBAAgB,CAACP,QAAQ,CAACK,OAAO,CAAC;EACpC;EAEA,MAAMO,KAAK,GAAGZ,QAAQ,CAACK,OAAO;EAE9BT,KAAK,CAACoB,aAAa,CAACJ,KAAK,CAAC;EAE1B,OAAO,CAACA,KAAK,EAAEH,QAAQ,EAAEE,QAAQ,EAAEE,cAAc,EAAEE,YAAY,CAAC;AAClE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/validatePathConfig.js b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/validatePathConfig.js new file mode 100644 index 00000000..02d7ba31 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/validatePathConfig.js @@ -0,0 +1,21 @@ +const formatToList = items => items.map(key => `- ${key}`).join('\n'); +export default function validatePathConfig(config) { + let root = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + const validKeys = ['initialRouteName', 'screens']; + if (!root) { + validKeys.push('path', 'exact', 'stringify', 'parse'); + } + const invalidKeys = Object.keys(config).filter(key => !validKeys.includes(key)); + if (invalidKeys.length) { + throw new Error(`Found invalid properties in the configuration:\n${formatToList(invalidKeys)}\n\nDid you forget to specify them under a 'screens' property?\n\nYou can only specify the following properties:\n${formatToList(validKeys)}\n\nSee https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.`); + } + if (config.screens) { + Object.entries(config.screens).forEach(_ref => { + let [_, value] = _ref; + if (typeof value !== 'string') { + validatePathConfig(value, false); + } + }); + } +} +//# sourceMappingURL=validatePathConfig.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/module/validatePathConfig.js.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/validatePathConfig.js.map new file mode 100644 index 00000000..b2c6076c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/module/validatePathConfig.js.map @@ -0,0 +1 @@ +{"version":3,"names":["formatToList","items","map","key","join","validatePathConfig","config","root","validKeys","push","invalidKeys","Object","keys","filter","includes","length","Error","screens","entries","forEach","_","value"],"sourceRoot":"../../src","sources":["validatePathConfig.tsx"],"mappings":"AAAA,MAAMA,YAAY,GAAIC,KAAe,IACnCA,KAAK,CAACC,GAAG,CAAEC,GAAG,IAAM,KAAIA,GAAI,EAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;AAE3C,eAAe,SAASC,kBAAkB,CAACC,MAAW,EAAe;EAAA,IAAbC,IAAI,uEAAG,IAAI;EACjE,MAAMC,SAAS,GAAG,CAAC,kBAAkB,EAAE,SAAS,CAAC;EAEjD,IAAI,CAACD,IAAI,EAAE;IACTC,SAAS,CAACC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC;EACvD;EAEA,MAAMC,WAAW,GAAGC,MAAM,CAACC,IAAI,CAACN,MAAM,CAAC,CAACO,MAAM,CAC3CV,GAAG,IAAK,CAACK,SAAS,CAACM,QAAQ,CAACX,GAAG,CAAC,CAClC;EAED,IAAIO,WAAW,CAACK,MAAM,EAAE;IACtB,MAAM,IAAIC,KAAK,CACZ,mDAAkDhB,YAAY,CAC7DU,WAAW,CACX,qHAAoHV,YAAY,CAChIQ,SAAS,CACT,wHAAuH,CAC1H;EACH;EAEA,IAAIF,MAAM,CAACW,OAAO,EAAE;IAClBN,MAAM,CAACO,OAAO,CAACZ,MAAM,CAACW,OAAO,CAAC,CAACE,OAAO,CAAC,QAAgB;MAAA,IAAf,CAACC,CAAC,EAAEC,KAAK,CAAC;MAChD,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;QAC7BhB,kBAAkB,CAACgB,KAAK,EAAE,KAAK,CAAC;MAClC;IACF,CAAC,CAAC;EACJ;AACF"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/BaseNavigationContainer.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/BaseNavigationContainer.d.ts new file mode 100644 index 00000000..dfa3f199 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/BaseNavigationContainer.d.ts @@ -0,0 +1,15 @@ +import { ParamListBase } from '@react-navigation/routers'; +import * as React from 'react'; +import type { NavigationContainerProps, NavigationContainerRef } from './types'; +/** + * Container component which holds the navigation state. + * This should be rendered at the root wrapping the whole app. + * + * @param props.initialState Initial state object for the navigation tree. + * @param props.onStateChange Callback which is called with the latest navigation state when it changes. + * @param props.children Child elements to render the content. + * @param props.ref Ref object which refers to the navigation object containing helper methods. + */ +declare const BaseNavigationContainer: React.ForwardRefExoticComponent>>; +export default BaseNavigationContainer; +//# sourceMappingURL=BaseNavigationContainer.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/BaseNavigationContainer.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/BaseNavigationContainer.d.ts.map new file mode 100644 index 00000000..7bd52202 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/BaseNavigationContainer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BaseNavigationContainer.d.ts","sourceRoot":"","sources":["../../../src/BaseNavigationContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,aAAa,EAGd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,KAAK,EAEV,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,SAAS,CAAC;AA4CjB;;;;;;;;GAQG;AACH,QAAA,MAAM,uBAAuB,wHAoX5B,CAAC;AAEF,eAAe,uBAAuB,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/CurrentRenderContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/CurrentRenderContext.d.ts new file mode 100644 index 00000000..4c87fe21 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/CurrentRenderContext.d.ts @@ -0,0 +1,10 @@ +import * as React from 'react'; +/** + * Context which holds the values for the current navigation tree. + * Intended for use in SSR. This is not safe to use on the client. + */ +declare const CurrentRenderContext: React.Context<{ + options?: object | undefined; +} | undefined>; +export default CurrentRenderContext; +//# sourceMappingURL=CurrentRenderContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/CurrentRenderContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/CurrentRenderContext.d.ts.map new file mode 100644 index 00000000..11c98c4f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/CurrentRenderContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CurrentRenderContext.d.ts","sourceRoot":"","sources":["../../../src/CurrentRenderContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;GAGG;AACH,QAAA,MAAM,oBAAoB;;cAEd,CAAC;AAEb,eAAe,oBAAoB,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/EnsureSingleNavigator.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/EnsureSingleNavigator.d.ts new file mode 100644 index 00000000..f5d857fa --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/EnsureSingleNavigator.d.ts @@ -0,0 +1,14 @@ +import * as React from 'react'; +declare type Props = { + children: React.ReactNode; +}; +export declare const SingleNavigatorContext: React.Context<{ + register(key: string): void; + unregister(key: string): void; +} | undefined>; +/** + * Component which ensures that there's only one navigator nested under it. + */ +export default function EnsureSingleNavigator({ children }: Props): JSX.Element; +export {}; +//# sourceMappingURL=EnsureSingleNavigator.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/EnsureSingleNavigator.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/EnsureSingleNavigator.d.ts.map new file mode 100644 index 00000000..50a5044a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/EnsureSingleNavigator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"EnsureSingleNavigator.d.ts","sourceRoot":"","sources":["../../../src/EnsureSingleNavigator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,aAAK,KAAK,GAAG;IACX,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAIF,eAAO,MAAM,sBAAsB;kBAEf,MAAM,GAAG,IAAI;oBACX,MAAM,GAAG,IAAI;cAGvB,CAAC;AAEb;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,eAgChE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Group.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Group.d.ts new file mode 100644 index 00000000..ae3a8173 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Group.d.ts @@ -0,0 +1,7 @@ +import type { ParamListBase } from '@react-navigation/routers'; +import type { RouteGroupConfig } from './types'; +/** + * Empty component used for grouping screen configs. + */ +export default function Group(_: RouteGroupConfig): null; +//# sourceMappingURL=Group.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Group.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Group.d.ts.map new file mode 100644 index 00000000..f13a6762 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Group.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../src/Group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAC3B,SAAS,SAAS,aAAa,EAC/B,aAAa,SAAS,EAAE,EACxB,CAAC,EAAE,gBAAgB,CAAC,SAAS,EAAE,aAAa,CAAC,QAG9C"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationBuilderContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationBuilderContext.d.ts new file mode 100644 index 00000000..819509d7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationBuilderContext.d.ts @@ -0,0 +1,35 @@ +import type { NavigationAction, NavigationState, ParamListBase } from '@react-navigation/routers'; +import * as React from 'react'; +import type { NavigationHelpers } from './types'; +export declare type ListenerMap = { + action: ChildActionListener; + focus: FocusedNavigationListener; +}; +export declare type KeyedListenerMap = { + getState: GetStateListener; + beforeRemove: ChildBeforeRemoveListener; +}; +export declare type AddListener = (type: T, listener: ListenerMap[T]) => void; +export declare type AddKeyedListener = (type: T, key: string, listener: KeyedListenerMap[T]) => void; +export declare type ChildActionListener = (action: NavigationAction, visitedNavigators?: Set) => boolean; +export declare type FocusedNavigationCallback = (navigation: NavigationHelpers) => T; +export declare type FocusedNavigationListener = (callback: FocusedNavigationCallback) => { + handled: boolean; + result: T; +}; +export declare type GetStateListener = () => NavigationState; +export declare type ChildBeforeRemoveListener = (action: NavigationAction) => boolean; +/** + * Context which holds the required helpers needed to build nested navigators. + */ +declare const NavigationBuilderContext: React.Context<{ + onAction?: ((action: NavigationAction, visitedNavigators?: Set) => boolean) | undefined; + addListener?: AddListener | undefined; + addKeyedListener?: AddKeyedListener | undefined; + onRouteFocus?: ((key: string) => void) | undefined; + onDispatchAction: (action: NavigationAction, noop: boolean) => void; + onOptionsChange: (options: object) => void; + stackRef?: React.MutableRefObject | undefined; +}>; +export default NavigationBuilderContext; +//# sourceMappingURL=NavigationBuilderContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationBuilderContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationBuilderContext.d.ts.map new file mode 100644 index 00000000..1ecf526d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationBuilderContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NavigationBuilderContext.d.ts","sourceRoot":"","sources":["../../../src/NavigationBuilderContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,oBAAY,WAAW,GAAG;IACxB,MAAM,EAAE,mBAAmB,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ter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContainerRefContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContainerRefContext.d.ts new file mode 100644 index 00000000..9523258f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContainerRefContext.d.ts @@ -0,0 +1,9 @@ +import type { ParamListBase } from '@react-navigation/routers'; +import * as React from 'react'; +import type { NavigationContainerRef } from './types'; +/** + * Context which holds the route prop for a screen. + */ +declare const NavigationContainerRefContext: React.Context | undefined>; +export default NavigationContainerRefContext; +//# sourceMappingURL=NavigationContainerRefContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContainerRefContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContainerRefContext.d.ts.map new file mode 100644 index 00000000..7f3dc90a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContainerRefContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NavigationContainerRefContext.d.ts","sourceRoot":"","sources":["../../../src/NavigationContainerRefContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD;;GAEG;AACH,QAAA,MAAM,6BAA6B,kEAEvB,CAAC;AAEb,eAAe,6BAA6B,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContext.d.ts new file mode 100644 index 00000000..0e070ae7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContext.d.ts @@ -0,0 +1,25 @@ +import type { ParamListBase } from '@react-navigation/routers'; +import * as React from 'react'; +import type { NavigationProp } from './types'; +/** + * Context which holds the navigation prop for a screen. + */ +declare const NavigationContext: React.Context & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | import("@react-navigation/routers").PartialState> | undefined; + })[]; + type: string; + stale: false; +}>, {}, {}> | undefined>; +export default NavigationContext; +//# sourceMappingURL=NavigationContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContext.d.ts.map new file mode 100644 index 00000000..3ed3730f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NavigationContext.d.ts","sourceRoot":"","sources":["../../../src/NavigationContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;wBAEX,CAAC;AAEb,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationHelpersContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationHelpersContext.d.ts new file mode 100644 index 00000000..f346b816 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationHelpersContext.d.ts @@ -0,0 +1,10 @@ +import type { ParamListBase } from '@react-navigation/routers'; +import * as React from 'react'; +import type { NavigationHelpers } from './types'; +/** + * Context which holds the navigation helpers of the parent navigator. + * Navigators should use this context in their view component. + */ +declare const NavigationHelpersContext: React.Context | undefined>; +export default NavigationHelpersContext; +//# sourceMappingURL=NavigationHelpersContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationHelpersContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationHelpersContext.d.ts.map new file mode 100644 index 00000000..0795e281 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationHelpersContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NavigationHelpersContext.d.ts","sourceRoot":"","sources":["../../../src/NavigationHelpersContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;GAGG;AACH,QAAA,MAAM,wBAAwB,iEAElB,CAAC;AAEb,eAAe,wBAAwB,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationRouteContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationRouteContext.d.ts new file mode 100644 index 00000000..dfc044cc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationRouteContext.d.ts @@ -0,0 +1,8 @@ +import type { Route } from '@react-navigation/routers'; +import * as React from 'react'; +/** + * Context which holds the route prop for a screen. + */ +declare const NavigationRouteContext: React.Context | undefined>; +export default NavigationRouteContext; +//# sourceMappingURL=NavigationRouteContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationRouteContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationRouteContext.d.ts.map new file mode 100644 index 00000000..4b711f46 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationRouteContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NavigationRouteContext.d.ts","sourceRoot":"","sources":["../../../src/NavigationRouteContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;GAEG;AACH,QAAA,MAAM,sBAAsB,8DAE3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationStateContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationStateContext.d.ts new file mode 100644 index 00000000..e828be92 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationStateContext.d.ts @@ -0,0 +1,46 @@ +import type { NavigationState, PartialState } from '@react-navigation/routers'; +import * as React from 'react'; +declare const _default: React.Context<{ + isDefault?: true | undefined; + state?: Readonly<{ + key: string; + index: number; + routeNames: string[]; + history?: unknown[] | undefined; + routes: (Readonly<{ + key: string; + name: string; + path?: string | undefined; + }> & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | PartialState> | undefined; + })[]; + type: string; + stale: false; + }> | PartialState & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | PartialState> | undefined; + })[]; + type: string; + stale: false; + }>> | undefined; + getKey: () => string | undefined; + setKey: (key: string) => void; + getState: () => NavigationState | PartialState | undefined; + setState: (state: NavigationState | PartialState | undefined) => void; + getIsInitial: () => boolean; + addOptionsGetter?: ((key: string, getter: () => object | undefined | null) => void) | undefined; +}>; +export default _default; +//# sourceMappingURL=NavigationStateContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationStateContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationStateContext.d.ts.map new file mode 100644 index 00000000..5155cb8b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/NavigationStateContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NavigationStateContext.d.ts","sourceRoot":"","sources":["../../../src/NavigationStateContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAQrB,MAAM,MAAM,GAAG,SAAS;kBAClB,MAAM,KAAK,IAAI;cACnB,MAAM,eAAe,GAAG,aAAa,eAAe,CAAC,GAAG,SAAS;sBAElE,eAAe,GAAG,aAAa,eAAe,CAAC,GAAG,SAAS,KAC/D,IAAI;kBACK,MAAM,OAAO;8BAEpB,MAAM,UACH,MAAM,MAAM,GAAG,SAAS,GAAG,IAAI,KACpC,IAAI;;AAbX,wBAgCG"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveContext.d.ts new file mode 100644 index 00000000..dc8ed807 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveContext.d.ts @@ -0,0 +1,14 @@ +import * as React from 'react'; +/** + * A type of an object that have a route key as an object key + * and a value whether to prevent that route. + */ +export declare type PreventedRoutes = Record; +declare const PreventRemoveContext: React.Context<{ + preventedRoutes: PreventedRoutes; + setPreventRemove: (id: string, routeKey: string, preventRemove: boolean) => void; +} | undefined>; +export default PreventRemoveContext; +//# sourceMappingURL=PreventRemoveContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveContext.d.ts.map new file mode 100644 index 00000000..b25e11a8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PreventRemoveContext.d.ts","sourceRoot":"","sources":["../../../src/PreventRemoveContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;GAGG;AACH,oBAAY,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAEzE,QAAA,MAAM,oBAAoB;qBAEH,eAAe;2BAE1B,MAAM,YACA,MAAM,iBACD,OAAO,KACnB,IAAI;cAGH,CAAC;AAEb,eAAe,oBAAoB,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveProvider.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveProvider.d.ts new file mode 100644 index 00000000..613203cc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveProvider.d.ts @@ -0,0 +1,10 @@ +import * as React from 'react'; +declare type Props = { + children: React.ReactNode; +}; +/** + * Component used for managing which routes have to be prevented from removal in native-stack. + */ +export default function PreventRemoveProvider({ children }: Props): JSX.Element; +export {}; +//# sourceMappingURL=PreventRemoveProvider.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveProvider.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveProvider.d.ts.map new file mode 100644 index 00000000..d50b0679 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/PreventRemoveProvider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PreventRemoveProvider.d.ts","sourceRoot":"","sources":["../../../src/PreventRemoveProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,aAAK,KAAK,GAAG;IACX,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AA+BF;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,eAiFhE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/SceneView.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/SceneView.d.ts new file mode 100644 index 00000000..4d63f5c8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/SceneView.d.ts @@ -0,0 +1,22 @@ +/// +import type { NavigationState, ParamListBase, PartialState, Route } from '@react-navigation/routers'; +import type { NavigationProp, RouteConfigComponent } from './types'; +declare type Props = { + screen: RouteConfigComponent & { + name: string; + }; + navigation: NavigationProp; + route: Route; + routeState: NavigationState | PartialState | undefined; + getState: () => State; + setState: (state: State) => void; + options: object; + clearOptions: () => void; +}; +/** + * Component which takes care of rendering the screen for a route. + * It provides all required contexts and applies optimizations when applicable. + */ +export default function SceneView({ screen, route, navigation, routeState, getState, setState, options, clearOptions, }: Props): JSX.Element; +export {}; +//# sourceMappingURL=SceneView.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/SceneView.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/SceneView.d.ts.map new file mode 100644 index 00000000..9e10b1ad --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/SceneView.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SceneView.d.ts","sourceRoot":"","sources":["../../../src/SceneView.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,YAAY,EACZ,KAAK,EACN,MAAM,2BAA2B,CAAC;AAMnC,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAGpE,aAAK,KAAK,CAAC,KAAK,SAAS,eAAe,EAAE,aAAa,SAAS,EAAE,IAAI;IACpE,MAAM,EAAE,oBAAoB,CAAC,aAAa,EAAE,MAAM,CAAC,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACvE,UAAU,EAAE,cAAc,CACxB,aAAa,EACb,MAAM,EACN,MAAM,GAAG,SAAS,EAClB,KAAK,EACL,aAAa,CACd,CAAC;IACF,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,UAAU,EAAE,eAAe,GAAG,YAAY,CAAC,eAAe,CAAC,GAAG,SAAS,CAAC;IACxE,QAAQ,EAAE,MAAM,KAAK,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,EACA,MAAM,EACN,KAAK,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,YAAY,GACb,EAAE,KAAK,CAAC,KAAK,EAAE,aAAa,CAAC,eA4F7B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Screen.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Screen.d.ts new file mode 100644 index 00000000..db4bf027 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Screen.d.ts @@ -0,0 +1,7 @@ +import type { NavigationState, ParamListBase } from '@react-navigation/routers'; +import type { EventMapBase, RouteConfig } from './types'; +/** + * Empty component used for specifying route configuration. + */ +export default function Screen(_: RouteConfig): null; +//# sourceMappingURL=Screen.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Screen.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Screen.d.ts.map new file mode 100644 index 00000000..2c572221 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/Screen.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../src/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEhF,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEzD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAC5B,SAAS,SAAS,aAAa,EAC/B,SAAS,SAAS,MAAM,SAAS,EACjC,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,YAAY,EAC7B,CAAC,EAAE,WAAW,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,CAAC,QAGrE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/StaticContainer.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/StaticContainer.d.ts new file mode 100644 index 00000000..464419f3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/StaticContainer.d.ts @@ -0,0 +1,8 @@ +import * as React from 'react'; +/** + * Component which prevents updates for children if no props changed + */ +declare function StaticContainer(props: any): any; +declare const _default: React.MemoExoticComponent; +export default _default; +//# sourceMappingURL=StaticContainer.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/StaticContainer.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/StaticContainer.d.ts.map new file mode 100644 index 00000000..666c9c94 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/StaticContainer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"StaticContainer.d.ts","sourceRoot":"","sources":["../../../src/StaticContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;GAEG;AACH,iBAAS,eAAe,CAAC,KAAK,EAAE,GAAG,OAElC;;AAED,wBAmBG"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/UnhandledActionContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/UnhandledActionContext.d.ts new file mode 100644 index 00000000..baa341e7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/UnhandledActionContext.d.ts @@ -0,0 +1,5 @@ +import type { NavigationAction } from '@react-navigation/routers'; +import * as React from 'react'; +declare const UnhandledActionContext: React.Context<((action: NavigationAction) => void) | undefined>; +export default UnhandledActionContext; +//# sourceMappingURL=UnhandledActionContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/UnhandledActionContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/UnhandledActionContext.d.ts.map new file mode 100644 index 00000000..2373e5d2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/UnhandledActionContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"UnhandledActionContext.d.ts","sourceRoot":"","sources":["../../../src/UnhandledActionContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,QAAA,MAAM,sBAAsB,0BAChB,gBAAgB,KAAK,IAAI,cACzB,CAAC;AAEb,eAAe,sBAAsB,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkDuplicateRouteNames.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkDuplicateRouteNames.d.ts new file mode 100644 index 00000000..31eec9a6 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkDuplicateRouteNames.d.ts @@ -0,0 +1,3 @@ +import type { NavigationState } from '@react-navigation/routers'; +export default function checkDuplicateRouteNames(state: NavigationState): string[][]; +//# sourceMappingURL=checkDuplicateRouteNames.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkDuplicateRouteNames.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkDuplicateRouteNames.d.ts.map new file mode 100644 index 00000000..88d16c7e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkDuplicateRouteNames.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"checkDuplicateRouteNames.d.ts","sourceRoot":"","sources":["../../../src/checkDuplicateRouteNames.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,2BAA2B,CAAC;AAE/E,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,KAAK,EAAE,eAAe,cA8BtE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkSerializable.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkSerializable.d.ts new file mode 100644 index 00000000..d167c403 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkSerializable.d.ts @@ -0,0 +1,10 @@ +export default function checkSerializable(o: { + [key: string]: any; +}): { + serializable: true; +} | { + serializable: false; + location: (string | number)[]; + reason: string; +}; +//# sourceMappingURL=checkSerializable.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkSerializable.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkSerializable.d.ts.map new file mode 100644 index 00000000..fee41bb1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/checkSerializable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"checkSerializable.d.ts","sourceRoot":"","sources":["../../../src/checkSerializable.tsx"],"names":[],"mappings":"AAuEA,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE;;;;;;EAElE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigationContainerRef.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigationContainerRef.d.ts new file mode 100644 index 00000000..544484bf --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigationContainerRef.d.ts @@ -0,0 +1,4 @@ +import type { NavigationContainerRefWithCurrent } from './types'; +export declare 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."; +export default function createNavigationContainerRef(): NavigationContainerRefWithCurrent; +//# sourceMappingURL=createNavigationContainerRef.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigationContainerRef.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigationContainerRef.d.ts.map new file mode 100644 index 00000000..a84a1c43 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigationContainerRef.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createNavigationContainerRef.d.ts","sourceRoot":"","sources":["../../../src/createNavigationContainerRef.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAGV,iCAAiC,EAClC,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,qBAAqB,kRAC+O,CAAC;AAElR,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAClD,SAAS,SAAS,EAAE,GAAG,eAAe,CAAC,aAAa,KACjD,iCAAiC,CAAC,SAAS,CAAC,CAqFhD"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts new file mode 100644 index 00000000..55a87da7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts @@ -0,0 +1,12 @@ +import type { NavigationState, ParamListBase } from '@react-navigation/routers'; +import type * as React from 'react'; +import type { EventMapBase, TypedNavigator } from './types'; +/** + * Higher order component to create a `Navigator` and `Screen` pair. + * Custom navigators should wrap the navigator component in `createNavigator` before exporting. + * + * @param Navigator The navigtor component to wrap. + * @returns Factory method to create a `Navigator` and `Screen` pair. + */ +export default function createNavigatorFactory>(Navigator: NavigatorComponent): () => TypedNavigator; +//# sourceMappingURL=createNavigatorFactory.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts.map new file mode 100644 index 00000000..27faf3ed --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createNavigatorFactory.d.ts","sourceRoot":"","sources":["../../../src/createNavigatorFactory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,YAAY,EAC7B,kBAAkB,SAAS,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,EACnD,SAAS,EAAE,kBAAkB,wHAoB9B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/findFocusedRoute.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/findFocusedRoute.d.ts new file mode 100644 index 00000000..ad4a4537 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/findFocusedRoute.d.ts @@ -0,0 +1,23 @@ +import type { InitialState } from '@react-navigation/routers'; +export default function findFocusedRoute(state: InitialState): (Omit, "key"> & { + state?: Readonly & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | import("@react-navigation/routers").PartialState> | undefined; + })[]; + type: string; + stale: false; + }>, "stale" | "routes">> & { + routes: (Omit, "key"> & any)[]; + }> | undefined; +}) | undefined; +//# sourceMappingURL=findFocusedRoute.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/findFocusedRoute.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/findFocusedRoute.d.ts.map new file mode 100644 index 00000000..1e7849ef --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/findFocusedRoute.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"findFocusedRoute.d.ts","sourceRoot":"","sources":["../../../src/findFocusedRoute.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,KAAK,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;eAU3D"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/fromEntries.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/fromEntries.d.ts new file mode 100644 index 00000000..e65b44a0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/fromEntries.d.ts @@ -0,0 +1,2 @@ +export default function fromEntries(entries: (readonly [K, V])[]): Record; +//# sourceMappingURL=fromEntries.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/fromEntries.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/fromEntries.d.ts.map new file mode 100644 index 00000000..69df6c70 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/fromEntries.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fromEntries.d.ts","sourceRoot":"","sources":["../../../src/fromEntries.tsx"],"names":[],"mappings":"AACA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EACrD,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,gBAU7B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getActionFromState.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getActionFromState.d.ts new file mode 100644 index 00000000..591636af --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getActionFromState.d.ts @@ -0,0 +1,17 @@ +import type { CommonActions, NavigationState, PartialState } from '@react-navigation/routers'; +import type { NavigatorScreenParams, PathConfigMap } from './types'; +declare type Options = { + initialRouteName?: string; + screens: PathConfigMap; +}; +declare type NavigateAction = { + type: 'NAVIGATE'; + payload: { + name: string; + params?: NavigatorScreenParams; + path?: string; + }; +}; +export default function getActionFromState(state: PartialState, options?: Options): NavigateAction | CommonActions.Action | undefined; +export {}; +//# sourceMappingURL=getActionFromState.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getActionFromState.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getActionFromState.d.ts.map new file mode 100644 index 00000000..6bc4de21 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getActionFromState.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getActionFromState.d.ts","sourceRoot":"","sources":["../../../src/getActionFromState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EAGf,YAAY,EAEb,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,qBAAqB,EAAc,aAAa,EAAE,MAAM,SAAS,CAAC;AAOhF,aAAK,OAAO,GAAG;IACb,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAChC,CAAC;AAEF,aAAK,cAAc,CAAC,KAAK,SAAS,eAAe,IAAI;IACnD,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,CAAC,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC;QACtC,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,KAAK,EAAE,YAAY,CAAC,eAAe,CAAC,EACpC,OAAO,CAAC,EAAE,OAAO,GAChB,cAAc,CAAC,eAAe,CAAC,GAAG,aAAa,CAAC,MAAM,GAAG,SAAS,CAuGpE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts new file mode 100644 index 00000000..eb8b816a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts @@ -0,0 +1,3 @@ +import type { Route } from '@react-navigation/routers'; +export default function getFocusedRouteNameFromRoute(route: Partial>): string | undefined; +//# sourceMappingURL=getFocusedRouteNameFromRoute.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts.map new file mode 100644 index 00000000..eac9428c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getFocusedRouteNameFromRoute.d.ts","sourceRoot":"","sources":["../../../src/getFocusedRouteNameFromRoute.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIvD,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAClD,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAC5B,MAAM,GAAG,SAAS,CAqBpB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getPathFromState.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getPathFromState.d.ts new file mode 100644 index 00000000..0cdb6c01 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getPathFromState.d.ts @@ -0,0 +1,39 @@ +import type { NavigationState, PartialState } from '@react-navigation/routers'; +import type { PathConfigMap } from './types'; +declare type Options = { + initialRouteName?: string; + screens: PathConfigMap; +}; +declare type State = NavigationState | Omit, 'stale'>; +/** + * Utility to serialize a navigation state object to a path string. + * + * @example + * ```js + * getPathFromState( + * { + * routes: [ + * { + * name: 'Chat', + * params: { author: 'Jane', id: 42 }, + * }, + * ], + * }, + * { + * screens: { + * Chat: { + * path: 'chat/:author/:id', + * stringify: { author: author => author.toLowerCase() } + * } + * } + * } + * ) + * ``` + * + * @param state Navigation state to serialize. + * @param options Extra options to fine-tune how to serialize the path. + * @returns Path representing the state, e.g. /foo/bar?count=42. + */ +export default function getPathFromState(state: State, options?: Options): string; +export {}; +//# sourceMappingURL=getPathFromState.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getPathFromState.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getPathFromState.d.ts.map new file mode 100644 index 00000000..91983513 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getPathFromState.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getPathFromState.d.ts","sourceRoot":"","sources":["../../../src/getPathFromState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EAEb,MAAM,2BAA2B,CAAC;AAInC,OAAO,KAAK,EAAc,aAAa,EAAE,MAAM,SAAS,CAAC;AAGzD,aAAK,OAAO,CAAC,SAAS,IAAI;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACnC,CAAC;AAEF,aAAK,KAAK,GAAG,eAAe,GAAG,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC,CAAC;AAuB5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,SAAS,SAAS,EAAE,EAC3D,KAAK,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC3B,MAAM,CAsKR"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getStateFromPath.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getStateFromPath.d.ts new file mode 100644 index 00000000..258d767e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getStateFromPath.d.ts @@ -0,0 +1,33 @@ +import type { NavigationState, PartialState } from '@react-navigation/routers'; +import type { PathConfigMap } from './types'; +declare type Options = { + initialRouteName?: string; + screens: PathConfigMap; +}; +declare type ResultState = PartialState & { + state?: ResultState; +}; +/** + * Utility to parse a path string to initial state object accepted by the container. + * This is useful for deep linking when we need to handle the incoming URL. + * + * @example + * ```js + * getStateFromPath( + * '/chat/jane/42', + * { + * screens: { + * Chat: { + * path: 'chat/:author/:id', + * parse: { id: Number } + * } + * } + * } + * ) + * ``` + * @param path Path string to parse and convert, e.g. /foo/bar?count=42. + * @param options Extra options to fine-tune how to parse the path. + */ +export default function getStateFromPath(path: string, options?: Options): ResultState | undefined; +export {}; +//# sourceMappingURL=getStateFromPath.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getStateFromPath.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getStateFromPath.d.ts.map new file mode 100644 index 00000000..27c79d86 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/getStateFromPath.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getStateFromPath.d.ts","sourceRoot":"","sources":["../../../src/getStateFromPath.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,eAAe,EACf,YAAY,EACb,MAAM,2BAA2B,CAAC;AAKnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C,aAAK,OAAO,CAAC,SAAS,SAAS,EAAE,IAAI;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACnC,CAAC;AAkBF,aAAK,WAAW,GAAG,YAAY,CAAC,eAAe,CAAC,GAAG;IACjD,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAQF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,SAAS,SAAS,EAAE,EAC3D,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC3B,WAAW,GAAG,SAAS,CAwLzB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts new file mode 100644 index 00000000..e59dc93b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts @@ -0,0 +1,28 @@ +export { default as BaseNavigationContainer } from './BaseNavigationContainer'; +export { default as createNavigationContainerRef } from './createNavigationContainerRef'; +export { default as createNavigatorFactory } from './createNavigatorFactory'; +export { default as CurrentRenderContext } from './CurrentRenderContext'; +export { default as findFocusedRoute } from './findFocusedRoute'; +export { default as getActionFromState } from './getActionFromState'; +export { default as getFocusedRouteNameFromRoute } from './getFocusedRouteNameFromRoute'; +export { default as getPathFromState } from './getPathFromState'; +export { default as getStateFromPath } from './getStateFromPath'; +export { default as NavigationContainerRefContext } from './NavigationContainerRefContext'; +export { default as NavigationContext } from './NavigationContext'; +export { default as NavigationHelpersContext } from './NavigationHelpersContext'; +export { default as NavigationRouteContext } from './NavigationRouteContext'; +export { default as PreventRemoveContext } from './PreventRemoveContext'; +export { default as PreventRemoveProvider } from './PreventRemoveProvider'; +export * from './types'; +export { default as useFocusEffect } from './useFocusEffect'; +export { default as useIsFocused } from './useIsFocused'; +export { default as useNavigation } from './useNavigation'; +export { default as useNavigationBuilder } from './useNavigationBuilder'; +export { default as useNavigationContainerRef } from './useNavigationContainerRef'; +export { default as useNavigationState } from './useNavigationState'; +export { default as UNSTABLE_usePreventRemove } from './usePreventRemove'; +export { default as usePreventRemoveContext } from './usePreventRemoveContext'; +export { default as useRoute } from './useRoute'; +export { default as validatePathConfig } from './validatePathConfig'; +export * from '@react-navigation/routers'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts.map new file mode 100644 index 00000000..366138ed --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,cAAc,2BAA2B,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isArrayEqual.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isArrayEqual.d.ts new file mode 100644 index 00000000..93a029d3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isArrayEqual.d.ts @@ -0,0 +1,6 @@ +/** + * Compare two arrays with primitive values as the content. + * We need to make sure that both values and order match. + */ +export default function isArrayEqual(a: any[], b: any[]): boolean; +//# sourceMappingURL=isArrayEqual.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isArrayEqual.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isArrayEqual.d.ts.map new file mode 100644 index 00000000..37e53006 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isArrayEqual.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isArrayEqual.d.ts","sourceRoot":"","sources":["../../../src/isArrayEqual.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,WAUtD"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isRecordEqual.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isRecordEqual.d.ts new file mode 100644 index 00000000..474f26fd --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isRecordEqual.d.ts @@ -0,0 +1,5 @@ +/** + * Compare two records with primitive values as the content. + */ +export default function isRecordEqual(a: Record, b: Record): boolean; +//# sourceMappingURL=isRecordEqual.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isRecordEqual.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isRecordEqual.d.ts.map new file mode 100644 index 00000000..cf02a08f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/isRecordEqual.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isRecordEqual.d.ts","sourceRoot":"","sources":["../../../src/isRecordEqual.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,WAcvB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts new file mode 100644 index 00000000..42792c68 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts @@ -0,0 +1,513 @@ +import type { DefaultRouterOptions, InitialState, NavigationAction, NavigationState, ParamListBase, PartialState, Route } from '@react-navigation/routers'; +import type * as React from 'react'; +declare global { + namespace ReactNavigation { + interface RootParamList { + } + } +} +declare type Keyof = Extract; +export declare type DefaultNavigatorOptions = DefaultRouterOptions> & { + /** + * Optional ID for the navigator. Can be used with `navigation.getParent(id)` to refer to a parent. + */ + id?: string; + /** + * Children React Elements to extract the route configuration from. + * Only `Screen`, `Group` and `React.Fragment` are supported as children. + */ + children: React.ReactNode; + /** + * Event listeners for all the screens in the navigator. + */ + screenListeners?: ScreenListeners | ((props: { + route: RouteProp; + navigation: any; + }) => ScreenListeners); + /** + * Default options for all screens under this navigator. + */ + screenOptions?: ScreenOptions | ((props: { + route: RouteProp; + navigation: any; + }) => ScreenOptions); +}; +export declare type EventMapBase = Record; +export declare type EventMapCore = { + focus: { + data: undefined; + }; + blur: { + data: undefined; + }; + state: { + data: { + state: State; + }; + }; + beforeRemove: { + data: { + action: NavigationAction; + }; + canPreventDefault: true; + }; +}; +export declare type EventArg = { + /** + * Type of the event (e.g. `focus`, `blur`) + */ + readonly type: EventName; + readonly target?: string; +} & (CanPreventDefault extends true ? { + /** + * Whether `event.preventDefault()` was called on this event object. + */ + readonly defaultPrevented: boolean; + /** + * Prevent the default action which happens on this event. + */ + preventDefault(): void; +} : {}) & (undefined extends Data ? { + readonly data?: Readonly; +} : { + readonly data: Readonly; +}); +export declare type EventListenerCallback = (e: EventArg, EventMap[EventName]['canPreventDefault'], EventMap[EventName]['data']>) => void; +export declare type EventConsumer = { + /** + * Subscribe to events from the parent navigator. + * + * @param type Type of the event (e.g. `focus`, `blur`) + * @param callback Callback listener which is executed upon receiving the event. + */ + addListener>(type: EventName, callback: EventListenerCallback): () => void; + removeListener>(type: EventName, callback: EventListenerCallback): void; +}; +export declare type EventEmitter = { + /** + * Emit an event to child screens. + * + * @param options.type Type of the event (e.g. `focus`, `blur`) + * @param [options.data] Optional information regarding the event. + * @param [options.target] Key of the target route which should receive the event. + * If not specified, all routes receive the event. + */ + emit>(options: { + type: EventName; + target?: string; + } & (EventMap[EventName]['canPreventDefault'] extends true ? { + canPreventDefault: true; + } : {}) & (undefined extends EventMap[EventName]['data'] ? { + data?: EventMap[EventName]['data']; + } : { + data: EventMap[EventName]['data']; + })): EventArg; +}; +export declare class PrivateValueStore { + /** + * UGLY HACK! DO NOT USE THE TYPE!!! + * + * TypeScript requires a type to be used to be able to infer it. + * The type should exist as its own without any operations such as union. + * So we need to figure out a way to store this type in a property. + * The problem with a normal property is that it shows up in intelliSense. + * Adding private keyword works, but the annotation is stripped away in declaration. + * Turns out if we use an empty string, it doesn't show up in intelliSense. + */ + protected ''?: T; +} +declare type NavigationHelpersCommon = { + /** + * Dispatch an action or an update function to the router. + * The update function will receive the current state, + * + * @param action Action object or update function. + */ + dispatch(action: NavigationAction | ((state: State) => NavigationAction)): void; + /** + * Navigate to a route in current navigation tree. + * + * @param name Name of the route to navigate to. + * @param [params] Params object for the route. + */ + navigate(...args: RouteName extends unknown ? undefined extends ParamList[RouteName] ? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]] : [screen: RouteName, params: ParamList[RouteName]] : never): void; + /** + * Navigate to a route in current navigation tree. + * + * @param route Object with `key` or `name` for the route to navigate to, and a `params` object. + */ + navigate(options: RouteName extends unknown ? { + key: string; + params?: ParamList[RouteName]; + merge?: boolean; + } | { + name: RouteName; + key?: string; + params: ParamList[RouteName]; + merge?: boolean; + } : never): void; + /** + * Reset the navigation state to the provided state. + * + * @param state Navigation state object. + */ + reset(state: PartialState | State): void; + /** + * Go back to the previous route in history. + */ + goBack(): void; + /** + * Check if the screen is focused. The method returns `true` if focused, `false` otherwise. + * Note that this method doesn't re-render screen when the focus changes. So don't use it in `render`. + * To get notified of focus changes, use `addListener('focus', cb)` and `addListener('blur', cb)`. + * To conditionally render content based on focus state, use the `useIsFocused` hook. + */ + isFocused(): boolean; + /** + * Check if dispatching back action will be handled by navigation. + * Note that this method doesn't re-render screen when the result changes. So don't use it in `render`. + */ + canGoBack(): boolean; + /** + * Returns the name of the navigator specified in the `name` prop. + * If no name is specified, returns `undefined`. + */ + getId(): string | undefined; + /** + * Returns the navigation helpers from a parent navigator based on the ID. + * If an ID is provided, the navigation helper from the parent navigator with matching ID (including current) will be returned. + * If no ID is provided, the navigation helper from the immediate parent navigator will be returned. + * + * @param id Optional ID of a parent navigator. + */ + getParent | undefined>(id?: string): T; + /** + * Returns the navigator's state. + * Note that this method doesn't re-render screen when the result changes. So don't use it in `render`. + */ + getState(): State; +} & PrivateValueStore<[ParamList, unknown, unknown]>; +export declare type NavigationHelpers = NavigationHelpersCommon & EventEmitter & { + /** + * Update the param object for the route. + * The new params will be shallow merged with the old one. + * + * @param params Params object for the current route. + */ + setParams(params: Partial): void; +}; +export declare type NavigationContainerProps = { + /** + * Initial navigation state for the child navigators. + */ + initialState?: InitialState; + /** + * Callback which is called with the latest navigation state when it changes. + */ + onStateChange?: (state: NavigationState | undefined) => void; + /** + * Callback which is called when an action is not handled. + */ + onUnhandledAction?: (action: NavigationAction) => void; + /** + * Whether this navigation container should be independent of parent containers. + * If this is not set to `true`, this container cannot be nested inside another container. + * Setting it to `true` disconnects any children navigators from parent container. + */ + independent?: boolean; + /** + * Children elements to render. + */ + children: React.ReactNode; +}; +export declare type NavigationProp, NavigatorID extends string | undefined = undefined, State extends NavigationState = NavigationState, ScreenOptions extends {} = {}, EventMap extends EventMapBase = {}> = Omit, 'getParent'> & { + /** + * Returns the navigation prop from a parent navigator based on the ID. + * If an ID is provided, the navigation prop from the parent navigator with matching ID (including current) will be returned. + * If no ID is provided, the navigation prop from the immediate parent navigator will be returned. + * + * @param id Optional ID of a parent navigator. + */ + getParent | undefined>(id?: NavigatorID): T; + /** + * Update the param object for the route. + * The new params will be shallow merged with the old one. + * + * @param params Params object for the current route. + */ + setParams(params: ParamList[RouteName] extends undefined ? undefined : Partial): void; + /** + * Update the options for the route. + * The options object will be shallow merged with default options object. + * + * @param options Options object for the route. + */ + setOptions(options: Partial): void; +} & EventConsumer> & PrivateValueStore<[ParamList, RouteName, EventMap]>; +export declare type RouteProp> = Route, ParamList[RouteName]>; +export declare type CompositeNavigationProp, B extends NavigationHelpersCommon> = Omit> & NavigationProp< +/** + * Param list from both navigation objects needs to be combined + * For example, we should be able to navigate to screens in both A and B + */ +(A extends NavigationHelpersCommon ? T : never) & (B extends NavigationHelpersCommon ? U : never), +/** + * The route name should refer to the route name specified in the first type + * Ideally it should work for any of them, but it's not possible to infer that way + */ +A extends NavigationProp ? R : string, +/** + * ID from both navigation objects needs to be combined for `getParent` + */ +(A extends NavigationProp ? I : never) | (B extends NavigationProp ? J : never), +/** + * The type of state should refer to the state specified in the first type + */ +A extends NavigationProp ? S : NavigationState, +/** + * Screen options from both navigation objects needs to be combined + * This allows typechecking `setOptions` + */ +(A extends NavigationProp ? O : {}) & (B extends NavigationProp ? P : {}), +/** + * Event consumer config should refer to the config specified in the first type + * This allows typechecking `addListener`/`removeListener` + */ +A extends NavigationProp ? E : {}>; +export declare type CompositeScreenProps; + route: RouteProp; +}, B extends { + navigation: NavigationHelpersCommon; +}> = { + navigation: CompositeNavigationProp; + route: A['route']; +}; +export declare type Descriptor, Route extends RouteProp> = { + /** + * Render the component associated with this route. + */ + render(): JSX.Element; + /** + * Options for the route. + */ + options: ScreenOptions; + /** + * Route object for the screen + */ + route: Route; + /** + * Navigation object for the screen + */ + navigation: Navigation; +}; +export declare type ScreenListeners = Partial<{ + [EventName in keyof (EventMap & EventMapCore)]: EventListenerCallback; +}>; +declare type ScreenComponentType = React.ComponentType<{ + route: RouteProp; + navigation: any; +}> | React.ComponentType<{}>; +export declare type RouteConfigComponent = { + /** + * React component to render for this screen. + */ + component: ScreenComponentType; + getComponent?: never; + children?: never; +} | { + /** + * Lazily get a React component to render for this screen. + */ + getComponent: () => ScreenComponentType; + component?: never; + children?: never; +} | { + /** + * Render callback to render content of this screen. + */ + children: (props: { + route: RouteProp; + navigation: any; + }) => React.ReactNode; + component?: never; + getComponent?: never; +}; +export declare type RouteConfig = { + /** + * Optional key for this screen. This doesn't need to be unique. + * If the key changes, existing screens with this name will be removed or reset. + * Useful when we have some common screens and have conditional rendering. + */ + navigationKey?: string; + /** + * Route name of this screen. + */ + name: RouteName; + /** + * Navigator options for this screen. + */ + options?: ScreenOptions | ((props: { + route: RouteProp; + navigation: any; + }) => ScreenOptions); + /** + * Event listeners for this screen. + */ + listeners?: ScreenListeners | ((props: { + route: RouteProp; + navigation: any; + }) => ScreenListeners); + /** + * Function to return an unique ID for this screen. + * Receives an object with the route params. + * For a given screen name, there will always be only one screen corresponding to an ID. + * If `undefined` is returned, it acts same as no `getId` being specified. + */ + getId?: ({ params }: { + params: ParamList[RouteName]; + }) => string | undefined; + /** + * Initial params object for the route. + */ + initialParams?: Partial; +} & RouteConfigComponent; +export declare type RouteGroupConfig = { + /** + * Optional key for the screens in this group. + * If the key changes, all existing screens in this group will be removed or reset. + */ + navigationKey?: string; + /** + * Navigator options for this screen. + */ + screenOptions?: ScreenOptions | ((props: { + route: RouteProp; + navigation: any; + }) => ScreenOptions); + /** + * Children React Elements to extract the route configuration from. + * Only `Screen`, `Group` and `React.Fragment` are supported as children. + */ + children: React.ReactNode; +}; +export declare type NavigationContainerEventMap = { + /** + * Event which fires when the navigation state changes. + */ + state: { + data: { + /** + * The updated state object after the state change. + */ + state: NavigationState | PartialState | undefined; + }; + }; + /** + * Event which fires when current options changes. + */ + options: { + data: { + options: object; + }; + }; + /** + * Event which fires when an action is dispatched. + * Only intended for debugging purposes, don't use it for app logic. + * This event will be emitted before state changes have been applied. + */ + __unsafe_action__: { + data: { + /** + * The action object which was dispatched. + */ + action: NavigationAction; + /** + * Whether the action was a no-op, i.e. resulted any state changes. + */ + noop: boolean; + /** + * Stack trace of the action, this will only be available during development. + */ + stack: string | undefined; + }; + }; +}; +export declare type NavigationContainerRef = NavigationHelpers & EventConsumer & { + /** + * Reset the navigation state of the root navigator to the provided state. + * + * @param state Navigation state object. + */ + resetRoot(state?: PartialState | NavigationState): void; + /** + * Get the rehydrated navigation state of the navigation tree. + */ + getRootState(): NavigationState; + /** + * Get the currently focused navigation route. + */ + getCurrentRoute(): Route | undefined; + /** + * Get the currently focused route's options. + */ + getCurrentOptions(): object | undefined; + /** + * Whether the navigation container is ready to handle actions. + */ + isReady(): boolean; +}; +export declare type NavigationContainerRefWithCurrent = NavigationContainerRef & { + current: NavigationContainerRef | null; +}; +export declare type TypedNavigator> = { + /** + * Navigator component which manages the child screens. + */ + Navigator: React.ComponentType, keyof DefaultNavigatorOptions> & DefaultNavigatorOptions>; + /** + * Component used for grouping multiple route configuration. + */ + Group: React.ComponentType>; + /** + * Component used for specifying route configuration. + */ + Screen: (_: RouteConfig) => null; +}; +export declare type NavigatorScreenParams = { + screen?: never; + params?: never; + initial?: never; + path?: string; + state: PartialState | State | undefined; +} | { + [RouteName in keyof ParamList]: undefined extends ParamList[RouteName] ? { + screen: RouteName; + params?: ParamList[RouteName]; + initial?: boolean; + path?: string; + state?: never; + } : { + screen: RouteName; + params: ParamList[RouteName]; + initial?: boolean; + path?: string; + state?: never; + }; +}[keyof ParamList]; +export declare type PathConfig = { + path?: string; + exact?: boolean; + parse?: Record any>; + stringify?: Record string>; + screens?: PathConfigMap; + initialRouteName?: keyof ParamList; +}; +export declare type PathConfigMap = { + [RouteName in keyof ParamList]?: NonNullable extends NavigatorScreenParams ? string | PathConfig : string | Omit, 'screens' | 'initialRouteName'>; +}; +export {}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts.map new file mode 100644 index 00000000..580e0074 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,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CAAC,SAAS,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,SAAS,CAAC;CACpC,CAAC;AAEF,oBAAY,aAAa,CAAC,SAAS,SAAS,EAAE,IAAI;KAC/C,SAAS,IAAI,MAAM,SAAS,CAAC,CAAC,EAAE,WAAW,CAC1C,SAAS,CAAC,SAAS,CAAC,CACrB,SAAS,qBAAqB,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GACzC,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,GACtB,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,SAAS,GAAG,kBAAkB,CAAC;CAClE,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useChildListeners.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useChildListeners.d.ts new file mode 100644 index 00000000..34551355 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useChildListeners.d.ts @@ -0,0 +1,12 @@ +import type { ListenerMap } from './NavigationBuilderContext'; +/** + * Hook which lets child navigators add action listeners. + */ +export default function useChildListeners(): { + listeners: { + action: import("./NavigationBuilderContext").ChildActionListener[]; + focus: import("./NavigationBuilderContext").FocusedNavigationListener[]; + }; + addListener: (type: T, listener: ListenerMap[T]) => () => void; +}; +//# sourceMappingURL=useChildListeners.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useChildListeners.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useChildListeners.d.ts.map new file mode 100644 index 00000000..97cb338e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useChildListeners.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useChildListeners.d.ts","sourceRoot":"","sources":["../../../src/useChildListeners.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB;;;;;;EA6BxC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useComponent.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useComponent.d.ts new file mode 100644 index 00000000..d3614bd5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useComponent.d.ts @@ -0,0 +1,7 @@ +import * as React from 'react'; +declare type Render = (children: React.ReactNode) => JSX.Element; +export default function useComponent(render: Render): ({ children }: { + children: React.ReactNode; +}) => JSX.Element; +export {}; +//# sourceMappingURL=useComponent.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useComponent.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useComponent.d.ts.map new file mode 100644 index 00000000..a4d1a4db --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useComponent.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useComponent.d.ts","sourceRoot":"","sources":["../../../src/useComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,aAAK,MAAM,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,GAAG,CAAC,OAAO,CAAC;AAWzD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,MAAM,EAAE,MAAM;cAYF,MAAM,SAAS;kBAW/D"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useCurrentRender.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useCurrentRender.d.ts new file mode 100644 index 00000000..34d0e182 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useCurrentRender.d.ts @@ -0,0 +1,14 @@ +import type { NavigationState, ParamListBase } from '@react-navigation/routers'; +import type { Descriptor, NavigationHelpers, NavigationProp, RouteProp } from './types'; +declare type Options = { + state: NavigationState; + navigation: NavigationHelpers; + descriptors: Record, RouteProp>>; +}; +/** + * Write the current options, so that server renderer can get current values + * Mutating values like this is not safe in async mode, but it doesn't apply to SSR + */ +export default function useCurrentRender({ state, navigation, descriptors, }: Options): void; +export {}; +//# sourceMappingURL=useCurrentRender.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useCurrentRender.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useCurrentRender.d.ts.map new file mode 100644 index 00000000..1a608957 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useCurrentRender.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useCurrentRender.d.ts","sourceRoot":"","sources":["../../../src/useCurrentRender.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAIhF,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,SAAS,EACV,MAAM,SAAS,CAAC;AAEjB,aAAK,OAAO,GAAG;IACb,KAAK,EAAE,eAAe,CAAC;IACvB,UAAU,EAAE,iBAAiB,CAAC,aAAa,CAAC,CAAC;IAC7C,WAAW,EAAE,MAAM,CACjB,MAAM,EACN,UAAU,CAAC,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC,CAC5E,CAAC;CACH,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,KAAK,EACL,UAAU,EACV,WAAW,GACZ,EAAE,OAAO,QAMT"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useDescriptors.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useDescriptors.d.ts new file mode 100644 index 00000000..1e9e2678 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useDescriptors.d.ts @@ -0,0 +1,93 @@ +import type { NavigationAction, NavigationState, ParamListBase, Router } from '@react-navigation/routers'; +import { AddKeyedListener, AddListener } from './NavigationBuilderContext'; +import type { Descriptor, EventMapBase, NavigationHelpers, NavigationProp, RouteConfig, RouteProp } from './types'; +import type { NavigationEventEmitter } from './useEventEmitter'; +export declare type ScreenConfigWithParent = { + keys: (string | undefined)[]; + options: (ScreenOptionsOrCallback | undefined)[] | undefined; + props: RouteConfig; +}; +declare type ScreenOptionsOrCallback = ScreenOptions | ((props: { + route: RouteProp; + navigation: any; +}) => ScreenOptions); +declare type Options = { + state: State; + screens: Record>; + navigation: NavigationHelpers; + screenOptions?: ScreenOptionsOrCallback; + defaultScreenOptions?: ScreenOptions | ((props: { + route: RouteProp; + navigation: any; + options: ScreenOptions; + }) => ScreenOptions); + onAction: (action: NavigationAction) => boolean; + getState: () => State; + setState: (state: State) => void; + addListener: AddListener; + addKeyedListener: AddKeyedListener; + onRouteFocus: (key: string) => void; + router: Router; + emitter: NavigationEventEmitter; +}; +/** + * Hook to create descriptor objects for the child routes. + * + * A descriptor object provides 3 things: + * - Helper method to render a screen + * - Options specified by the screen for the navigator + * - Navigation object intended for the route + */ +export default function useDescriptors void>, ScreenOptions extends {}, EventMap extends EventMapBase>({ state, screens, navigation, screenOptions, defaultScreenOptions, onAction, getState, setState, addListener, addKeyedListener, onRouteFocus, router, emitter, }: Options): Record | ((state: State) => Readonly<{ + type: string; + payload?: object | undefined; + source?: string | undefined; + target?: string | undefined; + }>)): void; + navigate(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; + navigate(options: RouteName_1 extends unknown ? { + key: string; + params?: object | undefined; + merge?: boolean | undefined; + } | { + name: RouteName_1; + key?: string | undefined; + params: object | undefined; + merge?: boolean | undefined; + } : never): void; + reset(state: State | import("@react-navigation/routers").PartialState): void; + goBack(): void; + isFocused(): boolean; + canGoBack(): boolean; + getId(): string | undefined; + getParent | undefined>(id?: string | undefined): T; + getState(): State; +} & import("./types").PrivateValueStore<[ParamListBase, unknown, unknown]>, "getParent"> & { + getParent & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | import("@react-navigation/routers").PartialState> | undefined; + })[]; + type: string; + stale: false; + }>, {}, {}> | undefined>(id?: string | undefined): T_1; + setParams(params: Partial): void; + setOptions(options: Partial): void; +} & import("./types").EventConsumer> & import("./types").PrivateValueStore<[ParamListBase, string, EventMap]> & ActionHelpers, RouteProp>>; +export {}; +//# sourceMappingURL=useDescriptors.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useDescriptors.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useDescriptors.d.ts.map new file mode 100644 index 00000000..7edf4802 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useDescriptors.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useDescriptors.d.ts","sourceRoot":"","sources":["../../../src/useDescriptors.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,MAAM,EACP,MAAM,2BAA2B,CAAC;AAGnC,OAAiC,EAC/B,gBAAgB,EAChB,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAIpC,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,SAAS,EACV,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAIhE,oBAAY,sBAAsB,CAChC,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,YAAY,IAC3B;IACF,IAAI,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC;IAC7B,OAAO,EAAE,C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MAAM,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IACxC,OAAO,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;CAC3C,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,EAChD,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,YAAY,EAC7B,EACA,KAAK,EACL,OAAO,EACP,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,MAAM,EACN,OAAO,GACR,EAAE,OAAO,CAAC,KAAK,EAAE,aAAa,EAAE,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mNAwIzC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useEventEmitter.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useEventEmitter.d.ts new file mode 100644 index 00000000..e0ac796c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useEventEmitter.d.ts @@ -0,0 +1,9 @@ +import type { EventConsumer, EventEmitter } from './types'; +export declare type NavigationEventEmitter> = EventEmitter & { + create: (target: string) => EventConsumer; +}; +/** + * Hook to manage the event system used by the navigator to notify screens of various events. + */ +export default function useEventEmitter>(listen?: (e: any) => void): NavigationEventEmitter; +//# sourceMappingURL=useEventEmitter.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useEventEmitter.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useEventEmitter.d.ts.map new file mode 100644 index 00000000..63367201 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useEventEmitter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useEventEmitter.d.ts","sourceRoot":"","sources":["../../../src/useEventEmitter.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAY,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAErE,oBAAY,sBAAsB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAC9D,YAAY,CAAC,CAAC,CAAC,GAAG;IAChB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC;CAC9C,CAAC;AAIJ;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnE,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,GACxB,sBAAsB,CAAC,CAAC,CAAC,CA4H3B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEffect.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEffect.d.ts new file mode 100644 index 00000000..57bcc253 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEffect.d.ts @@ -0,0 +1,11 @@ +declare type EffectCallback = () => undefined | void | (() => void); +/** + * Hook to run an effect in a focused screen, similar to `React.useEffect`. + * This can be used to perform side-effects such as fetching data or subscribing to events. + * The passed callback should be wrapped in `React.useCallback` to avoid running the effect too often. + * + * @param callback Memoized callback containing the effect, should optionally return a cleanup function. + */ +export default function useFocusEffect(effect: EffectCallback): void; +export {}; +//# sourceMappingURL=useFocusEffect.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEffect.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEffect.d.ts.map new file mode 100644 index 00000000..2e13da40 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEffect.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useFocusEffect.d.ts","sourceRoot":"","sources":["../../../src/useFocusEffect.tsx"],"names":[],"mappings":"AAIA,aAAK,cAAc,GAAG,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,MAAM,EAAE,cAAc,QAkG5D"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEvents.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEvents.d.ts new file mode 100644 index 00000000..0073fdf3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEvents.d.ts @@ -0,0 +1,13 @@ +import type { NavigationState } from '@react-navigation/routers'; +import type { EventMapCore } from './types'; +import type { NavigationEventEmitter } from './useEventEmitter'; +declare type Options = { + state: State; + emitter: NavigationEventEmitter>; +}; +/** + * Hook to take care of emitting `focus` and `blur` events. + */ +export default function useFocusEvents({ state, emitter, }: Options): void; +export {}; +//# sourceMappingURL=useFocusEvents.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEvents.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEvents.d.ts.map new file mode 100644 index 00000000..f2cc5c4a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusEvents.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useFocusEvents.d.ts","sourceRoot":"","sources":["../../../src/useFocusEvents.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAIjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,aAAK,OAAO,CAAC,KAAK,SAAS,eAAe,IAAI;IAC5C,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;CACtD,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,SAAS,eAAe,EAAE,EACpE,KAAK,EACL,OAAO,GACR,EAAE,OAAO,CAAC,KAAK,CAAC,QAsDhB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts new file mode 100644 index 00000000..9d1ba637 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts @@ -0,0 +1,13 @@ +import type { ParamListBase } from '@react-navigation/routers'; +import { FocusedNavigationListener } from './NavigationBuilderContext'; +import type { NavigationHelpers } from './types'; +declare type Options = { + navigation: NavigationHelpers; + focusedListeners: FocusedNavigationListener[]; +}; +/** + * Hook for passing focus callback to children + */ +export default function useFocusedListenersChildrenAdapter({ navigation, focusedListeners, }: Options): void; +export {}; +//# sourceMappingURL=useFocusedListenersChildrenAdapter.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts.map new file mode 100644 index 00000000..cda5ef27 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useFocusedListenersChildrenAdapter.d.ts","sourceRoot":"","sources":["../../../src/useFocusedListenersChildrenAdapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG/D,OAAiC,EAE/B,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,aAAK,OAAO,GAAG;IACb,UAAU,EAAE,iBAAiB,CAAC,aAAa,CAAC,CAAC;IAC7C,gBAAgB,EAAE,yBAAyB,EAAE,CAAC;CAC/C,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,kCAAkC,CAAC,EACzD,UAAU,EACV,gBAAgB,GACjB,EAAE,OAAO,QA0BT"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useIsFocused.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useIsFocused.d.ts new file mode 100644 index 00000000..e1ecaa70 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useIsFocused.d.ts @@ -0,0 +1,6 @@ +/** + * Hook to get the current focus state of the screen. Returns a `true` if screen is focused, otherwise `false`. + * This can be used if a component needs to render something based on the focus state. + */ +export default function useIsFocused(): boolean; +//# sourceMappingURL=useIsFocused.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useIsFocused.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useIsFocused.d.ts.map new file mode 100644 index 00000000..4bbe2301 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useIsFocused.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useIsFocused.d.ts","sourceRoot":"","sources":["../../../src/useIsFocused.tsx"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,IAAI,OAAO,CAiC9C"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useKeyedChildListeners.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useKeyedChildListeners.d.ts new file mode 100644 index 00000000..f4b5f6e9 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useKeyedChildListeners.d.ts @@ -0,0 +1,12 @@ +import type { KeyedListenerMap } from './NavigationBuilderContext'; +/** + * Hook which lets child navigators add getters to be called for obtaining rehydrated state. + */ +export default function useKeyedChildListeners(): { + keyedListeners: { + getState: Record; + beforeRemove: Record; + }; + addKeyedListener: (type: T, key: string, listener: KeyedListenerMap[T]) => () => void; +}; +//# sourceMappingURL=useKeyedChildListeners.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useKeyedChildListeners.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useKeyedChildListeners.d.ts.map new file mode 100644 index 00000000..72ca0361 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useKeyedChildListeners.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useKeyedChildListeners.d.ts","sourceRoot":"","sources":["../../../src/useKeyedChildListeners.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB;;;;;uEAgBnC,MAAM;EAkBhB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigation.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigation.d.ts new file mode 100644 index 00000000..4c10492c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigation.d.ts @@ -0,0 +1,8 @@ +import type { NavigationProp } from './types'; +/** + * Hook to access the navigation prop of the parent screen anywhere. + * + * @returns Navigation prop of the parent screen. + */ +export default function useNavigation>(): T; +//# sourceMappingURL=useNavigation.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigation.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigation.d.ts.map new file mode 100644 index 00000000..283ded2f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigation.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useNavigation.d.ts","sourceRoot":"","sources":["../../../src/useNavigation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,CAAC,GAAG,cAAc,CAAC,eAAe,CAAC,aAAa,CAAC,KAC9C,CAAC,CAYL"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts new file mode 100644 index 00000000..2b6d8c95 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts @@ -0,0 +1,177 @@ +import { DefaultRouterOptions, NavigationState, ParamListBase, PartialState, RouterFactory } from '@react-navigation/routers'; +import * as React from 'react'; +import { DefaultNavigatorOptions, EventMapCore, PrivateValueStore, RouteProp } from './types'; +declare type NavigationBuilderOptions = { + /** + * Default options specified by the navigator. + * It receives the custom options in the arguments if a function is specified. + */ + defaultScreenOptions?: ScreenOptions | ((props: { + route: RouteProp; + navigation: any; + options: ScreenOptions; + }) => ScreenOptions); +}; +/** + * Hook for building navigators. + * + * @param createRouter Factory method which returns router object. + * @param options Options object containing `children` and additional options for the router. + * @returns An object containing `state`, `navigation`, `descriptors` objects. + */ +export default function useNavigationBuilder void>, ScreenOptions extends {}, EventMap extends Record>(createRouter: RouterFactory, options: DefaultNavigatorOptions & NavigationBuilderOptions & RouterOptions): { + state: State; + navigation: { + dispatch(action: Readonly<{ + type: string; + payload?: object | undefined; + source?: string | undefined; + target?: string | undefined; + }> | ((state: Readonly<{ + key: string; + index: number; + routeNames: string[]; + history?: unknown[] | undefined; + routes: (Readonly<{ + key: string; + name: string; + path?: string | undefined; + }> & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | PartialState> | undefined; + })[]; + type: string; + stale: false; + }>) => Readonly<{ + type: string; + payload?: object | undefined; + source?: string | undefined; + target?: string | undefined; + }>)): void; + navigate(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; + navigate(options: RouteName_1 extends unknown ? { + key: string; + params?: object | undefined; + merge?: boolean | undefined; + } | { + name: RouteName_1; + key?: string | undefined; + params: object | undefined; + merge?: boolean | undefined; + } : never): void; + reset(state: Readonly<{ + key: string; + index: number; + routeNames: string[]; + history?: unknown[] | undefined; + routes: (Readonly<{ + key: string; + name: string; + path?: string | undefined; + }> & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | PartialState> | undefined; + })[]; + type: string; + stale: false; + }> | PartialState & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | PartialState> | undefined; + })[]; + type: string; + stale: false; + }>>): void; + goBack(): void; + isFocused(): boolean; + canGoBack(): boolean; + getId(): string | undefined; + getParent | undefined>(id?: string | undefined): T; + getState(): Readonly<{ + key: string; + index: number; + routeNames: string[]; + history?: unknown[] | undefined; + routes: (Readonly<{ + key: string; + name: string; + path?: string | undefined; + }> & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | PartialState> | undefined; + })[]; + type: string; + stale: false; + }>; + } & PrivateValueStore<[ParamListBase, unknown, unknown]> & import("./types").EventEmitter & { + setParams(params: Partial): void; + } & ActionHelpers; + descriptors: Record | ((state: State) => Readonly<{ + type: string; + payload?: object | undefined; + source?: string | undefined; + target?: string | undefined; + }>)): void; + navigate(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; + navigate(options: RouteName_1 extends unknown ? { + key: string; + params?: object | undefined; + merge?: boolean | undefined; + } | { + name: RouteName_1; + key?: string | undefined; + params: object | undefined; + merge?: boolean | undefined; + } : never): void; + reset(state: State | PartialState): void; + goBack(): void; + isFocused(): boolean; + canGoBack(): boolean; + getId(): string | undefined; + getParent | undefined>(id?: string | undefined): T; + getState(): State; + } & PrivateValueStore<[ParamListBase, unknown, unknown]>, "getParent"> & { + getParent & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | PartialState> | undefined; + })[]; + type: string; + stale: false; + }>, {}, {}> | undefined>(id?: string | undefined): T_1; + setParams(params: Partial): void; + setOptions(options: Partial): void; + } & import("./types").EventConsumer> & PrivateValueStore<[ParamListBase, string, EventMap]> & ActionHelpers, RouteProp>>; + NavigationContent: ({ children }: { + children: React.ReactNode; + }) => JSX.Element; +}; +export {}; +//# sourceMappingURL=useNavigationBuilder.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map new file mode 100644 index 00000000..3c361706 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useNavigationBuilder.d.ts","sourceRoot":"","sources":["../../../src/useNavigationBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EAEpB,eAAe,EACf,aAAa,EACb,YAAY,EAIZ,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EACL,uBAAuB,EAEvB,YAAY,EAEZ,iBAAiB,EAEjB,SAAS,EACV,MAAM,SAAS,CAAC;AAoBjB,aAAK,wBAAwB,CAAC,aAAa,SAAS,EAAE,IAAI;IACxD;;;OAGG;IACH,oBAAoB,CAAC,EACjB,aAAa,GACb,CAAC,CAAC,KAAK,EAAE;QACP,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;QAChC,UAAU,EAAE,GAAG,CAAC;QAChB,OAAO,EAAE,aAAa,CAAC;KACxB,KAAK,aAAa,CAAC,CAAC;CAC1B,CAAC;AAmLF;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,oBAAoB,EAC1C,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,EAChD,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAEpC,YAAY,EAAE,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,aAAa,CAAC,EACtD,OAAO,EAAE,uBAAuB,CAC9B,aAAa,EACb,KAAK,EACL,aAAa,EACb,QAAQ,CACT,GACC,wBAAwB,CAAC,aAAa,CAAC,GACvC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0chB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationCache.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationCache.d.ts new file mode 100644 index 00000000..af937e65 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationCache.d.ts @@ -0,0 +1,20 @@ +import { NavigationAction, NavigationState, ParamListBase, Router } from '@react-navigation/routers'; +import type { NavigationHelpers, NavigationProp } from './types'; +import type { NavigationEventEmitter } from './useEventEmitter'; +declare type Options> = { + state: State; + getState: () => State; + navigation: NavigationHelpers & Partial>; + setOptions: (cb: (options: Record) => Record) => void; + router: Router; + emitter: NavigationEventEmitter; +}; +declare type NavigationCache> = Record>; +/** + * Hook to cache navigation objects for each screen in the navigator. + * It's important to cache them to make sure navigation objects don't change between renders. + * This lets us apply optimizations like `React.memo` to minimize re-rendering screens. + */ +export default function useNavigationCache>({ state, getState, navigation, setOptions, router, emitter, }: Options): NavigationCache; +export {}; +//# sourceMappingURL=useNavigationCache.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationCache.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationCache.d.ts.map new file mode 100644 index 00000000..44955cd1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationCache.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useNavigationCache.d.ts","sourceRoot":"","sources":["../../../src/useNavigationCache.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,MAAM,EACP,MAAM,2BAA2B,CAAC;AAInC,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,aAAK,OAAO,CACV,KAAK,SAAS,eAAe,EAC7B,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAClC;IACF,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,MAAM,KAAK,CAAC;IACtB,UAAU,EAAE,iBAAiB,CAAC,aAAa,CAAC,GAC1C,OAAO,CAAC,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAChE,UAAU,EAAE,CACV,EAAE,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC5D,IAAI,CAAC;IACV,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IACxC,OAAO,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;CAC3C,CAAC;AAEF,aAAK,eAAe,CAClB,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAClC,MAAM,CACR,MAAM,EACN,cAAc,CACZ,aAAa,EACb,MAAM,EACN,MAAM,GAAG,SAAS,EAClB,KAAK,EACL,aAAa,EACb,QAAQ,CACT,CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACpC,EACA,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,EACV,MAAM,EACN,OAAO,GACR,EAAE,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,mDAkH1B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationContainerRef.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationContainerRef.d.ts new file mode 100644 index 00000000..18d33f38 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationContainerRef.d.ts @@ -0,0 +1,3 @@ +import type { NavigationContainerRefWithCurrent } from './types'; +export default function useNavigationContainerRef(): NavigationContainerRefWithCurrent; +//# sourceMappingURL=useNavigationContainerRef.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationContainerRef.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationContainerRef.d.ts.map new file mode 100644 index 00000000..e1b2403b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationContainerRef.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useNavigationContainerRef.d.ts","sourceRoot":"","sources":["../../../src/useNavigationContainerRef.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAC;AAEjE,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAC/C,SAAS,SAAS,EAAE,GAAG,eAAe,CAAC,aAAa,KACjD,iCAAiC,CAAC,SAAS,CAAC,CAShD"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationHelpers.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationHelpers.d.ts new file mode 100644 index 00000000..d7a8c112 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationHelpers.d.ts @@ -0,0 +1,113 @@ +import { NavigationAction, NavigationState, ParamListBase, Router } from '@react-navigation/routers'; +import { NavigationHelpers, PrivateValueStore } from './types'; +import type { NavigationEventEmitter } from './useEventEmitter'; +declare type Options = { + id: string | undefined; + onAction: (action: NavigationAction) => boolean; + getState: () => State; + emitter: NavigationEventEmitter; + router: Router; +}; +/** + * Navigation object with helper methods to be used by a navigator. + * This object includes methods for common actions as well as methods the parent screen's navigation object. + */ +export default function useNavigationHelpers void>, Action extends NavigationAction, EventMap extends Record>({ id: navigatorId, onAction, getState, emitter, router, }: Options): { + dispatch(action: Readonly<{ + type: string; + payload?: object | undefined; + source?: string | undefined; + target?: string | undefined; + }> | ((state: Readonly<{ + key: string; + index: number; + routeNames: string[]; + history?: unknown[] | undefined; + routes: (Readonly<{ + key: string; + name: string; + path?: string | undefined; + }> & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | import("@react-navigation/routers").PartialState> | undefined; + })[]; + type: string; + stale: false; + }>) => Readonly<{ + type: string; + payload?: object | undefined; + source?: string | undefined; + target?: string | undefined; + }>)): void; + navigate(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; + navigate(options: RouteName_1 extends unknown ? { + key: string; + params?: object | undefined; + merge?: boolean | undefined; + } | { + name: RouteName_1; + key?: string | undefined; + params: object | undefined; + merge?: boolean | undefined; + } : never): void; + reset(state: Readonly<{ + key: string; + index: number; + routeNames: string[]; + history?: unknown[] | undefined; + routes: (Readonly<{ + key: string; + name: string; + path?: string | undefined; + }> & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | import("@react-navigation/routers").PartialState> | undefined; + })[]; + type: string; + stale: false; + }> | import("@react-navigation/routers").PartialState & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | import("@react-navigation/routers").PartialState> | undefined; + })[]; + type: string; + stale: false; + }>>): void; + goBack(): void; + isFocused(): boolean; + canGoBack(): boolean; + getId(): string | undefined; + getParent | undefined>(id?: string | undefined): T; + getState(): Readonly<{ + key: string; + index: number; + routeNames: string[]; + history?: unknown[] | undefined; + routes: (Readonly<{ + key: string; + name: string; + path?: string | undefined; + }> & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | import("@react-navigation/routers").PartialState> | undefined; + })[]; + type: string; + stale: false; + }>; +} & PrivateValueStore<[ParamListBase, unknown, unknown]> & import("./types").EventEmitter & { + setParams(params: Partial): void; +} & ActionHelpers; +export {}; +//# sourceMappingURL=useNavigationHelpers.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationHelpers.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationHelpers.d.ts.map new file mode 100644 index 00000000..d4c8d3f7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationHelpers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useNavigationHelpers.d.ts","sourceRoot":"","sources":["../../../src/useNavigationHelpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,MAAM,EACP,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAMhE,aAAK,OAAO,CAAC,KAAK,SAAS,eAAe,EAAE,MAAM,SAAS,gBAAgB,IAAI;IAC7E,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC;IAChD,QAAQ,EAAE,MAAM,KAAK,CAAC;IACtB,OAAO,EAAE,sBAAsB,CAAC,GAAG,CAAC,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;CAC/B,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,EAChD,MAAM,SAAS,gBAAgB,EAC/B,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACpC,EACA,EAAE,EAAE,WAAW,EACf,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,MAAM,GACP,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA0ExB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationState.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationState.d.ts new file mode 100644 index 00000000..e935609f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationState.d.ts @@ -0,0 +1,10 @@ +import type { NavigationState, ParamListBase } from '@react-navigation/routers'; +declare type Selector = (state: NavigationState) => T; +/** + * Hook to get a value from the current navigation state using a selector. + * + * @param selector Selector function to get a value from the state. + */ +export default function useNavigationState(selector: Selector): T; +export {}; +//# sourceMappingURL=useNavigationState.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationState.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationState.d.ts.map new file mode 100644 index 00000000..873fdde4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useNavigationState.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useNavigationState.d.ts","sourceRoot":"","sources":["../../../src/useNavigationState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAMhF,aAAK,QAAQ,CAAC,SAAS,SAAS,aAAa,EAAE,CAAC,IAAI,CAClD,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,KAC9B,CAAC,CAAC;AAEP;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,SAAS,SAAS,aAAa,EAAE,CAAC,EAC3E,QAAQ,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,GAC/B,CAAC,CAuBH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnAction.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnAction.d.ts new file mode 100644 index 00000000..d2aa01a3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnAction.d.ts @@ -0,0 +1,26 @@ +import type { NavigationAction, NavigationState, PartialState, Router, RouterConfigOptions } from '@react-navigation/routers'; +import { ChildActionListener, ChildBeforeRemoveListener } from './NavigationBuilderContext'; +import type { EventMapCore } from './types'; +import type { NavigationEventEmitter } from './useEventEmitter'; +declare type Options = { + router: Router; + key?: string; + getState: () => NavigationState; + setState: (state: NavigationState | PartialState) => void; + actionListeners: ChildActionListener[]; + beforeRemoveListeners: Record; + routerConfigOptions: RouterConfigOptions; + emitter: NavigationEventEmitter>; +}; +/** + * Hook to handle actions for a navigator, including state updates and bubbling. + * + * Bubbling an action is achieved in 2 ways: + * 1. To bubble action to parent, we expose the action handler in context and then access the parent context + * 2. To bubble action to child, child adds event listeners subscribing to actions from parent + * + * When the action handler handles as action, it returns `true`, otherwise `false`. + */ +export default function useOnAction({ router, getState, setState, key, actionListeners, beforeRemoveListeners, routerConfigOptions, emitter, }: Options): (action: NavigationAction, visitedNavigators?: Set) => boolean; +export {}; +//# sourceMappingURL=useOnAction.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnAction.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnAction.d.ts.map new file mode 100644 index 00000000..e2d8ab0a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnAction.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useOnAction.d.ts","sourceRoot":"","sources":["../../../src/useOnAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,MAAM,EACN,mBAAmB,EACpB,MAAM,2BAA2B,CAAC;AAGnC,OAAiC,EAC/B,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAGhE,aAAK,OAAO,GAAG;IACb,MAAM,EAAE,MAAM,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,eAAe,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IAC3E,eAAe,EAAE,mBAAmB,EAAE,CAAC;IACvC,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,SAAS,CAAC,CAAC;IAC7E,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;CACpD,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,GAAG,EACH,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,OAAO,GACR,EAAE,OAAO,YAiBI,gBAAgB,sBACL,IAAI,MAAM,CAAC,aAqGnC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnGetState.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnGetState.d.ts new file mode 100644 index 00000000..3bb650fd --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnGetState.d.ts @@ -0,0 +1,9 @@ +import type { NavigationState } from '@react-navigation/routers'; +import { GetStateListener } from './NavigationBuilderContext'; +declare type Options = { + getState: () => NavigationState; + getStateListeners: Record; +}; +export default function useOnGetState({ getState, getStateListeners, }: Options): void; +export {}; +//# sourceMappingURL=useOnGetState.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnGetState.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnGetState.d.ts.map new file mode 100644 index 00000000..577d832e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnGetState.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useOnGetState.d.ts","sourceRoot":"","sources":["../../../src/useOnGetState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAIjE,OAAiC,EAC/B,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AAGpC,aAAK,OAAO,GAAG;IACb,QAAQ,EAAE,MAAM,eAAe,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,SAAS,CAAC,CAAC;CACjE,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,QAAQ,EACR,iBAAiB,GAClB,EAAE,OAAO,QA6BT"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnPreventRemove.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnPreventRemove.d.ts new file mode 100644 index 00000000..7e02ce05 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnPreventRemove.d.ts @@ -0,0 +1,17 @@ +import type { NavigationAction, NavigationState } from '@react-navigation/routers'; +import { ChildBeforeRemoveListener } from './NavigationBuilderContext'; +import type { EventMapCore } from './types'; +import type { NavigationEventEmitter } from './useEventEmitter'; +declare type Options = { + getState: () => NavigationState; + emitter: NavigationEventEmitter>; + beforeRemoveListeners: Record; +}; +export declare const shouldPreventRemove: (emitter: NavigationEventEmitter>, beforeRemoveListeners: Record, currentRoutes: { + key: string; +}[], nextRoutes: { + key?: string | undefined; +}[], action: NavigationAction) => boolean; +export default function useOnPreventRemove({ getState, emitter, beforeRemoveListeners, }: Options): void; +export {}; +//# sourceMappingURL=useOnPreventRemove.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnPreventRemove.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnPreventRemove.d.ts.map new file mode 100644 index 00000000..7115f0c9 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnPreventRemove.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useOnPreventRemove.d.ts","sourceRoot":"","sources":["../../../src/useOnPreventRemove.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EAChB,MAAM,2BAA2B,CAAC;AAGnC,OAAiC,EAC/B,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,aAAK,OAAO,GAAG;IACb,QAAQ,EAAE,MAAM,eAAe,CAAC;IAChC,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACnD,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,SAAS,CAAC,CAAC;CAC9E,CAAC;AAIF,eAAO,MAAM,mBAAmB,YACrB,uBAAuB,aAAa,GAAG,CAAC,CAAC,yBAC3B,OAAO,MAAM,EAAE,yBAAyB,GAAG,SAAS,CAAC,iBAC7D;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,cACpB;IAAE,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,EAAE,UAClC,gBAAgB,YA8CzB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,QAAQ,EACR,OAAO,EACP,qBAAqB,GACtB,EAAE,OAAO,QAoBT"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnRouteFocus.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnRouteFocus.d.ts new file mode 100644 index 00000000..6407c20c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnRouteFocus.d.ts @@ -0,0 +1,15 @@ +import type { NavigationAction, NavigationState, Router } from '@react-navigation/routers'; +declare type Options = { + router: Router; + getState: () => NavigationState; + setState: (state: NavigationState) => void; + key?: string; +}; +/** + * Hook to handle focus actions for a route. + * Focus action needs to be treated specially, coz when a nested route is focused, + * the parent navigators also needs to be focused. + */ +export default function useOnRouteFocus({ router, getState, key: sourceRouteKey, setState, }: Options): (key: string) => void; +export {}; +//# sourceMappingURL=useOnRouteFocus.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnRouteFocus.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnRouteFocus.d.ts.map new file mode 100644 index 00000000..dabe0a04 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOnRouteFocus.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useOnRouteFocus.d.ts","sourceRoot":"","sources":["../../../src/useOnRouteFocus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,MAAM,EACP,MAAM,2BAA2B,CAAC;AAKnC,aAAK,OAAO,CAAC,MAAM,SAAS,gBAAgB,IAAI;IAC9C,MAAM,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IACxC,QAAQ,EAAE,MAAM,eAAe,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,MAAM,SAAS,gBAAgB,EAAE,EACvE,MAAM,EACN,QAAQ,EACR,GAAG,EAAE,cAAc,EACnB,QAAQ,GACT,EAAE,OAAO,CAAC,MAAM,CAAC,SAMR,MAAM,UAcf"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOptionsGetters.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOptionsGetters.d.ts new file mode 100644 index 00000000..ef3e2363 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOptionsGetters.d.ts @@ -0,0 +1,13 @@ +import type { ParamListBase } from '@react-navigation/routers'; +import type { NavigationProp } from './types'; +declare type Options = { + key?: string; + navigation?: NavigationProp; + options?: object | undefined; +}; +export default function useOptionsGetters({ key, options, navigation, }: Options): { + addOptionsGetter: (key: string, getter: () => object | undefined | null) => () => void; + getCurrentOptions: () => object | null | undefined; +}; +export {}; +//# sourceMappingURL=useOptionsGetters.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOptionsGetters.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOptionsGetters.d.ts.map new file mode 100644 index 00000000..300632d4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useOptionsGetters.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useOptionsGetters.d.ts","sourceRoot":"","sources":["../../../src/useOptionsGetters.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAK/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,aAAK,OAAO,GAAG;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,GAAG,EACH,OAAO,EACP,UAAU,GACX,EAAE,OAAO;4BA+DA,MAAM,UAAU,MAAM,MAAM,GAAG,SAAS,GAAG,IAAI;;EAiBxD"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemove.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemove.d.ts new file mode 100644 index 00000000..50637628 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemove.d.ts @@ -0,0 +1,13 @@ +import type { NavigationAction } from '@react-navigation/routers'; +/** + * Hook to prevent screen from being removed. Can be used to prevent users from leaving the screen. + * + * @param preventRemove Boolean indicating whether to prevent screen from being removed. + * @param callback Function which is executed when screen was prevented from being removed. + */ +export default function usePreventRemove(preventRemove: boolean, callback: (options: { + data: { + action: NavigationAction; + }; +}) => void): void; +//# sourceMappingURL=usePreventRemove.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemove.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemove.d.ts.map new file mode 100644 index 00000000..e91d2792 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemove.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"usePreventRemove.d.ts","sourceRoot":"","sources":["../../../src/usePreventRemove.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAUlE;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,aAAa,EAAE,OAAO,EACtB,QAAQ,EAAE,CAAC,OAAO,EAAE;IAAE,IAAI,EAAE;QAAE,MAAM,EAAE,gBAAgB,CAAA;KAAE,CAAA;CAAE,KAAK,IAAI,QAgCpE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemoveContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemoveContext.d.ts new file mode 100644 index 00000000..93228299 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemoveContext.d.ts @@ -0,0 +1,5 @@ +export default function usePreventRemoveContext(): { + preventedRoutes: import("./PreventRemoveContext").PreventedRoutes; + setPreventRemove: (id: string, routeKey: string, preventRemove: boolean) => void; +}; +//# sourceMappingURL=usePreventRemoveContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemoveContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemoveContext.d.ts.map new file mode 100644 index 00000000..038e81dd --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/usePreventRemoveContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"usePreventRemoveContext.d.ts","sourceRoot":"","sources":["../../../src/usePreventRemoveContext.tsx"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,uBAAuB;;;EAU9C"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRegisterNavigator.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRegisterNavigator.d.ts new file mode 100644 index 00000000..2db4a552 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRegisterNavigator.d.ts @@ -0,0 +1,6 @@ +/** + * Register a navigator in the parent context (either a navigation container or a screen). + * This is used to prevent multiple navigators under a single container or screen. + */ +export default function useRegisterNavigator(): string; +//# sourceMappingURL=useRegisterNavigator.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRegisterNavigator.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRegisterNavigator.d.ts.map new file mode 100644 index 00000000..e9677d56 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRegisterNavigator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useRegisterNavigator.d.ts","sourceRoot":"","sources":["../../../src/useRegisterNavigator.tsx"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,WAmB3C"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRoute.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRoute.d.ts new file mode 100644 index 00000000..0d0b33ac --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRoute.d.ts @@ -0,0 +1,9 @@ +import type { ParamListBase } from '@react-navigation/routers'; +import type { RouteProp } from './types'; +/** + * Hook to access the route prop of the parent screen anywhere. + * + * @returns Route prop of the parent screen. + */ +export default function useRoute>(): T; +//# sourceMappingURL=useRoute.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRoute.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRoute.d.ts.map new file mode 100644 index 00000000..0215c478 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRoute.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useRoute.d.ts","sourceRoot":"","sources":["../../../src/useRoute.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAI/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAC,SAAS,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,CAUxE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRouteCache.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRouteCache.d.ts new file mode 100644 index 00000000..4fffcbc0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRouteCache.d.ts @@ -0,0 +1,14 @@ +import type { NavigationState, ParamListBase } from '@react-navigation/routers'; +import type { RouteProp } from './types'; +/** + * Utilites such as `getFocusedRouteNameFromRoute` need to access state. + * So we need a way to suppress the warning for those use cases. + * This is fine since they are internal utilities and this is not public API. + */ +export declare const CHILD_STATE: unique symbol; +/** + * Hook to cache route props for each screen in the navigator. + * This lets add warnings and modifications to the route object but keep references between renders. + */ +export default function useRouteCache(routes: State['routes']): RouteProp[]; +//# sourceMappingURL=useRouteCache.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRouteCache.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRouteCache.d.ts.map new file mode 100644 index 00000000..1dee0c7c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useRouteCache.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useRouteCache.d.ts","sourceRoot":"","sources":["../../../src/useRouteCache.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EAEd,MAAM,2BAA2B,CAAC;AAGnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzC;;;;GAIG;AACH,eAAO,MAAM,WAAW,eAAwB,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,SAAS,eAAe,EACjE,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,sCA+BxB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useScheduleUpdate.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useScheduleUpdate.d.ts new file mode 100644 index 00000000..9c914cc3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useScheduleUpdate.d.ts @@ -0,0 +1,14 @@ +import * as React from 'react'; +export declare const ScheduleUpdateContext: React.Context<{ + scheduleUpdate: (callback: () => void) => void; + flushUpdates: () => void; +}>; +/** + * When screen config changes, we want to update the navigator in the same update phase. + * However, navigation state is in the root component and React won't let us update it from a child. + * This is a workaround for that, the scheduled update is stored in the ref without actually calling setState. + * It lets all subsequent updates access the latest state so it stays correct. + * Then we call setState during after the component updates. + */ +export default function useScheduleUpdate(callback: () => void): void; +//# sourceMappingURL=useScheduleUpdate.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useScheduleUpdate.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useScheduleUpdate.d.ts.map new file mode 100644 index 00000000..7bc02bb7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useScheduleUpdate.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useScheduleUpdate.d.ts","sourceRoot":"","sources":["../../../src/useScheduleUpdate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,eAAO,MAAM,qBAAqB;+BACL,MAAM,IAAI,KAAK,IAAI;kBAChC,MAAM,IAAI;EAQxB,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI,QAQ7D"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useSyncState.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useSyncState.d.ts new file mode 100644 index 00000000..5bab8398 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useSyncState.d.ts @@ -0,0 +1,5 @@ +/** + * This is definitely not compatible with concurrent mode, but we don't have a solution for sync state yet. + */ +export default function useSyncState(initialState?: (() => T) | T): readonly [T, () => T, (state: T) => void, (callback: () => void) => void, () => void]; +//# sourceMappingURL=useSyncState.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useSyncState.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useSyncState.d.ts.map new file mode 100644 index 00000000..1748b00b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/useSyncState.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useSyncState.d.ts","sourceRoot":"","sources":["../../../src/useSyncState.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,CAAC,EAAE,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,iCAuBvB,CAAC,sBAYQ,MAAM,IAAI,uBA+B/D"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/validatePathConfig.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/validatePathConfig.d.ts new file mode 100644 index 00000000..71167ce5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/validatePathConfig.d.ts @@ -0,0 +1,2 @@ +export default function validatePathConfig(config: any, root?: boolean): void; +//# sourceMappingURL=validatePathConfig.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/validatePathConfig.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/validatePathConfig.d.ts.map new file mode 100644 index 00000000..2d119104 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/lib/typescript/src/validatePathConfig.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"validatePathConfig.d.ts","sourceRoot":"","sources":["../../../src/validatePathConfig.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,UAAO,QA4BlE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/index.d.ts b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/index.d.ts new file mode 100644 index 00000000..7d34edc7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/index.d.ts @@ -0,0 +1,18 @@ +/** +Escape RegExp special characters. + +You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class. + +@example +``` +import escapeStringRegexp = require('escape-string-regexp'); + +const escapedString = escapeStringRegexp('How much $ for a 🦄?'); +//=> 'How much \\$ for a 🦄\\?' + +new RegExp(escapedString); +``` +*/ +declare const escapeStringRegexp: (string: string) => string; + +export = escapeStringRegexp; diff --git a/iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/index.js b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/index.js new file mode 100644 index 00000000..387c5615 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/index.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = string => { + if (typeof string !== 'string') { + throw new TypeError('Expected a string'); + } + + // Escape characters with special meaning either inside or outside character sets. + // Use a simple backslash escape when it’s always valid, and a \unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar. + return string + .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&') + .replace(/-/g, '\\x2d'); +}; diff --git a/iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/license b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/license new file mode 100644 index 00000000..fa7ceba3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/package.json b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/package.json new file mode 100644 index 00000000..c6eb4a91 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/package.json @@ -0,0 +1,38 @@ +{ + "name": "escape-string-regexp", + "version": "4.0.0", + "description": "Escape RegExp special characters", + "license": "MIT", + "repository": "sindresorhus/escape-string-regexp", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "escape", + "regex", + "regexp", + "regular", + "expression", + "string", + "special", + "characters" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.11.0", + "xo": "^0.28.3" + } +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/readme.md b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/readme.md new file mode 100644 index 00000000..2945dfcb --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/escape-string-regexp/readme.md @@ -0,0 +1,34 @@ +# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp) + +> Escape RegExp special characters + +## Install + +``` +$ npm install escape-string-regexp +``` + +## Usage + +```js +const escapeStringRegexp = require('escape-string-regexp'); + +const escapedString = escapeStringRegexp('How much $ for a 🦄?'); +//=> 'How much \\$ for a 🦄\\?' + +new RegExp(escapedString); +``` + +You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class. + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/LICENSE b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/LICENSE new file mode 100644 index 00000000..b96dcb04 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/README.md b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/README.md new file mode 100644 index 00000000..d2559776 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/README.md @@ -0,0 +1,104 @@ +# `react-is` + +This package allows you to test arbitrary values and see if they're a particular React element type. + +## Installation + +```sh +# Yarn +yarn add react-is + +# NPM +npm install react-is +``` + +## Usage + +### Determining if a Component is Valid + +```js +import React from "react"; +import * as ReactIs from "react-is"; + +class ClassComponent extends React.Component { + render() { + return React.createElement("div"); + } +} + +const FunctionComponent = () => React.createElement("div"); + +const ForwardRefComponent = React.forwardRef((props, ref) => + React.createElement(Component, { forwardedRef: ref, ...props }) +); + +const Context = React.createContext(false); + +ReactIs.isValidElementType("div"); // true +ReactIs.isValidElementType(ClassComponent); // true +ReactIs.isValidElementType(FunctionComponent); // true +ReactIs.isValidElementType(ForwardRefComponent); // true +ReactIs.isValidElementType(Context.Provider); // true +ReactIs.isValidElementType(Context.Consumer); // true +ReactIs.isValidElementType(React.createFactory("div")); // true +``` + +### Determining an Element's Type + +#### Context + +```js +import React from "react"; +import * as ReactIs from 'react-is'; + +const ThemeContext = React.createContext("blue"); + +ReactIs.isContextConsumer(); // true +ReactIs.isContextProvider(); // true +ReactIs.typeOf() === ReactIs.ContextProvider; // true +ReactIs.typeOf() === ReactIs.ContextConsumer; // true +``` + +#### Element + +```js +import React from "react"; +import * as ReactIs from 'react-is'; + +ReactIs.isElement(
); // true +ReactIs.typeOf(
) === ReactIs.Element; // true +``` + +#### Fragment + +```js +import React from "react"; +import * as ReactIs from 'react-is'; + +ReactIs.isFragment(<>); // true +ReactIs.typeOf(<>) === ReactIs.Fragment; // true +``` + +#### Portal + +```js +import React from "react"; +import ReactDOM from "react-dom"; +import * as ReactIs from 'react-is'; + +const div = document.createElement("div"); +const portal = ReactDOM.createPortal(
, div); + +ReactIs.isPortal(portal); // true +ReactIs.typeOf(portal) === ReactIs.Portal; // true +``` + +#### StrictMode + +```js +import React from "react"; +import * as ReactIs from 'react-is'; + +ReactIs.isStrictMode(); // true +ReactIs.typeOf() === ReactIs.StrictMode; // true +``` diff --git a/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/build-info.json b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/build-info.json new file mode 100644 index 00000000..4094da67 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/build-info.json @@ -0,0 +1,8 @@ +{ + "branch": "pull/18344", + "buildNumber": "106499", + "checksum": "7fe5a2e", + "commit": "da834083c", + "environment": "ci", + "reactVersion": "16.12.0-da834083c" +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/cjs/react-is.development.js b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/cjs/react-is.development.js new file mode 100644 index 00000000..8a80b768 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/cjs/react-is.development.js @@ -0,0 +1,181 @@ +/** @license React v16.13.1 + * react-is.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + + + +if (process.env.NODE_ENV !== "production") { + (function() { +'use strict'; + +// The Symbol used to tag the ReactElement-like types. If there is no native Symbol +// nor polyfill, then a plain number is used for performance. +var hasSymbol = typeof Symbol === 'function' && Symbol.for; +var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; +var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; +var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; +var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; +var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; +var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; +var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary +// (unstable) APIs that have been removed. Can we remove the symbols? + +var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; +var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; +var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; +var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; +var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; +var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; +var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; +var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; +var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; +var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; +var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + +function isValidElementType(type) { + return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); +} + +function typeOf(object) { + if (typeof object === 'object' && object !== null) { + var $$typeof = object.$$typeof; + + switch ($$typeof) { + case REACT_ELEMENT_TYPE: + var type = object.type; + + switch (type) { + case REACT_ASYNC_MODE_TYPE: + case REACT_CONCURRENT_MODE_TYPE: + case REACT_FRAGMENT_TYPE: + case REACT_PROFILER_TYPE: + case REACT_STRICT_MODE_TYPE: + case REACT_SUSPENSE_TYPE: + return type; + + default: + var $$typeofType = type && type.$$typeof; + + switch ($$typeofType) { + case REACT_CONTEXT_TYPE: + case REACT_FORWARD_REF_TYPE: + case REACT_LAZY_TYPE: + case REACT_MEMO_TYPE: + case REACT_PROVIDER_TYPE: + return $$typeofType; + + default: + return $$typeof; + } + + } + + case REACT_PORTAL_TYPE: + return $$typeof; + } + } + + return undefined; +} // AsyncMode is deprecated along with isAsyncMode + +var AsyncMode = REACT_ASYNC_MODE_TYPE; +var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; +var ContextConsumer = REACT_CONTEXT_TYPE; +var ContextProvider = REACT_PROVIDER_TYPE; +var Element = REACT_ELEMENT_TYPE; +var ForwardRef = REACT_FORWARD_REF_TYPE; +var Fragment = REACT_FRAGMENT_TYPE; +var Lazy = REACT_LAZY_TYPE; +var Memo = REACT_MEMO_TYPE; +var Portal = REACT_PORTAL_TYPE; +var Profiler = REACT_PROFILER_TYPE; +var StrictMode = REACT_STRICT_MODE_TYPE; +var Suspense = REACT_SUSPENSE_TYPE; +var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated + +function isAsyncMode(object) { + { + if (!hasWarnedAboutDeprecatedIsAsyncMode) { + hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint + + console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); + } + } + + return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; +} +function isConcurrentMode(object) { + return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; +} +function isContextConsumer(object) { + return typeOf(object) === REACT_CONTEXT_TYPE; +} +function isContextProvider(object) { + return typeOf(object) === REACT_PROVIDER_TYPE; +} +function isElement(object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; +} +function isForwardRef(object) { + return typeOf(object) === REACT_FORWARD_REF_TYPE; +} +function isFragment(object) { + return typeOf(object) === REACT_FRAGMENT_TYPE; +} +function isLazy(object) { + return typeOf(object) === REACT_LAZY_TYPE; +} +function isMemo(object) { + return typeOf(object) === REACT_MEMO_TYPE; +} +function isPortal(object) { + return typeOf(object) === REACT_PORTAL_TYPE; +} +function isProfiler(object) { + return typeOf(object) === REACT_PROFILER_TYPE; +} +function isStrictMode(object) { + return typeOf(object) === REACT_STRICT_MODE_TYPE; +} +function isSuspense(object) { + return typeOf(object) === REACT_SUSPENSE_TYPE; +} + +exports.AsyncMode = AsyncMode; +exports.ConcurrentMode = ConcurrentMode; +exports.ContextConsumer = ContextConsumer; +exports.ContextProvider = ContextProvider; +exports.Element = Element; +exports.ForwardRef = ForwardRef; +exports.Fragment = Fragment; +exports.Lazy = Lazy; +exports.Memo = Memo; +exports.Portal = Portal; +exports.Profiler = Profiler; +exports.StrictMode = StrictMode; +exports.Suspense = Suspense; +exports.isAsyncMode = isAsyncMode; +exports.isConcurrentMode = isConcurrentMode; +exports.isContextConsumer = isContextConsumer; +exports.isContextProvider = isContextProvider; +exports.isElement = isElement; +exports.isForwardRef = isForwardRef; +exports.isFragment = isFragment; +exports.isLazy = isLazy; +exports.isMemo = isMemo; +exports.isPortal = isPortal; +exports.isProfiler = isProfiler; +exports.isStrictMode = isStrictMode; +exports.isSuspense = isSuspense; +exports.isValidElementType = isValidElementType; +exports.typeOf = typeOf; + })(); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/cjs/react-is.production.min.js b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/cjs/react-is.production.min.js new file mode 100644 index 00000000..3e83c7ab --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/cjs/react-is.production.min.js @@ -0,0 +1,15 @@ +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict';var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b? +Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119; +function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d; +exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t}; +exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p}; +exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z; diff --git a/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/index.js b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/index.js new file mode 100644 index 00000000..3ae098d0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/index.js @@ -0,0 +1,7 @@ +'use strict'; + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./cjs/react-is.production.min.js'); +} else { + module.exports = require('./cjs/react-is.development.js'); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/package.json b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/package.json new file mode 100644 index 00000000..5f32de2e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/package.json @@ -0,0 +1,27 @@ +{ + "name": "react-is", + "version": "16.13.1", + "description": "Brand checking of React Elements.", + "main": "index.js", + "repository": { + "type": "git", + "url": "https://github.com/facebook/react.git", + "directory": "packages/react-is" + }, + "keywords": [ + "react" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/facebook/react/issues" + }, + "homepage": "https://reactjs.org/", + "files": [ + "LICENSE", + "README.md", + "build-info.json", + "index.js", + "cjs/", + "umd/" + ] +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/umd/react-is.development.js b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/umd/react-is.development.js new file mode 100644 index 00000000..a6bc018a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/umd/react-is.development.js @@ -0,0 +1,181 @@ +/** @license React v16.13.1 + * react-is.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = global || self, factory(global.ReactIs = {})); +}(this, (function (exports) { 'use strict'; + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + + function isValidElementType(type) { + return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); + } + + function typeOf(object) { + if (typeof object === 'object' && object !== null) { + var $$typeof = object.$$typeof; + + switch ($$typeof) { + case REACT_ELEMENT_TYPE: + var type = object.type; + + switch (type) { + case REACT_ASYNC_MODE_TYPE: + case REACT_CONCURRENT_MODE_TYPE: + case REACT_FRAGMENT_TYPE: + case REACT_PROFILER_TYPE: + case REACT_STRICT_MODE_TYPE: + case REACT_SUSPENSE_TYPE: + return type; + + default: + var $$typeofType = type && type.$$typeof; + + switch ($$typeofType) { + case REACT_CONTEXT_TYPE: + case REACT_FORWARD_REF_TYPE: + case REACT_LAZY_TYPE: + case REACT_MEMO_TYPE: + case REACT_PROVIDER_TYPE: + return $$typeofType; + + default: + return $$typeof; + } + + } + + case REACT_PORTAL_TYPE: + return $$typeof; + } + } + + return undefined; + } // AsyncMode is deprecated along with isAsyncMode + + var AsyncMode = REACT_ASYNC_MODE_TYPE; + var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; + var ContextConsumer = REACT_CONTEXT_TYPE; + var ContextProvider = REACT_PROVIDER_TYPE; + var Element = REACT_ELEMENT_TYPE; + var ForwardRef = REACT_FORWARD_REF_TYPE; + var Fragment = REACT_FRAGMENT_TYPE; + var Lazy = REACT_LAZY_TYPE; + var Memo = REACT_MEMO_TYPE; + var Portal = REACT_PORTAL_TYPE; + var Profiler = REACT_PROFILER_TYPE; + var StrictMode = REACT_STRICT_MODE_TYPE; + var Suspense = REACT_SUSPENSE_TYPE; + var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated + + function isAsyncMode(object) { + { + if (!hasWarnedAboutDeprecatedIsAsyncMode) { + hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint + + console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); + } + } + + return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; + } + function isConcurrentMode(object) { + return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; + } + function isContextConsumer(object) { + return typeOf(object) === REACT_CONTEXT_TYPE; + } + function isContextProvider(object) { + return typeOf(object) === REACT_PROVIDER_TYPE; + } + function isElement(object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + function isForwardRef(object) { + return typeOf(object) === REACT_FORWARD_REF_TYPE; + } + function isFragment(object) { + return typeOf(object) === REACT_FRAGMENT_TYPE; + } + function isLazy(object) { + return typeOf(object) === REACT_LAZY_TYPE; + } + function isMemo(object) { + return typeOf(object) === REACT_MEMO_TYPE; + } + function isPortal(object) { + return typeOf(object) === REACT_PORTAL_TYPE; + } + function isProfiler(object) { + return typeOf(object) === REACT_PROFILER_TYPE; + } + function isStrictMode(object) { + return typeOf(object) === REACT_STRICT_MODE_TYPE; + } + function isSuspense(object) { + return typeOf(object) === REACT_SUSPENSE_TYPE; + } + + exports.AsyncMode = AsyncMode; + exports.ConcurrentMode = ConcurrentMode; + exports.ContextConsumer = ContextConsumer; + exports.ContextProvider = ContextProvider; + exports.Element = Element; + exports.ForwardRef = ForwardRef; + exports.Fragment = Fragment; + exports.Lazy = Lazy; + exports.Memo = Memo; + exports.Portal = Portal; + exports.Profiler = Profiler; + exports.StrictMode = StrictMode; + exports.Suspense = Suspense; + exports.isAsyncMode = isAsyncMode; + exports.isConcurrentMode = isConcurrentMode; + exports.isContextConsumer = isContextConsumer; + exports.isContextProvider = isContextProvider; + exports.isElement = isElement; + exports.isForwardRef = isForwardRef; + exports.isFragment = isFragment; + exports.isLazy = isLazy; + exports.isMemo = isMemo; + exports.isPortal = isPortal; + exports.isProfiler = isProfiler; + exports.isStrictMode = isStrictMode; + exports.isSuspense = isSuspense; + exports.isValidElementType = isValidElementType; + exports.typeOf = typeOf; + +}))); diff --git a/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/umd/react-is.production.min.js b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/umd/react-is.production.min.js new file mode 100644 index 00000000..62fe6b22 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/node_modules/react-is/umd/react-is.production.min.js @@ -0,0 +1,13 @@ +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +'use strict';(function(b,d){"object"===typeof exports&&"undefined"!==typeof module?d(exports):"function"===typeof define&&define.amd?define(["exports"],d):(b=b||self,d(b.ReactIs={}))})(this,function(b){function d(a){if("object"===typeof a&&null!==a){var b=a.$$typeof;switch(b){case r:switch(a=a.type,a){case t:case e:case f:case g:case h:case k:return a;default:switch(a=a&&a.$$typeof,a){case l:case m:case n:case p:case q:return a;default:return b}}case u:return b}}}function v(a){return d(a)===e}var c= +"function"===typeof Symbol&&Symbol.for,r=c?Symbol.for("react.element"):60103,u=c?Symbol.for("react.portal"):60106,f=c?Symbol.for("react.fragment"):60107,h=c?Symbol.for("react.strict_mode"):60108,g=c?Symbol.for("react.profiler"):60114,q=c?Symbol.for("react.provider"):60109,l=c?Symbol.for("react.context"):60110,t=c?Symbol.for("react.async_mode"):60111,e=c?Symbol.for("react.concurrent_mode"):60111,m=c?Symbol.for("react.forward_ref"):60112,k=c?Symbol.for("react.suspense"):60113,w=c?Symbol.for("react.suspense_list"): +60120,p=c?Symbol.for("react.memo"):60115,n=c?Symbol.for("react.lazy"):60116,x=c?Symbol.for("react.block"):60121,y=c?Symbol.for("react.fundamental"):60117,z=c?Symbol.for("react.responder"):60118,A=c?Symbol.for("react.scope"):60119;b.AsyncMode=t;b.ConcurrentMode=e;b.ContextConsumer=l;b.ContextProvider=q;b.Element=r;b.ForwardRef=m;b.Fragment=f;b.Lazy=n;b.Memo=p;b.Portal=u;b.Profiler=g;b.StrictMode=h;b.Suspense=k;b.isAsyncMode=function(a){return v(a)||d(a)===t};b.isConcurrentMode=v;b.isContextConsumer= +function(a){return d(a)===l};b.isContextProvider=function(a){return d(a)===q};b.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===r};b.isForwardRef=function(a){return d(a)===m};b.isFragment=function(a){return d(a)===f};b.isLazy=function(a){return d(a)===n};b.isMemo=function(a){return d(a)===p};b.isPortal=function(a){return d(a)===u};b.isProfiler=function(a){return d(a)===g};b.isStrictMode=function(a){return d(a)===h};b.isSuspense=function(a){return d(a)===k};b.isValidElementType= +function(a){return"string"===typeof a||"function"===typeof a||a===f||a===e||a===g||a===h||a===k||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===n||a.$$typeof===p||a.$$typeof===q||a.$$typeof===l||a.$$typeof===m||a.$$typeof===y||a.$$typeof===z||a.$$typeof===A||a.$$typeof===x)};b.typeOf=d}); diff --git a/iut-expo-starter/node_modules/@react-navigation/core/package.json b/iut-expo-starter/node_modules/@react-navigation/core/package.json new file mode 100644 index 00000000..cf71eca1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/package.json @@ -0,0 +1,74 @@ +{ + "name": "@react-navigation/core", + "description": "Core utilities for building navigators", + "version": "6.4.6", + "keywords": [ + "react", + "react-native", + "react-navigation" + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/react-navigation/react-navigation.git", + "directory": "packages/core" + }, + "bugs": { + "url": "https://github.com/react-navigation/react-navigation/issues" + }, + "homepage": "https://reactnavigation.org", + "main": "lib/commonjs/index.js", + "react-native": "src/index.tsx", + "source": "src/index.tsx", + "module": "lib/module/index.js", + "types": "lib/typescript/src/index.d.ts", + "files": [ + "src", + "lib", + "!**/__tests__" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "prepack": "bob build", + "clean": "del lib" + }, + "dependencies": { + "@react-navigation/routers": "^6.1.6", + "escape-string-regexp": "^4.0.0", + "nanoid": "^3.1.23", + "query-string": "^7.1.3", + "react-is": "^16.13.0", + "use-latest-callback": "^0.1.5" + }, + "devDependencies": { + "@testing-library/react-native": "^11.5.0", + "@types/react": "~18.0.0", + "@types/react-is": "^17.0.0", + "del-cli": "^3.0.1", + "immer": "^9.0.2", + "react": "18.0.0", + "react-native-builder-bob": "^0.20.3", + "react-test-renderer": "18.0.0", + "typescript": "^4.7.4" + }, + "peerDependencies": { + "react": "*" + }, + "react-native-builder-bob": { + "source": "src", + "output": "lib", + "targets": [ + "commonjs", + "module", + [ + "typescript", + { + "project": "tsconfig.build.json" + } + ] + ] + }, + "gitHead": "f93576624282c3d65e359cca2826749f56221e8c" +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/BaseNavigationContainer.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/BaseNavigationContainer.tsx new file mode 100644 index 00000000..4ab6cca4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/BaseNavigationContainer.tsx @@ -0,0 +1,453 @@ +import { + CommonActions, + InitialState, + NavigationAction, + NavigationState, + ParamListBase, + PartialState, + Route, +} from '@react-navigation/routers'; +import * as React from 'react'; + +import checkDuplicateRouteNames from './checkDuplicateRouteNames'; +import checkSerializable from './checkSerializable'; +import { NOT_INITIALIZED_ERROR } from './createNavigationContainerRef'; +import EnsureSingleNavigator from './EnsureSingleNavigator'; +import findFocusedRoute from './findFocusedRoute'; +import NavigationBuilderContext from './NavigationBuilderContext'; +import NavigationContainerRefContext from './NavigationContainerRefContext'; +import NavigationContext from './NavigationContext'; +import NavigationRouteContext from './NavigationRouteContext'; +import NavigationStateContext from './NavigationStateContext'; +import type { + NavigationContainerEventMap, + NavigationContainerProps, + NavigationContainerRef, +} from './types'; +import UnhandledActionContext from './UnhandledActionContext'; +import useChildListeners from './useChildListeners'; +import useEventEmitter from './useEventEmitter'; +import useKeyedChildListeners from './useKeyedChildListeners'; +import useOptionsGetters from './useOptionsGetters'; +import { ScheduleUpdateContext } from './useScheduleUpdate'; +import useSyncState from './useSyncState'; + +type State = NavigationState | PartialState | undefined; + +const serializableWarnings: string[] = []; +const duplicateNameWarnings: string[] = []; + +/** + * Remove `key` and `routeNames` from the state objects recursively to get partial state. + * + * @param state Initial state object. + */ +const getPartialState = ( + state: InitialState | undefined +): PartialState | undefined => { + if (state === undefined) { + return; + } + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { key, routeNames, ...partialState } = state; + + return { + ...partialState, + stale: true, + routes: state.routes.map((route) => { + if (route.state === undefined) { + return route as Route & { + state?: PartialState; + }; + } + + return { ...route, state: getPartialState(route.state) }; + }), + }; +}; + +/** + * Container component which holds the navigation state. + * This should be rendered at the root wrapping the whole app. + * + * @param props.initialState Initial state object for the navigation tree. + * @param props.onStateChange Callback which is called with the latest navigation state when it changes. + * @param props.children Child elements to render the content. + * @param props.ref Ref object which refers to the navigation object containing helper methods. + */ +const BaseNavigationContainer = React.forwardRef( + function BaseNavigationContainer( + { + initialState, + onStateChange, + onUnhandledAction, + independent, + children, + }: NavigationContainerProps, + ref?: React.Ref> + ) { + const parent = React.useContext(NavigationStateContext); + + if (!parent.isDefault && !independent) { + throw new Error( + "Looks like you have nested a 'NavigationContainer' inside another. Normally you need only one container at the root of the app, so this was probably an error. If this was intentional, pass 'independent={true}' explicitly. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them." + ); + } + + const [state, getState, setState, scheduleUpdate, flushUpdates] = + useSyncState(() => + getPartialState(initialState == null ? undefined : initialState) + ); + + const isFirstMountRef = React.useRef(true); + + const navigatorKeyRef = React.useRef(); + + const getKey = React.useCallback(() => navigatorKeyRef.current, []); + + const setKey = React.useCallback((key: string) => { + navigatorKeyRef.current = key; + }, []); + + const { listeners, addListener } = useChildListeners(); + + const { keyedListeners, addKeyedListener } = useKeyedChildListeners(); + + const dispatch = React.useCallback( + ( + action: + | NavigationAction + | ((state: NavigationState) => NavigationAction) + ) => { + if (listeners.focus[0] == null) { + console.error(NOT_INITIALIZED_ERROR); + } else { + listeners.focus[0]((navigation) => navigation.dispatch(action)); + } + }, + [listeners.focus] + ); + + const canGoBack = React.useCallback(() => { + if (listeners.focus[0] == null) { + return false; + } + + const { result, handled } = listeners.focus[0]((navigation) => + navigation.canGoBack() + ); + + if (handled) { + return result; + } else { + return false; + } + }, [listeners.focus]); + + const resetRoot = React.useCallback( + (state?: PartialState | NavigationState) => { + const target = state?.key ?? keyedListeners.getState.root?.().key; + + if (target == null) { + console.error(NOT_INITIALIZED_ERROR); + } else { + listeners.focus[0]((navigation) => + navigation.dispatch({ + ...CommonActions.reset(state), + target, + }) + ); + } + }, + [keyedListeners.getState, listeners.focus] + ); + + const getRootState = React.useCallback(() => { + return keyedListeners.getState.root?.(); + }, [keyedListeners.getState]); + + const getCurrentRoute = React.useCallback(() => { + const state = getRootState(); + + if (state == null) { + return undefined; + } + + const route = findFocusedRoute(state); + + return route as Route | undefined; + }, [getRootState]); + + const emitter = useEventEmitter(); + + const { addOptionsGetter, getCurrentOptions } = useOptionsGetters({}); + + const navigation: NavigationContainerRef = React.useMemo( + () => ({ + ...Object.keys(CommonActions).reduce((acc, name) => { + acc[name] = (...args: any[]) => + // @ts-expect-error: this is ok + dispatch(CommonActions[name](...args)); + return acc; + }, {}), + ...emitter.create('root'), + dispatch, + resetRoot, + isFocused: () => true, + canGoBack, + getParent: () => undefined, + getState: () => stateRef.current, + getRootState, + getCurrentRoute, + getCurrentOptions, + isReady: () => listeners.focus[0] != null, + }), + [ + canGoBack, + dispatch, + emitter, + getCurrentOptions, + getCurrentRoute, + getRootState, + listeners.focus, + resetRoot, + ] + ); + + React.useImperativeHandle(ref, () => navigation, [navigation]); + + const onDispatchAction = React.useCallback( + (action: NavigationAction, noop: boolean) => { + emitter.emit({ + type: '__unsafe_action__', + data: { action, noop, stack: stackRef.current }, + }); + }, + [emitter] + ); + + const lastEmittedOptionsRef = React.useRef(); + + const onOptionsChange = React.useCallback( + (options: object) => { + if (lastEmittedOptionsRef.current === options) { + return; + } + + lastEmittedOptionsRef.current = options; + + emitter.emit({ + type: 'options', + data: { options }, + }); + }, + [emitter] + ); + + const stackRef = React.useRef(); + + const builderContext = React.useMemo( + () => ({ + addListener, + addKeyedListener, + onDispatchAction, + onOptionsChange, + stackRef, + }), + [addListener, addKeyedListener, onDispatchAction, onOptionsChange] + ); + + const scheduleContext = React.useMemo( + () => ({ scheduleUpdate, flushUpdates }), + [scheduleUpdate, flushUpdates] + ); + + const isInitialRef = React.useRef(true); + + const getIsInitial = React.useCallback(() => isInitialRef.current, []); + + const context = React.useMemo( + () => ({ + state, + getState, + setState, + getKey, + setKey, + getIsInitial, + addOptionsGetter, + }), + [ + state, + getState, + setState, + getKey, + setKey, + getIsInitial, + addOptionsGetter, + ] + ); + + const onStateChangeRef = React.useRef(onStateChange); + const stateRef = React.useRef(state); + + React.useEffect(() => { + isInitialRef.current = false; + onStateChangeRef.current = onStateChange; + stateRef.current = state; + }); + + React.useEffect(() => { + const hydratedState = getRootState(); + + if (process.env.NODE_ENV !== 'production') { + if (hydratedState !== undefined) { + const serializableResult = checkSerializable(hydratedState); + + if (!serializableResult.serializable) { + const { location, reason } = serializableResult; + + let path = ''; + let pointer: Record = hydratedState; + let params = false; + + for (let i = 0; i < location.length; i++) { + const curr = location[i]; + const prev = location[i - 1]; + + pointer = pointer[curr]; + + if (!params && curr === 'state') { + continue; + } else if (!params && curr === 'routes') { + if (path) { + path += ' > '; + } + } else if ( + !params && + typeof curr === 'number' && + prev === 'routes' + ) { + path += pointer?.name; + } else if (!params) { + path += ` > ${curr}`; + params = true; + } else { + if (typeof curr === 'number' || /^[0-9]+$/.test(curr)) { + path += `[${curr}]`; + } else if (/^[a-z$_]+$/i.test(curr)) { + path += `.${curr}`; + } else { + path += `[${JSON.stringify(curr)}]`; + } + } + } + + const message = `Non-serializable values were found in the navigation state. Check:\n\n${path} (${reason})\n\nThis can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.`; + + if (!serializableWarnings.includes(message)) { + serializableWarnings.push(message); + console.warn(message); + } + } + + const duplicateRouteNamesResult = + checkDuplicateRouteNames(hydratedState); + + if (duplicateRouteNamesResult.length) { + const message = `Found screens with the same name nested inside one another. Check:\n${duplicateRouteNamesResult.map( + (locations) => `\n${locations.join(', ')}` + )}\n\nThis can cause confusing behavior during navigation. Consider using unique names for each screen instead.`; + + if (!duplicateNameWarnings.includes(message)) { + duplicateNameWarnings.push(message); + console.warn(message); + } + } + } + } + + emitter.emit({ type: 'state', data: { state } }); + + if (!isFirstMountRef.current && onStateChangeRef.current) { + onStateChangeRef.current(hydratedState); + } + + isFirstMountRef.current = false; + }, [getRootState, emitter, state]); + + const defaultOnUnhandledAction = React.useCallback( + (action: NavigationAction) => { + if (process.env.NODE_ENV === 'production') { + return; + } + + const payload: Record | undefined = action.payload; + + let message = `The action '${action.type}'${ + payload ? ` with payload ${JSON.stringify(action.payload)}` : '' + } was not handled by any navigator.`; + + switch (action.type) { + case 'NAVIGATE': + case 'PUSH': + case 'REPLACE': + case 'JUMP_TO': + if (payload?.name) { + message += `\n\nDo you have a screen named '${payload.name}'?\n\nIf you're trying to navigate to a screen in a nested navigator, see https://reactnavigation.org/docs/nesting-navigators#navigating-to-a-screen-in-a-nested-navigator.`; + } else { + message += `\n\nYou need to pass the name of the screen to navigate to.\n\nSee https://reactnavigation.org/docs/navigation-actions for usage.`; + } + + break; + case 'GO_BACK': + case 'POP': + case 'POP_TO_TOP': + message += `\n\nIs there any screen to go back to?`; + break; + case 'OPEN_DRAWER': + case 'CLOSE_DRAWER': + case 'TOGGLE_DRAWER': + message += `\n\nIs your screen inside a Drawer navigator?`; + break; + } + + message += `\n\nThis is a development-only warning and won't be shown in production.`; + + console.error(message); + }, + [] + ); + + let element = ( + + + + + + {children} + + + + + + ); + + if (independent) { + // We need to clear any existing contexts for nested independent container to work correctly + element = ( + + + {element} + + + ); + } + + return element; + } +); + +export default BaseNavigationContainer; diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/CurrentRenderContext.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/CurrentRenderContext.tsx new file mode 100644 index 00000000..2c9f2654 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/CurrentRenderContext.tsx @@ -0,0 +1,11 @@ +import * as React from 'react'; + +/** + * Context which holds the values for the current navigation tree. + * Intended for use in SSR. This is not safe to use on the client. + */ +const CurrentRenderContext = React.createContext< + { options?: object } | undefined +>(undefined); + +export default CurrentRenderContext; diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/EnsureSingleNavigator.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/EnsureSingleNavigator.tsx new file mode 100644 index 00000000..ce5ecdfe --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/EnsureSingleNavigator.tsx @@ -0,0 +1,52 @@ +import * as React from 'react'; + +type Props = { + children: React.ReactNode; +}; + +const MULTIPLE_NAVIGATOR_ERROR = `Another navigator is already registered for this container. You likely have multiple navigators under a single "NavigationContainer" or "Screen". Make sure each navigator is under a separate "Screen" container. See https://reactnavigation.org/docs/nesting-navigators for a guide on nesting.`; + +export const SingleNavigatorContext = React.createContext< + | { + register(key: string): void; + unregister(key: string): void; + } + | undefined +>(undefined); + +/** + * Component which ensures that there's only one navigator nested under it. + */ +export default function EnsureSingleNavigator({ children }: Props) { + const navigatorKeyRef = React.useRef(); + + const value = React.useMemo( + () => ({ + register(key: string) { + const currentKey = navigatorKeyRef.current; + + if (currentKey !== undefined && key !== currentKey) { + throw new Error(MULTIPLE_NAVIGATOR_ERROR); + } + + navigatorKeyRef.current = key; + }, + unregister(key: string) { + const currentKey = navigatorKeyRef.current; + + if (key !== currentKey) { + return; + } + + navigatorKeyRef.current = undefined; + }, + }), + [] + ); + + return ( + + {children} + + ); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/Group.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/Group.tsx new file mode 100644 index 00000000..352ba313 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/Group.tsx @@ -0,0 +1,14 @@ +import type { ParamListBase } from '@react-navigation/routers'; + +import type { RouteGroupConfig } from './types'; + +/** + * Empty component used for grouping screen configs. + */ +export default function Group< + ParamList extends ParamListBase, + ScreenOptions extends {} +>(_: RouteGroupConfig) { + /* istanbul ignore next */ + return null; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationBuilderContext.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationBuilderContext.tsx new file mode 100644 index 00000000..7782953a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationBuilderContext.tsx @@ -0,0 +1,70 @@ +import type { + NavigationAction, + NavigationState, + ParamListBase, +} from '@react-navigation/routers'; +import * as React from 'react'; + +import type { NavigationHelpers } from './types'; + +export type ListenerMap = { + action: ChildActionListener; + focus: FocusedNavigationListener; +}; + +export type KeyedListenerMap = { + getState: GetStateListener; + beforeRemove: ChildBeforeRemoveListener; +}; + +export type AddListener = ( + type: T, + listener: ListenerMap[T] +) => void; + +export type AddKeyedListener = ( + type: T, + key: string, + listener: KeyedListenerMap[T] +) => void; + +export type ChildActionListener = ( + action: NavigationAction, + visitedNavigators?: Set +) => boolean; + +export type FocusedNavigationCallback = ( + navigation: NavigationHelpers +) => T; + +export type FocusedNavigationListener = ( + callback: FocusedNavigationCallback +) => { + handled: boolean; + result: T; +}; + +export type GetStateListener = () => NavigationState; + +export type ChildBeforeRemoveListener = (action: NavigationAction) => boolean; + +/** + * Context which holds the required helpers needed to build nested navigators. + */ +const NavigationBuilderContext = React.createContext<{ + onAction?: ( + action: NavigationAction, + visitedNavigators?: Set + ) => boolean; + addListener?: AddListener; + addKeyedListener?: AddKeyedListener; + onRouteFocus?: (key: string) => void; + onDispatchAction: (action: NavigationAction, noop: boolean) => void; + onOptionsChange: (options: object) => void; + stackRef?: React.MutableRefObject; +}>({ + onDispatchAction: () => undefined, + onOptionsChange: () => undefined, +}); + +export default NavigationBuilderContext; diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationContainerRefContext.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationContainerRefContext.tsx new file mode 100644 index 00000000..b59c918c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationContainerRefContext.tsx @@ -0,0 +1,13 @@ +import type { ParamListBase } from '@react-navigation/routers'; +import * as React from 'react'; + +import type { NavigationContainerRef } from './types'; + +/** + * Context which holds the route prop for a screen. + */ +const NavigationContainerRefContext = React.createContext< + NavigationContainerRef | undefined +>(undefined); + +export default NavigationContainerRefContext; diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationContext.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationContext.tsx new file mode 100644 index 00000000..a6c92196 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationContext.tsx @@ -0,0 +1,13 @@ +import type { ParamListBase } from '@react-navigation/routers'; +import * as React from 'react'; + +import type { NavigationProp } from './types'; + +/** + * Context which holds the navigation prop for a screen. + */ +const NavigationContext = React.createContext< + NavigationProp | undefined +>(undefined); + +export default NavigationContext; diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationHelpersContext.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationHelpersContext.tsx new file mode 100644 index 00000000..0ea82afb --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationHelpersContext.tsx @@ -0,0 +1,14 @@ +import type { ParamListBase } from '@react-navigation/routers'; +import * as React from 'react'; + +import type { NavigationHelpers } from './types'; + +/** + * Context which holds the navigation helpers of the parent navigator. + * Navigators should use this context in their view component. + */ +const NavigationHelpersContext = React.createContext< + NavigationHelpers | undefined +>(undefined); + +export default NavigationHelpersContext; diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationRouteContext.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationRouteContext.tsx new file mode 100644 index 00000000..e7ecfe96 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationRouteContext.tsx @@ -0,0 +1,11 @@ +import type { Route } from '@react-navigation/routers'; +import * as React from 'react'; + +/** + * Context which holds the route prop for a screen. + */ +const NavigationRouteContext = React.createContext | undefined>( + undefined +); + +export default NavigationRouteContext; diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationStateContext.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationStateContext.tsx new file mode 100644 index 00000000..437de2e7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/NavigationStateContext.tsx @@ -0,0 +1,39 @@ +import type { NavigationState, PartialState } from '@react-navigation/routers'; +import * as React from 'react'; + +const MISSING_CONTEXT_ERROR = + "Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'? See https://reactnavigation.org/docs/getting-started for setup instructions."; + +export default React.createContext<{ + isDefault?: true; + state?: NavigationState | PartialState; + getKey: () => string | undefined; + setKey: (key: string) => void; + getState: () => NavigationState | PartialState | undefined; + setState: ( + state: NavigationState | PartialState | undefined + ) => void; + getIsInitial: () => boolean; + addOptionsGetter?: ( + key: string, + getter: () => object | undefined | null + ) => void; +}>({ + isDefault: true, + + get getKey(): any { + throw new Error(MISSING_CONTEXT_ERROR); + }, + get setKey(): any { + throw new Error(MISSING_CONTEXT_ERROR); + }, + get getState(): any { + throw new Error(MISSING_CONTEXT_ERROR); + }, + get setState(): any { + throw new Error(MISSING_CONTEXT_ERROR); + }, + get getIsInitial(): any { + throw new Error(MISSING_CONTEXT_ERROR); + }, +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/PreventRemoveContext.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/PreventRemoveContext.tsx new file mode 100644 index 00000000..225824da --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/PreventRemoveContext.tsx @@ -0,0 +1,21 @@ +import * as React from 'react'; + +/** + * A type of an object that have a route key as an object key + * and a value whether to prevent that route. + */ +export type PreventedRoutes = Record; + +const PreventRemoveContext = React.createContext< + | { + preventedRoutes: PreventedRoutes; + setPreventRemove: ( + id: string, + routeKey: string, + preventRemove: boolean + ) => void; + } + | undefined +>(undefined); + +export default PreventRemoveContext; diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/PreventRemoveProvider.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/PreventRemoveProvider.tsx new file mode 100644 index 00000000..5380923b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/PreventRemoveProvider.tsx @@ -0,0 +1,126 @@ +import { nanoid } from 'nanoid/non-secure'; +import * as React from 'react'; +import useLatestCallback from 'use-latest-callback'; + +import NavigationHelpersContext from './NavigationHelpersContext'; +import NavigationRouteContext from './NavigationRouteContext'; +import PreventRemoveContext, { PreventedRoutes } from './PreventRemoveContext'; + +type Props = { + children: React.ReactNode; +}; + +type PreventedRoutesMap = Map< + string, + { + routeKey: string; + preventRemove: boolean; + } +>; + +/** + * Util function to transform map of prevented routes to a simpler object. + */ +const transformPreventedRoutes = ( + preventedRoutesMap: PreventedRoutesMap +): PreventedRoutes => { + const preventedRoutesToTransform = [...preventedRoutesMap.values()]; + + const preventedRoutes = preventedRoutesToTransform.reduce( + (acc, { routeKey, preventRemove }) => { + acc[routeKey] = { + preventRemove: acc[routeKey]?.preventRemove || preventRemove, + }; + return acc; + }, + {} + ); + + return preventedRoutes; +}; + +/** + * Component used for managing which routes have to be prevented from removal in native-stack. + */ +export default function PreventRemoveProvider({ children }: Props) { + const [parentId] = React.useState(() => nanoid()); + const [preventedRoutesMap, setPreventedRoutesMap] = + React.useState(new Map()); + + const navigation = React.useContext(NavigationHelpersContext); + const route = React.useContext(NavigationRouteContext); + + const preventRemoveContextValue = React.useContext(PreventRemoveContext); + // take `setPreventRemove` from parent context - if exist it means we're in a nested context + const setParentPrevented = preventRemoveContextValue?.setPreventRemove; + + const setPreventRemove = useLatestCallback( + (id: string, routeKey: string, preventRemove: boolean): void => { + if ( + preventRemove && + (navigation == null || + navigation + ?.getState() + .routes.every((route) => route.key !== routeKey)) + ) { + throw new Error( + `Couldn't find a route with the key ${routeKey}. Is your component inside NavigationContent?` + ); + } + + setPreventedRoutesMap((prevPrevented) => { + // values haven't changed - do nothing + if ( + routeKey === prevPrevented.get(id)?.routeKey && + preventRemove === prevPrevented.get(id)?.preventRemove + ) { + return prevPrevented; + } + + const nextPrevented = new Map(prevPrevented); + + if (preventRemove) { + nextPrevented.set(id, { + routeKey, + preventRemove, + }); + } else { + nextPrevented.delete(id); + } + + return nextPrevented; + }); + } + ); + + const isPrevented = [...preventedRoutesMap.values()].some( + ({ preventRemove }) => preventRemove + ); + + React.useEffect(() => { + if (route?.key !== undefined && setParentPrevented !== undefined) { + // when route is defined (and setParentPrevented) it means we're in a nested stack + // route.key then will be the route key of parent + setParentPrevented(parentId, route.key, isPrevented); + return () => { + setParentPrevented(parentId, route.key, false); + }; + } + + return; + }, [parentId, isPrevented, route?.key, setParentPrevented]); + + const value = React.useMemo( + () => ({ + setPreventRemove, + preventedRoutes: transformPreventedRoutes(preventedRoutesMap), + }), + [setPreventRemove, preventedRoutesMap] + ); + + return ( + + {children} + + ); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/SceneView.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/SceneView.tsx new file mode 100644 index 00000000..4dbd5f17 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/SceneView.tsx @@ -0,0 +1,140 @@ +import type { + NavigationState, + ParamListBase, + PartialState, + Route, +} from '@react-navigation/routers'; +import * as React from 'react'; + +import EnsureSingleNavigator from './EnsureSingleNavigator'; +import NavigationStateContext from './NavigationStateContext'; +import StaticContainer from './StaticContainer'; +import type { NavigationProp, RouteConfigComponent } from './types'; +import useOptionsGetters from './useOptionsGetters'; + +type Props = { + screen: RouteConfigComponent & { name: string }; + navigation: NavigationProp< + ParamListBase, + string, + string | undefined, + State, + ScreenOptions + >; + route: Route; + routeState: NavigationState | PartialState | undefined; + getState: () => State; + setState: (state: State) => void; + options: object; + clearOptions: () => void; +}; + +/** + * Component which takes care of rendering the screen for a route. + * It provides all required contexts and applies optimizations when applicable. + */ +export default function SceneView< + State extends NavigationState, + ScreenOptions extends {} +>({ + screen, + route, + navigation, + routeState, + getState, + setState, + options, + clearOptions, +}: Props) { + const navigatorKeyRef = React.useRef(); + const getKey = React.useCallback(() => navigatorKeyRef.current, []); + + const { addOptionsGetter } = useOptionsGetters({ + key: route.key, + options, + navigation, + }); + + const setKey = React.useCallback((key: string) => { + navigatorKeyRef.current = key; + }, []); + + const getCurrentState = React.useCallback(() => { + const state = getState(); + const currentRoute = state.routes.find((r) => r.key === route.key); + + return currentRoute ? currentRoute.state : undefined; + }, [getState, route.key]); + + const setCurrentState = React.useCallback( + (child: NavigationState | PartialState | undefined) => { + const state = getState(); + + setState({ + ...state, + routes: state.routes.map((r) => + r.key === route.key ? { ...r, state: child } : r + ), + }); + }, + [getState, route.key, setState] + ); + + const isInitialRef = React.useRef(true); + + React.useEffect(() => { + isInitialRef.current = false; + }); + + // Clear options set by this screen when it is unmounted + React.useEffect(() => { + return clearOptions; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + const getIsInitial = React.useCallback(() => isInitialRef.current, []); + + const context = React.useMemo( + () => ({ + state: routeState, + getState: getCurrentState, + setState: setCurrentState, + getKey, + setKey, + getIsInitial, + addOptionsGetter, + }), + [ + routeState, + getCurrentState, + setCurrentState, + getKey, + setKey, + getIsInitial, + addOptionsGetter, + ] + ); + + const ScreenComponent = screen.getComponent + ? screen.getComponent() + : screen.component; + + return ( + + + + {ScreenComponent !== undefined ? ( + + ) : screen.children !== undefined ? ( + screen.children({ navigation, route }) + ) : null} + + + + ); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/Screen.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/Screen.tsx new file mode 100644 index 00000000..4ca43062 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/Screen.tsx @@ -0,0 +1,17 @@ +import type { NavigationState, ParamListBase } from '@react-navigation/routers'; + +import type { EventMapBase, RouteConfig } from './types'; + +/** + * Empty component used for specifying route configuration. + */ +export default function Screen< + ParamList extends ParamListBase, + RouteName extends keyof ParamList, + State extends NavigationState, + ScreenOptions extends {}, + EventMap extends EventMapBase +>(_: RouteConfig) { + /* istanbul ignore next */ + return null; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/StaticContainer.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/StaticContainer.tsx new file mode 100644 index 00000000..05606adf --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/StaticContainer.tsx @@ -0,0 +1,29 @@ +import * as React from 'react'; + +/** + * Component which prevents updates for children if no props changed + */ +function StaticContainer(props: any) { + return props.children; +} + +export default React.memo(StaticContainer, (prevProps: any, nextProps: any) => { + const prevPropKeys = Object.keys(prevProps); + const nextPropKeys = Object.keys(nextProps); + + if (prevPropKeys.length !== nextPropKeys.length) { + return false; + } + + for (const key of prevPropKeys) { + if (key === 'children') { + continue; + } + + if (prevProps[key] !== nextProps[key]) { + return false; + } + } + + return true; +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/UnhandledActionContext.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/UnhandledActionContext.tsx new file mode 100644 index 00000000..b5682aea --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/UnhandledActionContext.tsx @@ -0,0 +1,8 @@ +import type { NavigationAction } from '@react-navigation/routers'; +import * as React from 'react'; + +const UnhandledActionContext = React.createContext< + ((action: NavigationAction) => void) | undefined +>(undefined); + +export default UnhandledActionContext; diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/checkDuplicateRouteNames.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/checkDuplicateRouteNames.tsx new file mode 100644 index 00000000..93650f50 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/checkDuplicateRouteNames.tsx @@ -0,0 +1,33 @@ +import type { NavigationState, PartialState } from '@react-navigation/routers'; + +export default function checkDuplicateRouteNames(state: NavigationState) { + const duplicates: string[][] = []; + + const getRouteNames = ( + location: string, + state: NavigationState | PartialState + ) => { + state.routes.forEach((route: typeof state.routes[0]) => { + const currentLocation = location + ? `${location} > ${route.name}` + : route.name; + + route.state?.routeNames?.forEach((routeName) => { + if (routeName === route.name) { + duplicates.push([ + currentLocation, + `${currentLocation} > ${route.name}`, + ]); + } + }); + + if (route.state) { + getRouteNames(currentLocation, route.state); + } + }); + }; + + getRouteNames('', state); + + return duplicates; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/checkSerializable.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/checkSerializable.tsx new file mode 100644 index 00000000..077daf1a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/checkSerializable.tsx @@ -0,0 +1,74 @@ +const checkSerializableWithoutCircularReference = ( + o: { [key: string]: any }, + seen: Set, + location: (string | number)[] +): + | { serializable: true } + | { + serializable: false; + location: (string | number)[]; + reason: string; + } => { + if ( + o === undefined || + o === null || + typeof o === 'boolean' || + typeof o === 'number' || + typeof o === 'string' + ) { + return { serializable: true }; + } + + if ( + Object.prototype.toString.call(o) !== '[object Object]' && + !Array.isArray(o) + ) { + return { + serializable: false, + location, + reason: typeof o === 'function' ? 'Function' : String(o), + }; + } + + if (seen.has(o)) { + return { + serializable: false, + reason: 'Circular reference', + location, + }; + } + + seen.add(o); + + if (Array.isArray(o)) { + for (let i = 0; i < o.length; i++) { + const childResult = checkSerializableWithoutCircularReference( + o[i], + new Set(seen), + [...location, i] + ); + + if (!childResult.serializable) { + return childResult; + } + } + } else { + for (const key in o) { + const childResult = checkSerializableWithoutCircularReference( + o[key], + new Set(seen), + [...location, key] + ); + + if (!childResult.serializable) { + return childResult; + } + } + } + + return { serializable: true }; +}; + +export default function checkSerializable(o: { [key: string]: any }) { + return checkSerializableWithoutCircularReference(o, new Set(), []); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/createNavigationContainerRef.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/createNavigationContainerRef.tsx new file mode 100644 index 00000000..2fc76fca --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/createNavigationContainerRef.tsx @@ -0,0 +1,99 @@ +import { CommonActions } from '@react-navigation/routers'; + +import type { + NavigationContainerEventMap, + NavigationContainerRef, + NavigationContainerRefWithCurrent, +} from './types'; + +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."; + +export default function createNavigationContainerRef< + ParamList extends {} = ReactNavigation.RootParamList +>(): NavigationContainerRefWithCurrent { + const methods = [ + ...Object.keys(CommonActions), + 'addListener', + 'removeListener', + 'resetRoot', + 'dispatch', + 'isFocused', + 'canGoBack', + 'getRootState', + 'getState', + 'getParent', + 'getCurrentRoute', + 'getCurrentOptions', + ] as const; + + const listeners: Record void)[]> = {}; + + const removeListener = ( + event: string, + callback: (...args: any[]) => void + ) => { + if (listeners[event]) { + listeners[event] = listeners[event].filter((cb) => cb !== callback); + } + }; + + let current: NavigationContainerRef | null = null; + + const ref: NavigationContainerRefWithCurrent = { + get current() { + return current; + }, + set current(value: NavigationContainerRef | null) { + current = value; + + if (value != null) { + Object.entries(listeners).forEach(([event, callbacks]) => { + callbacks.forEach((callback) => { + value.addListener( + event as keyof NavigationContainerEventMap, + callback + ); + }); + }); + } + }, + isReady: () => { + if (current == null) { + return false; + } + + return current.isReady(); + }, + ...methods.reduce((acc, name) => { + acc[name] = (...args: any[]) => { + if (current == null) { + switch (name) { + case 'addListener': { + const [event, callback] = args; + + listeners[event] = listeners[event] || []; + listeners[event].push(callback); + + return () => removeListener(event, callback); + } + case 'removeListener': { + const [event, callback] = args; + + removeListener(event, callback); + break; + } + default: + console.error(NOT_INITIALIZED_ERROR); + } + } else { + // @ts-expect-error: this is ok + return current[name](...args); + } + }; + return acc; + }, {}), + }; + + return ref; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/createNavigatorFactory.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/createNavigatorFactory.tsx new file mode 100644 index 00000000..e367956c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/createNavigatorFactory.tsx @@ -0,0 +1,40 @@ +import type { NavigationState, ParamListBase } from '@react-navigation/routers'; +import type * as React from 'react'; + +import Group from './Group'; +import Screen from './Screen'; +import type { EventMapBase, TypedNavigator } from './types'; + +/** + * Higher order component to create a `Navigator` and `Screen` pair. + * Custom navigators should wrap the navigator component in `createNavigator` before exporting. + * + * @param Navigator The navigtor component to wrap. + * @returns Factory method to create a `Navigator` and `Screen` pair. + */ +export default function createNavigatorFactory< + State extends NavigationState, + ScreenOptions extends {}, + EventMap extends EventMapBase, + NavigatorComponent extends React.ComponentType +>(Navigator: NavigatorComponent) { + return function (): TypedNavigator< + ParamList, + State, + ScreenOptions, + EventMap, + typeof Navigator + > { + if (arguments[0] !== undefined) { + throw new Error( + "Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API? See https://reactnavigation.org/docs/hello-react-navigation for the latest API and guides." + ); + } + + return { + Navigator, + Group, + Screen, + }; + }; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/findFocusedRoute.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/findFocusedRoute.tsx new file mode 100644 index 00000000..099a2458 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/findFocusedRoute.tsx @@ -0,0 +1,13 @@ +import type { InitialState } from '@react-navigation/routers'; + +export default function findFocusedRoute(state: InitialState) { + let current: InitialState | undefined = state; + + while (current?.routes[current.index ?? 0].state != null) { + current = current.routes[current.index ?? 0].state; + } + + const route = current?.routes[current?.index ?? 0]; + + return route; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/fromEntries.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/fromEntries.tsx new file mode 100644 index 00000000..b79fcc14 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/fromEntries.tsx @@ -0,0 +1,13 @@ +// Object.fromEntries is not available in older iOS versions +export default function fromEntries( + entries: (readonly [K, V])[] +) { + return entries.reduce((acc, [k, v]) => { + if (acc.hasOwnProperty(k)) { + throw new Error(`A value for key '${k}' already exists in the object.`); + } + + acc[k] = v; + return acc; + }, {} as Record); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/getActionFromState.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/getActionFromState.tsx new file mode 100644 index 00000000..df79c83a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/getActionFromState.tsx @@ -0,0 +1,154 @@ +import type { + CommonActions, + NavigationState, + ParamListBase, + PartialRoute, + PartialState, + Route, +} from '@react-navigation/routers'; + +import type { NavigatorScreenParams, PathConfig, PathConfigMap } from './types'; + +type ConfigItem = { + initialRouteName?: string; + screens?: Record; +}; + +type Options = { + initialRouteName?: string; + screens: PathConfigMap; +}; + +type NavigateAction = { + type: 'NAVIGATE'; + payload: { + name: string; + params?: NavigatorScreenParams; + path?: string; + }; +}; + +export default function getActionFromState( + state: PartialState, + options?: Options +): NavigateAction | CommonActions.Action | undefined { + // Create a normalized configs object which will be easier to use + const normalizedConfig = options + ? createNormalizedConfigItem(options as PathConfig | string) + : {}; + + const routes = + state.index != null ? state.routes.slice(0, state.index + 1) : state.routes; + + if (routes.length === 0) { + return undefined; + } + + if ( + !( + (routes.length === 1 && routes[0].key === undefined) || + (routes.length === 2 && + routes[0].key === undefined && + routes[0].name === normalizedConfig?.initialRouteName && + routes[1].key === undefined) + ) + ) { + return { + type: 'RESET', + payload: state, + }; + } + + const route = state.routes[state.index ?? state.routes.length - 1]; + + let current: PartialState | undefined = route?.state; + let config: ConfigItem | undefined = normalizedConfig?.screens?.[route?.name]; + let params = { ...route.params } as NavigatorScreenParams< + ParamListBase, + NavigationState + >; + + let payload = route + ? { name: route.name, path: route.path, params } + : undefined; + + while (current) { + if (current.routes.length === 0) { + return undefined; + } + + const routes = + current.index != null + ? current.routes.slice(0, current.index + 1) + : current.routes; + + const route: Route | PartialRoute> = + routes[routes.length - 1]; + + // Explicitly set to override existing value when merging params + Object.assign(params, { + initial: undefined, + screen: undefined, + params: undefined, + state: undefined, + }); + + if (routes.length === 1 && routes[0].key === undefined) { + params.initial = true; + params.screen = route.name; + } else if ( + routes.length === 2 && + routes[0].key === undefined && + routes[0].name === config?.initialRouteName && + routes[1].key === undefined + ) { + params.initial = false; + params.screen = route.name; + } else { + params.state = current; + break; + } + + if (route.state) { + params.params = { ...route.params }; + params = params.params as NavigatorScreenParams< + ParamListBase, + NavigationState + >; + } else { + params.path = route.path; + params.params = route.params; + } + + current = route.state; + config = config?.screens?.[route.name]; + } + + if (!payload) { + return; + } + + // Try to construct payload for a `NAVIGATE` action from the state + // This lets us preserve the navigation state and not lose it + return { + type: 'NAVIGATE', + payload, + }; +} + +const createNormalizedConfigItem = (config: PathConfig | string) => + typeof config === 'object' && config != null + ? { + initialRouteName: config.initialRouteName, + screens: + config.screens != null + ? createNormalizedConfigs(config.screens) + : undefined, + } + : {}; + +const createNormalizedConfigs = (options: PathConfigMap) => + Object.entries(options).reduce>((acc, [k, v]) => { + acc[k] = createNormalizedConfigItem(v); + return acc; + }, {}); diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/getFocusedRouteNameFromRoute.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/getFocusedRouteNameFromRoute.tsx new file mode 100644 index 00000000..8db015e0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/getFocusedRouteNameFromRoute.tsx @@ -0,0 +1,28 @@ +import type { Route } from '@react-navigation/routers'; + +import { CHILD_STATE } from './useRouteCache'; + +export default function getFocusedRouteNameFromRoute( + route: Partial> +): string | undefined { + // @ts-expect-error: this isn't in type definitions coz we want this private + const state = route[CHILD_STATE] ?? route.state; + const params = route.params as { screen?: unknown } | undefined; + + const routeName = state + ? // Get the currently active route name in the nested navigator + state.routes[ + // If we have a partial state without index, for tab/drawer, first screen will be focused one, and last for stack + // The type property will only exist for rehydrated state and not for state from deep link + state.index ?? + (typeof state.type === 'string' && state.type !== 'stack' + ? 0 + : state.routes.length - 1) + ].name + : // If state doesn't exist, we need to default to `screen` param if available + typeof params?.screen === 'string' + ? params.screen + : undefined; + + return routeName; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/getPathFromState.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/getPathFromState.tsx new file mode 100644 index 00000000..f3e30de4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/getPathFromState.tsx @@ -0,0 +1,297 @@ +import type { + NavigationState, + PartialState, + Route, +} from '@react-navigation/routers'; +import * as queryString from 'query-string'; + +import fromEntries from './fromEntries'; +import type { PathConfig, PathConfigMap } from './types'; +import validatePathConfig from './validatePathConfig'; + +type Options = { + initialRouteName?: string; + screens: PathConfigMap; +}; + +type State = NavigationState | Omit, 'stale'>; + +type StringifyConfig = Record string>; + +type ConfigItem = { + pattern?: string; + stringify?: StringifyConfig; + screens?: Record; +}; + +const getActiveRoute = (state: State): { name: string; params?: object } => { + const route = + typeof state.index === 'number' + ? state.routes[state.index] + : state.routes[state.routes.length - 1]; + + if (route.state) { + return getActiveRoute(route.state); + } + + return route; +}; + +/** + * Utility to serialize a navigation state object to a path string. + * + * @example + * ```js + * getPathFromState( + * { + * routes: [ + * { + * name: 'Chat', + * params: { author: 'Jane', id: 42 }, + * }, + * ], + * }, + * { + * screens: { + * Chat: { + * path: 'chat/:author/:id', + * stringify: { author: author => author.toLowerCase() } + * } + * } + * } + * ) + * ``` + * + * @param state Navigation state to serialize. + * @param options Extra options to fine-tune how to serialize the path. + * @returns Path representing the state, e.g. /foo/bar?count=42. + */ +export default function getPathFromState( + state: State, + options?: Options +): string { + if (state == null) { + throw Error( + "Got 'undefined' for the navigation state. You must pass a valid state object." + ); + } + + if (options) { + validatePathConfig(options); + } + + // Create a normalized configs object which will be easier to use + const configs: Record = options?.screens + ? createNormalizedConfigs(options?.screens) + : {}; + + let path = '/'; + let current: State | undefined = state; + + const allParams: Record = {}; + + while (current) { + let index = typeof current.index === 'number' ? current.index : 0; + let route = current.routes[index] as Route & { + state?: State; + }; + + let pattern: string | undefined; + + let focusedParams: Record | undefined; + let focusedRoute = getActiveRoute(state); + let currentOptions = configs; + + // Keep all the route names that appeared during going deeper in config in case the pattern is resolved to undefined + let nestedRouteNames = []; + + let hasNext = true; + + while (route.name in currentOptions && hasNext) { + pattern = currentOptions[route.name].pattern; + + nestedRouteNames.push(route.name); + + if (route.params) { + const stringify = currentOptions[route.name]?.stringify; + + const currentParams = fromEntries( + Object.entries(route.params).map(([key, value]) => [ + key, + stringify?.[key] ? stringify[key](value) : String(value), + ]) + ); + + if (pattern) { + Object.assign(allParams, currentParams); + } + + if (focusedRoute === route) { + // If this is the focused route, keep the params for later use + // We save it here since it's been stringified already + focusedParams = { ...currentParams }; + + pattern + ?.split('/') + .filter((p) => p.startsWith(':')) + // eslint-disable-next-line no-loop-func + .forEach((p) => { + const name = getParamName(p); + + // Remove the params present in the pattern since we'll only use the rest for query string + if (focusedParams) { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete focusedParams[name]; + } + }); + } + } + + // If there is no `screens` property or no nested state, we return pattern + if (!currentOptions[route.name].screens || route.state === undefined) { + hasNext = false; + } else { + index = + typeof route.state.index === 'number' + ? route.state.index + : route.state.routes.length - 1; + + const nextRoute = route.state.routes[index]; + const nestedConfig = currentOptions[route.name].screens; + + // if there is config for next route name, we go deeper + if (nestedConfig && nextRoute.name in nestedConfig) { + route = nextRoute as Route & { state?: State }; + currentOptions = nestedConfig; + } else { + // If not, there is no sense in going deeper in config + hasNext = false; + } + } + } + + if (pattern === undefined) { + pattern = nestedRouteNames.join('/'); + } + + if (currentOptions[route.name] !== undefined) { + path += pattern + .split('/') + .map((p) => { + const name = getParamName(p); + + // We don't know what to show for wildcard patterns + // Showing the route name seems ok, though whatever we show here will be incorrect + // Since the page doesn't actually exist + if (p === '*') { + return route.name; + } + + // If the path has a pattern for a param, put the param in the path + if (p.startsWith(':')) { + const value = allParams[name]; + + if (value === undefined && p.endsWith('?')) { + // Optional params without value assigned in route.params should be ignored + return ''; + } + + return encodeURIComponent(value); + } + + return encodeURIComponent(p); + }) + .join('/'); + } else { + path += encodeURIComponent(route.name); + } + + if (!focusedParams) { + focusedParams = focusedRoute.params; + } + + if (route.state) { + path += '/'; + } else if (focusedParams) { + for (let param in focusedParams) { + if (focusedParams[param] === 'undefined') { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete focusedParams[param]; + } + } + + const query = queryString.stringify(focusedParams, { sort: false }); + + if (query) { + path += `?${query}`; + } + } + + current = route.state; + } + + // Remove multiple as well as trailing slashes + path = path.replace(/\/+/g, '/'); + path = path.length > 1 ? path.replace(/\/$/, '') : path; + + return path; +} + +const getParamName = (pattern: string) => + pattern.replace(/^:/, '').replace(/\?$/, ''); + +const joinPaths = (...paths: string[]): string => + ([] as string[]) + .concat(...paths.map((p) => p.split('/'))) + .filter(Boolean) + .join('/'); + +const createConfigItem = ( + config: PathConfig | string, + parentPattern?: string +): ConfigItem => { + if (typeof config === 'string') { + // If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern + const pattern = parentPattern ? joinPaths(parentPattern, config) : config; + + return { pattern }; + } + + // If an object is specified as the value (e.g. Foo: { ... }), + // It can have `path` property and `screens` prop which has nested configs + let pattern: string | undefined; + + if (config.exact && config.path === undefined) { + 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: ''`." + ); + } + + pattern = + config.exact !== true + ? joinPaths(parentPattern || '', config.path || '') + : config.path || ''; + + const screens = config.screens + ? createNormalizedConfigs(config.screens, pattern) + : undefined; + + return { + // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc. + pattern: pattern?.split('/').filter(Boolean).join('/'), + stringify: config.stringify, + screens, + }; +}; + +const createNormalizedConfigs = ( + options: PathConfigMap, + pattern?: string +): Record => + fromEntries( + Object.entries(options).map(([name, c]) => { + const result = createConfigItem(c, pattern); + + return [name, result]; + }) + ); diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/getStateFromPath.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/getStateFromPath.tsx new file mode 100644 index 00000000..b61e1e55 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/getStateFromPath.tsx @@ -0,0 +1,578 @@ +import type { + InitialState, + NavigationState, + PartialState, +} from '@react-navigation/routers'; +import escape from 'escape-string-regexp'; +import * as queryString from 'query-string'; + +import findFocusedRoute from './findFocusedRoute'; +import type { PathConfigMap } from './types'; +import validatePathConfig from './validatePathConfig'; + +type Options = { + initialRouteName?: string; + screens: PathConfigMap; +}; + +type ParseConfig = Record any>; + +type RouteConfig = { + screen: string; + regex?: RegExp; + path: string; + pattern: string; + routeNames: string[]; + parse?: ParseConfig; +}; + +type InitialRouteConfig = { + initialRouteName: string; + parentScreens: string[]; +}; + +type ResultState = PartialState & { + state?: ResultState; +}; + +type ParsedRoute = { + name: string; + path?: string; + params?: Record | undefined; +}; + +/** + * Utility to parse a path string to initial state object accepted by the container. + * This is useful for deep linking when we need to handle the incoming URL. + * + * @example + * ```js + * getStateFromPath( + * '/chat/jane/42', + * { + * screens: { + * Chat: { + * path: 'chat/:author/:id', + * parse: { id: Number } + * } + * } + * } + * ) + * ``` + * @param path Path string to parse and convert, e.g. /foo/bar?count=42. + * @param options Extra options to fine-tune how to parse the path. + */ +export default function getStateFromPath( + path: string, + options?: Options +): ResultState | undefined { + if (options) { + validatePathConfig(options); + } + + let initialRoutes: InitialRouteConfig[] = []; + + if (options?.initialRouteName) { + initialRoutes.push({ + initialRouteName: options.initialRouteName, + parentScreens: [], + }); + } + + const screens = options?.screens; + + let remaining = path + .replace(/\/+/g, '/') // Replace multiple slash (//) with single ones + .replace(/^\//, '') // Remove extra leading slash + .replace(/\?.*$/, ''); // Remove query params which we will handle later + + // Make sure there is a trailing slash + remaining = remaining.endsWith('/') ? remaining : `${remaining}/`; + + if (screens === undefined) { + // When no config is specified, use the path segments as route names + const routes = remaining + .split('/') + .filter(Boolean) + .map((segment) => { + const name = decodeURIComponent(segment); + return { name }; + }); + + if (routes.length) { + return createNestedStateObject(path, routes, initialRoutes); + } + + return undefined; + } + + // Create a normalized configs array which will be easier to use + const configs = ([] as RouteConfig[]) + .concat( + ...Object.keys(screens).map((key) => + createNormalizedConfigs( + key, + screens as PathConfigMap, + [], + initialRoutes, + [] + ) + ) + ) + .sort((a, b) => { + // Sort config so that: + // - the most exhaustive ones are always at the beginning + // - patterns with wildcard are always at the end + + // If 2 patterns are same, move the one with less route names up + // This is an error state, so it's only useful for consistent error messages + if (a.pattern === b.pattern) { + return b.routeNames.join('>').localeCompare(a.routeNames.join('>')); + } + + // If one of the patterns starts with the other, it's more exhaustive + // So move it up + if (a.pattern.startsWith(b.pattern)) { + return -1; + } + + if (b.pattern.startsWith(a.pattern)) { + return 1; + } + + const aParts = a.pattern.split('/'); + const bParts = b.pattern.split('/'); + + for (let i = 0; i < Math.max(aParts.length, bParts.length); i++) { + // if b is longer, b get higher priority + if (aParts[i] == null) { + return 1; + } + // if a is longer, a get higher priority + if (bParts[i] == null) { + return -1; + } + const aWildCard = aParts[i] === '*' || aParts[i].startsWith(':'); + const bWildCard = bParts[i] === '*' || bParts[i].startsWith(':'); + // if both are wildcard we compare next component + if (aWildCard && bWildCard) { + continue; + } + // if only a is wild card, b get higher priority + if (aWildCard) { + return 1; + } + // if only b is wild card, a get higher priority + if (bWildCard) { + return -1; + } + } + return bParts.length - aParts.length; + }); + + // Check for duplicate patterns in the config + configs.reduce>((acc, config) => { + if (acc[config.pattern]) { + const a = acc[config.pattern].routeNames; + const b = config.routeNames; + + // It's not a problem if the path string omitted from a inner most screen + // For example, it's ok if a path resolves to `A > B > C` or `A > B` + const intersects = + a.length > b.length + ? b.every((it, i) => a[i] === it) + : a.every((it, i) => b[i] === it); + + if (!intersects) { + throw new Error( + `Found conflicting screens with the same pattern. The pattern '${ + config.pattern + }' resolves to both '${a.join(' > ')}' and '${b.join( + ' > ' + )}'. Patterns must be unique and cannot resolve to more than one screen.` + ); + } + } + + return Object.assign(acc, { + [config.pattern]: config, + }); + }, {}); + + if (remaining === '/') { + // We need to add special handling of empty path so navigation to empty path also works + // When handling empty path, we should only look at the root level config + const match = configs.find( + (config) => + config.path === '' && + config.routeNames.every( + // Make sure that none of the parent configs have a non-empty path defined + (name) => !configs.find((c) => c.screen === name)?.path + ) + ); + + if (match) { + return createNestedStateObject( + path, + match.routeNames.map((name) => ({ name })), + initialRoutes, + configs + ); + } + + return undefined; + } + + let result: PartialState | undefined; + let current: PartialState | undefined; + + // We match the whole path against the regex instead of segments + // This makes sure matches such as wildcard will catch any unmatched routes, even if nested + const { routes, remainingPath } = matchAgainstConfigs( + remaining, + configs.map((c) => ({ + ...c, + // Add `$` to the regex to make sure it matches till end of the path and not just beginning + regex: c.regex ? new RegExp(c.regex.source + '$') : undefined, + })) + ); + + if (routes !== undefined) { + // This will always be empty if full path matched + current = createNestedStateObject(path, routes, initialRoutes, configs); + remaining = remainingPath; + result = current; + } + + if (current == null || result == null) { + return undefined; + } + + return result; +} + +const joinPaths = (...paths: string[]): string => + ([] as string[]) + .concat(...paths.map((p) => p.split('/'))) + .filter(Boolean) + .join('/'); + +const matchAgainstConfigs = (remaining: string, configs: RouteConfig[]) => { + let routes: ParsedRoute[] | undefined; + let remainingPath = remaining; + + // Go through all configs, and see if the next path segment matches our regex + for (const config of configs) { + if (!config.regex) { + continue; + } + + const match = remainingPath.match(config.regex); + + // If our regex matches, we need to extract params from the path + if (match) { + const matchedParams = config.pattern + ?.split('/') + .filter((p) => p.startsWith(':')) + .reduce>( + (acc, p, i) => + Object.assign(acc, { + // The param segments appear every second item starting from 2 in the regex match result + [p]: match![(i + 1) * 2].replace(/\//, ''), + }), + {} + ); + + routes = config.routeNames.map((name) => { + const config = configs.find((c) => c.screen === name); + const params = config?.path + ?.split('/') + .filter((p) => p.startsWith(':')) + .reduce>((acc, p) => { + const value = matchedParams[p]; + + if (value) { + const key = p.replace(/^:/, '').replace(/\?$/, ''); + acc[key] = config.parse?.[key] ? config.parse[key](value) : value; + } + + return acc; + }, {}); + + if (params && Object.keys(params).length) { + return { name, params }; + } + + return { name }; + }); + + remainingPath = remainingPath.replace(match[1], ''); + + break; + } + } + + return { routes, remainingPath }; +}; + +const createNormalizedConfigs = ( + screen: string, + routeConfig: PathConfigMap, + routeNames: string[] = [], + initials: InitialRouteConfig[], + parentScreens: string[], + parentPattern?: string +): RouteConfig[] => { + const configs: RouteConfig[] = []; + + routeNames.push(screen); + + parentScreens.push(screen); + + // @ts-expect-error: we can't strongly typecheck this for now + const config = routeConfig[screen]; + + if (typeof config === 'string') { + // If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern + const pattern = parentPattern ? joinPaths(parentPattern, config) : config; + + configs.push(createConfigItem(screen, routeNames, pattern, config)); + } else if (typeof config === 'object') { + let pattern: string | undefined; + + // if an object is specified as the value (e.g. Foo: { ... }), + // it can have `path` property and + // it could have `screens` prop which has nested configs + if (typeof config.path === 'string') { + if (config.exact && config.path === undefined) { + 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: ''`." + ); + } + + pattern = + config.exact !== true + ? joinPaths(parentPattern || '', config.path || '') + : config.path || ''; + + configs.push( + createConfigItem( + screen, + routeNames, + pattern!, + config.path, + config.parse + ) + ); + } + + if (config.screens) { + // property `initialRouteName` without `screens` has no purpose + if (config.initialRouteName) { + initials.push({ + initialRouteName: config.initialRouteName, + parentScreens, + }); + } + + Object.keys(config.screens).forEach((nestedConfig) => { + const result = createNormalizedConfigs( + nestedConfig, + config.screens as PathConfigMap, + routeNames, + initials, + [...parentScreens], + pattern ?? parentPattern + ); + + configs.push(...result); + }); + } + } + + routeNames.pop(); + + return configs; +}; + +const createConfigItem = ( + screen: string, + routeNames: string[], + pattern: string, + path: string, + parse?: ParseConfig +): RouteConfig => { + // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc. + pattern = pattern.split('/').filter(Boolean).join('/'); + + const regex = pattern + ? new RegExp( + `^(${pattern + .split('/') + .map((it) => { + if (it.startsWith(':')) { + return `(([^/]+\\/)${it.endsWith('?') ? '?' : ''})`; + } + + return `${it === '*' ? '.*' : escape(it)}\\/`; + }) + .join('')})` + ) + : undefined; + + return { + screen, + regex, + pattern, + path, + // The routeNames array is mutated, so copy it to keep the current state + routeNames: [...routeNames], + parse, + }; +}; + +const findParseConfigForRoute = ( + routeName: string, + flatConfig: RouteConfig[] +): ParseConfig | undefined => { + for (const config of flatConfig) { + if (routeName === config.routeNames[config.routeNames.length - 1]) { + return config.parse; + } + } + + return undefined; +}; + +// Try to find an initial route connected with the one passed +const findInitialRoute = ( + routeName: string, + parentScreens: string[], + initialRoutes: InitialRouteConfig[] +): string | undefined => { + for (const config of initialRoutes) { + if (parentScreens.length === config.parentScreens.length) { + let sameParents = true; + for (let i = 0; i < parentScreens.length; i++) { + if (parentScreens[i].localeCompare(config.parentScreens[i]) !== 0) { + sameParents = false; + break; + } + } + if (sameParents) { + return routeName !== config.initialRouteName + ? config.initialRouteName + : undefined; + } + } + } + return undefined; +}; + +// returns state object with values depending on whether +// it is the end of state and if there is initialRoute for this level +const createStateObject = ( + initialRoute: string | undefined, + route: ParsedRoute, + isEmpty: boolean +): InitialState => { + if (isEmpty) { + if (initialRoute) { + return { + index: 1, + routes: [{ name: initialRoute }, route], + }; + } else { + return { + routes: [route], + }; + } + } else { + if (initialRoute) { + return { + index: 1, + routes: [{ name: initialRoute }, { ...route, state: { routes: [] } }], + }; + } else { + return { + routes: [{ ...route, state: { routes: [] } }], + }; + } + } +}; + +const createNestedStateObject = ( + path: string, + routes: ParsedRoute[], + initialRoutes: InitialRouteConfig[], + flatConfig?: RouteConfig[] +) => { + let state: InitialState; + let route = routes.shift() as ParsedRoute; + const parentScreens: string[] = []; + + let initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes); + + parentScreens.push(route.name); + + state = createStateObject(initialRoute, route, routes.length === 0); + + if (routes.length > 0) { + let nestedState = state; + + while ((route = routes.shift() as ParsedRoute)) { + initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes); + + const nestedStateIndex = + nestedState.index || nestedState.routes.length - 1; + + nestedState.routes[nestedStateIndex].state = createStateObject( + initialRoute, + route, + routes.length === 0 + ); + + if (routes.length > 0) { + nestedState = nestedState.routes[nestedStateIndex] + .state as InitialState; + } + + parentScreens.push(route.name); + } + } + + route = findFocusedRoute(state) as ParsedRoute; + route.path = path; + + const params = parseQueryParams( + path, + flatConfig ? findParseConfigForRoute(route.name, flatConfig) : undefined + ); + + if (params) { + route.params = { ...route.params, ...params }; + } + + return state; +}; + +const parseQueryParams = ( + path: string, + parseConfig?: Record any> +) => { + const query = path.split('?')[1]; + const params = queryString.parse(query); + + if (parseConfig) { + Object.keys(params).forEach((name) => { + if ( + Object.hasOwnProperty.call(parseConfig, name) && + typeof params[name] === 'string' + ) { + params[name] = parseConfig[name](params[name] as string); + } + }); + } + + return Object.keys(params).length ? params : undefined; +}; diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/index.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/index.tsx new file mode 100644 index 00000000..61706b6c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/index.tsx @@ -0,0 +1,27 @@ +export { default as BaseNavigationContainer } from './BaseNavigationContainer'; +export { default as createNavigationContainerRef } from './createNavigationContainerRef'; +export { default as createNavigatorFactory } from './createNavigatorFactory'; +export { default as CurrentRenderContext } from './CurrentRenderContext'; +export { default as findFocusedRoute } from './findFocusedRoute'; +export { default as getActionFromState } from './getActionFromState'; +export { default as getFocusedRouteNameFromRoute } from './getFocusedRouteNameFromRoute'; +export { default as getPathFromState } from './getPathFromState'; +export { default as getStateFromPath } from './getStateFromPath'; +export { default as NavigationContainerRefContext } from './NavigationContainerRefContext'; +export { default as NavigationContext } from './NavigationContext'; +export { default as NavigationHelpersContext } from './NavigationHelpersContext'; +export { default as NavigationRouteContext } from './NavigationRouteContext'; +export { default as PreventRemoveContext } from './PreventRemoveContext'; +export { default as PreventRemoveProvider } from './PreventRemoveProvider'; +export * from './types'; +export { default as useFocusEffect } from './useFocusEffect'; +export { default as useIsFocused } from './useIsFocused'; +export { default as useNavigation } from './useNavigation'; +export { default as useNavigationBuilder } from './useNavigationBuilder'; +export { default as useNavigationContainerRef } from './useNavigationContainerRef'; +export { default as useNavigationState } from './useNavigationState'; +export { default as UNSTABLE_usePreventRemove } from './usePreventRemove'; +export { default as usePreventRemoveContext } from './usePreventRemoveContext'; +export { default as useRoute } from './useRoute'; +export { default as validatePathConfig } from './validatePathConfig'; +export * from '@react-navigation/routers'; diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/isArrayEqual.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/isArrayEqual.tsx new file mode 100644 index 00000000..6149e8bd --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/isArrayEqual.tsx @@ -0,0 +1,15 @@ +/** + * Compare two arrays with primitive values as the content. + * We need to make sure that both values and order match. + */ +export default function isArrayEqual(a: any[], b: any[]) { + if (a === b) { + return true; + } + + if (a.length !== b.length) { + return false; + } + + return a.every((it, index) => it === b[index]); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/isRecordEqual.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/isRecordEqual.tsx new file mode 100644 index 00000000..f185a776 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/isRecordEqual.tsx @@ -0,0 +1,20 @@ +/** + * Compare two records with primitive values as the content. + */ +export default function isRecordEqual( + a: Record, + b: Record +) { + if (a === b) { + return true; + } + + const aKeys = Object.keys(a); + const bKeys = Object.keys(b); + + if (aKeys.length !== bKeys.length) { + return false; + } + + return aKeys.every((key) => a[key] === b[key]); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/types.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/types.tsx new file mode 100644 index 00000000..20685bb4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/types.tsx @@ -0,0 +1,708 @@ +import type { + DefaultRouterOptions, + InitialState, + NavigationAction, + NavigationState, + ParamListBase, + PartialState, + Route, +} from '@react-navigation/routers'; +import type * as React from 'react'; + +declare global { + // eslint-disable-next-line @typescript-eslint/no-namespace + namespace ReactNavigation { + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface RootParamList {} + } +} + +type Keyof = Extract; + +export type DefaultNavigatorOptions< + ParamList extends ParamListBase, + State extends NavigationState, + ScreenOptions extends {}, + EventMap extends EventMapBase +> = DefaultRouterOptions> & { + /** + * Optional ID for the navigator. Can be used with `navigation.getParent(id)` to refer to a parent. + */ + id?: string; + /** + * Children React Elements to extract the route configuration from. + * Only `Screen`, `Group` and `React.Fragment` are supported as children. + */ + children: React.ReactNode; + /** + * Event listeners for all the screens in the navigator. + */ + screenListeners?: + | ScreenListeners + | ((props: { + route: RouteProp; + navigation: any; + }) => ScreenListeners); + /** + * Default options for all screens under this navigator. + */ + screenOptions?: + | ScreenOptions + | ((props: { + route: RouteProp; + navigation: any; + }) => ScreenOptions); +}; + +export type EventMapBase = Record< + string, + { data?: any; canPreventDefault?: boolean } +>; + +export type EventMapCore = { + focus: { data: undefined }; + blur: { data: undefined }; + state: { data: { state: State } }; + beforeRemove: { data: { action: NavigationAction }; canPreventDefault: true }; +}; + +export type EventArg< + EventName extends string, + CanPreventDefault extends boolean | undefined = false, + Data = undefined +> = { + /** + * Type of the event (e.g. `focus`, `blur`) + */ + readonly type: EventName; + readonly target?: string; +} & (CanPreventDefault extends true + ? { + /** + * Whether `event.preventDefault()` was called on this event object. + */ + readonly defaultPrevented: boolean; + /** + * Prevent the default action which happens on this event. + */ + preventDefault(): void; + } + : {}) & + (undefined extends Data + ? { readonly data?: Readonly } + : { readonly data: Readonly }); + +export type EventListenerCallback< + EventMap extends EventMapBase, + EventName extends keyof EventMap +> = ( + e: EventArg< + Extract, + EventMap[EventName]['canPreventDefault'], + EventMap[EventName]['data'] + > +) => void; + +export type EventConsumer = { + /** + * Subscribe to events from the parent navigator. + * + * @param type Type of the event (e.g. `focus`, `blur`) + * @param callback Callback listener which is executed upon receiving the event. + */ + addListener>( + type: EventName, + callback: EventListenerCallback + ): () => void; + removeListener>( + type: EventName, + callback: EventListenerCallback + ): void; +}; + +export type EventEmitter = { + /** + * Emit an event to child screens. + * + * @param options.type Type of the event (e.g. `focus`, `blur`) + * @param [options.data] Optional information regarding the event. + * @param [options.target] Key of the target route which should receive the event. + * If not specified, all routes receive the event. + */ + emit>( + options: { + type: EventName; + target?: string; + } & (EventMap[EventName]['canPreventDefault'] extends true + ? { canPreventDefault: true } + : {}) & + (undefined extends EventMap[EventName]['data'] + ? { data?: EventMap[EventName]['data'] } + : { data: EventMap[EventName]['data'] }) + ): EventArg< + EventName, + EventMap[EventName]['canPreventDefault'], + EventMap[EventName]['data'] + >; +}; + +export class PrivateValueStore { + /** + * UGLY HACK! DO NOT USE THE TYPE!!! + * + * TypeScript requires a type to be used to be able to infer it. + * The type should exist as its own without any operations such as union. + * So we need to figure out a way to store this type in a property. + * The problem with a normal property is that it shows up in intelliSense. + * Adding private keyword works, but the annotation is stripped away in declaration. + * Turns out if we use an empty string, it doesn't show up in intelliSense. + */ + protected ''?: T; +} + +type NavigationHelpersCommon< + ParamList extends ParamListBase, + State extends NavigationState = NavigationState +> = { + /** + * Dispatch an action or an update function to the router. + * The update function will receive the current state, + * + * @param action Action object or update function. + */ + dispatch( + action: NavigationAction | ((state: State) => NavigationAction) + ): void; + + /** + * Navigate to a route in current navigation tree. + * + * @param name Name of the route to navigate to. + * @param [params] Params object for the route. + */ + navigate( + ...args: // this first condition allows us to iterate over a union type + // This is to avoid getting a union of all the params from `ParamList[RouteName]`, + // which will get our types all mixed up if a union RouteName is passed in. + RouteName extends unknown + ? // This condition checks if the params are optional, + // which means it's either undefined or a union with undefined + undefined extends ParamList[RouteName] + ? + | [screen: RouteName] // if the params are optional, we don't have to provide it + | [screen: RouteName, params: ParamList[RouteName]] + : [screen: RouteName, params: ParamList[RouteName]] + : never + ): void; + + /** + * Navigate to a route in current navigation tree. + * + * @param route Object with `key` or `name` for the route to navigate to, and a `params` object. + */ + navigate( + options: RouteName extends unknown + ? + | { key: string; params?: ParamList[RouteName]; merge?: boolean } + | { + name: RouteName; + key?: string; + params: ParamList[RouteName]; + merge?: boolean; + } + : never + ): void; + + /** + * Reset the navigation state to the provided state. + * + * @param state Navigation state object. + */ + reset(state: PartialState | State): void; + + /** + * Go back to the previous route in history. + */ + goBack(): void; + + /** + * Check if the screen is focused. The method returns `true` if focused, `false` otherwise. + * Note that this method doesn't re-render screen when the focus changes. So don't use it in `render`. + * To get notified of focus changes, use `addListener('focus', cb)` and `addListener('blur', cb)`. + * To conditionally render content based on focus state, use the `useIsFocused` hook. + */ + isFocused(): boolean; + + /** + * Check if dispatching back action will be handled by navigation. + * Note that this method doesn't re-render screen when the result changes. So don't use it in `render`. + */ + canGoBack(): boolean; + + /** + * Returns the name of the navigator specified in the `name` prop. + * If no name is specified, returns `undefined`. + */ + getId(): string | undefined; + + /** + * Returns the navigation helpers from a parent navigator based on the ID. + * If an ID is provided, the navigation helper from the parent navigator with matching ID (including current) will be returned. + * If no ID is provided, the navigation helper from the immediate parent navigator will be returned. + * + * @param id Optional ID of a parent navigator. + */ + getParent | undefined>(id?: string): T; + + /** + * Returns the navigator's state. + * Note that this method doesn't re-render screen when the result changes. So don't use it in `render`. + */ + getState(): State; +} & PrivateValueStore<[ParamList, unknown, unknown]>; + +export type NavigationHelpers< + ParamList extends ParamListBase, + EventMap extends EventMapBase = {} +> = NavigationHelpersCommon & + EventEmitter & { + /** + * Update the param object for the route. + * The new params will be shallow merged with the old one. + * + * @param params Params object for the current route. + */ + setParams( + params: Partial + ): void; + }; + +export type NavigationContainerProps = { + /** + * Initial navigation state for the child navigators. + */ + initialState?: InitialState; + /** + * Callback which is called with the latest navigation state when it changes. + */ + onStateChange?: (state: NavigationState | undefined) => void; + /** + * Callback which is called when an action is not handled. + */ + onUnhandledAction?: (action: NavigationAction) => void; + /** + * Whether this navigation container should be independent of parent containers. + * If this is not set to `true`, this container cannot be nested inside another container. + * Setting it to `true` disconnects any children navigators from parent container. + */ + independent?: boolean; + /** + * Children elements to render. + */ + children: React.ReactNode; +}; + +export type NavigationProp< + ParamList extends {}, + RouteName extends keyof ParamList = Keyof, + NavigatorID extends string | undefined = undefined, + State extends NavigationState = NavigationState, + ScreenOptions extends {} = {}, + EventMap extends EventMapBase = {} +> = Omit, 'getParent'> & { + /** + * Returns the navigation prop from a parent navigator based on the ID. + * If an ID is provided, the navigation prop from the parent navigator with matching ID (including current) will be returned. + * If no ID is provided, the navigation prop from the immediate parent navigator will be returned. + * + * @param id Optional ID of a parent navigator. + */ + getParent | undefined>(id?: NavigatorID): T; + + /** + * Update the param object for the route. + * The new params will be shallow merged with the old one. + * + * @param params Params object for the current route. + */ + setParams( + params: ParamList[RouteName] extends undefined + ? undefined + : Partial + ): void; + + /** + * Update the options for the route. + * The options object will be shallow merged with default options object. + * + * @param options Options object for the route. + */ + setOptions(options: Partial): void; +} & EventConsumer> & + PrivateValueStore<[ParamList, RouteName, EventMap]>; + +export type RouteProp< + ParamList extends ParamListBase, + RouteName extends keyof ParamList = Keyof +> = Route, ParamList[RouteName]>; + +export type CompositeNavigationProp< + A extends NavigationProp, + B extends NavigationHelpersCommon +> = Omit> & + NavigationProp< + /** + * Param list from both navigation objects needs to be combined + * For example, we should be able to navigate to screens in both A and B + */ + (A extends NavigationHelpersCommon ? T : never) & + (B extends NavigationHelpersCommon ? U : never), + /** + * The route name should refer to the route name specified in the first type + * Ideally it should work for any of them, but it's not possible to infer that way + */ + A extends NavigationProp ? R : string, + /** + * ID from both navigation objects needs to be combined for `getParent` + */ + | (A extends NavigationProp ? I : never) + | (B extends NavigationProp ? J : never), + /** + * The type of state should refer to the state specified in the first type + */ + A extends NavigationProp ? S : NavigationState, + /** + * Screen options from both navigation objects needs to be combined + * This allows typechecking `setOptions` + */ + (A extends NavigationProp ? O : {}) & + (B extends NavigationProp ? P : {}), + /** + * Event consumer config should refer to the config specified in the first type + * This allows typechecking `addListener`/`removeListener` + */ + A extends NavigationProp ? E : {} + >; + +export type CompositeScreenProps< + A extends { + navigation: NavigationProp< + ParamListBase, + string, + string | undefined, + any, + any, + any + >; + route: RouteProp; + }, + B extends { + navigation: NavigationHelpersCommon; + } +> = { + navigation: CompositeNavigationProp; + route: A['route']; +}; + +export type Descriptor< + ScreenOptions extends {}, + Navigation extends NavigationProp, + Route extends RouteProp +> = { + /** + * Render the component associated with this route. + */ + render(): JSX.Element; + + /** + * Options for the route. + */ + options: ScreenOptions; + + /** + * Route object for the screen + */ + route: Route; + + /** + * Navigation object for the screen + */ + navigation: Navigation; +}; + +export type ScreenListeners< + State extends NavigationState, + EventMap extends EventMapBase +> = Partial<{ + [EventName in keyof (EventMap & EventMapCore)]: EventListenerCallback< + EventMap, + EventName + >; +}>; + +type ScreenComponentType< + ParamList extends ParamListBase, + RouteName extends keyof ParamList +> = + | React.ComponentType<{ + route: RouteProp; + navigation: any; + }> + | React.ComponentType<{}>; + +export type RouteConfigComponent< + ParamList extends ParamListBase, + RouteName extends keyof ParamList +> = + | { + /** + * React component to render for this screen. + */ + component: ScreenComponentType; + getComponent?: never; + children?: never; + } + | { + /** + * Lazily get a React component to render for this screen. + */ + getComponent: () => ScreenComponentType; + component?: never; + children?: never; + } + | { + /** + * Render callback to render content of this screen. + */ + children: (props: { + route: RouteProp; + navigation: any; + }) => React.ReactNode; + component?: never; + getComponent?: never; + }; + +export type RouteConfig< + ParamList extends ParamListBase, + RouteName extends keyof ParamList, + State extends NavigationState, + ScreenOptions extends {}, + EventMap extends EventMapBase +> = { + /** + * Optional key for this screen. This doesn't need to be unique. + * If the key changes, existing screens with this name will be removed or reset. + * Useful when we have some common screens and have conditional rendering. + */ + navigationKey?: string; + + /** + * Route name of this screen. + */ + name: RouteName; + + /** + * Navigator options for this screen. + */ + options?: + | ScreenOptions + | ((props: { + route: RouteProp; + navigation: any; + }) => ScreenOptions); + + /** + * Event listeners for this screen. + */ + listeners?: + | ScreenListeners + | ((props: { + route: RouteProp; + navigation: any; + }) => ScreenListeners); + + /** + * Function to return an unique ID for this screen. + * Receives an object with the route params. + * For a given screen name, there will always be only one screen corresponding to an ID. + * If `undefined` is returned, it acts same as no `getId` being specified. + */ + getId?: ({ params }: { params: ParamList[RouteName] }) => string | undefined; + + /** + * Initial params object for the route. + */ + initialParams?: Partial; +} & RouteConfigComponent; + +export type RouteGroupConfig< + ParamList extends ParamListBase, + ScreenOptions extends {} +> = { + /** + * Optional key for the screens in this group. + * If the key changes, all existing screens in this group will be removed or reset. + */ + navigationKey?: string; + + /** + * Navigator options for this screen. + */ + screenOptions?: + | ScreenOptions + | ((props: { + route: RouteProp; + navigation: any; + }) => ScreenOptions); + /** + * Children React Elements to extract the route configuration from. + * Only `Screen`, `Group` and `React.Fragment` are supported as children. + */ + children: React.ReactNode; +}; + +export type NavigationContainerEventMap = { + /** + * Event which fires when the navigation state changes. + */ + state: { + data: { + /** + * The updated state object after the state change. + */ + state: NavigationState | PartialState | undefined; + }; + }; + /** + * Event which fires when current options changes. + */ + options: { data: { options: object } }; + /** + * Event which fires when an action is dispatched. + * Only intended for debugging purposes, don't use it for app logic. + * This event will be emitted before state changes have been applied. + */ + __unsafe_action__: { + data: { + /** + * The action object which was dispatched. + */ + action: NavigationAction; + /** + * Whether the action was a no-op, i.e. resulted any state changes. + */ + noop: boolean; + /** + * Stack trace of the action, this will only be available during development. + */ + stack: string | undefined; + }; + }; +}; + +export type NavigationContainerRef = + NavigationHelpers & + EventConsumer & { + /** + * Reset the navigation state of the root navigator to the provided state. + * + * @param state Navigation state object. + */ + resetRoot(state?: PartialState | NavigationState): void; + /** + * Get the rehydrated navigation state of the navigation tree. + */ + getRootState(): NavigationState; + /** + * Get the currently focused navigation route. + */ + getCurrentRoute(): Route | undefined; + /** + * Get the currently focused route's options. + */ + getCurrentOptions(): object | undefined; + /** + * Whether the navigation container is ready to handle actions. + */ + isReady(): boolean; + }; + +export type NavigationContainerRefWithCurrent = + NavigationContainerRef & { + current: NavigationContainerRef | null; + }; + +export type TypedNavigator< + ParamList extends ParamListBase, + State extends NavigationState, + ScreenOptions extends {}, + EventMap extends EventMapBase, + Navigator extends React.ComponentType +> = { + /** + * Navigator component which manages the child screens. + */ + Navigator: React.ComponentType< + Omit< + React.ComponentProps, + keyof DefaultNavigatorOptions + > & + DefaultNavigatorOptions + >; + /** + * Component used for grouping multiple route configuration. + */ + Group: React.ComponentType>; + /** + * Component used for specifying route configuration. + */ + Screen: ( + _: RouteConfig + ) => null; +}; + +export type NavigatorScreenParams< + ParamList, + State extends NavigationState = NavigationState +> = + | { + screen?: never; + params?: never; + initial?: never; + path?: string; + state: PartialState | State | undefined; + } + | { + [RouteName in keyof ParamList]: undefined extends ParamList[RouteName] + ? { + screen: RouteName; + params?: ParamList[RouteName]; + initial?: boolean; + path?: string; + state?: never; + } + : { + screen: RouteName; + params: ParamList[RouteName]; + initial?: boolean; + path?: string; + state?: never; + }; + }[keyof ParamList]; + +export type PathConfig = { + path?: string; + exact?: boolean; + parse?: Record any>; + stringify?: Record string>; + screens?: PathConfigMap; + initialRouteName?: keyof ParamList; +}; + +export type PathConfigMap = { + [RouteName in keyof ParamList]?: NonNullable< + ParamList[RouteName] + > extends NavigatorScreenParams + ? string | PathConfig + : string | Omit, 'screens' | 'initialRouteName'>; +}; diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useChildListeners.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useChildListeners.tsx new file mode 100644 index 00000000..d71c913f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useChildListeners.tsx @@ -0,0 +1,37 @@ +import * as React from 'react'; + +import type { ListenerMap } from './NavigationBuilderContext'; + +/** + * Hook which lets child navigators add action listeners. + */ +export default function useChildListeners() { + const { current: listeners } = React.useRef<{ + [K in keyof ListenerMap]: ListenerMap[K][]; + }>({ + action: [], + focus: [], + }); + + const addListener = React.useCallback( + (type: T, listener: ListenerMap[T]) => { + listeners[type].push(listener); + + let removed = false; + return () => { + const index = listeners[type].indexOf(listener); + + if (!removed && index > -1) { + removed = true; + listeners[type].splice(index, 1); + } + }; + }, + [listeners] + ); + + return { + listeners, + addListener, + }; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useComponent.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useComponent.tsx new file mode 100644 index 00000000..03276053 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useComponent.tsx @@ -0,0 +1,37 @@ +import * as React from 'react'; + +type Render = (children: React.ReactNode) => JSX.Element; + +type Props = { + render: Render; + children: React.ReactNode; +}; + +const NavigationContent = ({ render, children }: Props) => { + return render(children); +}; + +export default function useComponent(render: Render) { + const renderRef = React.useRef(render); + + // Normally refs shouldn't be mutated in render + // But we return a component which will be rendered + // So it's just for immediate consumption + renderRef.current = render; + + React.useEffect(() => { + renderRef.current = null; + }); + + return React.useRef(({ children }: { children: React.ReactNode }) => { + const render = renderRef.current; + + if (render === null) { + throw new Error( + 'The returned component must be rendered in the same render phase as the hook.' + ); + } + + return {children}; + }).current; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useCurrentRender.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useCurrentRender.tsx new file mode 100644 index 00000000..9271bce4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useCurrentRender.tsx @@ -0,0 +1,35 @@ +import type { NavigationState, ParamListBase } from '@react-navigation/routers'; +import * as React from 'react'; + +import CurrentRenderContext from './CurrentRenderContext'; +import type { + Descriptor, + NavigationHelpers, + NavigationProp, + RouteProp, +} from './types'; + +type Options = { + state: NavigationState; + navigation: NavigationHelpers; + descriptors: Record< + string, + Descriptor, RouteProp> + >; +}; + +/** + * Write the current options, so that server renderer can get current values + * Mutating values like this is not safe in async mode, but it doesn't apply to SSR + */ +export default function useCurrentRender({ + state, + navigation, + descriptors, +}: Options) { + const current = React.useContext(CurrentRenderContext); + + if (current && navigation.isFocused()) { + current.options = descriptors[state.routes[state.index].key].options; + } +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useDescriptors.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useDescriptors.tsx new file mode 100644 index 00000000..6aacdc86 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useDescriptors.tsx @@ -0,0 +1,237 @@ +import type { + NavigationAction, + NavigationState, + ParamListBase, + Router, +} from '@react-navigation/routers'; +import * as React from 'react'; + +import NavigationBuilderContext, { + AddKeyedListener, + AddListener, +} from './NavigationBuilderContext'; +import NavigationContext from './NavigationContext'; +import NavigationRouteContext from './NavigationRouteContext'; +import SceneView from './SceneView'; +import type { + Descriptor, + EventMapBase, + NavigationHelpers, + NavigationProp, + RouteConfig, + RouteProp, +} from './types'; +import type { NavigationEventEmitter } from './useEventEmitter'; +import useNavigationCache from './useNavigationCache'; +import useRouteCache from './useRouteCache'; + +export type ScreenConfigWithParent< + State extends NavigationState, + ScreenOptions extends {}, + EventMap extends EventMapBase +> = { + keys: (string | undefined)[]; + options: (ScreenOptionsOrCallback | undefined)[] | undefined; + props: RouteConfig; +}; + +type ScreenOptionsOrCallback = + | ScreenOptions + | ((props: { + route: RouteProp; + navigation: any; + }) => ScreenOptions); + +type Options< + State extends NavigationState, + ScreenOptions extends {}, + EventMap extends EventMapBase +> = { + state: State; + screens: Record< + string, + ScreenConfigWithParent + >; + navigation: NavigationHelpers; + screenOptions?: ScreenOptionsOrCallback; + defaultScreenOptions?: + | ScreenOptions + | ((props: { + route: RouteProp; + navigation: any; + options: ScreenOptions; + }) => ScreenOptions); + onAction: (action: NavigationAction) => boolean; + getState: () => State; + setState: (state: State) => void; + addListener: AddListener; + addKeyedListener: AddKeyedListener; + onRouteFocus: (key: string) => void; + router: Router; + emitter: NavigationEventEmitter; +}; + +/** + * Hook to create descriptor objects for the child routes. + * + * A descriptor object provides 3 things: + * - Helper method to render a screen + * - Options specified by the screen for the navigator + * - Navigation object intended for the route + */ +export default function useDescriptors< + State extends NavigationState, + ActionHelpers extends Record void>, + ScreenOptions extends {}, + EventMap extends EventMapBase +>({ + state, + screens, + navigation, + screenOptions, + defaultScreenOptions, + onAction, + getState, + setState, + addListener, + addKeyedListener, + onRouteFocus, + router, + emitter, +}: Options) { + const [options, setOptions] = React.useState>({}); + const { onDispatchAction, onOptionsChange, stackRef } = React.useContext( + NavigationBuilderContext + ); + + const context = React.useMemo( + () => ({ + navigation, + onAction, + addListener, + addKeyedListener, + onRouteFocus, + onDispatchAction, + onOptionsChange, + stackRef, + }), + [ + navigation, + onAction, + addListener, + addKeyedListener, + onRouteFocus, + onDispatchAction, + onOptionsChange, + stackRef, + ] + ); + + const navigations = useNavigationCache({ + state, + getState, + navigation, + setOptions, + router, + emitter, + }); + + const routes = useRouteCache(state.routes); + + return routes.reduce< + Record< + string, + Descriptor< + ScreenOptions, + NavigationProp< + ParamListBase, + string, + string | undefined, + State, + ScreenOptions, + EventMap + > & + ActionHelpers, + RouteProp + > + > + >((acc, route, i) => { + const config = screens[route.name]; + const screen = config.props; + const navigation = navigations[route.key]; + + const optionsList = [ + // The default `screenOptions` passed to the navigator + screenOptions, + // The `screenOptions` props passed to `Group` elements + ...((config.options + ? config.options.filter(Boolean) + : []) as ScreenOptionsOrCallback[]), + // The `options` prop passed to `Screen` elements, + screen.options, + // The options set via `navigation.setOptions` + options[route.key], + ]; + + const customOptions = optionsList.reduce( + (acc, curr) => + Object.assign( + acc, + typeof curr !== 'function' ? curr : curr({ route, navigation }) + ), + {} as ScreenOptions + ); + + const mergedOptions = { + ...(typeof defaultScreenOptions === 'function' + ? // @ts-expect-error: ts gives incorrect error here + defaultScreenOptions({ + route, + navigation, + options: customOptions, + }) + : defaultScreenOptions), + ...customOptions, + }; + + const clearOptions = () => + setOptions((o) => { + if (route.key in o) { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { [route.key]: _, ...rest } = o; + return rest; + } + + return o; + }); + + acc[route.key] = { + route, + // @ts-expect-error: it's missing action helpers, fix later + navigation, + render() { + return ( + + + + + + + + ); + }, + options: mergedOptions as ScreenOptions, + }; + + return acc; + }, {}); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useEventEmitter.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useEventEmitter.tsx new file mode 100644 index 00000000..bcf91768 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useEventEmitter.tsx @@ -0,0 +1,141 @@ +import * as React from 'react'; + +import type { EventArg, EventConsumer, EventEmitter } from './types'; + +export type NavigationEventEmitter> = + EventEmitter & { + create: (target: string) => EventConsumer; + }; + +type Listeners = ((e: any) => void)[]; + +/** + * Hook to manage the event system used by the navigator to notify screens of various events. + */ +export default function useEventEmitter>( + listen?: (e: any) => void +): NavigationEventEmitter { + const listenRef = React.useRef(listen); + + React.useEffect(() => { + listenRef.current = listen; + }); + + const listeners = React.useRef>>( + Object.create(null) + ); + + const create = React.useCallback((target: string) => { + const removeListener = (type: string, callback: (data: any) => void) => { + const callbacks = listeners.current[type] + ? listeners.current[type][target] + : undefined; + + if (!callbacks) { + return; + } + + const index = callbacks.indexOf(callback); + + if (index > -1) { + callbacks.splice(index, 1); + } + }; + + const addListener = (type: string, callback: (data: any) => void) => { + listeners.current[type] = listeners.current[type] || {}; + listeners.current[type][target] = listeners.current[type][target] || []; + listeners.current[type][target].push(callback); + + let removed = false; + return () => { + // Prevent removing other listeners when unsubscribing same listener multiple times + if (!removed) { + removed = true; + removeListener(type, callback); + } + }; + }; + + return { + addListener, + removeListener, + }; + }, []); + + const emit = React.useCallback( + ({ + type, + data, + target, + canPreventDefault, + }: { + type: string; + data?: any; + target?: string; + canPreventDefault?: boolean; + }) => { + const items = listeners.current[type] || {}; + + // Copy the current list of callbacks in case they are mutated during execution + const callbacks = + target !== undefined + ? items[target]?.slice() + : ([] as Listeners) + .concat(...Object.keys(items).map((t) => items[t])) + .filter((cb, i, self) => self.lastIndexOf(cb) === i); + + const event: EventArg = { + get type() { + return type; + }, + }; + + if (target !== undefined) { + Object.defineProperty(event, 'target', { + enumerable: true, + get() { + return target; + }, + }); + } + + if (data !== undefined) { + Object.defineProperty(event, 'data', { + enumerable: true, + get() { + return data; + }, + }); + } + + if (canPreventDefault) { + let defaultPrevented = false; + + Object.defineProperties(event, { + defaultPrevented: { + enumerable: true, + get() { + return defaultPrevented; + }, + }, + preventDefault: { + enumerable: true, + value() { + defaultPrevented = true; + }, + }, + }); + } + + listenRef.current?.(event); + + callbacks?.forEach((cb) => cb(event)); + + return event as any; + }, + [] + ); + + return React.useMemo(() => ({ create, emit }), [create, emit]); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useFocusEffect.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useFocusEffect.tsx new file mode 100644 index 00000000..9561063c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useFocusEffect.tsx @@ -0,0 +1,112 @@ +import * as React from 'react'; + +import useNavigation from './useNavigation'; + +type EffectCallback = () => undefined | void | (() => void); + +/** + * Hook to run an effect in a focused screen, similar to `React.useEffect`. + * This can be used to perform side-effects such as fetching data or subscribing to events. + * The passed callback should be wrapped in `React.useCallback` to avoid running the effect too often. + * + * @param callback Memoized callback containing the effect, should optionally return a cleanup function. + */ +export default function useFocusEffect(effect: EffectCallback) { + const navigation = useNavigation(); + + if (arguments[1] !== undefined) { + const message = + "You passed a second argument to 'useFocusEffect', but it only accepts one argument. " + + "If you want to pass a dependency array, you can use 'React.useCallback':\n\n" + + 'useFocusEffect(\n' + + ' React.useCallback(() => {\n' + + ' // Your code here\n' + + ' }, [depA, depB])\n' + + ');\n\n' + + 'See usage guide: https://reactnavigation.org/docs/use-focus-effect'; + + console.error(message); + } + + React.useEffect(() => { + let isFocused = false; + let cleanup: undefined | void | (() => void); + + const callback = () => { + const destroy = effect(); + + if (destroy === undefined || typeof destroy === 'function') { + return destroy; + } + + if (process.env.NODE_ENV !== 'production') { + let message = + 'An effect function must not return anything besides a function, which is used for clean-up.'; + + if (destroy === null) { + message += + " You returned 'null'. If your effect does not require clean-up, return 'undefined' (or nothing)."; + } else if (typeof (destroy as any).then === 'function') { + message += + "\n\nIt looks like you wrote 'useFocusEffect(async () => ...)' or returned a Promise. " + + 'Instead, write the async function inside your effect ' + + 'and call it immediately:\n\n' + + 'useFocusEffect(\n' + + ' React.useCallback(() => {\n' + + ' async function fetchData() {\n' + + ' // You can await here\n' + + ' const response = await MyAPI.getData(someId);\n' + + ' // ...\n' + + ' }\n\n' + + ' fetchData();\n' + + ' }, [someId])\n' + + ');\n\n' + + 'See usage guide: https://reactnavigation.org/docs/use-focus-effect'; + } else { + message += ` You returned '${JSON.stringify(destroy)}'.`; + } + + console.error(message); + } + }; + + // We need to run the effect on intial render/dep changes if the screen is focused + if (navigation.isFocused()) { + cleanup = callback(); + isFocused = true; + } + + const unsubscribeFocus = navigation.addListener('focus', () => { + // If callback was already called for focus, avoid calling it again + // The focus event may also fire on intial render, so we guard against runing the effect twice + if (isFocused) { + return; + } + + if (cleanup !== undefined) { + cleanup(); + } + + cleanup = callback(); + isFocused = true; + }); + + const unsubscribeBlur = navigation.addListener('blur', () => { + if (cleanup !== undefined) { + cleanup(); + } + + cleanup = undefined; + isFocused = false; + }); + + return () => { + if (cleanup !== undefined) { + cleanup(); + } + + unsubscribeFocus(); + unsubscribeBlur(); + }; + }, [effect, navigation]); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useFocusEvents.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useFocusEvents.tsx new file mode 100644 index 00000000..39ea15e1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useFocusEvents.tsx @@ -0,0 +1,73 @@ +import type { NavigationState } from '@react-navigation/routers'; +import * as React from 'react'; + +import NavigationContext from './NavigationContext'; +import type { EventMapCore } from './types'; +import type { NavigationEventEmitter } from './useEventEmitter'; + +type Options = { + state: State; + emitter: NavigationEventEmitter>; +}; + +/** + * Hook to take care of emitting `focus` and `blur` events. + */ +export default function useFocusEvents({ + state, + emitter, +}: Options) { + const navigation = React.useContext(NavigationContext); + const lastFocusedKeyRef = React.useRef(); + + const currentFocusedKey = state.routes[state.index].key; + + // When the parent screen changes its focus state, we also need to change child's focus + // Coz the child screen can't be focused if the parent screen is out of focus + React.useEffect( + () => + navigation?.addListener('focus', () => { + lastFocusedKeyRef.current = currentFocusedKey; + emitter.emit({ type: 'focus', target: currentFocusedKey }); + }), + [currentFocusedKey, emitter, navigation] + ); + + React.useEffect( + () => + navigation?.addListener('blur', () => { + lastFocusedKeyRef.current = undefined; + emitter.emit({ type: 'blur', target: currentFocusedKey }); + }), + [currentFocusedKey, emitter, navigation] + ); + + React.useEffect(() => { + const lastFocusedKey = lastFocusedKeyRef.current; + + lastFocusedKeyRef.current = currentFocusedKey; + + // We wouldn't have `lastFocusedKey` on initial mount + // Fire focus event for the current route on mount if there's no parent navigator + if (lastFocusedKey === undefined && !navigation) { + emitter.emit({ type: 'focus', target: currentFocusedKey }); + } + + // We should only emit events when the focused key changed and navigator is focused + // When navigator is not focused, screens inside shouldn't receive focused status either + if ( + lastFocusedKey === currentFocusedKey || + !(navigation ? navigation.isFocused() : true) + ) { + return; + } + + if (lastFocusedKey === undefined) { + // Only fire events after initial mount + return; + } + + emitter.emit({ type: 'blur', target: lastFocusedKey }); + emitter.emit({ type: 'focus', target: currentFocusedKey }); + }, [currentFocusedKey, emitter, navigation]); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useFocusedListenersChildrenAdapter.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useFocusedListenersChildrenAdapter.tsx new file mode 100644 index 00000000..b7e43493 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useFocusedListenersChildrenAdapter.tsx @@ -0,0 +1,47 @@ +import type { ParamListBase } from '@react-navigation/routers'; +import * as React from 'react'; + +import NavigationBuilderContext, { + FocusedNavigationCallback, + FocusedNavigationListener, +} from './NavigationBuilderContext'; +import type { NavigationHelpers } from './types'; + +type Options = { + navigation: NavigationHelpers; + focusedListeners: FocusedNavigationListener[]; +}; + +/** + * Hook for passing focus callback to children + */ +export default function useFocusedListenersChildrenAdapter({ + navigation, + focusedListeners, +}: Options) { + const { addListener } = React.useContext(NavigationBuilderContext); + + const listener = React.useCallback( + (callback: FocusedNavigationCallback) => { + if (navigation.isFocused()) { + for (const listener of focusedListeners) { + const { handled, result } = listener(callback); + + if (handled) { + return { handled, result }; + } + } + + return { handled: true, result: callback(navigation) }; + } else { + return { handled: false, result: null }; + } + }, + [focusedListeners, navigation] + ); + + React.useEffect( + () => addListener?.('focus', listener), + [addListener, listener] + ); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useIsFocused.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useIsFocused.tsx new file mode 100644 index 00000000..d3135792 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useIsFocused.tsx @@ -0,0 +1,43 @@ +import * as React from 'react'; +import { useState } from 'react'; + +import useNavigation from './useNavigation'; + +/** + * Hook to get the current focus state of the screen. Returns a `true` if screen is focused, otherwise `false`. + * This can be used if a component needs to render something based on the focus state. + */ +export default function useIsFocused(): boolean { + const navigation = useNavigation(); + const [isFocused, setIsFocused] = useState(navigation.isFocused); + + const valueToReturn = navigation.isFocused(); + + if (isFocused !== valueToReturn) { + // If the value has changed since the last render, we need to update it. + // This could happen if we missed an update from the event listeners during re-render. + // React will process this update immediately, so the old subscription value won't be committed. + // It is still nice to avoid returning a mismatched value though, so let's override the return value. + // This is the same logic as in https://github.com/facebook/react/tree/master/packages/use-subscription + setIsFocused(valueToReturn); + } + + React.useEffect(() => { + const unsubscribeFocus = navigation.addListener('focus', () => + setIsFocused(true) + ); + + const unsubscribeBlur = navigation.addListener('blur', () => + setIsFocused(false) + ); + + return () => { + unsubscribeFocus(); + unsubscribeBlur(); + }; + }, [navigation]); + + React.useDebugValue(valueToReturn); + + return valueToReturn; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useKeyedChildListeners.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useKeyedChildListeners.tsx new file mode 100644 index 00000000..6cbdba41 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useKeyedChildListeners.tsx @@ -0,0 +1,42 @@ +import * as React from 'react'; + +import type { KeyedListenerMap } from './NavigationBuilderContext'; + +/** + * Hook which lets child navigators add getters to be called for obtaining rehydrated state. + */ +export default function useKeyedChildListeners() { + const { current: keyedListeners } = React.useRef<{ + [K in keyof KeyedListenerMap]: Record< + string, + KeyedListenerMap[K] | undefined + >; + }>( + Object.assign(Object.create(null), { + getState: {}, + beforeRemove: {}, + }) + ); + + const addKeyedListener = React.useCallback( + ( + type: T, + key: string, + listener: KeyedListenerMap[T] + ) => { + // @ts-expect-error: according to ref stated above you can use `key` to index type + keyedListeners[type][key] = listener; + + return () => { + // @ts-expect-error: according to ref stated above you can use `key` to index type + keyedListeners[type][key] = undefined; + }; + }, + [keyedListeners] + ); + + return { + keyedListeners, + addKeyedListener, + }; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigation.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigation.tsx new file mode 100644 index 00000000..150f08d2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigation.tsx @@ -0,0 +1,26 @@ +import * as React from 'react'; + +import NavigationContainerRefContext from './NavigationContainerRefContext'; +import NavigationContext from './NavigationContext'; +import type { NavigationProp } from './types'; + +/** + * Hook to access the navigation prop of the parent screen anywhere. + * + * @returns Navigation prop of the parent screen. + */ +export default function useNavigation< + T = NavigationProp +>(): T { + const root = React.useContext(NavigationContainerRefContext); + const navigation = React.useContext(NavigationContext); + + if (navigation === undefined && root === undefined) { + throw new Error( + "Couldn't find a navigation object. Is your component inside NavigationContainer?" + ); + } + + // FIXME: Figure out a better way to do this + return (navigation ?? root) as unknown as T; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx new file mode 100644 index 00000000..76442df0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx @@ -0,0 +1,723 @@ +import { + CommonActions, + DefaultRouterOptions, + NavigationAction, + NavigationState, + ParamListBase, + PartialState, + Route, + Router, + RouterConfigOptions, + RouterFactory, +} from '@react-navigation/routers'; +import * as React from 'react'; +import { isValidElementType } from 'react-is'; + +import Group from './Group'; +import isArrayEqual from './isArrayEqual'; +import isRecordEqual from './isRecordEqual'; +import NavigationHelpersContext from './NavigationHelpersContext'; +import NavigationRouteContext from './NavigationRouteContext'; +import NavigationStateContext from './NavigationStateContext'; +import PreventRemoveProvider from './PreventRemoveProvider'; +import Screen from './Screen'; +import { + DefaultNavigatorOptions, + EventMapBase, + EventMapCore, + NavigatorScreenParams, + PrivateValueStore, + RouteConfig, + RouteProp, +} from './types'; +import useChildListeners from './useChildListeners'; +import useComponent from './useComponent'; +import useCurrentRender from './useCurrentRender'; +import useDescriptors, { ScreenConfigWithParent } from './useDescriptors'; +import useEventEmitter from './useEventEmitter'; +import useFocusedListenersChildrenAdapter from './useFocusedListenersChildrenAdapter'; +import useFocusEvents from './useFocusEvents'; +import useKeyedChildListeners from './useKeyedChildListeners'; +import useNavigationHelpers from './useNavigationHelpers'; +import useOnAction from './useOnAction'; +import useOnGetState from './useOnGetState'; +import useOnRouteFocus from './useOnRouteFocus'; +import useRegisterNavigator from './useRegisterNavigator'; +import useScheduleUpdate from './useScheduleUpdate'; + +// This is to make TypeScript compiler happy +// eslint-disable-next-line babel/no-unused-expressions +PrivateValueStore; + +type NavigationBuilderOptions = { + /** + * Default options specified by the navigator. + * It receives the custom options in the arguments if a function is specified. + */ + defaultScreenOptions?: + | ScreenOptions + | ((props: { + route: RouteProp; + navigation: any; + options: ScreenOptions; + }) => ScreenOptions); +}; + +type NavigatorRoute = { + key: string; + params?: NavigatorScreenParams; +}; + +const isValidKey = (key: unknown) => + key === undefined || (typeof key === 'string' && key !== ''); + +/** + * Extract route config object from React children elements. + * + * @param children React Elements to extract the config from. + */ +const getRouteConfigsFromChildren = < + State extends NavigationState, + ScreenOptions extends {}, + EventMap extends EventMapBase +>( + children: React.ReactNode, + groupKey?: string, + groupOptions?: ScreenConfigWithParent< + State, + ScreenOptions, + EventMap + >['options'] +) => { + const configs = React.Children.toArray(children).reduce< + ScreenConfigWithParent[] + >((acc, child) => { + if (React.isValidElement(child)) { + if (child.type === Screen) { + // We can only extract the config from `Screen` elements + // If something else was rendered, it's probably a bug + + if (!isValidKey(child.props.navigationKey)) { + throw new Error( + `Got an invalid 'navigationKey' prop (${JSON.stringify( + child.props.navigationKey + )}) for the screen '${ + child.props.name + }'. It must be a non-empty string or 'undefined'.` + ); + } + + acc.push({ + keys: [groupKey, child.props.navigationKey], + options: groupOptions, + props: child.props as RouteConfig< + ParamListBase, + string, + State, + ScreenOptions, + EventMap + >, + }); + return acc; + } + + if (child.type === React.Fragment || child.type === Group) { + if (!isValidKey(child.props.navigationKey)) { + throw new Error( + `Got an invalid 'navigationKey' prop (${JSON.stringify( + child.props.navigationKey + )}) for the group. It must be a non-empty string or 'undefined'.` + ); + } + + // When we encounter a fragment or group, we need to dive into its children to extract the configs + // This is handy to conditionally define a group of screens + acc.push( + ...getRouteConfigsFromChildren( + child.props.children, + child.props.navigationKey, + child.type !== Group + ? groupOptions + : groupOptions != null + ? [...groupOptions, child.props.screenOptions] + : [child.props.screenOptions] + ) + ); + return acc; + } + } + + throw new Error( + `A navigator can only contain 'Screen', 'Group' or 'React.Fragment' as its direct children (found ${ + React.isValidElement(child) + ? `'${ + typeof child.type === 'string' ? child.type : child.type?.name + }'${ + child.props?.name ? ` for the screen '${child.props.name}'` : '' + }` + : typeof child === 'object' + ? JSON.stringify(child) + : `'${String(child)}'` + }). To render this component in the navigator, pass it in the 'component' prop to 'Screen'.` + ); + }, []); + + if (process.env.NODE_ENV !== 'production') { + configs.forEach((config) => { + const { name, children, component, getComponent } = config.props; + + if (typeof name !== 'string' || !name) { + throw new Error( + `Got an invalid name (${JSON.stringify( + name + )}) for the screen. It must be a non-empty string.` + ); + } + + if ( + children != null || + component !== undefined || + getComponent !== undefined + ) { + if (children != null && component !== undefined) { + throw new Error( + `Got both 'component' and 'children' props for the screen '${name}'. You must pass only one of them.` + ); + } + + if (children != null && getComponent !== undefined) { + throw new Error( + `Got both 'getComponent' and 'children' props for the screen '${name}'. You must pass only one of them.` + ); + } + + if (component !== undefined && getComponent !== undefined) { + throw new Error( + `Got both 'component' and 'getComponent' props for the screen '${name}'. You must pass only one of them.` + ); + } + + if (children != null && typeof children !== 'function') { + throw new Error( + `Got an invalid value for 'children' prop for the screen '${name}'. It must be a function returning a React Element.` + ); + } + + if (component !== undefined && !isValidElementType(component)) { + throw new Error( + `Got an invalid value for 'component' prop for the screen '${name}'. It must be a valid React Component.` + ); + } + + if (getComponent !== undefined && typeof getComponent !== 'function') { + throw new Error( + `Got an invalid value for 'getComponent' prop for the screen '${name}'. It must be a function returning a React Component.` + ); + } + + if (typeof component === 'function') { + if (component.name === 'component') { + // Inline anonymous functions passed in the `component` prop will have the name of the prop + // It's relatively safe to assume that it's not a component since it should also have PascalCase name + // We won't catch all scenarios here, but this should catch a good chunk of incorrect use. + console.warn( + `Looks like you're passing an inline function for 'component' prop for the screen '${name}' (e.g. component={() => }). Passing an inline function will cause the component state to be lost on re-render and cause perf issues since it's re-created every render. You can pass the function as children to 'Screen' instead to achieve the desired behaviour.` + ); + } else if (/^[a-z]/.test(component.name)) { + console.warn( + `Got a component with the name '${component.name}' for the screen '${name}'. React Components must start with an uppercase letter. If you're passing a regular function and not a component, pass it as children to 'Screen' instead. Otherwise capitalize your component's name.` + ); + } + } + } else { + throw new Error( + `Couldn't find a 'component', 'getComponent' or 'children' prop for the screen '${name}'. This can happen if you passed 'undefined'. You likely forgot to export your component from the file it's defined in, or mixed up default import and named import when importing.` + ); + } + }); + } + + return configs; +}; + +/** + * Hook for building navigators. + * + * @param createRouter Factory method which returns router object. + * @param options Options object containing `children` and additional options for the router. + * @returns An object containing `state`, `navigation`, `descriptors` objects. + */ +export default function useNavigationBuilder< + State extends NavigationState, + RouterOptions extends DefaultRouterOptions, + ActionHelpers extends Record void>, + ScreenOptions extends {}, + EventMap extends Record +>( + createRouter: RouterFactory, + options: DefaultNavigatorOptions< + ParamListBase, + State, + ScreenOptions, + EventMap + > & + NavigationBuilderOptions & + RouterOptions +) { + const navigatorKey = useRegisterNavigator(); + + const route = React.useContext(NavigationRouteContext) as + | NavigatorRoute + | undefined; + + const { children, screenListeners, ...rest } = options; + const { current: router } = React.useRef>( + createRouter({ + ...(rest as unknown as RouterOptions), + ...(route?.params && + route.params.state == null && + route.params.initial !== false && + typeof route.params.screen === 'string' + ? { initialRouteName: route.params.screen } + : null), + }) + ); + + const routeConfigs = getRouteConfigsFromChildren< + State, + ScreenOptions, + EventMap + >(children); + + const screens = routeConfigs.reduce< + Record> + >((acc, config) => { + if (config.props.name in acc) { + throw new Error( + `A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '${config.props.name}')` + ); + } + + acc[config.props.name] = config; + return acc; + }, {}); + + const routeNames = routeConfigs.map((config) => config.props.name); + const routeKeyList = routeNames.reduce>( + (acc, curr) => { + acc[curr] = screens[curr].keys.map((key) => key ?? '').join(':'); + return acc; + }, + {} + ); + const routeParamList = routeNames.reduce>( + (acc, curr) => { + const { initialParams } = screens[curr].props; + acc[curr] = initialParams; + return acc; + }, + {} + ); + const routeGetIdList = routeNames.reduce< + RouterConfigOptions['routeGetIdList'] + >( + (acc, curr) => + Object.assign(acc, { + [curr]: screens[curr].props.getId, + }), + {} + ); + + if (!routeNames.length) { + throw new Error( + "Couldn't find any screens for the navigator. Have you defined any screens as its children?" + ); + } + + const isStateValid = React.useCallback( + (state: NavigationState | PartialState) => + state.type === undefined || state.type === router.type, + [router.type] + ); + + const isStateInitialized = React.useCallback( + (state: NavigationState | PartialState | undefined) => + state !== undefined && state.stale === false && isStateValid(state), + [isStateValid] + ); + + const { + state: currentState, + getState: getCurrentState, + setState: setCurrentState, + setKey, + getKey, + getIsInitial, + } = React.useContext(NavigationStateContext); + + const stateCleanedUp = React.useRef(false); + + const cleanUpState = React.useCallback(() => { + setCurrentState(undefined); + stateCleanedUp.current = true; + }, [setCurrentState]); + + const setState = React.useCallback( + (state: NavigationState | PartialState | undefined) => { + if (stateCleanedUp.current) { + // State might have been already cleaned up due to unmount + // We do not want to expose API allowing to override this + // This would lead to old data preservation on main navigator unmount + return; + } + setCurrentState(state); + }, + [setCurrentState] + ); + + const [initializedState, isFirstStateInitialization] = React.useMemo(() => { + const initialRouteParamList = routeNames.reduce< + Record + >((acc, curr) => { + const { initialParams } = screens[curr].props; + const initialParamsFromParams = + route?.params?.state == null && + route?.params?.initial !== false && + route?.params?.screen === curr + ? route.params.params + : undefined; + + acc[curr] = + initialParams !== undefined || initialParamsFromParams !== undefined + ? { + ...initialParams, + ...initialParamsFromParams, + } + : undefined; + + return acc; + }, {}); + + // If the current state isn't initialized on first render, we initialize it + // We also need to re-initialize it if the state passed from parent was changed (maybe due to reset) + // Otherwise assume that the state was provided as initial state + // So we need to rehydrate it to make it usable + if ( + (currentState === undefined || !isStateValid(currentState)) && + route?.params?.state == null + ) { + return [ + router.getInitialState({ + routeNames, + routeParamList: initialRouteParamList, + routeGetIdList, + }), + true, + ]; + } else { + return [ + router.getRehydratedState( + route?.params?.state ?? (currentState as PartialState), + { + routeNames, + routeParamList: initialRouteParamList, + routeGetIdList, + } + ), + false, + ]; + } + // We explicitly don't include routeNames, route.params etc. in the dep list + // below. We want to avoid forcing a new state to be calculated in those cases + // Instead, we handle changes to these in the nextState code below. Note + // that some changes to routeConfigs are explicitly ignored, such as changes + // to initialParams + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [currentState, router, isStateValid]); + + const previousRouteKeyListRef = React.useRef(routeKeyList); + + React.useEffect(() => { + previousRouteKeyListRef.current = routeKeyList; + }); + + const previousRouteKeyList = previousRouteKeyListRef.current; + + let state = + // If the state isn't initialized, or stale, use the state we initialized instead + // The state won't update until there's a change needed in the state we have initalized locally + // So it'll be `undefined` or stale until the first navigation event happens + isStateInitialized(currentState) + ? (currentState as State) + : (initializedState as State); + + let nextState: State = state; + + if ( + !isArrayEqual(state.routeNames, routeNames) || + !isRecordEqual(routeKeyList, previousRouteKeyList) + ) { + // When the list of route names change, the router should handle it to remove invalid routes + nextState = router.getStateForRouteNamesChange(state, { + routeNames, + routeParamList, + routeGetIdList, + routeKeyChanges: Object.keys(routeKeyList).filter( + (name) => + previousRouteKeyList.hasOwnProperty(name) && + routeKeyList[name] !== previousRouteKeyList[name] + ), + }); + } + + const previousNestedParamsRef = React.useRef(route?.params); + + React.useEffect(() => { + previousNestedParamsRef.current = route?.params; + }, [route?.params]); + + if (route?.params) { + const previousParams = previousNestedParamsRef.current; + + let action: CommonActions.Action | undefined; + + if ( + typeof route.params.state === 'object' && + route.params.state != null && + route.params !== previousParams + ) { + // If the route was updated with new state, we should reset to it + action = CommonActions.reset(route.params.state); + } else if ( + typeof route.params.screen === 'string' && + ((route.params.initial === false && isFirstStateInitialization) || + route.params !== previousParams) + ) { + // If the route was updated with new screen name and/or params, we should navigate there + action = CommonActions.navigate({ + name: route.params.screen, + params: route.params.params, + path: route.params.path, + }); + } + + // The update should be limited to current navigator only, so we call the router manually + const updatedState = action + ? router.getStateForAction(nextState, action, { + routeNames, + routeParamList, + routeGetIdList, + }) + : null; + + nextState = + updatedState !== null + ? router.getRehydratedState(updatedState, { + routeNames, + routeParamList, + routeGetIdList, + }) + : nextState; + } + + const shouldUpdate = state !== nextState; + + useScheduleUpdate(() => { + if (shouldUpdate) { + // If the state needs to be updated, we'll schedule an update + setState(nextState); + } + }); + + // The up-to-date state will come in next render, but we don't need to wait for it + // We can't use the outdated state since the screens have changed, which will cause error due to mismatched config + // So we override the state object we return to use the latest state as soon as possible + state = nextState; + + React.useEffect(() => { + setKey(navigatorKey); + + if (!getIsInitial()) { + // If it's not initial render, we need to update the state + // This will make sure that our container gets notifier of state changes due to new mounts + // This is necessary for proper screen tracking, URL updates etc. + setState(nextState); + } + + return () => { + // We need to clean up state for this navigator on unmount + // We do it in a timeout because we need to detect if another navigator mounted in the meantime + // For example, if another navigator has started rendering, we should skip cleanup + // Otherwise, our cleanup step will cleanup state for the other navigator and re-initialize it + setTimeout(() => { + if (getCurrentState() !== undefined && getKey() === navigatorKey) { + cleanUpState(); + } + }, 0); + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + // We initialize this ref here to avoid a new getState getting initialized + // whenever initializedState changes. We want getState to have access to the + // latest initializedState, but don't need it to change when that happens + const initializedStateRef = React.useRef(); + initializedStateRef.current = initializedState; + + const getState = React.useCallback((): State => { + const currentState = getCurrentState(); + + return isStateInitialized(currentState) + ? (currentState as State) + : (initializedStateRef.current as State); + }, [getCurrentState, isStateInitialized]); + + const emitter = useEventEmitter>((e) => { + let routeNames = []; + + let route: Route | undefined; + + if (e.target) { + route = state.routes.find((route) => route.key === e.target); + + if (route?.name) { + routeNames.push(route.name); + } + } else { + route = state.routes[state.index]; + routeNames.push( + ...Object.keys(screens).filter((name) => route?.name === name) + ); + } + + if (route == null) { + return; + } + + const navigation = descriptors[route.key].navigation; + + const listeners = ([] as (((e: any) => void) | undefined)[]) + .concat( + // Get an array of listeners for all screens + common listeners on navigator + ...[ + screenListeners, + ...routeNames.map((name) => { + const { listeners } = screens[name].props; + return listeners; + }), + ].map((listeners) => { + const map = + typeof listeners === 'function' + ? listeners({ route: route as any, navigation }) + : listeners; + + return map + ? Object.keys(map) + .filter((type) => type === e.type) + .map((type) => map?.[type]) + : undefined; + }) + ) + // We don't want same listener to be called multiple times for same event + // So we remove any duplicate functions from the array + .filter((cb, i, self) => cb && self.lastIndexOf(cb) === i); + + listeners.forEach((listener) => listener?.(e)); + }); + + useFocusEvents({ state, emitter }); + + React.useEffect(() => { + emitter.emit({ type: 'state', data: { state } }); + }, [emitter, state]); + + const { listeners: childListeners, addListener } = useChildListeners(); + + const { keyedListeners, addKeyedListener } = useKeyedChildListeners(); + + const onAction = useOnAction({ + router, + getState, + setState, + key: route?.key, + actionListeners: childListeners.action, + beforeRemoveListeners: keyedListeners.beforeRemove, + routerConfigOptions: { + routeNames, + routeParamList, + routeGetIdList, + }, + emitter, + }); + + const onRouteFocus = useOnRouteFocus({ + router, + key: route?.key, + getState, + setState, + }); + + const navigation = useNavigationHelpers< + State, + ActionHelpers, + NavigationAction, + EventMap + >({ + id: options.id, + onAction, + getState, + emitter, + router, + }); + + useFocusedListenersChildrenAdapter({ + navigation, + focusedListeners: childListeners.focus, + }); + + useOnGetState({ + getState, + getStateListeners: keyedListeners.getState, + }); + + const descriptors = useDescriptors< + State, + ActionHelpers, + ScreenOptions, + EventMap + >({ + state, + screens, + navigation, + screenOptions: options.screenOptions, + defaultScreenOptions: options.defaultScreenOptions, + onAction, + getState, + setState, + onRouteFocus, + addListener, + addKeyedListener, + router, + // @ts-expect-error: this should have both core and custom events, but too much work right now + emitter, + }); + + useCurrentRender({ + state, + navigation, + descriptors, + }); + + const NavigationContent = useComponent((children: React.ReactNode) => ( + + {children} + + )); + + return { + state, + navigation, + descriptors, + NavigationContent, + }; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationCache.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationCache.tsx new file mode 100644 index 00000000..390120ab --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationCache.tsx @@ -0,0 +1,175 @@ +import { + CommonActions, + NavigationAction, + NavigationState, + ParamListBase, + Router, +} from '@react-navigation/routers'; +import * as React from 'react'; + +import NavigationBuilderContext from './NavigationBuilderContext'; +import type { NavigationHelpers, NavigationProp } from './types'; +import type { NavigationEventEmitter } from './useEventEmitter'; + +type Options< + State extends NavigationState, + EventMap extends Record +> = { + state: State; + getState: () => State; + navigation: NavigationHelpers & + Partial>; + setOptions: ( + cb: (options: Record) => Record + ) => void; + router: Router; + emitter: NavigationEventEmitter; +}; + +type NavigationCache< + State extends NavigationState, + ScreenOptions extends {}, + EventMap extends Record +> = Record< + string, + NavigationProp< + ParamListBase, + string, + string | undefined, + State, + ScreenOptions, + EventMap + > +>; + +/** + * Hook to cache navigation objects for each screen in the navigator. + * It's important to cache them to make sure navigation objects don't change between renders. + * This lets us apply optimizations like `React.memo` to minimize re-rendering screens. + */ +export default function useNavigationCache< + State extends NavigationState, + ScreenOptions extends {}, + EventMap extends Record +>({ + state, + getState, + navigation, + setOptions, + router, + emitter, +}: Options) { + const { stackRef } = React.useContext(NavigationBuilderContext); + + // Cache object which holds navigation objects for each screen + // We use `React.useMemo` instead of `React.useRef` coz we want to invalidate it when deps change + // In reality, these deps will rarely change, if ever + const cache = React.useMemo( + () => ({ current: {} as NavigationCache }), + // eslint-disable-next-line react-hooks/exhaustive-deps + [getState, navigation, setOptions, router, emitter] + ); + + const actions = { + ...router.actionCreators, + ...CommonActions, + }; + + cache.current = state.routes.reduce< + NavigationCache + >((acc, route) => { + const previous = cache.current[route.key]; + + type Thunk = + | NavigationAction + | ((state: State) => NavigationAction | null | undefined); + + if (previous) { + // If a cached navigation object already exists, reuse it + acc[route.key] = previous; + } else { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { emit, ...rest } = navigation; + + const dispatch = (thunk: Thunk) => { + const action = typeof thunk === 'function' ? thunk(getState()) : thunk; + + if (action != null) { + navigation.dispatch({ source: route.key, ...action }); + } + }; + + const withStack = (callback: () => void) => { + let isStackSet = false; + + try { + if ( + process.env.NODE_ENV !== 'production' && + stackRef && + !stackRef.current + ) { + // Capture the stack trace for devtools + stackRef.current = new Error().stack; + isStackSet = true; + } + + callback(); + } finally { + if (isStackSet && stackRef) { + stackRef.current = undefined; + } + } + }; + + const helpers = Object.keys(actions).reduce void>>( + (acc, name) => { + acc[name] = (...args: any) => + withStack(() => + // @ts-expect-error: name is a valid key, but TypeScript is dumb + dispatch(actions[name](...args)) + ); + + return acc; + }, + {} + ); + + acc[route.key] = { + ...rest, + ...helpers, + // FIXME: too much work to fix the types for now + ...(emitter.create(route.key) as any), + dispatch: (thunk: Thunk) => withStack(() => dispatch(thunk)), + getParent: (id?: string) => { + if (id !== undefined && id === rest.getId()) { + // If the passed id is the same as the current navigation id, + // we return the cached navigation object for the relevant route + return acc[route.key]; + } + + return rest.getParent(id); + }, + setOptions: (options: object) => + setOptions((o) => ({ + ...o, + [route.key]: { ...o[route.key], ...options }, + })), + isFocused: () => { + const state = getState(); + + if (state.routes[state.index].key !== route.key) { + return false; + } + + // If the current screen is focused, we also need to check if parent navigator is focused + // This makes sure that we return the focus state in the whole tree, not just this navigator + return navigation ? navigation.isFocused() : true; + }, + }; + } + + return acc; + }, {}); + + return cache.current; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationContainerRef.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationContainerRef.tsx new file mode 100644 index 00000000..102efc40 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationContainerRef.tsx @@ -0,0 +1,17 @@ +import * as React from 'react'; + +import createNavigationContainerRef from './createNavigationContainerRef'; +import type { NavigationContainerRefWithCurrent } from './types'; + +export default function useNavigationContainerRef< + ParamList extends {} = ReactNavigation.RootParamList +>(): NavigationContainerRefWithCurrent { + const navigation = + React.useRef | null>(null); + + if (navigation.current == null) { + navigation.current = createNavigationContainerRef(); + } + + return navigation.current; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationHelpers.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationHelpers.tsx new file mode 100644 index 00000000..945e6d87 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationHelpers.tsx @@ -0,0 +1,116 @@ +import { + CommonActions, + NavigationAction, + NavigationState, + ParamListBase, + Router, +} from '@react-navigation/routers'; +import * as React from 'react'; + +import NavigationContext from './NavigationContext'; +import { NavigationHelpers, PrivateValueStore } from './types'; +import UnhandledActionContext from './UnhandledActionContext'; +import type { NavigationEventEmitter } from './useEventEmitter'; + +// This is to make TypeScript compiler happy +// eslint-disable-next-line babel/no-unused-expressions +PrivateValueStore; + +type Options = { + id: string | undefined; + onAction: (action: NavigationAction) => boolean; + getState: () => State; + emitter: NavigationEventEmitter; + router: Router; +}; + +/** + * Navigation object with helper methods to be used by a navigator. + * This object includes methods for common actions as well as methods the parent screen's navigation object. + */ +export default function useNavigationHelpers< + State extends NavigationState, + ActionHelpers extends Record void>, + Action extends NavigationAction, + EventMap extends Record +>({ + id: navigatorId, + onAction, + getState, + emitter, + router, +}: Options) { + const onUnhandledAction = React.useContext(UnhandledActionContext); + const parentNavigationHelpers = React.useContext(NavigationContext); + + return React.useMemo(() => { + const dispatch = (op: Action | ((state: State) => Action)) => { + const action = typeof op === 'function' ? op(getState()) : op; + + const handled = onAction(action); + + if (!handled) { + onUnhandledAction?.(action); + } + }; + + const actions = { + ...router.actionCreators, + ...CommonActions, + }; + + const helpers = Object.keys(actions).reduce((acc, name) => { + // @ts-expect-error: name is a valid key, but TypeScript is dumb + acc[name] = (...args: any) => dispatch(actions[name](...args)); + return acc; + }, {} as ActionHelpers); + + const navigationHelpers = { + ...parentNavigationHelpers, + ...helpers, + dispatch, + emit: emitter.emit, + isFocused: parentNavigationHelpers + ? parentNavigationHelpers.isFocused + : () => true, + canGoBack: () => { + const state = getState(); + + return ( + router.getStateForAction(state, CommonActions.goBack() as Action, { + routeNames: state.routeNames, + routeParamList: {}, + routeGetIdList: {}, + }) !== null || + parentNavigationHelpers?.canGoBack() || + false + ); + }, + getId: () => navigatorId, + getParent: (id?: string) => { + if (id !== undefined) { + let current = navigationHelpers; + + while (current && id !== current.getId()) { + current = current.getParent(); + } + + return current; + } + + return parentNavigationHelpers; + }, + getState, + } as NavigationHelpers & ActionHelpers; + + return navigationHelpers; + }, [ + navigatorId, + emitter.emit, + getState, + onAction, + onUnhandledAction, + parentNavigationHelpers, + router, + ]); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationState.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationState.tsx new file mode 100644 index 00000000..21716643 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useNavigationState.tsx @@ -0,0 +1,41 @@ +import type { NavigationState, ParamListBase } from '@react-navigation/routers'; +import * as React from 'react'; + +import type { NavigationProp } from './types'; +import useNavigation from './useNavigation'; + +type Selector = ( + state: NavigationState +) => T; + +/** + * Hook to get a value from the current navigation state using a selector. + * + * @param selector Selector function to get a value from the state. + */ +export default function useNavigationState( + selector: Selector +): T { + const navigation = useNavigation>(); + + // We don't care about the state value, we run the selector again at the end + // The state is only to make sure that there's a re-render when we have a new value + const [, setResult] = React.useState(() => selector(navigation.getState())); + + // We store the selector in a ref to avoid re-subscribing listeners every render + const selectorRef = React.useRef(selector); + + React.useEffect(() => { + selectorRef.current = selector; + }); + + React.useEffect(() => { + const unsubscribe = navigation.addListener('state', (e) => { + setResult(selectorRef.current(e.data.state)); + }); + + return unsubscribe; + }, [navigation]); + + return selector(navigation.getState()); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useOnAction.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useOnAction.tsx new file mode 100644 index 00000000..9156565a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useOnAction.tsx @@ -0,0 +1,166 @@ +import type { + NavigationAction, + NavigationState, + PartialState, + Router, + RouterConfigOptions, +} from '@react-navigation/routers'; +import * as React from 'react'; + +import NavigationBuilderContext, { + ChildActionListener, + ChildBeforeRemoveListener, +} from './NavigationBuilderContext'; +import type { EventMapCore } from './types'; +import type { NavigationEventEmitter } from './useEventEmitter'; +import useOnPreventRemove, { shouldPreventRemove } from './useOnPreventRemove'; + +type Options = { + router: Router; + key?: string; + getState: () => NavigationState; + setState: (state: NavigationState | PartialState) => void; + actionListeners: ChildActionListener[]; + beforeRemoveListeners: Record; + routerConfigOptions: RouterConfigOptions; + emitter: NavigationEventEmitter>; +}; + +/** + * Hook to handle actions for a navigator, including state updates and bubbling. + * + * Bubbling an action is achieved in 2 ways: + * 1. To bubble action to parent, we expose the action handler in context and then access the parent context + * 2. To bubble action to child, child adds event listeners subscribing to actions from parent + * + * When the action handler handles as action, it returns `true`, otherwise `false`. + */ +export default function useOnAction({ + router, + getState, + setState, + key, + actionListeners, + beforeRemoveListeners, + routerConfigOptions, + emitter, +}: Options) { + const { + onAction: onActionParent, + onRouteFocus: onRouteFocusParent, + addListener: addListenerParent, + onDispatchAction, + } = React.useContext(NavigationBuilderContext); + + const routerConfigOptionsRef = + React.useRef(routerConfigOptions); + + React.useEffect(() => { + routerConfigOptionsRef.current = routerConfigOptions; + }); + + const onAction = React.useCallback( + ( + action: NavigationAction, + visitedNavigators: Set = new Set() + ) => { + const state = getState(); + + // Since actions can bubble both up and down, they could come to the same navigator again + // We keep track of navigators which have already tried to handle the action and return if it's already visited + if (visitedNavigators.has(state.key)) { + return false; + } + + visitedNavigators.add(state.key); + + if (typeof action.target !== 'string' || action.target === state.key) { + let result = router.getStateForAction( + state, + action, + routerConfigOptionsRef.current + ); + + // If a target is specified and set to current navigator, the action shouldn't bubble + // So instead of `null`, we use the state object for such cases to signal that action was handled + result = + result === null && action.target === state.key ? state : result; + + if (result !== null) { + onDispatchAction(action, state === result); + + if (state !== result) { + const isPrevented = shouldPreventRemove( + emitter, + beforeRemoveListeners, + state.routes, + result.routes, + action + ); + + if (isPrevented) { + return true; + } + + setState(result); + } + + if (onRouteFocusParent !== undefined) { + // Some actions such as `NAVIGATE` also want to bring the navigated route to focus in the whole tree + // This means we need to focus all of the parent navigators of this navigator as well + const shouldFocus = router.shouldActionChangeFocus(action); + + if (shouldFocus && key !== undefined) { + onRouteFocusParent(key); + } + } + + return true; + } + } + + if (onActionParent !== undefined) { + // Bubble action to the parent if the current navigator didn't handle it + if (onActionParent(action, visitedNavigators)) { + return true; + } + } + + // If the action wasn't handled by current navigator or a parent navigator, let children handle it + for (let i = actionListeners.length - 1; i >= 0; i--) { + const listener = actionListeners[i]; + + if (listener(action, visitedNavigators)) { + return true; + } + } + + return false; + }, + [ + actionListeners, + beforeRemoveListeners, + emitter, + getState, + key, + onActionParent, + onDispatchAction, + onRouteFocusParent, + router, + setState, + ] + ); + + useOnPreventRemove({ + getState, + emitter, + beforeRemoveListeners, + }); + + React.useEffect( + () => addListenerParent?.('action', onAction), + [addListenerParent, onAction] + ); + + return onAction; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useOnGetState.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useOnGetState.tsx new file mode 100644 index 00000000..ed620ab8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useOnGetState.tsx @@ -0,0 +1,47 @@ +import type { NavigationState } from '@react-navigation/routers'; +import * as React from 'react'; + +import isArrayEqual from './isArrayEqual'; +import NavigationBuilderContext, { + GetStateListener, +} from './NavigationBuilderContext'; +import NavigationRouteContext from './NavigationRouteContext'; + +type Options = { + getState: () => NavigationState; + getStateListeners: Record; +}; + +export default function useOnGetState({ + getState, + getStateListeners, +}: Options) { + const { addKeyedListener } = React.useContext(NavigationBuilderContext); + const route = React.useContext(NavigationRouteContext); + const key = route ? route.key : 'root'; + + const getRehydratedState = React.useCallback(() => { + const state = getState(); + + // Avoid returning new route objects if we don't need to + const routes = state.routes.map((route) => { + const childState = getStateListeners[route.key]?.(); + + if (route.state === childState) { + return route; + } + + return { ...route, state: childState }; + }); + + if (isArrayEqual(state.routes, routes)) { + return state; + } + + return { ...state, routes }; + }, [getState, getStateListeners]); + + React.useEffect(() => { + return addKeyedListener?.('getState', key, getRehydratedState); + }, [addKeyedListener, getRehydratedState, key]); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useOnPreventRemove.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useOnPreventRemove.tsx new file mode 100644 index 00000000..268ea314 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useOnPreventRemove.tsx @@ -0,0 +1,99 @@ +import type { + NavigationAction, + NavigationState, +} from '@react-navigation/routers'; +import * as React from 'react'; + +import NavigationBuilderContext, { + ChildBeforeRemoveListener, +} from './NavigationBuilderContext'; +import NavigationRouteContext from './NavigationRouteContext'; +import type { EventMapCore } from './types'; +import type { NavigationEventEmitter } from './useEventEmitter'; + +type Options = { + getState: () => NavigationState; + emitter: NavigationEventEmitter>; + beforeRemoveListeners: Record; +}; + +const VISITED_ROUTE_KEYS = Symbol('VISITED_ROUTE_KEYS'); + +export const shouldPreventRemove = ( + emitter: NavigationEventEmitter>, + beforeRemoveListeners: Record, + currentRoutes: { key: string }[], + nextRoutes: { key?: string | undefined }[], + action: NavigationAction +) => { + const nextRouteKeys = nextRoutes.map((route) => route.key); + + // Call these in reverse order so last screens handle the event first + const removedRoutes = currentRoutes + .filter((route) => !nextRouteKeys.includes(route.key)) + .reverse(); + + const visitedRouteKeys: Set = + // @ts-expect-error: add this property to mark that we've already emitted this action + action[VISITED_ROUTE_KEYS] ?? new Set(); + + const beforeRemoveAction = { + ...action, + [VISITED_ROUTE_KEYS]: visitedRouteKeys, + }; + + for (const route of removedRoutes) { + if (visitedRouteKeys.has(route.key)) { + // Skip if we've already emitted this action for this screen + continue; + } + + // First, we need to check if any child screens want to prevent it + const isPrevented = beforeRemoveListeners[route.key]?.(beforeRemoveAction); + + if (isPrevented) { + return true; + } + + visitedRouteKeys.add(route.key); + + const event = emitter.emit({ + type: 'beforeRemove', + target: route.key, + data: { action: beforeRemoveAction }, + canPreventDefault: true, + }); + + if (event.defaultPrevented) { + return true; + } + } + + return false; +}; + +export default function useOnPreventRemove({ + getState, + emitter, + beforeRemoveListeners, +}: Options) { + const { addKeyedListener } = React.useContext(NavigationBuilderContext); + const route = React.useContext(NavigationRouteContext); + const routeKey = route?.key; + + React.useEffect(() => { + if (routeKey) { + return addKeyedListener?.('beforeRemove', routeKey, (action) => { + const state = getState(); + + return shouldPreventRemove( + emitter, + beforeRemoveListeners, + state.routes, + [], + action + ); + }); + } + }, [addKeyedListener, beforeRemoveListeners, emitter, getState, routeKey]); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useOnRouteFocus.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useOnRouteFocus.tsx new file mode 100644 index 00000000..baa554af --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useOnRouteFocus.tsx @@ -0,0 +1,47 @@ +import type { + NavigationAction, + NavigationState, + Router, +} from '@react-navigation/routers'; +import * as React from 'react'; + +import NavigationBuilderContext from './NavigationBuilderContext'; + +type Options = { + router: Router; + getState: () => NavigationState; + setState: (state: NavigationState) => void; + key?: string; +}; + +/** + * Hook to handle focus actions for a route. + * Focus action needs to be treated specially, coz when a nested route is focused, + * the parent navigators also needs to be focused. + */ +export default function useOnRouteFocus({ + router, + getState, + key: sourceRouteKey, + setState, +}: Options) { + const { onRouteFocus: onRouteFocusParent } = React.useContext( + NavigationBuilderContext + ); + + return React.useCallback( + (key: string) => { + const state = getState(); + const result = router.getStateForRouteFocus(state, key); + + if (result !== state) { + setState(result); + } + + if (onRouteFocusParent !== undefined && sourceRouteKey !== undefined) { + onRouteFocusParent(sourceRouteKey); + } + }, + [getState, onRouteFocusParent, router, setState, sourceRouteKey] + ); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useOptionsGetters.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useOptionsGetters.tsx new file mode 100644 index 00000000..ffecfb3b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useOptionsGetters.tsx @@ -0,0 +1,98 @@ +import type { ParamListBase } from '@react-navigation/routers'; +import * as React from 'react'; + +import NavigationBuilderContext from './NavigationBuilderContext'; +import NavigationStateContext from './NavigationStateContext'; +import type { NavigationProp } from './types'; + +type Options = { + key?: string; + navigation?: NavigationProp; + options?: object | undefined; +}; + +export default function useOptionsGetters({ + key, + options, + navigation, +}: Options) { + const optionsRef = React.useRef(options); + const optionsGettersFromChildRef = React.useRef< + Record object | undefined | null> + >({}); + + const { onOptionsChange } = React.useContext(NavigationBuilderContext); + const { addOptionsGetter: parentAddOptionsGetter } = React.useContext( + NavigationStateContext + ); + + const optionsChangeListener = React.useCallback(() => { + const isFocused = navigation?.isFocused() ?? true; + const hasChildren = Object.keys(optionsGettersFromChildRef.current).length; + + if (isFocused && !hasChildren) { + onOptionsChange(optionsRef.current ?? {}); + } + }, [navigation, onOptionsChange]); + + React.useEffect(() => { + optionsRef.current = options; + optionsChangeListener(); + + return navigation?.addListener('focus', optionsChangeListener); + }, [navigation, options, optionsChangeListener]); + + const getOptionsFromListener = React.useCallback(() => { + for (let key in optionsGettersFromChildRef.current) { + if (optionsGettersFromChildRef.current.hasOwnProperty(key)) { + const result = optionsGettersFromChildRef.current[key]?.(); + + // null means unfocused route + if (result !== null) { + return result; + } + } + } + + return null; + }, []); + + const getCurrentOptions = React.useCallback(() => { + const isFocused = navigation?.isFocused() ?? true; + + if (!isFocused) { + return null; + } + + const optionsFromListener = getOptionsFromListener(); + + if (optionsFromListener !== null) { + return optionsFromListener; + } + + return optionsRef.current; + }, [navigation, getOptionsFromListener]); + + React.useEffect(() => { + return parentAddOptionsGetter?.(key!, getCurrentOptions); + }, [getCurrentOptions, parentAddOptionsGetter, key]); + + const addOptionsGetter = React.useCallback( + (key: string, getter: () => object | undefined | null) => { + optionsGettersFromChildRef.current[key] = getter; + optionsChangeListener(); + + return () => { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete optionsGettersFromChildRef.current[key]; + optionsChangeListener(); + }; + }, + [optionsChangeListener] + ); + + return { + addOptionsGetter, + getCurrentOptions, + }; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/usePreventRemove.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/usePreventRemove.tsx new file mode 100644 index 00000000..93b59d39 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/usePreventRemove.tsx @@ -0,0 +1,51 @@ +import type { NavigationAction } from '@react-navigation/routers'; +import { nanoid } from 'nanoid/non-secure'; +import * as React from 'react'; +import useLatestCallback from 'use-latest-callback'; + +import type { EventListenerCallback, EventMapCore } from './types'; +import useNavigation from './useNavigation'; +import usePreventRemoveContext from './usePreventRemoveContext'; +import useRoute from './useRoute'; + +/** + * Hook to prevent screen from being removed. Can be used to prevent users from leaving the screen. + * + * @param preventRemove Boolean indicating whether to prevent screen from being removed. + * @param callback Function which is executed when screen was prevented from being removed. + */ +export default function usePreventRemove( + preventRemove: boolean, + callback: (options: { data: { action: NavigationAction } }) => void +) { + const [id] = React.useState(() => nanoid()); + + const navigation = useNavigation(); + const { key: routeKey } = useRoute(); + + const { setPreventRemove } = usePreventRemoveContext(); + + React.useEffect(() => { + setPreventRemove(id, routeKey, preventRemove); + return () => { + setPreventRemove(id, routeKey, false); + }; + }, [setPreventRemove, id, routeKey, preventRemove]); + + const beforeRemoveListener = useLatestCallback< + EventListenerCallback, 'beforeRemove'> + >((e) => { + if (!preventRemove) { + return; + } + + e.preventDefault(); + + callback({ data: e.data }); + }); + + React.useEffect( + () => navigation?.addListener('beforeRemove', beforeRemoveListener), + [navigation, beforeRemoveListener] + ); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/usePreventRemoveContext.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/usePreventRemoveContext.tsx new file mode 100644 index 00000000..475fe0b0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/usePreventRemoveContext.tsx @@ -0,0 +1,15 @@ +import * as React from 'react'; + +import PreventRemoveContext from './PreventRemoveContext'; + +export default function usePreventRemoveContext() { + const value = React.useContext(PreventRemoveContext); + + if (value == null) { + throw new Error( + "Couldn't find the prevent remove context. Is your component inside NavigationContent?" + ); + } + + return value; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useRegisterNavigator.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useRegisterNavigator.tsx new file mode 100644 index 00000000..0f159d00 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useRegisterNavigator.tsx @@ -0,0 +1,29 @@ +import { nanoid } from 'nanoid/non-secure'; +import * as React from 'react'; + +import { SingleNavigatorContext } from './EnsureSingleNavigator'; + +/** + * Register a navigator in the parent context (either a navigation container or a screen). + * This is used to prevent multiple navigators under a single container or screen. + */ +export default function useRegisterNavigator() { + const [key] = React.useState(() => nanoid()); + const container = React.useContext(SingleNavigatorContext); + + if (container === undefined) { + throw new Error( + "Couldn't register the navigator. Have you wrapped your app with 'NavigationContainer'?\n\nThis can also happen if there are multiple copies of '@react-navigation' packages installed." + ); + } + + React.useEffect(() => { + const { register, unregister } = container; + + register(key); + + return () => unregister(key); + }, [container, key]); + + return key; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useRoute.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useRoute.tsx new file mode 100644 index 00000000..48e3bcd0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useRoute.tsx @@ -0,0 +1,22 @@ +import type { ParamListBase } from '@react-navigation/routers'; +import * as React from 'react'; + +import NavigationRouteContext from './NavigationRouteContext'; +import type { RouteProp } from './types'; + +/** + * Hook to access the route prop of the parent screen anywhere. + * + * @returns Route prop of the parent screen. + */ +export default function useRoute>(): T { + const route = React.useContext(NavigationRouteContext); + + if (route === undefined) { + throw new Error( + "Couldn't find a route object. Is your component inside a screen in a navigator?" + ); + } + + return route as T; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useRouteCache.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useRouteCache.tsx new file mode 100644 index 00000000..2815ccb6 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useRouteCache.tsx @@ -0,0 +1,55 @@ +import type { + NavigationState, + ParamListBase, + Route, +} from '@react-navigation/routers'; +import * as React from 'react'; + +import type { RouteProp } from './types'; + +type RouteCache = Map, RouteProp>; + +/** + * Utilites such as `getFocusedRouteNameFromRoute` need to access state. + * So we need a way to suppress the warning for those use cases. + * This is fine since they are internal utilities and this is not public API. + */ +export const CHILD_STATE = Symbol('CHILD_STATE'); + +/** + * Hook to cache route props for each screen in the navigator. + * This lets add warnings and modifications to the route object but keep references between renders. + */ +export default function useRouteCache( + routes: State['routes'] +) { + // Cache object which holds route objects for each screen + const cache = React.useMemo(() => ({ current: new Map() as RouteCache }), []); + + if (process.env.NODE_ENV === 'production') { + // We don't want the overhead of creating extra maps every render in prod + return routes; + } + + cache.current = routes.reduce((acc, route) => { + const previous = cache.current.get(route); + + if (previous) { + // If a cached route object already exists, reuse it + acc.set(route, previous); + } else { + const { state, ...proxy } = route; + + Object.defineProperty(proxy, CHILD_STATE, { + enumerable: false, + value: state, + }); + + acc.set(route, proxy); + } + + return acc; + }, new Map() as RouteCache); + + return Array.from(cache.current.values()); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useScheduleUpdate.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useScheduleUpdate.tsx new file mode 100644 index 00000000..0cef45a7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useScheduleUpdate.tsx @@ -0,0 +1,32 @@ +import * as React from 'react'; + +const MISSING_CONTEXT_ERROR = "Couldn't find a schedule context."; + +export const ScheduleUpdateContext = React.createContext<{ + scheduleUpdate: (callback: () => void) => void; + flushUpdates: () => void; +}>({ + scheduleUpdate() { + throw new Error(MISSING_CONTEXT_ERROR); + }, + flushUpdates() { + throw new Error(MISSING_CONTEXT_ERROR); + }, +}); + +/** + * When screen config changes, we want to update the navigator in the same update phase. + * However, navigation state is in the root component and React won't let us update it from a child. + * This is a workaround for that, the scheduled update is stored in the ref without actually calling setState. + * It lets all subsequent updates access the latest state so it stays correct. + * Then we call setState during after the component updates. + */ +export default function useScheduleUpdate(callback: () => void) { + const { scheduleUpdate, flushUpdates } = React.useContext( + ScheduleUpdateContext + ); + + scheduleUpdate(callback); + + React.useEffect(flushUpdates); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/useSyncState.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/useSyncState.tsx new file mode 100644 index 00000000..bc34d1b7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/useSyncState.tsx @@ -0,0 +1,74 @@ +import * as React from 'react'; + +const UNINTIALIZED_STATE = {}; + +/** + * This is definitely not compatible with concurrent mode, but we don't have a solution for sync state yet. + */ +export default function useSyncState(initialState?: (() => T) | T) { + const stateRef = React.useRef(UNINTIALIZED_STATE as any); + const isSchedulingRef = React.useRef(false); + const isMountedRef = React.useRef(true); + + React.useEffect(() => { + isMountedRef.current = true; + + return () => { + isMountedRef.current = false; + }; + }, []); + + if (stateRef.current === UNINTIALIZED_STATE) { + stateRef.current = + // @ts-expect-error: initialState is a function, but TypeScript doesn't think so + typeof initialState === 'function' ? initialState() : initialState; + } + + const [trackingState, setTrackingState] = React.useState(stateRef.current); + + const getState = React.useCallback(() => stateRef.current, []); + + const setState = React.useCallback((state: T) => { + if (state === stateRef.current || !isMountedRef.current) { + return; + } + + stateRef.current = state; + + if (!isSchedulingRef.current) { + setTrackingState(state); + } + }, []); + + const scheduleUpdate = React.useCallback((callback: () => void) => { + isSchedulingRef.current = true; + + try { + callback(); + } finally { + isSchedulingRef.current = false; + } + }, []); + + const flushUpdates = React.useCallback(() => { + if (!isMountedRef.current) { + return; + } + + // Make sure that the tracking state is up-to-date. + // We call it unconditionally, but React should skip the update if state is unchanged. + setTrackingState(stateRef.current); + }, []); + + // If we're rendering and the tracking state is out of date, update it immediately + // This will make sure that our updates are applied as early as possible. + if (trackingState !== stateRef.current) { + setTrackingState(stateRef.current); + } + + const state = stateRef.current; + + React.useDebugValue(state); + + return [state, getState, setState, scheduleUpdate, flushUpdates] as const; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/core/src/validatePathConfig.tsx b/iut-expo-starter/node_modules/@react-navigation/core/src/validatePathConfig.tsx new file mode 100644 index 00000000..5ad01975 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/core/src/validatePathConfig.tsx @@ -0,0 +1,32 @@ +const formatToList = (items: string[]) => + items.map((key) => `- ${key}`).join('\n'); + +export default function validatePathConfig(config: any, root = true) { + const validKeys = ['initialRouteName', 'screens']; + + if (!root) { + validKeys.push('path', 'exact', 'stringify', 'parse'); + } + + const invalidKeys = Object.keys(config).filter( + (key) => !validKeys.includes(key) + ); + + if (invalidKeys.length) { + throw new Error( + `Found invalid properties in the configuration:\n${formatToList( + invalidKeys + )}\n\nDid you forget to specify them under a 'screens' property?\n\nYou can only specify the following properties:\n${formatToList( + validKeys + )}\n\nSee https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.` + ); + } + + if (config.screens) { + Object.entries(config.screens).forEach(([_, value]) => { + if (typeof value !== 'string') { + validatePathConfig(value, false); + } + }); + } +} diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/LICENSE b/iut-expo-starter/node_modules/@react-navigation/elements/LICENSE new file mode 100644 index 00000000..9d268cb0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 React Navigation Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/README.md b/iut-expo-starter/node_modules/@react-navigation/elements/README.md new file mode 100644 index 00000000..0a3ceadf --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/README.md @@ -0,0 +1,5 @@ +# `@react-navigation/elements` + +UI Components for React Navigation. + +Installation instructions and documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/elements/). diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Background.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Background.js new file mode 100644 index 00000000..2d863630 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Background.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = Background; +var _native = require("@react-navigation/native"); +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +function Background(_ref) { + let { + style, + ...rest + } = _ref; + const { + colors + } = (0, _native.useTheme)(); + return /*#__PURE__*/React.createElement(_reactNative.View, _extends({}, rest, { + style: [{ + flex: 1, + backgroundColor: colors.background + }, style] + })); +} +//# sourceMappingURL=Background.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Background.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Background.js.map new file mode 100644 index 00000000..53e23d95 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Background.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Background","style","rest","colors","useTheme","flex","backgroundColor","background"],"sourceRoot":"../../src","sources":["Background.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AAA+C;AAAA;AAAA;AAMhC,SAASA,UAAU,OAA4B;EAAA,IAA3B;IAAEC,KAAK;IAAE,GAAGC;EAAY,CAAC;EAC1D,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,gBAAQ,GAAE;EAE7B,oBACE,oBAAC,iBAAI,eACCF,IAAI;IACR,KAAK,EAAE,CAAC;MAAEG,IAAI,EAAE,CAAC;MAAEC,eAAe,EAAEH,MAAM,CAACI;IAAW,CAAC,EAAEN,KAAK;EAAE,GAChE;AAEN"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/Header.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/Header.js new file mode 100644 index 00000000..79f04aa3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/Header.js @@ -0,0 +1,239 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = Header; +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +var _reactNativeSafeAreaContext = require("react-native-safe-area-context"); +var _getDefaultHeaderHeight = _interopRequireDefault(require("./getDefaultHeaderHeight")); +var _HeaderBackground = _interopRequireDefault(require("./HeaderBackground")); +var _HeaderShownContext = _interopRequireDefault(require("./HeaderShownContext")); +var _HeaderTitle = _interopRequireDefault(require("./HeaderTitle")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const warnIfHeaderStylesDefined = styles => { + Object.keys(styles).forEach(styleProp => { + const value = styles[styleProp]; + if (styleProp === 'position' && value === 'absolute') { + console.warn("position: 'absolute' is not supported on headerStyle. If you would like to render content under the header, use the 'headerTransparent' option."); + } else if (value !== undefined) { + console.warn(`${styleProp} was given a value of ${value}, this has no effect on headerStyle.`); + } + }); +}; +function Header(props) { + const insets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)(); + const frame = (0, _reactNativeSafeAreaContext.useSafeAreaFrame)(); + const isParentHeaderShown = React.useContext(_HeaderShownContext.default); + const { + layout = frame, + modal = false, + title, + headerTitle: customTitle, + headerTitleAlign = _reactNative.Platform.select({ + ios: 'center', + default: 'left' + }), + headerLeft, + headerLeftLabelVisible, + headerTransparent, + headerTintColor, + headerBackground, + headerRight, + headerTitleAllowFontScaling: titleAllowFontScaling, + headerTitleStyle: titleStyle, + headerLeftContainerStyle: leftContainerStyle, + headerRightContainerStyle: rightContainerStyle, + headerTitleContainerStyle: titleContainerStyle, + headerBackgroundContainerStyle: backgroundContainerStyle, + headerStyle: customHeaderStyle, + headerShadowVisible, + headerPressColor, + headerPressOpacity, + headerStatusBarHeight = isParentHeaderShown ? 0 : insets.top + } = props; + const defaultHeight = (0, _getDefaultHeaderHeight.default)(layout, modal, headerStatusBarHeight); + const { + height = defaultHeight, + minHeight, + maxHeight, + backgroundColor, + borderBottomColor, + borderBottomEndRadius, + borderBottomLeftRadius, + borderBottomRightRadius, + borderBottomStartRadius, + borderBottomWidth, + borderColor, + borderEndColor, + borderEndWidth, + borderLeftColor, + borderLeftWidth, + borderRadius, + borderRightColor, + borderRightWidth, + borderStartColor, + borderStartWidth, + borderStyle, + borderTopColor, + borderTopEndRadius, + borderTopLeftRadius, + borderTopRightRadius, + borderTopStartRadius, + borderTopWidth, + borderWidth, + // @ts-expect-error: web support for shadow + boxShadow, + elevation, + shadowColor, + shadowOffset, + shadowOpacity, + shadowRadius, + opacity, + transform, + ...unsafeStyles + } = _reactNative.StyleSheet.flatten(customHeaderStyle || {}); + if (process.env.NODE_ENV !== 'production') { + warnIfHeaderStylesDefined(unsafeStyles); + } + const safeStyles = { + backgroundColor, + borderBottomColor, + borderBottomEndRadius, + borderBottomLeftRadius, + borderBottomRightRadius, + borderBottomStartRadius, + borderBottomWidth, + borderColor, + borderEndColor, + borderEndWidth, + borderLeftColor, + borderLeftWidth, + borderRadius, + borderRightColor, + borderRightWidth, + borderStartColor, + borderStartWidth, + borderStyle, + borderTopColor, + borderTopEndRadius, + borderTopLeftRadius, + borderTopRightRadius, + borderTopStartRadius, + borderTopWidth, + borderWidth, + // @ts-expect-error: boxShadow is only for Web + boxShadow, + elevation, + shadowColor, + shadowOffset, + shadowOpacity, + shadowRadius, + opacity, + transform + }; + + // Setting a property to undefined triggers default style + // So we need to filter them out + // Users can use `null` instead + for (const styleProp in safeStyles) { + // @ts-expect-error: typescript wrongly complains that styleProp cannot be used to index safeStyles + if (safeStyles[styleProp] === undefined) { + // @ts-expect-error + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete safeStyles[styleProp]; + } + } + const backgroundStyle = [safeStyles, headerShadowVisible === false && { + elevation: 0, + shadowOpacity: 0, + borderBottomWidth: 0 + }]; + const leftButton = headerLeft ? headerLeft({ + tintColor: headerTintColor, + pressColor: headerPressColor, + pressOpacity: headerPressOpacity, + labelVisible: headerLeftLabelVisible + }) : null; + const rightButton = headerRight ? headerRight({ + tintColor: headerTintColor, + pressColor: headerPressColor, + pressOpacity: headerPressOpacity + }) : null; + const headerTitle = typeof customTitle !== 'function' ? props => /*#__PURE__*/React.createElement(_HeaderTitle.default, props) : customTitle; + return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_reactNative.Animated.View, { + pointerEvents: "box-none", + style: [_reactNative.StyleSheet.absoluteFill, { + zIndex: 0 + }, backgroundContainerStyle] + }, headerBackground ? headerBackground({ + style: backgroundStyle + }) : headerTransparent ? null : /*#__PURE__*/React.createElement(_HeaderBackground.default, { + style: backgroundStyle + })), /*#__PURE__*/React.createElement(_reactNative.Animated.View, { + pointerEvents: "box-none", + style: [{ + height, + minHeight, + maxHeight, + opacity, + transform + }] + }, /*#__PURE__*/React.createElement(_reactNative.View, { + pointerEvents: "none", + style: { + height: headerStatusBarHeight + } + }), /*#__PURE__*/React.createElement(_reactNative.View, { + pointerEvents: "box-none", + style: styles.content + }, /*#__PURE__*/React.createElement(_reactNative.Animated.View, { + pointerEvents: "box-none", + style: [styles.left, headerTitleAlign === 'center' && styles.expand, { + marginStart: insets.left + }, leftContainerStyle] + }, leftButton), /*#__PURE__*/React.createElement(_reactNative.Animated.View, { + pointerEvents: "box-none", + style: [styles.title, { + // Avoid the title from going offscreen or overlapping buttons + maxWidth: headerTitleAlign === 'center' ? layout.width - ((leftButton ? headerLeftLabelVisible !== false ? 80 : 32 : 16) + Math.max(insets.left, insets.right)) * 2 : layout.width - ((leftButton ? 72 : 16) + (rightButton ? 72 : 16) + insets.left - insets.right) + }, titleContainerStyle] + }, headerTitle({ + children: title, + allowFontScaling: titleAllowFontScaling, + tintColor: headerTintColor, + style: titleStyle + })), /*#__PURE__*/React.createElement(_reactNative.Animated.View, { + pointerEvents: "box-none", + style: [styles.right, styles.expand, { + marginEnd: insets.right + }, rightContainerStyle] + }, rightButton)))); +} +const styles = _reactNative.StyleSheet.create({ + content: { + flex: 1, + flexDirection: 'row', + alignItems: 'stretch' + }, + title: { + marginHorizontal: 16, + justifyContent: 'center' + }, + left: { + justifyContent: 'center', + alignItems: 'flex-start' + }, + right: { + justifyContent: 'center', + alignItems: 'flex-end' + }, + expand: { + flexGrow: 1, + flexBasis: 0 + } +}); +//# sourceMappingURL=Header.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/Header.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/Header.js.map new file mode 100644 index 00000000..c02483c3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/Header.js.map @@ -0,0 +1 @@ +{"version":3,"names":["warnIfHeaderStylesDefined","styles","Object","keys","forEach","styleProp","value","console","warn","undefined","Header","props","insets","useSafeAreaInsets","frame","useSafeAreaFrame","isParentHeaderShown","React","useContext","HeaderShownContext","layout","modal","title","headerTitle","customTitle","headerTitleAlign","Platform","select","ios","default","headerLeft","headerLeftLabelVisible","headerTransparent","headerTintColor","headerBackground","headerRight","headerTitleAllowFontScaling","titleAllowFontScaling","headerTitleStyle","titleStyle","headerLeftContainerStyle","leftContainerStyle","headerRightContainerStyle","rightContainerStyle","headerTitleContainerStyle","titleContainerStyle","headerBackgroundContainerStyle","backgroundContainerStyle","headerStyle","customHeaderStyle","headerShadowVisible","headerPressColor","headerPressOpacity","headerStatusBarHeight","top","defaultHeight","getDefaultHeaderHeight","height","minHeight","maxHeight","backgroundColor","borderBottomColor","borderBottomEndRadius","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStartRadius","borderBottomWidth","borderColor","borderEndColor","borderEndWidth","borderLeftColor","borderLeftWidth","borderRadius","borderRightColor","borderRightWidth","borderStartColor","borderStartWidth","borderStyle","borderTopColor","borderTopEndRadius","borderTopLeftRadius","borderTopRightRadius","borderTopStartRadius","borderTopWidth","borderWidth","boxShadow","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","opacity","transform","unsafeStyles","StyleSheet","flatten","process","env","NODE_ENV","safeStyles","backgroundStyle","leftButton","tintColor","pressColor","pressOpacity","labelVisible","rightButton","absoluteFill","zIndex","style","content","left","expand","marginStart","maxWidth","width","Math","max","right","children","allowFontScaling","marginEnd","create","flex","flexDirection","alignItems","marginHorizontal","justifyContent","flexGrow","flexBasis"],"sourceRoot":"../../src","sources":["Header.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AAMA;AACA;AACA;AACA;AAAwC;AAAA;AAAA;AAiBxC,MAAMA,yBAAyB,GAAIC,MAA2B,IAAK;EACjEC,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CAACG,OAAO,CAAEC,SAAS,IAAK;IACzC,MAAMC,KAAK,GAAGL,MAAM,CAACI,SAAS,CAAC;IAE/B,IAAIA,SAAS,KAAK,UAAU,IAAIC,KAAK,KAAK,UAAU,EAAE;MACpDC,OAAO,CAACC,IAAI,CACV,iJAAiJ,CAClJ;IACH,CAAC,MAAM,IAAIF,KAAK,KAAKG,SAAS,EAAE;MAC9BF,OAAO,CAACC,IAAI,CACT,GAAEH,SAAU,yBAAwBC,KAAM,sCAAqC,CACjF;IACH;EACF,CAAC,CAAC;AACJ,CAAC;AAEc,SAASI,MAAM,CAACC,KAAY,EAAE;EAC3C,MAAMC,MAAM,GAAG,IAAAC,6CAAiB,GAAE;EAClC,MAAMC,KAAK,GAAG,IAAAC,4CAAgB,GAAE;EAEhC,MAAMC,mBAAmB,GAAGC,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EACDvG,KAAK,EAAE;IACLwG,gBAAgB,EAAE,EAAE;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDhB,IAAI,EAAE;IACJgB,cAAc,EAAE,QAAQ;IACxBF,UAAU,EAAE;EACd,CAAC;EACDP,KAAK,EAAE;IACLS,cAAc,EAAE,QAAQ;IACxBF,UAAU,EAAE;EACd,CAAC;EACDb,MAAM,EAAE;IACNgB,QAAQ,EAAE,CAAC;IACXC,SAAS,EAAE;EACb;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackButton.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackButton.js new file mode 100644 index 00000000..57fb1080 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackButton.js @@ -0,0 +1,205 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = HeaderBackButton; +var _native = require("@react-navigation/native"); +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +var _MaskedView = _interopRequireDefault(require("../MaskedView")); +var _PlatformPressable = _interopRequireDefault(require("../PlatformPressable")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function HeaderBackButton(_ref) { + let { + disabled, + allowFontScaling, + backImage, + label, + labelStyle, + labelVisible, + onLabelLayout, + onPress, + pressColor, + pressOpacity, + screenLayout, + tintColor: customTintColor, + titleLayout, + truncatedLabel = 'Back', + accessibilityLabel = label && label !== 'Back' ? `${label}, back` : 'Go back', + testID, + style + } = _ref; + const { + colors + } = (0, _native.useTheme)(); + const [initialLabelWidth, setInitialLabelWidth] = React.useState(undefined); + const tintColor = customTintColor !== undefined ? customTintColor : _reactNative.Platform.select({ + ios: colors.primary, + default: colors.text + }); + const handleLabelLayout = e => { + onLabelLayout === null || onLabelLayout === void 0 ? void 0 : onLabelLayout(e); + setInitialLabelWidth(e.nativeEvent.layout.x + e.nativeEvent.layout.width); + }; + const shouldTruncateLabel = () => { + return !label || initialLabelWidth && titleLayout && screenLayout && (screenLayout.width - titleLayout.width) / 2 < initialLabelWidth + 26; + }; + const renderBackImage = () => { + if (backImage) { + return backImage({ + tintColor + }); + } else { + return /*#__PURE__*/React.createElement(_reactNative.Image, { + style: [styles.icon, Boolean(labelVisible) && styles.iconWithLabel, Boolean(tintColor) && { + tintColor + }], + source: require('../assets/back-icon.png'), + fadeDuration: 0 + }); + } + }; + const renderLabel = () => { + const leftLabelText = shouldTruncateLabel() ? truncatedLabel : label; + if (!labelVisible || leftLabelText === undefined) { + return null; + } + const labelElement = /*#__PURE__*/React.createElement(_reactNative.View, { + style: screenLayout ? + // We make the button extend till the middle of the screen + // Otherwise it appears to cut off when translating + [styles.labelWrapper, { + minWidth: screenLayout.width / 2 - 27 + }] : null + }, /*#__PURE__*/React.createElement(_reactNative.Animated.Text, { + accessible: false, + onLayout: + // This measurement is used to determine if we should truncate the label when it doesn't fit + // Only measure it when label is not truncated because we want the measurement of full label + leftLabelText === label ? handleLabelLayout : undefined, + style: [styles.label, tintColor ? { + color: tintColor + } : null, labelStyle], + numberOfLines: 1, + allowFontScaling: !!allowFontScaling + }, leftLabelText)); + if (backImage || _reactNative.Platform.OS !== 'ios') { + // When a custom backimage is specified, we can't mask the label + // Otherwise there might be weird effect due to our mask not being the same as the image + return labelElement; + } + return /*#__PURE__*/React.createElement(_MaskedView.default, { + maskElement: /*#__PURE__*/React.createElement(_reactNative.View, { + style: styles.iconMaskContainer + }, /*#__PURE__*/React.createElement(_reactNative.Image, { + source: require('../assets/back-icon-mask.png'), + style: styles.iconMask + }), /*#__PURE__*/React.createElement(_reactNative.View, { + style: styles.iconMaskFillerRect + })) + }, labelElement); + }; + const handlePress = () => onPress && requestAnimationFrame(onPress); + return /*#__PURE__*/React.createElement(_PlatformPressable.default, { + disabled: disabled, + accessible: true, + accessibilityRole: "button", + accessibilityLabel: accessibilityLabel, + testID: testID, + onPress: disabled ? undefined : handlePress, + pressColor: pressColor, + pressOpacity: pressOpacity, + android_ripple: { + borderless: true + }, + style: [styles.container, disabled && styles.disabled, style], + hitSlop: _reactNative.Platform.select({ + ios: undefined, + default: { + top: 16, + right: 16, + bottom: 16, + left: 16 + } + }) + }, /*#__PURE__*/React.createElement(React.Fragment, null, renderBackImage(), renderLabel())); +} +const styles = _reactNative.StyleSheet.create({ + container: { + alignItems: 'center', + flexDirection: 'row', + minWidth: _reactNative.StyleSheet.hairlineWidth, + // Avoid collapsing when title is long + ..._reactNative.Platform.select({ + ios: null, + default: { + marginVertical: 3, + marginHorizontal: 11 + } + }) + }, + disabled: { + opacity: 0.5 + }, + label: { + fontSize: 17, + // Title and back label are a bit different width due to title being bold + // Adjusting the letterSpacing makes them coincide better + letterSpacing: 0.35 + }, + labelWrapper: { + // These styles will make sure that the label doesn't fill the available space + // Otherwise it messes with the measurement of the label + flexDirection: 'row', + alignItems: 'flex-start' + }, + icon: _reactNative.Platform.select({ + ios: { + height: 21, + width: 13, + marginLeft: 8, + marginRight: 22, + marginVertical: 12, + resizeMode: 'contain', + transform: [{ + scaleX: _reactNative.I18nManager.getConstants().isRTL ? -1 : 1 + }] + }, + default: { + height: 24, + width: 24, + margin: 3, + resizeMode: 'contain', + transform: [{ + scaleX: _reactNative.I18nManager.getConstants().isRTL ? -1 : 1 + }] + } + }), + iconWithLabel: _reactNative.Platform.OS === 'ios' ? { + marginRight: 6 + } : {}, + iconMaskContainer: { + flex: 1, + flexDirection: 'row', + justifyContent: 'center' + }, + iconMaskFillerRect: { + flex: 1, + backgroundColor: '#000' + }, + iconMask: { + height: 21, + width: 13, + marginLeft: -14.5, + marginVertical: 12, + alignSelf: 'center', + resizeMode: 'contain', + transform: [{ + scaleX: _reactNative.I18nManager.getConstants().isRTL ? -1 : 1 + }] + } +}); +//# sourceMappingURL=HeaderBackButton.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackButton.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackButton.js.map new file mode 100644 index 00000000..ee6d9a9a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackButton.js.map @@ -0,0 +1 @@ +{"version":3,"names":["HeaderBackButton","disabled","allowFontScaling","backImage","label","labelStyle","labelVisible","onLabelLayout","onPress","pressColor","pressOpacity","screenLayout","tintColor","customTintColor","titleLayout","truncatedLabel","accessibilityLabel","testID","style","colors","useTheme","initialLabelWidth","setInitialLabelWidth","React","useState","undefined","Platform","select","ios","primary","default","text","handleLabelLayout","e","nativeEvent","layout","x","width","shouldTruncateLabel","renderBackImage","styles","icon","Boolean","iconWithLabel","require","renderLabel","leftLabelText","labelElement","labelWrapper","minWidth","color","OS","iconMaskContainer","iconMask","iconMaskFillerRect","handlePress","requestAnimationFrame","borderless","container","top","right","bottom","left","StyleSheet","create","alignItems","flexDirection","hairlineWidth","marginVertical","marginHorizontal","opacity","fontSize","letterSpacing","height","marginLeft","marginRight","resizeMode","transform","scaleX","I18nManager","getConstants","isRTL","margin","flex","justifyContent","backgroundColor","alignSelf"],"sourceRoot":"../../src","sources":["HeaderBackButton.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AAUA;AACA;AAAqD;AAAA;AAAA;AAGtC,SAASA,gBAAgB,OAkBd;EAAA,IAlBe;IACvCC,QAAQ;IACRC,gBAAgB;IAChBC,SAAS;IACTC,KAAK;IACLC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,OAAO;IACPC,UAAU;IACVC,YAAY;IACZC,YAAY;IACZC,SAAS,EAAEC,eAAe;IAC1BC,WAAW;IACXC,cAAc,GAAG,MAAM;IACvBC,kBAAkB,GAAGZ,KAAK,IAAIA,KAAK,KAAK,MAAM,GAAI,GAAEA,KAAM,QAAO,GAAG,SAAS;IAC7Ea,MAAM;IACNC;EACqB,CAAC;EACtB,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,gBAAQ,GAAE;EAE7B,MAAM,CAACC,iBAAiB,EAAEC,oBAAoB,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAE9DC,SAAS,CAAC;EAEZ,MAAMb,SAAS,GACbC,eAAe,KAAKY,SAAS,GACzBZ,eAAe,GACfa,qBAAQ,CAACC,MAAM,CAAC;IACdC,GAAG,EAAET,MAAM,CAACU,OAAO;IACnBC,OAAO,EAAEX,MAAM,CAACY;EAClB,CAAC,CAAC;EAER,MAAMC,iBAAiB,GAAIC,CAAoB,IAAK;IAClD1B,aAAa,aAAbA,aAAa,uBAAbA,aAAa,CAAG0B,CAAC,CAAC;IAElBX,oBAAoB,CAACW,CAAC,CAACC,WAAW,CAACC,MAAM,CAACC,CAAC,GAAGH,CAAC,CAACC,WAAW,CAACC,MAAM,CAACE,KAAK,CAAC;EAC3E,CAAC;EAED,MAAMC,mBAAmB,GAAG,MAAM;IAChC,OACE,CAAClC,KAAK,IACLiB,iBAAiB,IAChBP,WAAW,IACXH,YAAY,IACZ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B,WAAW,EAAE;EACf,CAAC,GACD,CAAC,CAAC;EACRvB,iBAAiB,EAAE;IACjB+B,IAAI,EAAE,CAAC;IACPjB,aAAa,EAAE,KAAK;IACpBkB,cAAc,EAAE;EAClB,CAAC;EACD9B,kBAAkB,EAAE;IAClB6B,IAAI,EAAE,CAAC;IACPE,eAAe,EAAE;EACnB,CAAC;EACDhC,QAAQ,EAAE;IACRoB,MAAM,EAAE,EAAE;IACVpC,KAAK,EAAE,EAAE;IACTqC,UAAU,EAAE,CAAC,IAAI;IACjBN,cAAc,EAAE,EAAE;IAClBkB,SAAS,EAAE,QAAQ;IACnBV,UAAU,EAAE,SAAS;IACrBC,SAAS,EAAE,CAAC;MAAEC,MAAM,EAAEC,wBAAW,CAACC,YAAY,EAAE,CAACC,KAAK,GAAG,CAAC,CAAC,GAAG;IAAE,CAAC;EACnE;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackContext.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackContext.js new file mode 100644 index 00000000..7481de28 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackContext.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _getNamedContext = _interopRequireDefault(require("../getNamedContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const HeaderBackContext = (0, _getNamedContext.default)('HeaderBackContext', undefined); +var _default = HeaderBackContext; +exports.default = _default; +//# sourceMappingURL=HeaderBackContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackContext.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackContext.js.map new file mode 100644 index 00000000..d7f5a60a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["HeaderBackContext","getNamedContext","undefined"],"sourceRoot":"../../src","sources":["HeaderBackContext.tsx"],"mappings":";;;;;;AAAA;AAAiD;AAEjD,MAAMA,iBAAiB,GAAG,IAAAC,wBAAe,EACvC,mBAAmB,EACnBC,SAAS,CACV;AAAC,eAEaF,iBAAiB;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackground.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackground.js new file mode 100644 index 00000000..de92f73a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackground.js @@ -0,0 +1,50 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = HeaderBackground; +var _native = require("@react-navigation/native"); +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +function HeaderBackground(_ref) { + let { + style, + ...rest + } = _ref; + const { + colors + } = (0, _native.useTheme)(); + return /*#__PURE__*/React.createElement(_reactNative.Animated.View, _extends({ + style: [styles.container, { + backgroundColor: colors.card, + borderBottomColor: colors.border, + shadowColor: colors.border + }, style] + }, rest)); +} +const styles = _reactNative.StyleSheet.create({ + container: { + flex: 1, + ..._reactNative.Platform.select({ + android: { + elevation: 4 + }, + ios: { + shadowOpacity: 0.85, + shadowRadius: 0, + shadowOffset: { + width: 0, + height: _reactNative.StyleSheet.hairlineWidth + } + }, + default: { + borderBottomWidth: _reactNative.StyleSheet.hairlineWidth + } + }) + } +}); +//# sourceMappingURL=HeaderBackground.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackground.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackground.js.map new file mode 100644 index 00000000..bf6c145e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderBackground.js.map @@ -0,0 +1 @@ +{"version":3,"names":["HeaderBackground","style","rest","colors","useTheme","styles","container","backgroundColor","card","borderBottomColor","border","shadowColor","StyleSheet","create","flex","Platform","select","android","elevation","ios","shadowOpacity","shadowRadius","shadowOffset","width","height","hairlineWidth","default","borderBottomWidth"],"sourceRoot":"../../src","sources":["HeaderBackground.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AAOsB;AAAA;AAAA;AAOP,SAASA,gBAAgB,OAA4B;EAAA,IAA3B;IAAEC,KAAK;IAAE,GAAGC;EAAY,CAAC;EAChE,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,gBAAQ,GAAE;EAE7B,oBACE,oBAAC,qBAAQ,CAAC,IAAI;IACZ,KAAK,EAAE,CACLC,MAAM,CAACC,SAAS,EAChB;MACEC,eAAe,EAAEJ,MAAM,CAACK,IAAI;MAC5BC,iBAAiB,EAAEN,MAAM,CAACO,MAAM;MAChCC,WAAW,EAAER,MAAM,CAACO;IACtB,CAAC,EACDT,KAAK;EACL,GACEC,IAAI,EACR;AAEN;AAEA,MAAMG,MAAM,GAAGO,uBAAU,CAACC,MAAM,CAAC;EAC/BP,SAAS,EAAE;IACTQ,IAAI,EAAE,CAAC;IACP,GAAGC,qBAAQ,CAACC,MAAM,CAAC;MACjBC,OAAO,EAAE;QACPC,SAAS,EAAE;MACb,CAAC;MACDC,GAAG,EAAE;QACHC,aAAa,EAAE,IAAI;QACnBC,YAAY,EAAE,CAAC;QACfC,YAAY,EAAE;UACZC,KAAK,EAAE,CAAC;UACRC,MAAM,EAAEZ,uBAAU,CAACa;QACrB;MACF,CAAC;MACDC,OAAO,EAAE;QACPC,iBAAiB,EAAEf,uBAAU,CAACa;MAChC;IACF,CAAC;EACH;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderHeightContext.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderHeightContext.js new file mode 100644 index 00000000..94239686 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderHeightContext.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _getNamedContext = _interopRequireDefault(require("../getNamedContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const HeaderHeightContext = (0, _getNamedContext.default)('HeaderHeightContext', undefined); +var _default = HeaderHeightContext; +exports.default = _default; +//# sourceMappingURL=HeaderHeightContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderHeightContext.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderHeightContext.js.map new file mode 100644 index 00000000..c70fdef5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderHeightContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["HeaderHeightContext","getNamedContext","undefined"],"sourceRoot":"../../src","sources":["HeaderHeightContext.tsx"],"mappings":";;;;;;AAAA;AAAiD;AAEjD,MAAMA,mBAAmB,GAAG,IAAAC,wBAAe,EACzC,qBAAqB,EACrBC,SAAS,CACV;AAAC,eAEaF,mBAAmB;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderShownContext.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderShownContext.js new file mode 100644 index 00000000..0f2756ed --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderShownContext.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _getNamedContext = _interopRequireDefault(require("../getNamedContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const HeaderShownContext = (0, _getNamedContext.default)('HeaderShownContext', false); +var _default = HeaderShownContext; +exports.default = _default; +//# sourceMappingURL=HeaderShownContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderShownContext.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderShownContext.js.map new file mode 100644 index 00000000..bc0e86d3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderShownContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["HeaderShownContext","getNamedContext"],"sourceRoot":"../../src","sources":["HeaderShownContext.tsx"],"mappings":";;;;;;AAAA;AAAiD;AAEjD,MAAMA,kBAAkB,GAAG,IAAAC,wBAAe,EAAC,oBAAoB,EAAE,KAAK,CAAC;AAAC,eAEzDD,kBAAkB;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderTitle.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderTitle.js new file mode 100644 index 00000000..860e8c98 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderTitle.js @@ -0,0 +1,49 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = HeaderTitle; +var _native = require("@react-navigation/native"); +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +function HeaderTitle(_ref) { + let { + tintColor, + style, + ...rest + } = _ref; + const { + colors + } = (0, _native.useTheme)(); + return /*#__PURE__*/React.createElement(_reactNative.Animated.Text, _extends({ + accessibilityRole: "header", + "aria-level": "1", + numberOfLines: 1 + }, rest, { + style: [styles.title, { + color: tintColor === undefined ? colors.text : tintColor + }, style] + })); +} +const styles = _reactNative.StyleSheet.create({ + title: _reactNative.Platform.select({ + ios: { + fontSize: 17, + fontWeight: '600' + }, + android: { + fontSize: 20, + fontFamily: 'sans-serif-medium', + fontWeight: 'normal' + }, + default: { + fontSize: 18, + fontWeight: '500' + } + }) +}); +//# sourceMappingURL=HeaderTitle.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderTitle.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderTitle.js.map new file mode 100644 index 00000000..a45b3063 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/HeaderTitle.js.map @@ -0,0 +1 @@ +{"version":3,"names":["HeaderTitle","tintColor","style","rest","colors","useTheme","styles","title","color","undefined","text","StyleSheet","create","Platform","select","ios","fontSize","fontWeight","android","fontFamily","default"],"sourceRoot":"../../src","sources":["HeaderTitle.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AAOsB;AAAA;AAAA;AAOP,SAASA,WAAW,OAAuC;EAAA,IAAtC;IAAEC,SAAS;IAAEC,KAAK;IAAE,GAAGC;EAAY,CAAC;EACtE,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,gBAAQ,GAAE;EAE7B,oBACE,oBAAC,qBAAQ,CAAC,IAAI;IACZ,iBAAiB,EAAC,QAAQ;IAC1B,cAAW,GAAG;IACd,aAAa,EAAE;EAAE,GACbF,IAAI;IACR,KAAK,EAAE,CACLG,MAAM,CAACC,KAAK,EACZ;MAAEC,KAAK,EAAEP,SAAS,KAAKQ,SAAS,GAAGL,MAAM,CAACM,IAAI,GAAGT;IAAU,CAAC,EAC5DC,KAAK;EACL,GACF;AAEN;AAEA,MAAMI,MAAM,GAAGK,uBAAU,CAACC,MAAM,CAAC;EAC/BL,KAAK,EAAEM,qBAAQ,CAACC,MAAM,CAAC;IACrBC,GAAG,EAAE;MACHC,QAAQ,EAAE,EAAE;MACZC,UAAU,EAAE;IACd,CAAC;IACDC,OAAO,EAAE;MACPF,QAAQ,EAAE,EAAE;MACZG,UAAU,EAAE,mBAAmB;MAC/BF,UAAU,EAAE;IACd,CAAC;IACDG,OAAO,EAAE;MACPJ,QAAQ,EAAE,EAAE;MACZC,UAAU,EAAE;IACd;EACF,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getDefaultHeaderHeight.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getDefaultHeaderHeight.js new file mode 100644 index 00000000..e13110ed --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getDefaultHeaderHeight.js @@ -0,0 +1,36 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getDefaultHeaderHeight; +var _reactNative = require("react-native"); +function getDefaultHeaderHeight(layout, modalPresentation, statusBarHeight) { + let headerHeight; + const isLandscape = layout.width > layout.height; + if (_reactNative.Platform.OS === 'ios') { + if (_reactNative.Platform.isPad || _reactNative.Platform.isTV) { + if (modalPresentation) { + headerHeight = 56; + } else { + headerHeight = 50; + } + } else { + if (isLandscape) { + headerHeight = 32; + } else { + if (modalPresentation) { + headerHeight = 56; + } else { + headerHeight = 44; + } + } + } + } else if (_reactNative.Platform.OS === 'android') { + headerHeight = 56; + } else { + headerHeight = 64; + } + return headerHeight + statusBarHeight; +} +//# sourceMappingURL=getDefaultHeaderHeight.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getDefaultHeaderHeight.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getDefaultHeaderHeight.js.map new file mode 100644 index 00000000..119f22f2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getDefaultHeaderHeight.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getDefaultHeaderHeight","layout","modalPresentation","statusBarHeight","headerHeight","isLandscape","width","height","Platform","OS","isPad","isTV"],"sourceRoot":"../../src","sources":["getDefaultHeaderHeight.tsx"],"mappings":";;;;;;AAAA;AAIe,SAASA,sBAAsB,CAC5CC,MAAc,EACdC,iBAA0B,EAC1BC,eAAuB,EACf;EACR,IAAIC,YAAY;EAEhB,MAAMC,WAAW,GAAGJ,MAAM,CAACK,KAAK,GAAGL,MAAM,CAACM,MAAM;EAEhD,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;IACzB,IAAID,qBAAQ,CAACE,KAAK,IAAIF,qBAAQ,CAACG,IAAI,EAAE;MACnC,IAAIT,iBAAiB,EAAE;QACrBE,YAAY,GAAG,EAAE;MACnB,CAAC,MAAM;QACLA,YAAY,GAAG,EAAE;MACnB;IACF,CAAC,MAAM;MACL,IAAIC,WAAW,EAAE;QACfD,YAAY,GAAG,EAAE;MACnB,CAAC,MAAM;QACL,IAAIF,iBAAiB,EAAE;UACrBE,YAAY,GAAG,EAAE;QACnB,CAAC,MAAM;UACLA,YAAY,GAAG,EAAE;QACnB;MACF;IACF;EACF,CAAC,MAAM,IAAII,qBAAQ,CAACC,EAAE,KAAK,SAAS,EAAE;IACpCL,YAAY,GAAG,EAAE;EACnB,CAAC,MAAM;IACLA,YAAY,GAAG,EAAE;EACnB;EAEA,OAAOA,YAAY,GAAGD,eAAe;AACvC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getHeaderTitle.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getHeaderTitle.js new file mode 100644 index 00000000..f51f5416 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getHeaderTitle.js @@ -0,0 +1,10 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getHeaderTitle; +function getHeaderTitle(options, fallback) { + return typeof options.headerTitle === 'string' ? options.headerTitle : options.title !== undefined ? options.title : fallback; +} +//# sourceMappingURL=getHeaderTitle.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getHeaderTitle.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getHeaderTitle.js.map new file mode 100644 index 00000000..91ceeafa --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/getHeaderTitle.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getHeaderTitle","options","fallback","headerTitle","title","undefined"],"sourceRoot":"../../src","sources":["getHeaderTitle.tsx"],"mappings":";;;;;;AAEe,SAASA,cAAc,CACpCC,OAAuE,EACvEC,QAAgB,EACR;EACR,OAAO,OAAOD,OAAO,CAACE,WAAW,KAAK,QAAQ,GAC1CF,OAAO,CAACE,WAAW,GACnBF,OAAO,CAACG,KAAK,KAAKC,SAAS,GAC3BJ,OAAO,CAACG,KAAK,GACbF,QAAQ;AACd"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/useHeaderHeight.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/useHeaderHeight.js new file mode 100644 index 00000000..d868b5ec --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/useHeaderHeight.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useHeaderHeight; +var React = _interopRequireWildcard(require("react")); +var _HeaderHeightContext = _interopRequireDefault(require("./HeaderHeightContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function useHeaderHeight() { + const height = React.useContext(_HeaderHeightContext.default); + if (height === undefined) { + throw new Error("Couldn't find the header height. Are you inside a screen in a navigator with a header?"); + } + return height; +} +//# sourceMappingURL=useHeaderHeight.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/useHeaderHeight.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/useHeaderHeight.js.map new file mode 100644 index 00000000..ecbc247f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Header/useHeaderHeight.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useHeaderHeight","height","React","useContext","HeaderHeightContext","undefined","Error"],"sourceRoot":"../../src","sources":["useHeaderHeight.tsx"],"mappings":";;;;;;AAAA;AAEA;AAAwD;AAAA;AAAA;AAEzC,SAASA,eAAe,GAAG;EACxC,MAAMC,MAAM,GAAGC,KAAK,CAACC,UAAU,CAACC,4BAAmB,CAAC;EAEpD,IAAIH,MAAM,KAAKI,SAAS,EAAE;IACxB,MAAM,IAAIC,KAAK,CACb,wFAAwF,CACzF;EACH;EAEA,OAAOL,MAAM;AACf"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.android.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.android.js new file mode 100644 index 00000000..5f4cc9ed --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.android.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "default", { + enumerable: true, + get: function () { + return _MaskedViewNative.default; + } +}); +var _MaskedViewNative = _interopRequireDefault(require("./MaskedViewNative")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +//# sourceMappingURL=MaskedView.android.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.android.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.android.js.map new file mode 100644 index 00000000..1f8f1887 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.android.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sourceRoot":"../../src","sources":["MaskedView.android.tsx"],"mappings":";;;;;;;;;;;AAAA;AAA6C"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.ios.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.ios.js new file mode 100644 index 00000000..b6973ccf --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.ios.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "default", { + enumerable: true, + get: function () { + return _MaskedViewNative.default; + } +}); +var _MaskedViewNative = _interopRequireDefault(require("./MaskedViewNative")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +//# sourceMappingURL=MaskedView.ios.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.ios.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.ios.js.map new file mode 100644 index 00000000..99a8ff8e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.ios.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sourceRoot":"../../src","sources":["MaskedView.ios.tsx"],"mappings":";;;;;;;;;;;AAAA;AAA6C"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.js new file mode 100644 index 00000000..5beeea8e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = MaskedView; +/** + * Use a stub for MaskedView on all Platforms that don't support it. + */ + +function MaskedView(_ref) { + let { + children + } = _ref; + return children; +} +//# sourceMappingURL=MaskedView.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.js.map new file mode 100644 index 00000000..e3b411e2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedView.js.map @@ -0,0 +1 @@ +{"version":3,"names":["MaskedView","children"],"sourceRoot":"../../src","sources":["MaskedView.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;;AAQe,SAASA,UAAU,OAAsB;EAAA,IAArB;IAAEC;EAAgB,CAAC;EACpD,OAAOA,QAAQ;AACjB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedViewNative.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedViewNative.js new file mode 100644 index 00000000..eda8cc3d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedViewNative.js @@ -0,0 +1,34 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = MaskedView; +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * The native MaskedView that we explicitly re-export for supported platforms: Android, iOS. + */ + +let RNCMaskedView; +try { + // Add try/catch to support usage even if it's not installed, since it's optional. + // Newer versions of Metro will handle it properly. + RNCMaskedView = require('@react-native-masked-view/masked-view').default; +} catch (e) { + // Ignore +} +const isMaskedViewAvailable = _reactNative.UIManager.getViewManagerConfig('RNCMaskedView') != null; +function MaskedView(_ref) { + let { + children, + ...rest + } = _ref; + if (isMaskedViewAvailable && RNCMaskedView) { + return /*#__PURE__*/React.createElement(RNCMaskedView, rest, children); + } + return children; +} +//# sourceMappingURL=MaskedViewNative.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedViewNative.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedViewNative.js.map new file mode 100644 index 00000000..8770c1fc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MaskedViewNative.js.map @@ -0,0 +1 @@ +{"version":3,"names":["RNCMaskedView","require","default","e","isMaskedViewAvailable","UIManager","getViewManagerConfig","MaskedView","children","rest"],"sourceRoot":"../../src","sources":["MaskedViewNative.tsx"],"mappings":";;;;;;AAGA;AACA;AAAyC;AAAA;AAJzC;AACA;AACA;;AAWA,IAAIA,aAAyC;AAE7C,IAAI;EACF;EACA;EACAA,aAAa,GAAGC,OAAO,CAAC,uCAAuC,CAAC,CAACC,OAAO;AAC1E,CAAC,CAAC,OAAOC,CAAC,EAAE;EACV;AAAA;AAGF,MAAMC,qBAAqB,GACzBC,sBAAS,CAACC,oBAAoB,CAAC,eAAe,CAAC,IAAI,IAAI;AAE1C,SAASC,UAAU,OAA+B;EAAA,IAA9B;IAAEC,QAAQ;IAAE,GAAGC;EAAY,CAAC;EAC7D,IAAIL,qBAAqB,IAAIJ,aAAa,EAAE;IAC1C,oBAAO,oBAAC,aAAa,EAAKS,IAAI,EAAGD,QAAQ,CAAiB;EAC5D;EAEA,OAAOA,QAAQ;AACjB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MissingIcon.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MissingIcon.js new file mode 100644 index 00000000..0cbbe3ac --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MissingIcon.js @@ -0,0 +1,29 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = MissingIcon; +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function MissingIcon(_ref) { + let { + color, + size, + style + } = _ref; + return /*#__PURE__*/React.createElement(_reactNative.Text, { + style: [styles.icon, { + color, + fontSize: size + }, style] + }, "\u23F7"); +} +const styles = _reactNative.StyleSheet.create({ + icon: { + backgroundColor: 'transparent' + } +}); +//# sourceMappingURL=MissingIcon.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MissingIcon.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MissingIcon.js.map new file mode 100644 index 00000000..43705036 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/MissingIcon.js.map @@ -0,0 +1 @@ +{"version":3,"names":["MissingIcon","color","size","style","styles","icon","fontSize","StyleSheet","create","backgroundColor"],"sourceRoot":"../../src","sources":["MissingIcon.tsx"],"mappings":";;;;;;AAAA;AACA;AAAsE;AAAA;AAQvD,SAASA,WAAW,OAAgC;EAAA,IAA/B;IAAEC,KAAK;IAAEC,IAAI;IAAEC;EAAa,CAAC;EAC/D,oBAAO,oBAAC,iBAAI;IAAC,KAAK,EAAE,CAACC,MAAM,CAACC,IAAI,EAAE;MAAEJ,KAAK;MAAEK,QAAQ,EAAEJ;IAAK,CAAC,EAAEC,KAAK;EAAE,YAAS;AAC/E;AAEA,MAAMC,MAAM,GAAGG,uBAAU,CAACC,MAAM,CAAC;EAC/BH,IAAI,EAAE;IACJI,eAAe,EAAE;EACnB;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/PlatformPressable.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/PlatformPressable.js new file mode 100644 index 00000000..d3854fed --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/PlatformPressable.js @@ -0,0 +1,65 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = PlatformPressable; +var _native = require("@react-navigation/native"); +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +const AnimatedPressable = _reactNative.Animated.createAnimatedComponent(_reactNative.Pressable); +const ANDROID_VERSION_LOLLIPOP = 21; +const ANDROID_SUPPORTS_RIPPLE = _reactNative.Platform.OS === 'android' && _reactNative.Platform.Version >= ANDROID_VERSION_LOLLIPOP; + +/** + * PlatformPressable provides an abstraction on top of Pressable to handle platform differences. + */ +function PlatformPressable(_ref) { + let { + onPressIn, + onPressOut, + android_ripple, + pressColor, + pressOpacity = 0.3, + style, + ...rest + } = _ref; + const { + dark + } = (0, _native.useTheme)(); + const [opacity] = React.useState(() => new _reactNative.Animated.Value(1)); + const animateTo = (toValue, duration) => { + if (ANDROID_SUPPORTS_RIPPLE) { + return; + } + _reactNative.Animated.timing(opacity, { + toValue, + duration, + easing: _reactNative.Easing.inOut(_reactNative.Easing.quad), + useNativeDriver: true + }).start(); + }; + const handlePressIn = e => { + animateTo(pressOpacity, 0); + onPressIn === null || onPressIn === void 0 ? void 0 : onPressIn(e); + }; + const handlePressOut = e => { + animateTo(1, 200); + onPressOut === null || onPressOut === void 0 ? void 0 : onPressOut(e); + }; + return /*#__PURE__*/React.createElement(AnimatedPressable, _extends({ + onPressIn: handlePressIn, + onPressOut: handlePressOut, + android_ripple: ANDROID_SUPPORTS_RIPPLE ? { + color: pressColor !== undefined ? pressColor : dark ? 'rgba(255, 255, 255, .32)' : 'rgba(0, 0, 0, .32)', + ...android_ripple + } : undefined, + style: [{ + opacity: !ANDROID_SUPPORTS_RIPPLE ? opacity : 1 + }, style] + }, rest)); +} +//# sourceMappingURL=PlatformPressable.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/PlatformPressable.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/PlatformPressable.js.map new file mode 100644 index 00000000..7baf858b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/PlatformPressable.js.map @@ -0,0 +1 @@ +{"version":3,"names":["AnimatedPressable","Animated","createAnimatedComponent","Pressable","ANDROID_VERSION_LOLLIPOP","ANDROID_SUPPORTS_RIPPLE","Platform","OS","Version","PlatformPressable","onPressIn","onPressOut","android_ripple","pressColor","pressOpacity","style","rest","dark","useTheme","opacity","React","useState","Value","animateTo","toValue","duration","timing","easing","Easing","inOut","quad","useNativeDriver","start","handlePressIn","e","handlePressOut","color","undefined"],"sourceRoot":"../../src","sources":["PlatformPressable.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AASsB;AAAA;AAAA;AAStB,MAAMA,iBAAiB,GAAGC,qBAAQ,CAACC,uBAAuB,CAACC,sBAAS,CAAC;AAErE,MAAMC,wBAAwB,GAAG,EAAE;AACnC,MAAMC,uBAAuB,GAC3BC,qBAAQ,CAACC,EAAE,KAAK,SAAS,IAAID,qBAAQ,CAACE,OAAO,IAAIJ,wBAAwB;;AAE3E;AACA;AACA;AACe,SAASK,iBAAiB,OAQ/B;EAAA,IARgC;IACxCC,SAAS;IACTC,UAAU;IACVC,cAAc;IACdC,UAAU;IACVC,YAAY,GAAG,GAAG;IAClBC,KAAK;IACL,GAAGC;EACE,CAAC;EACN,MAAM;IAAEC;EAAK,CAAC,GAAG,IAAAC,gBAAQ,GAAE;EAC3B,MAAM,CAACC,OAAO,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAAC,MAAM,IAAIpB,qBAAQ,CAACqB,KAAK,CAAC,CAAC,CAAC,CAAC;EAE7D,MAAMC,SAAS,GAAG,CAACC,OAAe,EAAEC,QAAgB,KAAK;IACvD,IAAIpB,uBAAuB,EAAE;MAC3B;IACF;IAEAJ,qBAAQ,CAACyB,MAAM,CAACP,OAAO,EAAE;MACvBK,OAAO;MACPC,QAAQ;MACRE,MAAM,EAAEC,mBAAM,CAACC,KAAK,CAACD,mBAAM,CAACE,IAAI,CAAC;MACjCC,eAAe,EAAE;IACnB,CAAC,CAAC,CAACC,KAAK,EAAE;EACZ,CAAC;EAED,MAAMC,aAAa,GAAIC,CAAwB,IAAK;IAClDX,SAAS,CAACT,YAAY,EAAE,CAAC,CAAC;IAC1BJ,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAGwB,CAAC,CAAC;EAChB,CAAC;EAED,MAAMC,cAAc,GAAID,CAAwB,IAAK;IACnDX,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC;IACjBZ,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAGuB,CAAC,CAAC;EACjB,CAAC;EAED,oBACE,oBAAC,iBAAiB;IAChB,SAAS,EAAED,aAAc;IACzB,UAAU,EAAEE,cAAe;IAC3B,cAAc,EACZ9B,uBAAuB,GACnB;MACE+B,KAAK,EACHvB,UAAU,KAAKwB,SAAS,GACpBxB,UAAU,GACVI,IAAI,GACJ,0BAA0B,GAC1B,oBAAoB;MAC1B,GAAGL;IACL,CAAC,GACDyB,SACL;IACD,KAAK,EAAE,CAAC;MAAElB,OAAO,EAAE,CAACd,uBAAuB,GAAGc,OAAO,GAAG;IAAE,CAAC,EAAEJ,KAAK;EAAE,GAChEC,IAAI,EACR;AAEN"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/ResourceSavingView.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/ResourceSavingView.js new file mode 100644 index 00000000..024cb545 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/ResourceSavingView.js @@ -0,0 +1,60 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = ResourceSavingScene; +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +const FAR_FAR_AWAY = 30000; // this should be big enough to move the whole view out of its container + +function ResourceSavingScene(_ref) { + let { + visible, + children, + style, + ...rest + } = _ref; + if (_reactNative.Platform.OS === 'web') { + return /*#__PURE__*/React.createElement(_reactNative.View + // @ts-expect-error: hidden exists on web, but not in React Native + , _extends({ + hidden: !visible, + style: [{ + display: visible ? 'flex' : 'none' + }, styles.container, style], + pointerEvents: visible ? 'auto' : 'none' + }, rest), children); + } + return /*#__PURE__*/React.createElement(_reactNative.View, { + style: [styles.container, style] + // box-none doesn't seem to work properly on Android + , + pointerEvents: visible ? 'auto' : 'none' + }, /*#__PURE__*/React.createElement(_reactNative.View, { + collapsable: false, + removeClippedSubviews: + // On iOS & macOS, set removeClippedSubviews to true only when not focused + // This is an workaround for a bug where the clipped view never re-appears + _reactNative.Platform.OS === 'ios' || _reactNative.Platform.OS === 'macos' ? !visible : true, + pointerEvents: visible ? 'auto' : 'none', + style: visible ? styles.attached : styles.detached + }, children)); +} +const styles = _reactNative.StyleSheet.create({ + container: { + flex: 1, + overflow: 'hidden' + }, + attached: { + flex: 1 + }, + detached: { + flex: 1, + top: FAR_FAR_AWAY + } +}); +//# sourceMappingURL=ResourceSavingView.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/ResourceSavingView.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/ResourceSavingView.js.map new file mode 100644 index 00000000..03fa5426 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/ResourceSavingView.js.map @@ -0,0 +1 @@ +{"version":3,"names":["FAR_FAR_AWAY","ResourceSavingScene","visible","children","style","rest","Platform","OS","display","styles","container","attached","detached","StyleSheet","create","flex","overflow","top"],"sourceRoot":"../../src","sources":["ResourceSavingView.tsx"],"mappings":";;;;;;AAAA;AACA;AAAgF;AAAA;AAAA;AAQhF,MAAMA,YAAY,GAAG,KAAK,CAAC,CAAC;;AAEb,SAASC,mBAAmB,OAKjC;EAAA,IALkC;IAC1CC,OAAO;IACPC,QAAQ;IACRC,KAAK;IACL,GAAGC;EACE,CAAC;EACN,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;IACzB,oBACE,oBAAC;IACC;IAAA;MACA,MAAM,EAAE,CAACL,OAAQ;MACjB,KAAK,EAAE,CACL;QAAEM,OAAO,EAAEN,OAAO,GAAG,MAAM,GAAG;MAAO,CAAC,EACtCO,MAAM,CAACC,SAAS,EAChBN,KAAK,CACL;MACF,aAAa,EAAEF,OAAO,GAAG,MAAM,GAAG;IAAO,GACrCG,IAAI,GAEPF,QAAQ,CACJ;EAEX;EAEA,oBACE,oBAAC,iBAAI;IACH,KAAK,EAAE,CAACM,MAAM,CAACC,SAAS,EAAEN,KAAK;IAC/B;IAAA;IACA,aAAa,EAAEF,OAAO,GAAG,MAAM,GAAG;EAAO,gBAEzC,oBAAC,iBAAI;IACH,WAAW,EAAE,KAAM;IACnB,qBAAqB;IACnB;IACA;IACAI,qBAAQ,CAACC,EAAE,KAAK,KAAK,IAAID,qBAAQ,CAACC,EAAE,KAAK,OAAO,GAAG,CAACL,OAAO,GAAG,IAC/D;IACD,aAAa,EAAEA,OAAO,GAAG,MAAM,GAAG,MAAO;IACzC,KAAK,EAAEA,OAAO,GAAGO,MAAM,CAACE,QAAQ,GAAGF,MAAM,CAACG;EAAS,GAElDT,QAAQ,CACJ,CACF;AAEX;AAEA,MAAMM,MAAM,GAAGI,uBAAU,CAACC,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACTK,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE;EACZ,CAAC;EACDL,QAAQ,EAAE;IACRI,IAAI,EAAE;EACR,CAAC;EACDH,QAAQ,EAAE;IACRG,IAAI,EAAE,CAAC;IACPE,GAAG,EAAEjB;EACP;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/SafeAreaProviderCompat.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/SafeAreaProviderCompat.js new file mode 100644 index 00000000..b4913685 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/SafeAreaProviderCompat.js @@ -0,0 +1,60 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = SafeAreaProviderCompat; +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +var _reactNativeSafeAreaContext = require("react-native-safe-area-context"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const { + width = 0, + height = 0 +} = _reactNative.Dimensions.get('window'); + +// To support SSR on web, we need to have empty insets for initial values +// Otherwise there can be mismatch between SSR and client output +// We also need to specify empty values to support tests environments +const initialMetrics = _reactNative.Platform.OS === 'web' || _reactNativeSafeAreaContext.initialWindowMetrics == null ? { + frame: { + x: 0, + y: 0, + width, + height + }, + insets: { + top: 0, + left: 0, + right: 0, + bottom: 0 + } +} : _reactNativeSafeAreaContext.initialWindowMetrics; +function SafeAreaProviderCompat(_ref) { + let { + children, + style + } = _ref; + return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaInsetsContext.Consumer, null, insets => { + if (insets) { + // If we already have insets, don't wrap the stack in another safe area provider + // This avoids an issue with updates at the cost of potentially incorrect values + // https://github.com/react-navigation/react-navigation/issues/174 + return /*#__PURE__*/React.createElement(_reactNative.View, { + style: [styles.container, style] + }, children); + } + return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaProvider, { + initialMetrics: initialMetrics, + style: style + }, children); + }); +} +SafeAreaProviderCompat.initialMetrics = initialMetrics; +const styles = _reactNative.StyleSheet.create({ + container: { + flex: 1 + } +}); +//# sourceMappingURL=SafeAreaProviderCompat.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/SafeAreaProviderCompat.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/SafeAreaProviderCompat.js.map new file mode 100644 index 00000000..eb2aa840 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/SafeAreaProviderCompat.js.map @@ -0,0 +1 @@ +{"version":3,"names":["width","height","Dimensions","get","initialMetrics","Platform","OS","initialWindowMetrics","frame","x","y","insets","top","left","right","bottom","SafeAreaProviderCompat","children","style","styles","container","StyleSheet","create","flex"],"sourceRoot":"../../src","sources":["SafeAreaProviderCompat.tsx"],"mappings":";;;;;;AAAA;AACA;AAQA;AAIwC;AAAA;AAOxC,MAAM;EAAEA,KAAK,GAAG,CAAC;EAAEC,MAAM,GAAG;AAAE,CAAC,GAAGC,uBAAU,CAACC,GAAG,CAAC,QAAQ,CAAC;;AAE1D;AACA;AACA;AACA,MAAMC,cAAc,GAClBC,qBAAQ,CAACC,EAAE,KAAK,KAAK,IAAIC,gDAAoB,IAAI,IAAI,GACjD;EACEC,KAAK,EAAE;IAAEC,CAAC,EAAE,CAAC;IAAEC,CAAC,EAAE,CAAC;IAAEV,KAAK;IAAEC;EAAO,CAAC;EACpCU,MAAM,EAAE;IAAEC,GAAG,EAAE,CAAC;IAAEC,IAAI,EAAE,CAAC;IAAEC,KAAK,EAAE,CAAC;IAAEC,MAAM,EAAE;EAAE;AACjD,CAAC,GACDR,gDAAoB;AAEX,SAASS,sBAAsB,OAA6B;EAAA,IAA5B;IAAEC,QAAQ;IAAEC;EAAa,CAAC;EACvE,oBACE,oBAAC,iDAAqB,CAAC,QAAQ,QAC3BP,MAAM,IAAK;IACX,IAAIA,MAAM,EAAE;MACV;MACA;MACA;MACA,oBAAO,oBAAC,iBAAI;QAAC,KAAK,EAAE,CAACQ,MAAM,CAACC,SAAS,EAAEF,KAAK;MAAE,GAAED,QAAQ,CAAQ;IAClE;IAEA,oBACE,oBAAC,4CAAgB;MAAC,cAAc,EAAEb,cAAe;MAAC,KAAK,EAAEc;IAAM,GAC5DD,QAAQ,CACQ;EAEvB,CAAC,CAC8B;AAErC;AAEAD,sBAAsB,CAACZ,cAAc,GAAGA,cAAc;AAEtD,MAAMe,MAAM,GAAGE,uBAAU,CAACC,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,IAAI,EAAE;EACR;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Screen.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Screen.js new file mode 100644 index 00000000..bd7c27ec --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Screen.js @@ -0,0 +1,76 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = Screen; +var _native = require("@react-navigation/native"); +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +var _reactNativeSafeAreaContext = require("react-native-safe-area-context"); +var _Background = _interopRequireDefault(require("./Background")); +var _getDefaultHeaderHeight = _interopRequireDefault(require("./Header/getDefaultHeaderHeight")); +var _HeaderHeightContext = _interopRequireDefault(require("./Header/HeaderHeightContext")); +var _HeaderShownContext = _interopRequireDefault(require("./Header/HeaderShownContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function Screen(props) { + const dimensions = (0, _reactNativeSafeAreaContext.useSafeAreaFrame)(); + const insets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)(); + const isParentHeaderShown = React.useContext(_HeaderShownContext.default); + const parentHeaderHeight = React.useContext(_HeaderHeightContext.default); + const { + focused, + modal = false, + header, + headerShown = true, + headerTransparent, + headerStatusBarHeight = isParentHeaderShown ? 0 : insets.top, + navigation, + route, + children, + style + } = props; + const [headerHeight, setHeaderHeight] = React.useState(() => (0, _getDefaultHeaderHeight.default)(dimensions, modal, headerStatusBarHeight)); + return /*#__PURE__*/React.createElement(_Background.default, { + accessibilityElementsHidden: !focused, + importantForAccessibility: focused ? 'auto' : 'no-hide-descendants', + style: [styles.container, style] + }, /*#__PURE__*/React.createElement(_reactNative.View, { + style: styles.content + }, /*#__PURE__*/React.createElement(_HeaderShownContext.default.Provider, { + value: isParentHeaderShown || headerShown !== false + }, /*#__PURE__*/React.createElement(_HeaderHeightContext.default.Provider, { + value: headerShown ? headerHeight : parentHeaderHeight ?? 0 + }, children))), headerShown ? /*#__PURE__*/React.createElement(_native.NavigationContext.Provider, { + value: navigation + }, /*#__PURE__*/React.createElement(_native.NavigationRouteContext.Provider, { + value: route + }, /*#__PURE__*/React.createElement(_reactNative.View, { + onLayout: e => { + const { + height + } = e.nativeEvent.layout; + setHeaderHeight(height); + }, + style: headerTransparent ? styles.absolute : null + }, header))) : null); +} +const styles = _reactNative.StyleSheet.create({ + container: { + flex: 1, + flexDirection: 'column-reverse' + }, + // This is necessary to avoid applying 'column-reverse' to screen content + content: { + flex: 1 + }, + absolute: { + position: 'absolute', + top: 0, + left: 0, + right: 0 + } +}); +//# sourceMappingURL=Screen.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Screen.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Screen.js.map new file mode 100644 index 00000000..c33e3114 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/Screen.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Screen","props","dimensions","useSafeAreaFrame","insets","useSafeAreaInsets","isParentHeaderShown","React","useContext","HeaderShownContext","parentHeaderHeight","HeaderHeightContext","focused","modal","header","headerShown","headerTransparent","headerStatusBarHeight","top","navigation","route","children","style","headerHeight","setHeaderHeight","useState","getDefaultHeaderHeight","styles","container","content","e","height","nativeEvent","layout","absolute","StyleSheet","create","flex","flexDirection","position","left","right"],"sourceRoot":"../../src","sources":["Screen.tsx"],"mappings":";;;;;;AAAA;AAOA;AACA;AACA;AAKA;AACA;AACA;AACA;AAA6D;AAAA;AAAA;AAe9C,SAASA,MAAM,CAACC,KAAY,EAAE;EAC3C,MAAMC,UAAU,GAAG,IAAAC,4CAAgB,GAAE;EACrC,MAAMC,MAAM,GAAG,IAAAC,6CAAiB,GAAE;EAElC,MAAMC,mBAAmB,GAAGC,KAAK,CAACC,UAAU,CAACC,2BAAkB,CAAC;EAChE,MAAMC,kBAAkB,GAAGH,KAAK,CAACC,UAAU,CAACG,4BAAmB,CAAC;EAEhE,MAAM;IACJC,OAAO;IACPC,KAAK,GAAG,KAAK;IACbC,MAAM;IACNC,WAAW,GAAG,IAAI;IAClBC,iBAAiB;IACjBC,qBAAqB,GAAGX,mBAAmB,GAAG,CAAC,GAAGF,MAAM,CAACc,GAAG;IAC5DC,UAAU;IACVC,KAAK;IACLC,QAAQ;IACRC;EACF,CAAC,GAAGrB,KAAK;EAET,MAAM,CAACsB,YAAY,EAAEC,eAAe,CAAC,GAAGjB,KAAK,CAACkB,QAAQ,CAAC,MACrD,IAAAC,+BAAsB,EAACxB,UAAU,EAAEW,KAAK,EAAEI,qBAAqB,CAAC,CACjE;EAED,oBACE,oBAAC,mBAAU;IACT,2BAA2B,EAAE,CAACL,OAAQ;IACtC,yBAAyB,EAAEA,OAAO,GAAG,MAAM,GAAG,qBAAsB;IACpE,KAAK,EAAE,CAACe,MAAM,CAACC,SAAS,EAAEN,KAAK;EAAE,gBAEjC,oBAAC,iBAAI;IAAC,KAAK,EAAEK,MAAM,CAACE;EAAQ,gBAC1B,oBAAC,2BAAkB,CAAC,QAAQ;IAC1B,KAAK,EAAEvB,mBAAmB,IAAIS,WAAW,KAAK;EAAM,gBAEpD,oBAAC,4BAAmB,CAAC,QAAQ;IAC3B,KAAK,EAAEA,WAAW,GAAGQ,YAAY,GAAGb,kBAAkB,IAAI;EAAE,GAE3DW,QAAQ,CACoB,CACH,CACzB,EACNN,WAAW,gBACV,oBAAC,yBAAiB,CAAC,QAAQ;IAAC,KAAK,EAAEI;EAAW,gBAC5C,oBAAC,8BAAsB,CAAC,QAAQ;IAAC,KAAK,EAAEC;EAAM,gBAC5C,oBAAC,iBAAI;IACH,QAAQ,EAAGU,CAAC,IAAK;MACf,MAAM;QAAEC;MAAO,CAAC,GAAGD,CAAC,CAACE,WAAW,CAACC,MAAM;MAEvCT,eAAe,CAACO,MAAM,CAAC;IACzB,CAAE;IACF,KAAK,EAAEf,iBAAiB,GAAGW,MAAM,CAACO,QAAQ,GAAG;EAAK,GAEjDpB,MAAM,CACF,CACyB,CACP,GAC3B,IAAI,CACG;AAEjB;AAEA,MAAMa,MAAM,GAAGQ,uBAAU,CAACC,MAAM,CAAC;EAC/BR,SAAS,EAAE;IACTS,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB,CAAC;EACD;EACAT,OAAO,EAAE;IACPQ,IAAI,EAAE;EACR,CAAC;EACDH,QAAQ,EAAE;IACRK,QAAQ,EAAE,UAAU;IACpBrB,GAAG,EAAE,CAAC;IACNsB,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon-mask.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon-mask.png new file mode 100644 index 0000000000000000000000000000000000000000..9de72420073c10f588cd89d0eb473707735a5f7f GIT binary patch literal 913 zcmeAS@N?(olHy`uVBq!ia0vp^MnD|O!2%=~9Nn{1`6_P!I zd>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N!t9$=lt9;eUJonf*W> zdx@v7EBg~hW-b|X+fI&mK>3-TE{-7?_x9fO&K7YLVE=Hgcv6g5v(ug#3mpG2X~l^g z=?)jRW#8LT#}HWH+b8!|sEezKLr7ksgQH16e{<+n+u3K|wTS9}T$F9n`BriBYpL&s zwwFV#zyH1X`Ng_l(}U*KU#;EHaQ>^>t^L!(5AakXC4PMo>S zmG{@b!ud_d&X)NZyM-TeZd9&dwx6=iN;qyp!IZp1QYET33T6wU1CGvp=aP4Xtw6u0 zTG&!h`he`3ue$vTs7ZD2Sf7`0E}Q{v&)dm@5LS z6{-}TGTr;;T;h6)HTa5jU5B1WYM0o@)%uH+gJv#b|8X?exZLF$-y`QAY+}07o2+{K zFBorRUwP(1^q+ULf3Qc+JtltRgZ~!AXB~B&_7)vtLT6un-*D1d<-~KzzammGEKy5C zEV$1vXq@&w=%dPBwJ@f&i6FYf@ppS*D>*f2Rb9v59`RLSlXktfE5555;`r{`p^ziIX)a4v zg`eWP@NdFyd%>4mj#RlVe7F7TarZMF9!iQ+)~aY;EPOV_L*u=W*SjdmloLHFnOVK2 zzPZm1xvbe)@F_>nSpAMuP&2R5c$UjS%S+_~a>*m2vfi-K&BLtUD`4w>?{Cn8NdWPaP*On#R-0&WlZdFTM zBT7;dOH!?pi&B9UgOP!efv$m}u7Pogp@Ef=g_Wt1wt<0_fx++E&@dDYx%nxXX_dG& UbSb=j1=PUc>FVdQ&MBb@0A#a%=>Px# literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..17e52e8550e5668f7117bcb755beb70c3a21c9e9 GIT binary patch literal 207 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD0wg^q?%xcgrg^$JhEy=Vy>(TP*-+rv1Kz7M z%I*XNJ!(VLzdH4Ge@o8ai4)e^3vK%P+bZq#{MQci z?P`C0d3kxcKa^1~`zt>B;jiLd|K_aKfAEz>edFmDy)D6SUw`+o@R*?B*u=sqq~bB* zgRIJrKN^lr3+tD}bFTI}~XjubmVU5CWQ(LZ;AgeuH{an^LB{Ts5E|^v% literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@1.5x.android.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@1.5x.android.png new file mode 100644 index 0000000000000000000000000000000000000000..ad03a63bf3caba175695f5acca85a690dda2d02c GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8K;ucwP+NCjiE#Ight69&c5o}c_J zydef`Jl72k0*^~vo0xKDg<-rzRAUa4zKP)712eEBi<7^`H41)~>Hx;YuoOk;-zgG+pdOq&u`AY6N zNs%Ez@O2lA1Ar9y4M-g3PK&fS5t%Rm4Z&hHN5D ze!OHv(#0SvMkMX7>7>hv>qcQ)8D!H)r^yYOK!*Hb$B3k!LG~2nSt6-%O(#=+d}tt5 z%mPlRNQiQey7;(O3VZoBjMPO6X%u*Y$9!}eEnj{cPU;e%&A?WZU@gX4Y`hICS+hn1 z+v2eRbw--IZ^KJQR{c6p3by|?#3WW}V23>Bqs+igyg_8Kkrm4ypA_s&BFknQP-tKm zJQg8O{`{z5bM~KX>}63{4EscG-5(CbzmW{uhb&EM1UP^aDA14@z%Y_vpcViC0~i7* TCI99@00000NkvXXu0mjfD=e6J literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@1x.android.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@1x.android.png new file mode 100644 index 0000000000000000000000000000000000000000..083db295f474b9903408258c71818c2c49151d35 GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM0wlfaz7_*1ZBG}+kP60RiDL^GIXr{@&3`D~ x%$9kI*}bEvW6`UVO)xQz+sFfYmle_k4J{c^Y-u@of;y~NbrRr@}xDqOoe#7(!ujI zW)IKPtpOg9x^ZGiV^G!WUnY384Jwg^1?qzoV?Vqi%~F-r131d0cdTWi1E3pVgr)a^ zbA?Lk#0WF#3+Yvg4uEz<4l(HmchxGX6;goJ^ovoWl9~bgne?yCQ=RAlXaeYC>D}3~ oOlpASO$!ea%F`=`*pIb34xO&@x>?fx0{{R307*qoM6N<$f~pOBr2qf` literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@2x.android.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@2x.android.png new file mode 100644 index 0000000000000000000000000000000000000000..6de0a1cbb365dfd5d9274890d243ca2321f32235 GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}a}tUr!gukP61P(+)Bo5D;KluXOkB z|6f;`Uoa>nrTyP5;4+Jm;dJDxe#>oP@r$y*#>rHDd13s5eN)8##R;WH*ZD4M;?i1i i;i&z7`QNqd4J-@3aX4v+{p181%;4$j=d#Wzp$P!F!7nZV literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@2x.ios.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@2x.ios.png new file mode 100644 index 0000000000000000000000000000000000000000..63de0e303aae4f3f09bbf5834290131501232f64 GIT binary patch literal 405 zcmV;G0c!q$3ng)KwR%cav2NeVj#yi|twB8nJ$ zhJ9XSgC81to-du2Xkr{|@HcXhBf~opLkgz`JWJYh7b%=;afNgn{8BUDujC*_hPNS> z7&ls+kwoI8u%elk7pg@(StZ8P4^;l-*^fZJ1`5~OHBd;D;qqM+{Bs~b$&5^qEx(K8 zx9Nf9ZEAjO1n+^rUo`oHziD{zE6kAXuYyr+hHU>u3T%dKe|C&IvG2#fso;0*pv4!B zOc_R!8Jq}55TlLyCq{c8swLA2SGn}>CsPgp4HtE6hRq5700000NkvXXu0mjfokp-j literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@3x.android.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@3x.android.png new file mode 100644 index 0000000000000000000000000000000000000000..15a983a67d97c9a6c39d91550a528c37c53a9e3e GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY0wn)GsXhaw@;qG}Ln;{G-aN{9*nr0&aBl6p z15q2fw>DO<$f$_t-m`#N(R0!@qfL6}is!BA-aP5mqcux*S)AYDzOuXc@WF!zU-mWw z!RNIrdq3B7GJgpV3USMNx+#Bt3lxOZSlm}!I$z&?|8f=2ODy@*gQAaCs?P@6%;4$j K=d#Wzp$P!X&_+4{ literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@3x.ios.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@3x.ios.png new file mode 100644 index 0000000000000000000000000000000000000000..2320fd74d1781dc8a74cc131d8c3bb17fc52bae4 GIT binary patch literal 761 zcmVAUlM5g1Q_DYVitMm-$7Tx z*ro&sTZ*z6>QNY&<*{MBLwj|YS(XqXD^V764Y9I1Okis$Okg8b+mr|wUq@l0HcEq; zVTpm+Kw?IyI+FyL&Ez%>QDU|-7*wFaOtGZEY$rQ2K-HNzTzn^q>8HU=v}CyWZt?*4 zR&^#h0``%e>7l`lw-g9CKz639sxv7OaEQQsKxaB>Fyky00*;WF4yw+iM!+!&6ScM) z%veiJ{LO>gk?HFakuuxmtTUZbi;r*1=ySHXQyoauVV}3fsCFdksL$Qv?Q2bBWbLdnCsmVuHOp65Sf{(`X7f(3UB_ENM%STv@ zvIOdikIG_Hb<}I(pkKw$XH%o9lBnz0zU=BVRS7|_2-Hp7L=H8o0zzIAXX+Lzml{=$ zMBTymK^Jb-%uZCPG}qfJds0JQ2XB$6bg6-+U-Ef=(TP*-+rv1Kz7M z%I*XNJ!(VLzdH4Ge@o8ai4)e^3vK%P+bZq#{MQci z?P`C0d3kxcKa^1~`zt>B;jiLd|K_aKfAEz>edFmDy)D6SUw`+o@R*?B*u=sqq~bB* zgRIJrKN^lr3+tD}bFTI}~XjubmVU5CWQ(LZ;AgeuH{an^LB{Ts5E|^v% literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@4x.ios.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon@4x.ios.png new file mode 100644 index 0000000000000000000000000000000000000000..790102d4348ae0c20ee057b955442e35a4833136 GIT binary patch literal 812 zcmV+{1JnG8P)Nkl?98VCerpWz z2npul7f4C~wkz;ok${q{%%=iirvfj=$|xp&w+ipeEDnCIqy}KGGV{|}nNI`2er4vT zaqzPxEi!jVgGWqcWj+Y_Bg(SzIrv$U4vimEW_~;?^Xbv}aV35%2R~CXAoC~V=Quw@ zGNJL)%F$*xt86j@e^#0KA*{@2LF4C@nIFi?d{*EuD)7I6@6W+cmuvuBQsJ%i;ov>V zfw-c~d{0){z_8-VL7yeC~)vt@Y@Hx*^`(*&dwEAx4QzpcVsY0tvv z2jGsPYhWdupj z-)`eJJcZhF=E+gzo$%OqA_$PfnojV~31HhL5C@f`( { + Object.keys(styles).forEach(styleProp => { + const value = styles[styleProp]; + if (styleProp === 'position' && value === 'absolute') { + console.warn("position: 'absolute' is not supported on headerStyle. If you would like to render content under the header, use the 'headerTransparent' option."); + } else if (value !== undefined) { + console.warn(`${styleProp} was given a value of ${value}, this has no effect on headerStyle.`); + } + }); +}; +export default function Header(props) { + const insets = useSafeAreaInsets(); + const frame = useSafeAreaFrame(); + const isParentHeaderShown = React.useContext(HeaderShownContext); + const { + layout = frame, + modal = false, + title, + headerTitle: customTitle, + headerTitleAlign = Platform.select({ + ios: 'center', + default: 'left' + }), + headerLeft, + headerLeftLabelVisible, + headerTransparent, + headerTintColor, + headerBackground, + headerRight, + headerTitleAllowFontScaling: titleAllowFontScaling, + headerTitleStyle: titleStyle, + headerLeftContainerStyle: leftContainerStyle, + headerRightContainerStyle: rightContainerStyle, + headerTitleContainerStyle: titleContainerStyle, + headerBackgroundContainerStyle: backgroundContainerStyle, + headerStyle: customHeaderStyle, + headerShadowVisible, + headerPressColor, + headerPressOpacity, + headerStatusBarHeight = isParentHeaderShown ? 0 : insets.top + } = props; + const defaultHeight = getDefaultHeaderHeight(layout, modal, headerStatusBarHeight); + const { + height = defaultHeight, + minHeight, + maxHeight, + backgroundColor, + borderBottomColor, + borderBottomEndRadius, + borderBottomLeftRadius, + borderBottomRightRadius, + borderBottomStartRadius, + borderBottomWidth, + borderColor, + borderEndColor, + borderEndWidth, + borderLeftColor, + borderLeftWidth, + borderRadius, + borderRightColor, + borderRightWidth, + borderStartColor, + borderStartWidth, + borderStyle, + borderTopColor, + borderTopEndRadius, + borderTopLeftRadius, + borderTopRightRadius, + borderTopStartRadius, + borderTopWidth, + borderWidth, + // @ts-expect-error: web support for shadow + boxShadow, + elevation, + shadowColor, + shadowOffset, + shadowOpacity, + shadowRadius, + opacity, + transform, + ...unsafeStyles + } = StyleSheet.flatten(customHeaderStyle || {}); + if (process.env.NODE_ENV !== 'production') { + warnIfHeaderStylesDefined(unsafeStyles); + } + const safeStyles = { + backgroundColor, + borderBottomColor, + borderBottomEndRadius, + borderBottomLeftRadius, + borderBottomRightRadius, + borderBottomStartRadius, + borderBottomWidth, + borderColor, + borderEndColor, + borderEndWidth, + borderLeftColor, + borderLeftWidth, + borderRadius, + borderRightColor, + borderRightWidth, + borderStartColor, + borderStartWidth, + borderStyle, + borderTopColor, + borderTopEndRadius, + borderTopLeftRadius, + borderTopRightRadius, + borderTopStartRadius, + borderTopWidth, + borderWidth, + // @ts-expect-error: boxShadow is only for Web + boxShadow, + elevation, + shadowColor, + shadowOffset, + shadowOpacity, + shadowRadius, + opacity, + transform + }; + + // Setting a property to undefined triggers default style + // So we need to filter them out + // Users can use `null` instead + for (const styleProp in safeStyles) { + // @ts-expect-error: typescript wrongly complains that styleProp cannot be used to index safeStyles + if (safeStyles[styleProp] === undefined) { + // @ts-expect-error + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete safeStyles[styleProp]; + } + } + const backgroundStyle = [safeStyles, headerShadowVisible === false && { + elevation: 0, + shadowOpacity: 0, + borderBottomWidth: 0 + }]; + const leftButton = headerLeft ? headerLeft({ + tintColor: headerTintColor, + pressColor: headerPressColor, + pressOpacity: headerPressOpacity, + labelVisible: headerLeftLabelVisible + }) : null; + const rightButton = headerRight ? headerRight({ + tintColor: headerTintColor, + pressColor: headerPressColor, + pressOpacity: headerPressOpacity + }) : null; + const headerTitle = typeof customTitle !== 'function' ? props => /*#__PURE__*/React.createElement(HeaderTitle, props) : customTitle; + return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Animated.View, { + pointerEvents: "box-none", + style: [StyleSheet.absoluteFill, { + zIndex: 0 + }, backgroundContainerStyle] + }, headerBackground ? headerBackground({ + style: backgroundStyle + }) : headerTransparent ? null : /*#__PURE__*/React.createElement(HeaderBackground, { + style: backgroundStyle + })), /*#__PURE__*/React.createElement(Animated.View, { + pointerEvents: "box-none", + style: [{ + height, + minHeight, + maxHeight, + opacity, + transform + }] + }, /*#__PURE__*/React.createElement(View, { + pointerEvents: "none", + style: { + height: headerStatusBarHeight + } + }), /*#__PURE__*/React.createElement(View, { + pointerEvents: "box-none", + style: styles.content + }, /*#__PURE__*/React.createElement(Animated.View, { + pointerEvents: "box-none", + style: [styles.left, headerTitleAlign === 'center' && styles.expand, { + marginStart: insets.left + }, leftContainerStyle] + }, leftButton), /*#__PURE__*/React.createElement(Animated.View, { + pointerEvents: "box-none", + style: [styles.title, { + // Avoid the title from going offscreen or overlapping buttons + maxWidth: headerTitleAlign === 'center' ? layout.width - ((leftButton ? headerLeftLabelVisible !== false ? 80 : 32 : 16) + Math.max(insets.left, insets.right)) * 2 : layout.width - ((leftButton ? 72 : 16) + (rightButton ? 72 : 16) + insets.left - insets.right) + }, titleContainerStyle] + }, headerTitle({ + children: title, + allowFontScaling: titleAllowFontScaling, + tintColor: headerTintColor, + style: titleStyle + })), /*#__PURE__*/React.createElement(Animated.View, { + pointerEvents: "box-none", + style: [styles.right, styles.expand, { + marginEnd: insets.right + }, rightContainerStyle] + }, rightButton)))); +} +const styles = StyleSheet.create({ + content: { + flex: 1, + flexDirection: 'row', + alignItems: 'stretch' + }, + title: { + marginHorizontal: 16, + justifyContent: 'center' + }, + left: { + justifyContent: 'center', + alignItems: 'flex-start' + }, + right: { + justifyContent: 'center', + alignItems: 'flex-end' + }, + expand: { + flexGrow: 1, + flexBasis: 0 + } +}); +//# sourceMappingURL=Header.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/Header.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/Header.js.map new file mode 100644 index 00000000..049eef01 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/Header.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","Animated","Platform","StyleSheet","View","useSafeAreaFrame","useSafeAreaInsets","getDefaultHeaderHeight","HeaderBackground","HeaderShownContext","HeaderTitle","warnIfHeaderStylesDefined","styles","Object","keys","forEach","styleProp","value","console","warn","undefined","Header","props","insets","frame","isParentHeaderShown","useContext","layout","modal","title","headerTitle","customTitle","headerTitleAlign","select","ios","default","headerLeft","headerLeftLabelVisible","headerTransparent","headerTintColor","headerBackground","headerRight","headerTitleAllowFontScaling","titleAllowFontScaling","headerTitleStyle","titleStyle","headerLeftContainerStyle","leftContainerStyle","headerRightContainerStyle","rightContainerStyle","headerTitleContainerStyle","titleContainerStyle","headerBackgroundContainerStyle","backgroundContainerStyle","headerStyle","customHeaderStyle","headerShadowVisible","headerPressColor","headerPressOpacity","headerStatusBarHeight","top","defaultHeight","height","minHeight","maxHeight","backgroundColor","borderBottomColor","borderBottomEndRadius","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStartRadius","borderBottomWidth","borderColor","borderEndColor","borderEndWidth","borderLeftColor","borderLeftWidth","borderRadius","borderRightColor","borderRightWidth","borderStartColor","borderStartWidth","borderStyle","borderTopColor","borderTopEndRadius","borderTopLeftRadius","borderTopRightRadius","borderTopStartRadius","borderTopWidth","borderWidth","boxShadow","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","opacity","transform","unsafeStyles","flatten","process","env","NODE_ENV","safeStyles","backgroundStyle","leftButton","tintColor","pressColor","pressOpacity","labelVisible","rightButton","absoluteFill","zIndex","style","content","left","expand","marginStart","maxWidth","width","Math","max","right","children","allowFontScaling","marginEnd","create","flex","flexDirection","alignItems","marginHorizontal","justifyContent","flexGrow","flexBasis"],"sourceRoot":"../../src","sources":["Header.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAC9E,SACEC,gBAAgB,EAChBC,iBAAiB,QACZ,gCAAgC;AAGvC,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,OAAOC,WAAW,MAAM,eAAe;AAiBvC,MAAMC,yBAAyB,GAAIC,MAA2B,IAAK;EACjEC,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CAACG,OAAO,CAAEC,SAAS,IAAK;IACzC,MAAMC,KAAK,GAAGL,MAAM,CAACI,SAAS,CAAC;IAE/B,IAAIA,SAAS,KAAK,UAAU,IAAIC,KAAK,KAAK,UAAU,EAAE;MACpDC,OAAO,CAACC,IAAI,CACV,iJAAiJ,CAClJ;IACH,CAAC,MAAM,IAAIF,KAAK,KAAKG,SAAS,EAAE;MAC9BF,OAA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,CAACmG;IAAM,CAAC,EAC3BzE,mBAAmB;EACnB,GAED6D,WAAW,CACE,CACX,CACO,CACD;AAErB;AAEA,MAAMlG,MAAM,GAAGT,UAAU,CAAC2H,MAAM,CAAC;EAC/BZ,OAAO,EAAE;IACPa,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE;EACd,CAAC;EACDpG,KAAK,EAAE;IACLqG,gBAAgB,EAAE,EAAE;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDhB,IAAI,EAAE;IACJgB,cAAc,EAAE,QAAQ;IACxBF,UAAU,EAAE;EACd,CAAC;EACDP,KAAK,EAAE;IACLS,cAAc,EAAE,QAAQ;IACxBF,UAAU,EAAE;EACd,CAAC;EACDb,MAAM,EAAE;IACNgB,QAAQ,EAAE,CAAC;IACXC,SAAS,EAAE;EACb;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackButton.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackButton.js new file mode 100644 index 00000000..c20dca61 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackButton.js @@ -0,0 +1,196 @@ +import { useTheme } from '@react-navigation/native'; +import * as React from 'react'; +import { Animated, I18nManager, Image, Platform, StyleSheet, View } from 'react-native'; +import MaskedView from '../MaskedView'; +import PlatformPressable from '../PlatformPressable'; +export default function HeaderBackButton(_ref) { + let { + disabled, + allowFontScaling, + backImage, + label, + labelStyle, + labelVisible, + onLabelLayout, + onPress, + pressColor, + pressOpacity, + screenLayout, + tintColor: customTintColor, + titleLayout, + truncatedLabel = 'Back', + accessibilityLabel = label && label !== 'Back' ? `${label}, back` : 'Go back', + testID, + style + } = _ref; + const { + colors + } = useTheme(); + const [initialLabelWidth, setInitialLabelWidth] = React.useState(undefined); + const tintColor = customTintColor !== undefined ? customTintColor : Platform.select({ + ios: colors.primary, + default: colors.text + }); + const handleLabelLayout = e => { + onLabelLayout === null || onLabelLayout === void 0 ? void 0 : onLabelLayout(e); + setInitialLabelWidth(e.nativeEvent.layout.x + e.nativeEvent.layout.width); + }; + const shouldTruncateLabel = () => { + return !label || initialLabelWidth && titleLayout && screenLayout && (screenLayout.width - titleLayout.width) / 2 < initialLabelWidth + 26; + }; + const renderBackImage = () => { + if (backImage) { + return backImage({ + tintColor + }); + } else { + return /*#__PURE__*/React.createElement(Image, { + style: [styles.icon, Boolean(labelVisible) && styles.iconWithLabel, Boolean(tintColor) && { + tintColor + }], + source: require('../assets/back-icon.png'), + fadeDuration: 0 + }); + } + }; + const renderLabel = () => { + const leftLabelText = shouldTruncateLabel() ? truncatedLabel : label; + if (!labelVisible || leftLabelText === undefined) { + return null; + } + const labelElement = /*#__PURE__*/React.createElement(View, { + style: screenLayout ? + // We make the button extend till the middle of the screen + // Otherwise it appears to cut off when translating + [styles.labelWrapper, { + minWidth: screenLayout.width / 2 - 27 + }] : null + }, /*#__PURE__*/React.createElement(Animated.Text, { + accessible: false, + onLayout: + // This measurement is used to determine if we should truncate the label when it doesn't fit + // Only measure it when label is not truncated because we want the measurement of full label + leftLabelText === label ? handleLabelLayout : undefined, + style: [styles.label, tintColor ? { + color: tintColor + } : null, labelStyle], + numberOfLines: 1, + allowFontScaling: !!allowFontScaling + }, leftLabelText)); + if (backImage || Platform.OS !== 'ios') { + // When a custom backimage is specified, we can't mask the label + // Otherwise there might be weird effect due to our mask not being the same as the image + return labelElement; + } + return /*#__PURE__*/React.createElement(MaskedView, { + maskElement: /*#__PURE__*/React.createElement(View, { + style: styles.iconMaskContainer + }, /*#__PURE__*/React.createElement(Image, { + source: require('../assets/back-icon-mask.png'), + style: styles.iconMask + }), /*#__PURE__*/React.createElement(View, { + style: styles.iconMaskFillerRect + })) + }, labelElement); + }; + const handlePress = () => onPress && requestAnimationFrame(onPress); + return /*#__PURE__*/React.createElement(PlatformPressable, { + disabled: disabled, + accessible: true, + accessibilityRole: "button", + accessibilityLabel: accessibilityLabel, + testID: testID, + onPress: disabled ? undefined : handlePress, + pressColor: pressColor, + pressOpacity: pressOpacity, + android_ripple: { + borderless: true + }, + style: [styles.container, disabled && styles.disabled, style], + hitSlop: Platform.select({ + ios: undefined, + default: { + top: 16, + right: 16, + bottom: 16, + left: 16 + } + }) + }, /*#__PURE__*/React.createElement(React.Fragment, null, renderBackImage(), renderLabel())); +} +const styles = StyleSheet.create({ + container: { + alignItems: 'center', + flexDirection: 'row', + minWidth: StyleSheet.hairlineWidth, + // Avoid collapsing when title is long + ...Platform.select({ + ios: null, + default: { + marginVertical: 3, + marginHorizontal: 11 + } + }) + }, + disabled: { + opacity: 0.5 + }, + label: { + fontSize: 17, + // Title and back label are a bit different width due to title being bold + // Adjusting the letterSpacing makes them coincide better + letterSpacing: 0.35 + }, + labelWrapper: { + // These styles will make sure that the label doesn't fill the available space + // Otherwise it messes with the measurement of the label + flexDirection: 'row', + alignItems: 'flex-start' + }, + icon: Platform.select({ + ios: { + height: 21, + width: 13, + marginLeft: 8, + marginRight: 22, + marginVertical: 12, + resizeMode: 'contain', + transform: [{ + scaleX: I18nManager.getConstants().isRTL ? -1 : 1 + }] + }, + default: { + height: 24, + width: 24, + margin: 3, + resizeMode: 'contain', + transform: [{ + scaleX: I18nManager.getConstants().isRTL ? -1 : 1 + }] + } + }), + iconWithLabel: Platform.OS === 'ios' ? { + marginRight: 6 + } : {}, + iconMaskContainer: { + flex: 1, + flexDirection: 'row', + justifyContent: 'center' + }, + iconMaskFillerRect: { + flex: 1, + backgroundColor: '#000' + }, + iconMask: { + height: 21, + width: 13, + marginLeft: -14.5, + marginVertical: 12, + alignSelf: 'center', + resizeMode: 'contain', + transform: [{ + scaleX: I18nManager.getConstants().isRTL ? -1 : 1 + }] + } +}); +//# sourceMappingURL=HeaderBackButton.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackButton.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackButton.js.map new file mode 100644 index 00000000..b6db8afd --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackButton.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useTheme","React","Animated","I18nManager","Image","Platform","StyleSheet","View","MaskedView","PlatformPressable","HeaderBackButton","disabled","allowFontScaling","backImage","label","labelStyle","labelVisible","onLabelLayout","onPress","pressColor","pressOpacity","screenLayout","tintColor","customTintColor","titleLayout","truncatedLabel","accessibilityLabel","testID","style","colors","initialLabelWidth","setInitialLabelWidth","useState","undefined","select","ios","primary","default","text","handleLabelLayout","e","nativeEvent","layout","x","width","shouldTruncateLabel","renderBackImage","styles","icon","Boolean","iconWithLabel","require","renderLabel","leftLabelText","labelElement","labelWrapper","minWidth","color","OS","iconMaskContainer","iconMask","iconMaskFillerRect","handlePress","requestAnimationFrame","borderless","container","top","right","bottom","left","create","alignItems","flexDirection","hairlineWidth","marginVertical","marginHorizontal","opacity","fontSize","letterSpacing","height","marginLeft","marginRight","resizeMode","transform","scaleX","getConstants","isRTL","margin","flex","justifyContent","backgroundColor","alignSelf"],"sourceRoot":"../../src","sources":["HeaderBackButton.tsx"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,WAAW,EACXC,KAAK,EAELC,QAAQ,EACRC,UAAU,EACVC,IAAI,QACC,cAAc;AAErB,OAAOC,UAAU,MAAM,eAAe;AACtC,OAAOC,iBAAiB,MAAM,sBAAsB;AAGpD,eAAe,SAASC,gBAAgB,OAkBd;EAAA,IAlBe;IACvCC,QAAQ;IACRC,gBAAgB;IAChBC,SAAS;IACTC,KAAK;IACLC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,OAAO;IACPC,UAAU;IACVC,YAAY;IACZC,YAAY;IACZC,SAAS,EAAEC,eAAe;IAC1BC,WAAW;IACXC,cAAc,GAAG,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EC,MAAM,EAAEjF,WAAW,CAACkF,YAAY,EAAE,CAACC,KAAK,GAAG,CAAC,CAAC,GAAG;IAAE,CAAC;EACnE;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackContext.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackContext.js new file mode 100644 index 00000000..b7bf4a5d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackContext.js @@ -0,0 +1,4 @@ +import getNamedContext from '../getNamedContext'; +const HeaderBackContext = getNamedContext('HeaderBackContext', undefined); +export default HeaderBackContext; +//# sourceMappingURL=HeaderBackContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackContext.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackContext.js.map new file mode 100644 index 00000000..24079dcc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getNamedContext","HeaderBackContext","undefined"],"sourceRoot":"../../src","sources":["HeaderBackContext.tsx"],"mappings":"AAAA,OAAOA,eAAe,MAAM,oBAAoB;AAEhD,MAAMC,iBAAiB,GAAGD,eAAe,CACvC,mBAAmB,EACnBE,SAAS,CACV;AAED,eAAeD,iBAAiB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackground.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackground.js new file mode 100644 index 00000000..c20ed411 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackground.js @@ -0,0 +1,42 @@ +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +import { useTheme } from '@react-navigation/native'; +import * as React from 'react'; +import { Animated, Platform, StyleSheet } from 'react-native'; +export default function HeaderBackground(_ref) { + let { + style, + ...rest + } = _ref; + const { + colors + } = useTheme(); + return /*#__PURE__*/React.createElement(Animated.View, _extends({ + style: [styles.container, { + backgroundColor: colors.card, + borderBottomColor: colors.border, + shadowColor: colors.border + }, style] + }, rest)); +} +const styles = StyleSheet.create({ + container: { + flex: 1, + ...Platform.select({ + android: { + elevation: 4 + }, + ios: { + shadowOpacity: 0.85, + shadowRadius: 0, + shadowOffset: { + width: 0, + height: StyleSheet.hairlineWidth + } + }, + default: { + borderBottomWidth: StyleSheet.hairlineWidth + } + }) + } +}); +//# sourceMappingURL=HeaderBackground.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackground.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackground.js.map new file mode 100644 index 00000000..428c9bbd --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackground.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useTheme","React","Animated","Platform","StyleSheet","HeaderBackground","style","rest","colors","styles","container","backgroundColor","card","borderBottomColor","border","shadowColor","create","flex","select","android","elevation","ios","shadowOpacity","shadowRadius","shadowOffset","width","height","hairlineWidth","default","borderBottomWidth"],"sourceRoot":"../../src","sources":["HeaderBackground.tsx"],"mappings":";AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,QAAQ,EAERC,UAAU,QAGL,cAAc;AAOrB,eAAe,SAASC,gBAAgB,OAA4B;EAAA,IAA3B;IAAEC,KAAK;IAAE,GAAGC;EAAY,CAAC;EAChE,MAAM;IAAEC;EAAO,CAAC,GAAGR,QAAQ,EAAE;EAE7B,oBACE,oBAAC,QAAQ,CAAC,IAAI;IACZ,KAAK,EAAE,CACLS,MAAM,CAACC,SAAS,EAChB;MACEC,eAAe,EAAEH,MAAM,CAACI,IAAI;MAC5BC,iBAAiB,EAAEL,MAAM,CAACM,MAAM;MAChCC,WAAW,EAAEP,MAAM,CAACM;IACtB,CAAC,EACDR,KAAK;EACL,GACEC,IAAI,EACR;AAEN;AAEA,MAAME,MAAM,GAAGL,UAAU,CAACY,MAAM,CAAC;EAC/BN,SAAS,EAAE;IACTO,IAAI,EAAE,CAAC;IACP,GAAGd,QAAQ,CAACe,MAAM,CAAC;MACjBC,OAAO,EAAE;QACPC,SAAS,EAAE;MACb,CAAC;MACDC,GAAG,EAAE;QACHC,aAAa,EAAE,IAAI;QACnBC,YAAY,EAAE,CAAC;QACfC,YAAY,EAAE;UACZC,KAAK,EAAE,CAAC;UACRC,MAAM,EAAEtB,UAAU,CAACuB;QACrB;MACF,CAAC;MACDC,OAAO,EAAE;QACPC,iBAAiB,EAAEzB,UAAU,CAACuB;MAChC;IACF,CAAC;EACH;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderHeightContext.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderHeightContext.js new file mode 100644 index 00000000..90c13c58 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderHeightContext.js @@ -0,0 +1,4 @@ +import getNamedContext from '../getNamedContext'; +const HeaderHeightContext = getNamedContext('HeaderHeightContext', undefined); +export default HeaderHeightContext; +//# sourceMappingURL=HeaderHeightContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderHeightContext.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderHeightContext.js.map new file mode 100644 index 00000000..b1556da1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderHeightContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getNamedContext","HeaderHeightContext","undefined"],"sourceRoot":"../../src","sources":["HeaderHeightContext.tsx"],"mappings":"AAAA,OAAOA,eAAe,MAAM,oBAAoB;AAEhD,MAAMC,mBAAmB,GAAGD,eAAe,CACzC,qBAAqB,EACrBE,SAAS,CACV;AAED,eAAeD,mBAAmB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderShownContext.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderShownContext.js new file mode 100644 index 00000000..78eb9e26 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderShownContext.js @@ -0,0 +1,4 @@ +import getNamedContext from '../getNamedContext'; +const HeaderShownContext = getNamedContext('HeaderShownContext', false); +export default HeaderShownContext; +//# sourceMappingURL=HeaderShownContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderShownContext.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderShownContext.js.map new file mode 100644 index 00000000..01b1f838 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderShownContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getNamedContext","HeaderShownContext"],"sourceRoot":"../../src","sources":["HeaderShownContext.tsx"],"mappings":"AAAA,OAAOA,eAAe,MAAM,oBAAoB;AAEhD,MAAMC,kBAAkB,GAAGD,eAAe,CAAC,oBAAoB,EAAE,KAAK,CAAC;AAEvE,eAAeC,kBAAkB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderTitle.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderTitle.js new file mode 100644 index 00000000..d6939afd --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderTitle.js @@ -0,0 +1,41 @@ +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +import { useTheme } from '@react-navigation/native'; +import * as React from 'react'; +import { Animated, Platform, StyleSheet } from 'react-native'; +export default function HeaderTitle(_ref) { + let { + tintColor, + style, + ...rest + } = _ref; + const { + colors + } = useTheme(); + return /*#__PURE__*/React.createElement(Animated.Text, _extends({ + accessibilityRole: "header", + "aria-level": "1", + numberOfLines: 1 + }, rest, { + style: [styles.title, { + color: tintColor === undefined ? colors.text : tintColor + }, style] + })); +} +const styles = StyleSheet.create({ + title: Platform.select({ + ios: { + fontSize: 17, + fontWeight: '600' + }, + android: { + fontSize: 20, + fontFamily: 'sans-serif-medium', + fontWeight: 'normal' + }, + default: { + fontSize: 18, + fontWeight: '500' + } + }) +}); +//# sourceMappingURL=HeaderTitle.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderTitle.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderTitle.js.map new file mode 100644 index 00000000..8f791fca --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/HeaderTitle.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useTheme","React","Animated","Platform","StyleSheet","HeaderTitle","tintColor","style","rest","colors","styles","title","color","undefined","text","create","select","ios","fontSize","fontWeight","android","fontFamily","default"],"sourceRoot":"../../src","sources":["HeaderTitle.tsx"],"mappings":";AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,QAAQ,EAERC,UAAU,QAGL,cAAc;AAOrB,eAAe,SAASC,WAAW,OAAuC;EAAA,IAAtC;IAAEC,SAAS;IAAEC,KAAK;IAAE,GAAGC;EAAY,CAAC;EACtE,MAAM;IAAEC;EAAO,CAAC,GAAGT,QAAQ,EAAE;EAE7B,oBACE,oBAAC,QAAQ,CAAC,IAAI;IACZ,iBAAiB,EAAC,QAAQ;IAC1B,cAAW,GAAG;IACd,aAAa,EAAE;EAAE,GACbQ,IAAI;IACR,KAAK,EAAE,CACLE,MAAM,CAACC,KAAK,EACZ;MAAEC,KAAK,EAAEN,SAAS,KAAKO,SAAS,GAAGJ,MAAM,CAACK,IAAI,GAAGR;IAAU,CAAC,EAC5DC,KAAK;EACL,GACF;AAEN;AAEA,MAAMG,MAAM,GAAGN,UAAU,CAACW,MAAM,CAAC;EAC/BJ,KAAK,EAAER,QAAQ,CAACa,MAAM,CAAC;IACrBC,GAAG,EAAE;MACHC,QAAQ,EAAE,EAAE;MACZC,UAAU,EAAE;IACd,CAAC;IACDC,OAAO,EAAE;MACPF,QAAQ,EAAE,EAAE;MACZG,UAAU,EAAE,mBAAmB;MAC/BF,UAAU,EAAE;IACd,CAAC;IACDG,OAAO,EAAE;MACPJ,QAAQ,EAAE,EAAE;MACZC,UAAU,EAAE;IACd;EACF,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getDefaultHeaderHeight.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getDefaultHeaderHeight.js new file mode 100644 index 00000000..fb142fc9 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getDefaultHeaderHeight.js @@ -0,0 +1,30 @@ +import { Platform } from 'react-native'; +export default function getDefaultHeaderHeight(layout, modalPresentation, statusBarHeight) { + let headerHeight; + const isLandscape = layout.width > layout.height; + if (Platform.OS === 'ios') { + if (Platform.isPad || Platform.isTV) { + if (modalPresentation) { + headerHeight = 56; + } else { + headerHeight = 50; + } + } else { + if (isLandscape) { + headerHeight = 32; + } else { + if (modalPresentation) { + headerHeight = 56; + } else { + headerHeight = 44; + } + } + } + } else if (Platform.OS === 'android') { + headerHeight = 56; + } else { + headerHeight = 64; + } + return headerHeight + statusBarHeight; +} +//# sourceMappingURL=getDefaultHeaderHeight.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getDefaultHeaderHeight.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getDefaultHeaderHeight.js.map new file mode 100644 index 00000000..c6c11f6f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getDefaultHeaderHeight.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Platform","getDefaultHeaderHeight","layout","modalPresentation","statusBarHeight","headerHeight","isLandscape","width","height","OS","isPad","isTV"],"sourceRoot":"../../src","sources":["getDefaultHeaderHeight.tsx"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAIvC,eAAe,SAASC,sBAAsB,CAC5CC,MAAc,EACdC,iBAA0B,EAC1BC,eAAuB,EACf;EACR,IAAIC,YAAY;EAEhB,MAAMC,WAAW,GAAGJ,MAAM,CAACK,KAAK,GAAGL,MAAM,CAACM,MAAM;EAEhD,IAAIR,QAAQ,CAACS,EAAE,KAAK,KAAK,EAAE;IACzB,IAAIT,QAAQ,CAACU,KAAK,IAAIV,QAAQ,CAACW,IAAI,EAAE;MACnC,IAAIR,iBAAiB,EAAE;QACrBE,YAAY,GAAG,EAAE;MACnB,CAAC,MAAM;QACLA,YAAY,GAAG,EAAE;MACnB;IACF,CAAC,MAAM;MACL,IAAIC,WAAW,EAAE;QACfD,YAAY,GAAG,EAAE;MACnB,CAAC,MAAM;QACL,IAAIF,iBAAiB,EAAE;UACrBE,YAAY,GAAG,EAAE;QACnB,CAAC,MAAM;UACLA,YAAY,GAAG,EAAE;QACnB;MACF;IACF;EACF,CAAC,MAAM,IAAIL,QAAQ,CAACS,EAAE,KAAK,SAAS,EAAE;IACpCJ,YAAY,GAAG,EAAE;EACnB,CAAC,MAAM;IACLA,YAAY,GAAG,EAAE;EACnB;EAEA,OAAOA,YAAY,GAAGD,eAAe;AACvC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getHeaderTitle.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getHeaderTitle.js new file mode 100644 index 00000000..9dea31f9 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getHeaderTitle.js @@ -0,0 +1,4 @@ +export default function getHeaderTitle(options, fallback) { + return typeof options.headerTitle === 'string' ? options.headerTitle : options.title !== undefined ? options.title : fallback; +} +//# sourceMappingURL=getHeaderTitle.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getHeaderTitle.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getHeaderTitle.js.map new file mode 100644 index 00000000..a6d1cd5f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/getHeaderTitle.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getHeaderTitle","options","fallback","headerTitle","title","undefined"],"sourceRoot":"../../src","sources":["getHeaderTitle.tsx"],"mappings":"AAEA,eAAe,SAASA,cAAc,CACpCC,OAAuE,EACvEC,QAAgB,EACR;EACR,OAAO,OAAOD,OAAO,CAACE,WAAW,KAAK,QAAQ,GAC1CF,OAAO,CAACE,WAAW,GACnBF,OAAO,CAACG,KAAK,KAAKC,SAAS,GAC3BJ,OAAO,CAACG,KAAK,GACbF,QAAQ;AACd"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/useHeaderHeight.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/useHeaderHeight.js new file mode 100644 index 00000000..00fac9bd --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/useHeaderHeight.js @@ -0,0 +1,10 @@ +import * as React from 'react'; +import HeaderHeightContext from './HeaderHeightContext'; +export default function useHeaderHeight() { + const height = React.useContext(HeaderHeightContext); + if (height === undefined) { + throw new Error("Couldn't find the header height. Are you inside a screen in a navigator with a header?"); + } + return height; +} +//# sourceMappingURL=useHeaderHeight.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/useHeaderHeight.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/useHeaderHeight.js.map new file mode 100644 index 00000000..9e66adf1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Header/useHeaderHeight.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","HeaderHeightContext","useHeaderHeight","height","useContext","undefined","Error"],"sourceRoot":"../../src","sources":["useHeaderHeight.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,mBAAmB,MAAM,uBAAuB;AAEvD,eAAe,SAASC,eAAe,GAAG;EACxC,MAAMC,MAAM,GAAGH,KAAK,CAACI,UAAU,CAACH,mBAAmB,CAAC;EAEpD,IAAIE,MAAM,KAAKE,SAAS,EAAE;IACxB,MAAM,IAAIC,KAAK,CACb,wFAAwF,CACzF;EACH;EAEA,OAAOH,MAAM;AACf"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.android.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.android.js new file mode 100644 index 00000000..dd9d9be4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.android.js @@ -0,0 +1,2 @@ +export { default } from './MaskedViewNative'; +//# sourceMappingURL=MaskedView.android.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.android.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.android.js.map new file mode 100644 index 00000000..4c6265aa --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.android.js.map @@ -0,0 +1 @@ +{"version":3,"names":["default"],"sourceRoot":"../../src","sources":["MaskedView.android.tsx"],"mappings":"AAAA,SAASA,OAAO,QAAQ,oBAAoB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.ios.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.ios.js new file mode 100644 index 00000000..5a1afe5c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.ios.js @@ -0,0 +1,2 @@ +export { default } from './MaskedViewNative'; +//# sourceMappingURL=MaskedView.ios.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.ios.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.ios.js.map new file mode 100644 index 00000000..7c13e497 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.ios.js.map @@ -0,0 +1 @@ +{"version":3,"names":["default"],"sourceRoot":"../../src","sources":["MaskedView.ios.tsx"],"mappings":"AAAA,SAASA,OAAO,QAAQ,oBAAoB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.js new file mode 100644 index 00000000..c81fc00a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.js @@ -0,0 +1,11 @@ +/** + * Use a stub for MaskedView on all Platforms that don't support it. + */ + +export default function MaskedView(_ref) { + let { + children + } = _ref; + return children; +} +//# sourceMappingURL=MaskedView.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.js.map new file mode 100644 index 00000000..df509e03 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedView.js.map @@ -0,0 +1 @@ +{"version":3,"names":["MaskedView","children"],"sourceRoot":"../../src","sources":["MaskedView.tsx"],"mappings":"AAAA;AACA;AACA;;AAQA,eAAe,SAASA,UAAU,OAAsB;EAAA,IAArB;IAAEC;EAAgB,CAAC;EACpD,OAAOA,QAAQ;AACjB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedViewNative.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedViewNative.js new file mode 100644 index 00000000..ce77f990 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedViewNative.js @@ -0,0 +1,25 @@ +/** + * The native MaskedView that we explicitly re-export for supported platforms: Android, iOS. + */ +import * as React from 'react'; +import { UIManager } from 'react-native'; +let RNCMaskedView; +try { + // Add try/catch to support usage even if it's not installed, since it's optional. + // Newer versions of Metro will handle it properly. + RNCMaskedView = require('@react-native-masked-view/masked-view').default; +} catch (e) { + // Ignore +} +const isMaskedViewAvailable = UIManager.getViewManagerConfig('RNCMaskedView') != null; +export default function MaskedView(_ref) { + let { + children, + ...rest + } = _ref; + if (isMaskedViewAvailable && RNCMaskedView) { + return /*#__PURE__*/React.createElement(RNCMaskedView, rest, children); + } + return children; +} +//# sourceMappingURL=MaskedViewNative.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedViewNative.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedViewNative.js.map new file mode 100644 index 00000000..f488f8b3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MaskedViewNative.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","UIManager","RNCMaskedView","require","default","e","isMaskedViewAvailable","getViewManagerConfig","MaskedView","children","rest"],"sourceRoot":"../../src","sources":["MaskedViewNative.tsx"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,QAAQ,cAAc;AASxC,IAAIC,aAAyC;AAE7C,IAAI;EACF;EACA;EACAA,aAAa,GAAGC,OAAO,CAAC,uCAAuC,CAAC,CAACC,OAAO;AAC1E,CAAC,CAAC,OAAOC,CAAC,EAAE;EACV;AAAA;AAGF,MAAMC,qBAAqB,GACzBL,SAAS,CAACM,oBAAoB,CAAC,eAAe,CAAC,IAAI,IAAI;AAEzD,eAAe,SAASC,UAAU,OAA+B;EAAA,IAA9B;IAAEC,QAAQ;IAAE,GAAGC;EAAY,CAAC;EAC7D,IAAIJ,qBAAqB,IAAIJ,aAAa,EAAE;IAC1C,oBAAO,oBAAC,aAAa,EAAKQ,IAAI,EAAGD,QAAQ,CAAiB;EAC5D;EAEA,OAAOA,QAAQ;AACjB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MissingIcon.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MissingIcon.js new file mode 100644 index 00000000..cdc33904 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MissingIcon.js @@ -0,0 +1,21 @@ +import * as React from 'react'; +import { StyleSheet, Text } from 'react-native'; +export default function MissingIcon(_ref) { + let { + color, + size, + style + } = _ref; + return /*#__PURE__*/React.createElement(Text, { + style: [styles.icon, { + color, + fontSize: size + }, style] + }, "\u23F7"); +} +const styles = StyleSheet.create({ + icon: { + backgroundColor: 'transparent' + } +}); +//# sourceMappingURL=MissingIcon.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MissingIcon.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MissingIcon.js.map new file mode 100644 index 00000000..7d3af326 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/MissingIcon.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","StyleSheet","Text","MissingIcon","color","size","style","styles","icon","fontSize","create","backgroundColor"],"sourceRoot":"../../src","sources":["MissingIcon.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAAoBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAQrE,eAAe,SAASC,WAAW,OAAgC;EAAA,IAA/B;IAAEC,KAAK;IAAEC,IAAI;IAAEC;EAAa,CAAC;EAC/D,oBAAO,oBAAC,IAAI;IAAC,KAAK,EAAE,CAACC,MAAM,CAACC,IAAI,EAAE;MAAEJ,KAAK;MAAEK,QAAQ,EAAEJ;IAAK,CAAC,EAAEC,KAAK;EAAE,YAAS;AAC/E;AAEA,MAAMC,MAAM,GAAGN,UAAU,CAACS,MAAM,CAAC;EAC/BF,IAAI,EAAE;IACJG,eAAe,EAAE;EACnB;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/PlatformPressable.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/PlatformPressable.js new file mode 100644 index 00000000..054d09e2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/PlatformPressable.js @@ -0,0 +1,57 @@ +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +import { useTheme } from '@react-navigation/native'; +import * as React from 'react'; +import { Animated, Easing, Platform, Pressable } from 'react-native'; +const AnimatedPressable = Animated.createAnimatedComponent(Pressable); +const ANDROID_VERSION_LOLLIPOP = 21; +const ANDROID_SUPPORTS_RIPPLE = Platform.OS === 'android' && Platform.Version >= ANDROID_VERSION_LOLLIPOP; + +/** + * PlatformPressable provides an abstraction on top of Pressable to handle platform differences. + */ +export default function PlatformPressable(_ref) { + let { + onPressIn, + onPressOut, + android_ripple, + pressColor, + pressOpacity = 0.3, + style, + ...rest + } = _ref; + const { + dark + } = useTheme(); + const [opacity] = React.useState(() => new Animated.Value(1)); + const animateTo = (toValue, duration) => { + if (ANDROID_SUPPORTS_RIPPLE) { + return; + } + Animated.timing(opacity, { + toValue, + duration, + easing: Easing.inOut(Easing.quad), + useNativeDriver: true + }).start(); + }; + const handlePressIn = e => { + animateTo(pressOpacity, 0); + onPressIn === null || onPressIn === void 0 ? void 0 : onPressIn(e); + }; + const handlePressOut = e => { + animateTo(1, 200); + onPressOut === null || onPressOut === void 0 ? void 0 : onPressOut(e); + }; + return /*#__PURE__*/React.createElement(AnimatedPressable, _extends({ + onPressIn: handlePressIn, + onPressOut: handlePressOut, + android_ripple: ANDROID_SUPPORTS_RIPPLE ? { + color: pressColor !== undefined ? pressColor : dark ? 'rgba(255, 255, 255, .32)' : 'rgba(0, 0, 0, .32)', + ...android_ripple + } : undefined, + style: [{ + opacity: !ANDROID_SUPPORTS_RIPPLE ? opacity : 1 + }, style] + }, rest)); +} +//# sourceMappingURL=PlatformPressable.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/PlatformPressable.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/PlatformPressable.js.map new file mode 100644 index 00000000..03f2bc73 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/PlatformPressable.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useTheme","React","Animated","Easing","Platform","Pressable","AnimatedPressable","createAnimatedComponent","ANDROID_VERSION_LOLLIPOP","ANDROID_SUPPORTS_RIPPLE","OS","Version","PlatformPressable","onPressIn","onPressOut","android_ripple","pressColor","pressOpacity","style","rest","dark","opacity","useState","Value","animateTo","toValue","duration","timing","easing","inOut","quad","useNativeDriver","start","handlePressIn","e","handlePressOut","color","undefined"],"sourceRoot":"../../src","sources":["PlatformPressable.tsx"],"mappings":";AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,MAAM,EAENC,QAAQ,EACRC,SAAS,QAIJ,cAAc;AASrB,MAAMC,iBAAiB,GAAGJ,QAAQ,CAACK,uBAAuB,CAACF,SAAS,CAAC;AAErE,MAAMG,wBAAwB,GAAG,EAAE;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GACpBrB,UAAU,GACVI,IAAI,GACJ,0BAA0B,GAC1B,oBAAoB;MAC1B,GAAGL;IACL,CAAC,GACDsB,SACL;IACD,KAAK,EAAE,CAAC;MAAEhB,OAAO,EAAE,CAACZ,uBAAuB,GAAGY,OAAO,GAAG;IAAE,CAAC,EAAEH,KAAK;EAAE,GAChEC,IAAI,EACR;AAEN"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/ResourceSavingView.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/ResourceSavingView.js new file mode 100644 index 00000000..e2d58c19 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/ResourceSavingView.js @@ -0,0 +1,52 @@ +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +import * as React from 'react'; +import { Platform, StyleSheet, View } from 'react-native'; +const FAR_FAR_AWAY = 30000; // this should be big enough to move the whole view out of its container + +export default function ResourceSavingScene(_ref) { + let { + visible, + children, + style, + ...rest + } = _ref; + if (Platform.OS === 'web') { + return /*#__PURE__*/React.createElement(View + // @ts-expect-error: hidden exists on web, but not in React Native + , _extends({ + hidden: !visible, + style: [{ + display: visible ? 'flex' : 'none' + }, styles.container, style], + pointerEvents: visible ? 'auto' : 'none' + }, rest), children); + } + return /*#__PURE__*/React.createElement(View, { + style: [styles.container, style] + // box-none doesn't seem to work properly on Android + , + pointerEvents: visible ? 'auto' : 'none' + }, /*#__PURE__*/React.createElement(View, { + collapsable: false, + removeClippedSubviews: + // On iOS & macOS, set removeClippedSubviews to true only when not focused + // This is an workaround for a bug where the clipped view never re-appears + Platform.OS === 'ios' || Platform.OS === 'macos' ? !visible : true, + pointerEvents: visible ? 'auto' : 'none', + style: visible ? styles.attached : styles.detached + }, children)); +} +const styles = StyleSheet.create({ + container: { + flex: 1, + overflow: 'hidden' + }, + attached: { + flex: 1 + }, + detached: { + flex: 1, + top: FAR_FAR_AWAY + } +}); +//# sourceMappingURL=ResourceSavingView.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/ResourceSavingView.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/ResourceSavingView.js.map new file mode 100644 index 00000000..aa47c89f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/ResourceSavingView.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","Platform","StyleSheet","View","FAR_FAR_AWAY","ResourceSavingScene","visible","children","style","rest","OS","display","styles","container","attached","detached","create","flex","overflow","top"],"sourceRoot":"../../src","sources":["ResourceSavingView.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAaC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAQ/E,MAAMC,YAAY,GAAG,KAAK,CAAC,CAAC;;AAE5B,eAAe,SAASC,mBAAmB,OAKjC;EAAA,IALkC;IAC1CC,OAAO;IACPC,QAAQ;IACRC,KAAK;IACL,GAAGC;EACE,CAAC;EACN,IAAIR,QAAQ,CAACS,EAAE,KAAK,KAAK,EAAE;IACzB,oBACE,oBAAC;IACC;IAAA;MACA,MAAM,EAAE,CAACJ,OAAQ;MACjB,KAAK,EAAE,CACL;QAAEK,OAAO,EAAEL,OAAO,GAAG,MAAM,GAAG;MAAO,CAAC,EACtCM,MAAM,CAACC,SAAS,EAChBL,KAAK,CACL;MACF,aAAa,EAAEF,OAAO,GAAG,MAAM,GAAG;IAAO,GACrCG,IAAI,GAEPF,QAAQ,CACJ;EAEX;EAEA,oBACE,oBAAC,IAAI;IACH,KAAK,EAAE,CAACK,MAAM,CAACC,SAAS,EAAEL,KAAK;IAC/B;IAAA;IACA,aAAa,EAAEF,OAAO,GAAG,MAAM,GAAG;EAAO,gBAEzC,oBAAC,IAAI;IACH,WAAW,EAAE,KAAM;IACnB,qBAAqB;IACnB;IACA;IACAL,QAAQ,CAACS,EAAE,KAAK,KAAK,IAAIT,QAAQ,CAACS,EAAE,KAAK,OAAO,GAAG,CAACJ,OAAO,GAAG,IAC/D;IACD,aAAa,EAAEA,OAAO,GAAG,MAAM,GAAG,MAAO;IACzC,KAAK,EAAEA,OAAO,GAAGM,MAAM,CAACE,QAAQ,GAAGF,MAAM,CAACG;EAAS,GAElDR,QAAQ,CACJ,CACF;AAEX;AAEA,MAAMK,MAAM,GAAGV,UAAU,CAACc,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE;EACZ,CAAC;EACDJ,QAAQ,EAAE;IACRG,IAAI,EAAE;EACR,CAAC;EACDF,QAAQ,EAAE;IACRE,IAAI,EAAE,CAAC;IACPE,GAAG,EAAEf;EACP;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/SafeAreaProviderCompat.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/SafeAreaProviderCompat.js new file mode 100644 index 00000000..80bf9b74 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/SafeAreaProviderCompat.js @@ -0,0 +1,52 @@ +import * as React from 'react'; +import { Dimensions, Platform, StyleSheet, View } from 'react-native'; +import { initialWindowMetrics, SafeAreaInsetsContext, SafeAreaProvider } from 'react-native-safe-area-context'; +const { + width = 0, + height = 0 +} = Dimensions.get('window'); + +// To support SSR on web, we need to have empty insets for initial values +// Otherwise there can be mismatch between SSR and client output +// We also need to specify empty values to support tests environments +const initialMetrics = Platform.OS === 'web' || initialWindowMetrics == null ? { + frame: { + x: 0, + y: 0, + width, + height + }, + insets: { + top: 0, + left: 0, + right: 0, + bottom: 0 + } +} : initialWindowMetrics; +export default function SafeAreaProviderCompat(_ref) { + let { + children, + style + } = _ref; + return /*#__PURE__*/React.createElement(SafeAreaInsetsContext.Consumer, null, insets => { + if (insets) { + // If we already have insets, don't wrap the stack in another safe area provider + // This avoids an issue with updates at the cost of potentially incorrect values + // https://github.com/react-navigation/react-navigation/issues/174 + return /*#__PURE__*/React.createElement(View, { + style: [styles.container, style] + }, children); + } + return /*#__PURE__*/React.createElement(SafeAreaProvider, { + initialMetrics: initialMetrics, + style: style + }, children); + }); +} +SafeAreaProviderCompat.initialMetrics = initialMetrics; +const styles = StyleSheet.create({ + container: { + flex: 1 + } +}); +//# sourceMappingURL=SafeAreaProviderCompat.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/SafeAreaProviderCompat.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/SafeAreaProviderCompat.js.map new file mode 100644 index 00000000..af868bbd --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/SafeAreaProviderCompat.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","Dimensions","Platform","StyleSheet","View","initialWindowMetrics","SafeAreaInsetsContext","SafeAreaProvider","width","height","get","initialMetrics","OS","frame","x","y","insets","top","left","right","bottom","SafeAreaProviderCompat","children","style","styles","container","create","flex"],"sourceRoot":"../../src","sources":["SafeAreaProviderCompat.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,UAAU,EACVC,QAAQ,EAERC,UAAU,EACVC,IAAI,QAEC,cAAc;AACrB,SACEC,oBAAoB,EACpBC,qBAAqB,EACrBC,gBAAgB,QACX,gCAAgC;AAOvC,MAAM;EAAEC,KAAK,GAAG,CAAC;EAAEC,MAAM,GAAG;AAAE,CAAC,GAAGR,UAAU,CAACS,GAAG,CAAC,QAAQ,CAAC;;AAE1D;AACA;AACA;AACA,MAAMC,cAAc,GAClBT,QAAQ,CAACU,EAAE,KAAK,KAAK,IAAIP,oBAAoB,IAAI,IAAI,GACjD;EACEQ,KAAK,EAAE;IAAEC,CAAC,EAAE,CAAC;IAAEC,CAAC,EAAE,CAAC;IAAEP,KAAK;IAAEC;EAAO,CAAC;EACpCO,MAAM,EAAE;IAAEC,GAAG,EAAE,CAAC;IAAEC,IAAI,EAAE,CAAC;IAAEC,KAAK,EAAE,CAAC;IAAEC,MAAM,EAAE;EAAE;AACjD,CAAC,GACDf,oBAAoB;AAE1B,eAAe,SAASgB,sBAAsB,OAA6B;EAAA,IAA5B;IAAEC,QAAQ;IAAEC;EAAa,CAAC;EACvE,oBACE,oBAAC,qBAAqB,CAAC,QAAQ,QAC3BP,MAAM,IAAK;IACX,IAAIA,MAAM,EAAE;MACV;MACA;MACA;MACA,oBAAO,oBAAC,IAAI;QAAC,KAAK,EAAE,CAACQ,MAAM,CAACC,SAAS,EAAEF,KAAK;MAAE,GAAED,QAAQ,CAAQ;IAClE;IAEA,oBACE,oBAAC,gBAAgB;MAAC,cAAc,EAAEX,cAAe;MAAC,KAAK,EAAEY;IAAM,GAC5DD,QAAQ,CACQ;EAEvB,CAAC,CAC8B;AAErC;AAEAD,sBAAsB,CAACV,cAAc,GAAGA,cAAc;AAEtD,MAAMa,MAAM,GAAGrB,UAAU,CAACuB,MAAM,CAAC;EAC/BD,SAAS,EAAE;IACTE,IAAI,EAAE;EACR;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Screen.js b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Screen.js new file mode 100644 index 00000000..87ba3ec0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Screen.js @@ -0,0 +1,67 @@ +import { NavigationContext, NavigationRouteContext } from '@react-navigation/native'; +import * as React from 'react'; +import { StyleSheet, View } from 'react-native'; +import { useSafeAreaFrame, useSafeAreaInsets } from 'react-native-safe-area-context'; +import Background from './Background'; +import getDefaultHeaderHeight from './Header/getDefaultHeaderHeight'; +import HeaderHeightContext from './Header/HeaderHeightContext'; +import HeaderShownContext from './Header/HeaderShownContext'; +export default function Screen(props) { + const dimensions = useSafeAreaFrame(); + const insets = useSafeAreaInsets(); + const isParentHeaderShown = React.useContext(HeaderShownContext); + const parentHeaderHeight = React.useContext(HeaderHeightContext); + const { + focused, + modal = false, + header, + headerShown = true, + headerTransparent, + headerStatusBarHeight = isParentHeaderShown ? 0 : insets.top, + navigation, + route, + children, + style + } = props; + const [headerHeight, setHeaderHeight] = React.useState(() => getDefaultHeaderHeight(dimensions, modal, headerStatusBarHeight)); + return /*#__PURE__*/React.createElement(Background, { + accessibilityElementsHidden: !focused, + importantForAccessibility: focused ? 'auto' : 'no-hide-descendants', + style: [styles.container, style] + }, /*#__PURE__*/React.createElement(View, { + style: styles.content + }, /*#__PURE__*/React.createElement(HeaderShownContext.Provider, { + value: isParentHeaderShown || headerShown !== false + }, /*#__PURE__*/React.createElement(HeaderHeightContext.Provider, { + value: headerShown ? headerHeight : parentHeaderHeight ?? 0 + }, children))), headerShown ? /*#__PURE__*/React.createElement(NavigationContext.Provider, { + value: navigation + }, /*#__PURE__*/React.createElement(NavigationRouteContext.Provider, { + value: route + }, /*#__PURE__*/React.createElement(View, { + onLayout: e => { + const { + height + } = e.nativeEvent.layout; + setHeaderHeight(height); + }, + style: headerTransparent ? styles.absolute : null + }, header))) : null); +} +const styles = StyleSheet.create({ + container: { + flex: 1, + flexDirection: 'column-reverse' + }, + // This is necessary to avoid applying 'column-reverse' to screen content + content: { + flex: 1 + }, + absolute: { + position: 'absolute', + top: 0, + left: 0, + right: 0 + } +}); +//# sourceMappingURL=Screen.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Screen.js.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Screen.js.map new file mode 100644 index 00000000..439929f1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/Screen.js.map @@ -0,0 +1 @@ +{"version":3,"names":["NavigationContext","NavigationRouteContext","React","StyleSheet","View","useSafeAreaFrame","useSafeAreaInsets","Background","getDefaultHeaderHeight","HeaderHeightContext","HeaderShownContext","Screen","props","dimensions","insets","isParentHeaderShown","useContext","parentHeaderHeight","focused","modal","header","headerShown","headerTransparent","headerStatusBarHeight","top","navigation","route","children","style","headerHeight","setHeaderHeight","useState","styles","container","content","e","height","nativeEvent","layout","absolute","create","flex","flexDirection","position","left","right"],"sourceRoot":"../../src","sources":["Screen.tsx"],"mappings":"AAAA,SACEA,iBAAiB,EAEjBC,sBAAsB,QAGjB,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAAoBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACrE,SACEC,gBAAgB,EAChBC,iBAAiB,QACZ,gCAAgC;AAEvC,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,sBAAsB,MAAM,iCAAiC;AACpE,OAAOC,mBAAmB,MAAM,8BAA8B;AAC9D,OAAOC,kBAAkB,MAAM,6BAA6B;AAe5D,eAAe,SAASC,MAAM,CAACC,KAAY,EAAE;EAC3C,MAAMC,UAAU,GAAGR,gBAAgB,EAAE;EACrC,MAAMS,MAAM,GAAGR,iBAAiB,EAAE;EAElC,MAAMS,mBAAmB,GAAGb,KAAK,CAACc,UAAU,CAACN,kBAAkB,CAAC;EAChE,MAAMO,kBAAkB,GAAGf,KAAK,CAACc,UAAU,CAACP,mBAAmB,CAAC;EAEhE,MAAM;IACJS,OAAO;IACPC,KAAK,GAAG,KAAK;IACbC,MAAM;IACNC,WAAW,GAAG,IAAI;IAClBC,iBAAiB;IACjBC,qBAAqB,GAAGR,mBAAmB,GAAG,CAAC,GAAGD,MAAM,CAACU,GAAG;IAC5DC,UAAU;IACVC,KAAK;IACLC,QAAQ;IACRC;EACF,CAAC,GAAGhB,KAAK;EAET,MAAM,CAACiB,YAAY,EAAEC,eAAe,CAAC,GAAG5B,KAAK,CAAC6B,QAAQ,CAAC,MACrDvB,sBAAsB,CAACK,UAAU,EAAEM,KAAK,EAAEI,qBAAqB,CAAC,CACjE;EAED,oBACE,oBAAC,UAAU;IACT,2BA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-mask.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon-mask.png new file mode 100644 index 0000000000000000000000000000000000000000..9de72420073c10f588cd89d0eb473707735a5f7f GIT binary patch literal 913 zcmeAS@N?(olHy`uVBq!ia0vp^MnD|O!2%=~9Nn{1`6_P!I zd>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N!t9$=lt9;eUJonf*W> zdx@v7EBg~hW-b|X+fI&mK>3-TE{-7?_x9fO&K7YLVE=Hgcv6g5v(ug#3mpG2X~l^g z=?)jRW#8LT#}HWH+b8!|sEezKLr7ksgQH16e{<+n+u3K|wTS9}T$F9n`BriBYpL&s zwwFV#zyH1X`Ng_l(}U*KU#;EHaQ>^>t^L!(5AakXC4PMo>S zmG{@b!ud_d&X)NZyM-TeZd9&dwx6=iN;qyp!IZp1QYET33T6wU1CGvp=aP4Xtw6u0 zTG&!h`he`3ue$vTs7ZD2Sf7`0E}Q{v&)dm@5LS z6{-}TGTr;;T;h6)HTa5jU5B1WYM0o@)%uH+gJv#b|8X?exZLF$-y`QAY+}07o2+{K zFBorRUwP(1^q+ULf3Qc+JtltRgZ~!AXB~B&_7)vtLT6un-*D1d<-~KzzammGEKy5C zEV$1vXq@&w=%dPBwJ@f&i6FYf@ppS*D>*f2Rb9v59`RLSlXktfE5555;`r{`p^ziIX)a4v zg`eWP@NdFyd%>4mj#RlVe7F7TarZMF9!iQ+)~aY;EPOV_L*u=W*SjdmloLHFnOVK2 zzPZm1xvbe)@F_>nSpAMuP&2R5c$UjS%S+_~a>*m2vfi-K&BLtUD`4w>?{Cn8NdWPaP*On#R-0&WlZdFTM zBT7;dOH!?pi&B9UgOP!efv$m}u7Pogp@Ef=g_Wt1wt<0_fx++E&@dDYx%nxXX_dG& UbSb=j1=PUc>FVdQ&MBb@0A#a%=>Px# literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..17e52e8550e5668f7117bcb755beb70c3a21c9e9 GIT binary patch literal 207 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD0wg^q?%xcgrg^$JhEy=Vy>(TP*-+rv1Kz7M z%I*XNJ!(VLzdH4Ge@o8ai4)e^3vK%P+bZq#{MQci z?P`C0d3kxcKa^1~`zt>B;jiLd|K_aKfAEz>edFmDy)D6SUw`+o@R*?B*u=sqq~bB* zgRIJrKN^lr3+tD}bFTI}~XjubmVU5CWQ(LZ;AgeuH{an^LB{Ts5E|^v% literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@1.5x.android.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@1.5x.android.png new file mode 100644 index 0000000000000000000000000000000000000000..ad03a63bf3caba175695f5acca85a690dda2d02c GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8K;ucwP+NCjiE#Ight69&c5o}c_J zydef`Jl72k0*^~vo0xKDg<-rzRAUa4zKP)712eEBi<7^`H41)~>Hx;YuoOk;-zgG+pdOq&u`AY6N zNs%Ez@O2lA1Ar9y4M-g3PK&fS5t%Rm4Z&hHN5D ze!OHv(#0SvMkMX7>7>hv>qcQ)8D!H)r^yYOK!*Hb$B3k!LG~2nSt6-%O(#=+d}tt5 z%mPlRNQiQey7;(O3VZoBjMPO6X%u*Y$9!}eEnj{cPU;e%&A?WZU@gX4Y`hICS+hn1 z+v2eRbw--IZ^KJQR{c6p3by|?#3WW}V23>Bqs+igyg_8Kkrm4ypA_s&BFknQP-tKm zJQg8O{`{z5bM~KX>}63{4EscG-5(CbzmW{uhb&EM1UP^aDA14@z%Y_vpcViC0~i7* TCI99@00000NkvXXu0mjfD=e6J literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@1x.android.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@1x.android.png new file mode 100644 index 0000000000000000000000000000000000000000..083db295f474b9903408258c71818c2c49151d35 GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM0wlfaz7_*1ZBG}+kP60RiDL^GIXr{@&3`D~ x%$9kI*}bEvW6`UVO)xQz+sFfYmle_k4J{c^Y-u@of;y~NbrRr@}xDqOoe#7(!ujI zW)IKPtpOg9x^ZGiV^G!WUnY384Jwg^1?qzoV?Vqi%~F-r131d0cdTWi1E3pVgr)a^ zbA?Lk#0WF#3+Yvg4uEz<4l(HmchxGX6;goJ^ovoWl9~bgne?yCQ=RAlXaeYC>D}3~ oOlpASO$!ea%F`=`*pIb34xO&@x>?fx0{{R307*qoM6N<$f~pOBr2qf` literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@2x.android.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@2x.android.png new file mode 100644 index 0000000000000000000000000000000000000000..6de0a1cbb365dfd5d9274890d243ca2321f32235 GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}a}tUr!gukP61P(+)Bo5D;KluXOkB z|6f;`Uoa>nrTyP5;4+Jm;dJDxe#>oP@r$y*#>rHDd13s5eN)8##R;WH*ZD4M;?i1i i;i&z7`QNqd4J-@3aX4v+{p181%;4$j=d#Wzp$P!F!7nZV literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@2x.ios.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@2x.ios.png new file mode 100644 index 0000000000000000000000000000000000000000..63de0e303aae4f3f09bbf5834290131501232f64 GIT binary patch literal 405 zcmV;G0c!q$3ng)KwR%cav2NeVj#yi|twB8nJ$ zhJ9XSgC81to-du2Xkr{|@HcXhBf~opLkgz`JWJYh7b%=;afNgn{8BUDujC*_hPNS> z7&ls+kwoI8u%elk7pg@(StZ8P4^;l-*^fZJ1`5~OHBd;D;qqM+{Bs~b$&5^qEx(K8 zx9Nf9ZEAjO1n+^rUo`oHziD{zE6kAXuYyr+hHU>u3T%dKe|C&IvG2#fso;0*pv4!B zOc_R!8Jq}55TlLyCq{c8swLA2SGn}>CsPgp4HtE6hRq5700000NkvXXu0mjfokp-j literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@3x.android.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@3x.android.png new file mode 100644 index 0000000000000000000000000000000000000000..15a983a67d97c9a6c39d91550a528c37c53a9e3e GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY0wn)GsXhaw@;qG}Ln;{G-aN{9*nr0&aBl6p z15q2fw>DO<$f$_t-m`#N(R0!@qfL6}is!BA-aP5mqcux*S)AYDzOuXc@WF!zU-mWw z!RNIrdq3B7GJgpV3USMNx+#Bt3lxOZSlm}!I$z&?|8f=2ODy@*gQAaCs?P@6%;4$j K=d#Wzp$P!X&_+4{ literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@3x.ios.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@3x.ios.png new file mode 100644 index 0000000000000000000000000000000000000000..2320fd74d1781dc8a74cc131d8c3bb17fc52bae4 GIT binary patch literal 761 zcmVAUlM5g1Q_DYVitMm-$7Tx z*ro&sTZ*z6>QNY&<*{MBLwj|YS(XqXD^V764Y9I1Okis$Okg8b+mr|wUq@l0HcEq; zVTpm+Kw?IyI+FyL&Ez%>QDU|-7*wFaOtGZEY$rQ2K-HNzTzn^q>8HU=v}CyWZt?*4 zR&^#h0``%e>7l`lw-g9CKz639sxv7OaEQQsKxaB>Fyky00*;WF4yw+iM!+!&6ScM) z%veiJ{LO>gk?HFakuuxmtTUZbi;r*1=ySHXQyoauVV}3fsCFdksL$Qv?Q2bBWbLdnCsmVuHOp65Sf{(`X7f(3UB_ENM%STv@ zvIOdikIG_Hb<}I(pkKw$XH%o9lBnz0zU=BVRS7|_2-Hp7L=H8o0zzIAXX+Lzml{=$ zMBTymK^Jb-%uZCPG}qfJds0JQ2XB$6bg6-+U-Ef=(TP*-+rv1Kz7M z%I*XNJ!(VLzdH4Ge@o8ai4)e^3vK%P+bZq#{MQci z?P`C0d3kxcKa^1~`zt>B;jiLd|K_aKfAEz>edFmDy)D6SUw`+o@R*?B*u=sqq~bB* zgRIJrKN^lr3+tD}bFTI}~XjubmVU5CWQ(LZ;AgeuH{an^LB{Ts5E|^v% literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@4x.ios.png b/iut-expo-starter/node_modules/@react-navigation/elements/lib/module/assets/back-icon@4x.ios.png new file mode 100644 index 0000000000000000000000000000000000000000..790102d4348ae0c20ee057b955442e35a4833136 GIT binary patch literal 812 zcmV+{1JnG8P)Nkl?98VCerpWz z2npul7f4C~wkz;ok${q{%%=iirvfj=$|xp&w+ipeEDnCIqy}KGGV{|}nNI`2er4vT zaqzPxEi!jVgGWqcWj+Y_Bg(SzIrv$U4vimEW_~;?^Xbv}aV35%2R~CXAoC~V=Quw@ zGNJL)%F$*xt86j@e^#0KA*{@2LF4C@nIFi?d{*EuD)7I6@6W+cmuvuBQsJ%i;ov>V zfw-c~d{0){z_8-VL7yeC~)vt@Y@Hx*^`(*&dwEAx4QzpcVsY0tvv z2jGsPYhWdupj z-)`eJJcZhF=E+gzo$%OqA_$PfnojV~31HhL5C@f`( +import type { HeaderOptions, Layout } from '../types'; +declare type Props = HeaderOptions & { + /** + * Whether the header is in a modal + */ + modal?: boolean; + /** + * Layout of the screen. + */ + layout?: Layout; + /** + * Title text for the header. + */ + title: string; +}; +export default function Header(props: Props): JSX.Element; +export {}; +//# sourceMappingURL=Header.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/Header.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/Header.d.ts.map new file mode 100644 index 00000000..c15ca219 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/Header.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/Header/Header.tsx"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAMtD,aAAK,KAAK,GAAG,aAAa,GAAG;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAkBF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,KAAK,eAuP1C"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackButton.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackButton.d.ts new file mode 100644 index 00000000..11fe2ee1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackButton.d.ts @@ -0,0 +1,4 @@ +/// +import type { HeaderBackButtonProps } from '../types'; +export default function HeaderBackButton({ disabled, allowFontScaling, backImage, label, labelStyle, labelVisible, onLabelLayout, onPress, pressColor, pressOpacity, screenLayout, tintColor: customTintColor, titleLayout, truncatedLabel, accessibilityLabel, testID, style, }: HeaderBackButtonProps): JSX.Element; +//# sourceMappingURL=HeaderBackButton.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackButton.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackButton.d.ts.map new file mode 100644 index 00000000..d0ac18d2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackButton.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"HeaderBackButton.d.ts","sourceRoot":"","sources":["../../../../src/Header/HeaderBackButton.tsx"],"names":[],"mappings":";AAcA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,UAAU,EACV,YAAY,EACZ,aAAa,EACb,OAAO,EACP,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,SAAS,EAAE,eAAe,EAC1B,WAAW,EACX,cAAuB,EACvB,kBAA6E,EAC7E,MAAM,EACN,KAAK,GACN,EAAE,qBAAqB,eAsIvB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackContext.d.ts new file mode 100644 index 00000000..8b224068 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackContext.d.ts @@ -0,0 +1,6 @@ +/// +declare const HeaderBackContext: import("react").Context<{ + title: string; +} | undefined>; +export default HeaderBackContext; +//# sourceMappingURL=HeaderBackContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackContext.d.ts.map new file mode 100644 index 00000000..7b1d0469 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"HeaderBackContext.d.ts","sourceRoot":"","sources":["../../../../src/Header/HeaderBackContext.tsx"],"names":[],"mappings":";AAEA,QAAA,MAAM,iBAAiB;WAA4B,MAAM;cAGxD,CAAC;AAEF,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackground.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackground.d.ts new file mode 100644 index 00000000..078d7279 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackground.d.ts @@ -0,0 +1,9 @@ +import * as React from 'react'; +import { Animated, StyleProp, ViewProps, ViewStyle } from 'react-native'; +declare type Props = Omit & { + style?: Animated.WithAnimatedValue>; + children?: React.ReactNode; +}; +export default function HeaderBackground({ style, ...rest }: Props): JSX.Element; +export {}; +//# sourceMappingURL=HeaderBackground.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackground.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackground.d.ts.map new file mode 100644 index 00000000..5b035677 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderBackground.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"HeaderBackground.d.ts","sourceRoot":"","sources":["../../../../src/Header/HeaderBackground.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,EAER,SAAS,EAET,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,aAAK,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG;IACtC,KAAK,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IACzD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,eAiBjE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderHeightContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderHeightContext.d.ts new file mode 100644 index 00000000..d29de2e8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderHeightContext.d.ts @@ -0,0 +1,4 @@ +/// +declare const HeaderHeightContext: import("react").Context; +export default HeaderHeightContext; +//# sourceMappingURL=HeaderHeightContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderHeightContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderHeightContext.d.ts.map new file mode 100644 index 00000000..39dca980 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderHeightContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"HeaderHeightContext.d.ts","sourceRoot":"","sources":["../../../../src/Header/HeaderHeightContext.tsx"],"names":[],"mappings":";AAEA,QAAA,MAAM,mBAAmB,6CAGxB,CAAC;AAEF,eAAe,mBAAmB,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderShownContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderShownContext.d.ts new file mode 100644 index 00000000..b0237c51 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderShownContext.d.ts @@ -0,0 +1,4 @@ +/// +declare const HeaderShownContext: import("react").Context; +export default HeaderShownContext; +//# sourceMappingURL=HeaderShownContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderShownContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderShownContext.d.ts.map new file mode 100644 index 00000000..ea4c3407 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderShownContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"HeaderShownContext.d.ts","sourceRoot":"","sources":["../../../../src/Header/HeaderShownContext.tsx"],"names":[],"mappings":";AAEA,QAAA,MAAM,kBAAkB,kCAA+C,CAAC;AAExE,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderTitle.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderTitle.d.ts new file mode 100644 index 00000000..96aee0de --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderTitle.d.ts @@ -0,0 +1,9 @@ +/// +import { Animated, StyleProp, TextProps, TextStyle } from 'react-native'; +declare type Props = Omit & { + tintColor?: string; + style?: Animated.WithAnimatedValue>; +}; +export default function HeaderTitle({ tintColor, style, ...rest }: Props): JSX.Element; +export {}; +//# sourceMappingURL=HeaderTitle.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderTitle.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderTitle.d.ts.map new file mode 100644 index 00000000..7b499b8e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/HeaderTitle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"HeaderTitle.d.ts","sourceRoot":"","sources":["../../../../src/Header/HeaderTitle.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,QAAQ,EAER,SAAS,EAET,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,aAAK,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;CAC1D,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,eAgBvE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getDefaultHeaderHeight.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getDefaultHeaderHeight.d.ts new file mode 100644 index 00000000..ef5c98cc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getDefaultHeaderHeight.d.ts @@ -0,0 +1,3 @@ +import type { Layout } from '../types'; +export default function getDefaultHeaderHeight(layout: Layout, modalPresentation: boolean, statusBarHeight: number): number; +//# sourceMappingURL=getDefaultHeaderHeight.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getDefaultHeaderHeight.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getDefaultHeaderHeight.d.ts.map new file mode 100644 index 00000000..d96e9b2b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getDefaultHeaderHeight.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getDefaultHeaderHeight.d.ts","sourceRoot":"","sources":["../../../../src/Header/getDefaultHeaderHeight.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,OAAO,EAC1B,eAAe,EAAE,MAAM,GACtB,MAAM,CA8BR"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getHeaderTitle.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getHeaderTitle.d.ts new file mode 100644 index 00000000..ca2bcfab --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getHeaderTitle.d.ts @@ -0,0 +1,6 @@ +import type { HeaderOptions } from '../types'; +export default function getHeaderTitle(options: { + title?: string; + headerTitle?: HeaderOptions['headerTitle']; +}, fallback: string): string; +//# sourceMappingURL=getHeaderTitle.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getHeaderTitle.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getHeaderTitle.d.ts.map new file mode 100644 index 00000000..2cb8c0bd --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/getHeaderTitle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getHeaderTitle.d.ts","sourceRoot":"","sources":["../../../../src/Header/getHeaderTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAA;CAAE,EACvE,QAAQ,EAAE,MAAM,GACf,MAAM,CAMR"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/useHeaderHeight.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/useHeaderHeight.d.ts new file mode 100644 index 00000000..3dc641a9 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/useHeaderHeight.d.ts @@ -0,0 +1,2 @@ +export default function useHeaderHeight(): number; +//# sourceMappingURL=useHeaderHeight.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/useHeaderHeight.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/useHeaderHeight.d.ts.map new file mode 100644 index 00000000..d485d78b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Header/useHeaderHeight.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useHeaderHeight.d.ts","sourceRoot":"","sources":["../../../../src/Header/useHeaderHeight.tsx"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,eAAe,WAUtC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.android.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.android.d.ts new file mode 100644 index 00000000..1f49666a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.android.d.ts @@ -0,0 +1,2 @@ +export { default } from './MaskedViewNative'; +//# sourceMappingURL=MaskedView.android.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.android.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.android.d.ts.map new file mode 100644 index 00000000..abbdfb25 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.android.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MaskedView.android.d.ts","sourceRoot":"","sources":["../../../src/MaskedView.android.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.d.ts new file mode 100644 index 00000000..e3146dd2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.d.ts @@ -0,0 +1,11 @@ +/** + * Use a stub for MaskedView on all Platforms that don't support it. + */ +import type * as React from 'react'; +declare type Props = { + maskElement: React.ReactElement; + children: React.ReactElement; +}; +export default function MaskedView({ children }: Props): React.ReactElement>; +export {}; +//# sourceMappingURL=MaskedView.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.d.ts.map new file mode 100644 index 00000000..6b02c4a1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MaskedView.d.ts","sourceRoot":"","sources":["../../../src/MaskedView.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,aAAK,KAAK,GAAG;IACX,WAAW,EAAE,KAAK,CAAC,YAAY,CAAC;IAChC,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;CAC9B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,sEAErD"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.ios.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.ios.d.ts new file mode 100644 index 00000000..375afff3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.ios.d.ts @@ -0,0 +1,2 @@ +export { default } from './MaskedViewNative'; +//# sourceMappingURL=MaskedView.ios.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.ios.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.ios.d.ts.map new file mode 100644 index 00000000..4170cc85 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedView.ios.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MaskedView.ios.d.ts","sourceRoot":"","sources":["../../../src/MaskedView.ios.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedViewNative.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedViewNative.d.ts new file mode 100644 index 00000000..279bbcd3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedViewNative.d.ts @@ -0,0 +1,11 @@ +/** + * The native MaskedView that we explicitly re-export for supported platforms: Android, iOS. + */ +import * as React from 'react'; +declare type MaskedViewType = typeof import('@react-native-masked-view/masked-view').default; +declare type Props = React.ComponentProps & { + children: React.ReactElement; +}; +export default function MaskedView({ children, ...rest }: Props): JSX.Element; +export {}; +//# sourceMappingURL=MaskedViewNative.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedViewNative.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedViewNative.d.ts.map new file mode 100644 index 00000000..2632d7d4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MaskedViewNative.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MaskedViewNative.d.ts","sourceRoot":"","sources":["../../../src/MaskedViewNative.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,aAAK,cAAc,GACjB,cAAc,uCAAuC,EAAE,OAAO,CAAC;AAEjE,aAAK,KAAK,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IAClD,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;CAC9B,CAAC;AAeF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,eAM9D"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MissingIcon.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MissingIcon.d.ts new file mode 100644 index 00000000..3d07d15a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MissingIcon.d.ts @@ -0,0 +1,10 @@ +/// +import { StyleProp, TextStyle } from 'react-native'; +declare type Props = { + color?: string; + size?: number; + style?: StyleProp; +}; +export default function MissingIcon({ color, size, style }: Props): JSX.Element; +export {}; +//# sourceMappingURL=MissingIcon.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MissingIcon.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MissingIcon.d.ts.map new file mode 100644 index 00000000..012e4c5f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/MissingIcon.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MissingIcon.d.ts","sourceRoot":"","sources":["../../../src/MissingIcon.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAC;AAEtE,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,eAEhE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/PlatformPressable.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/PlatformPressable.d.ts new file mode 100644 index 00000000..90afd720 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/PlatformPressable.d.ts @@ -0,0 +1,13 @@ +import * as React from 'react'; +import { Animated, PressableProps, StyleProp, ViewStyle } from 'react-native'; +export declare type Props = Omit & { + pressColor?: string; + pressOpacity?: number; + style?: Animated.WithAnimatedValue>; + children: React.ReactNode; +}; +/** + * PlatformPressable provides an abstraction on top of Pressable to handle platform differences. + */ +export default function PlatformPressable({ onPressIn, onPressOut, android_ripple, pressColor, pressOpacity, style, ...rest }: Props): JSX.Element; +//# sourceMappingURL=PlatformPressable.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/PlatformPressable.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/PlatformPressable.d.ts.map new file mode 100644 index 00000000..3abf75f1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/PlatformPressable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PlatformPressable.d.ts","sourceRoot":"","sources":["../../../src/PlatformPressable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,EAKR,cAAc,EACd,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,oBAAY,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,GAAG;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IACzD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAQF;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,SAAS,EACT,UAAU,EACV,cAAc,EACd,UAAU,EACV,YAAkB,EAClB,KAAK,EACL,GAAG,IAAI,EACR,EAAE,KAAK,eAgDP"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/ResourceSavingView.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/ResourceSavingView.d.ts new file mode 100644 index 00000000..e9715239 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/ResourceSavingView.d.ts @@ -0,0 +1,10 @@ +import * as React from 'react'; +import { StyleProp, ViewStyle } from 'react-native'; +declare type Props = { + visible: boolean; + children: React.ReactNode; + style?: StyleProp; +}; +export default function ResourceSavingScene({ visible, children, style, ...rest }: Props): JSX.Element; +export {}; +//# sourceMappingURL=ResourceSavingView.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/ResourceSavingView.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/ResourceSavingView.d.ts.map new file mode 100644 index 00000000..62b9669e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/ResourceSavingView.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ResourceSavingView.d.ts","sourceRoot":"","sources":["../../../src/ResourceSavingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAY,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,aAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,OAAO,EACP,QAAQ,EACR,KAAK,EACL,GAAG,IAAI,EACR,EAAE,KAAK,eAuCP"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/SafeAreaProviderCompat.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/SafeAreaProviderCompat.d.ts new file mode 100644 index 00000000..8fc4c1c9 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/SafeAreaProviderCompat.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { StyleProp, ViewStyle } from 'react-native'; +declare type Props = { + children: React.ReactNode; + style?: StyleProp; +}; +declare function SafeAreaProviderCompat({ children, style }: Props): JSX.Element; +declare namespace SafeAreaProviderCompat { + var initialMetrics: import("react-native-safe-area-context").Metrics; +} +export default SafeAreaProviderCompat; +//# sourceMappingURL=SafeAreaProviderCompat.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/SafeAreaProviderCompat.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/SafeAreaProviderCompat.d.ts.map new file mode 100644 index 00000000..d75c9c27 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/SafeAreaProviderCompat.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SafeAreaProviderCompat.d.ts","sourceRoot":"","sources":["../../../src/SafeAreaProviderCompat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAGT,SAAS,EACV,MAAM,cAAc,CAAC;AAOtB,aAAK,KAAK,GAAG;IACX,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAeF,iBAAwB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,eAmBxE;kBAnBuB,sBAAsB;;;eAAtB,sBAAsB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Screen.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Screen.d.ts new file mode 100644 index 00000000..c8cf617e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Screen.d.ts @@ -0,0 +1,18 @@ +import { NavigationProp, ParamListBase, RouteProp } from '@react-navigation/native'; +import * as React from 'react'; +import { StyleProp, ViewStyle } from 'react-native'; +declare type Props = { + focused: boolean; + modal?: boolean; + navigation: NavigationProp; + route: RouteProp; + header: React.ReactNode; + headerShown?: boolean; + headerStatusBarHeight?: number; + headerTransparent?: boolean; + style?: StyleProp; + children: React.ReactNode; +}; +export default function Screen(props: Props): JSX.Element; +export {}; +//# sourceMappingURL=Screen.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Screen.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Screen.d.ts.map new file mode 100644 index 00000000..c5904b59 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/Screen.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../src/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EAEd,aAAa,EACb,SAAS,EACV,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAC;AAWtE,aAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAC1C,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IAChC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,KAAK,eA2D1C"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/getNamedContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/getNamedContext.d.ts new file mode 100644 index 00000000..441698bf --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/getNamedContext.d.ts @@ -0,0 +1,6 @@ +import * as React from 'react'; +declare global { + var __react_navigation__elements_contexts: Map>; +} +export default function getNamedContext(name: string, initialValue: T): React.Context; +//# sourceMappingURL=getNamedContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/getNamedContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/getNamedContext.d.ts.map new file mode 100644 index 00000000..7fd28280 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/getNamedContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getNamedContext.d.ts","sourceRoot":"","sources":["../../../src/getNamedContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,qCAAqC,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;CAC5E;AAKD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,CAAC,EACvC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,CAAC,GACd,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAalB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/index.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/index.d.ts new file mode 100644 index 00000000..593b2368 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/index.d.ts @@ -0,0 +1,19 @@ +export { default as Background } from './Background'; +export { default as getDefaultHeaderHeight } from './Header/getDefaultHeaderHeight'; +export { default as getHeaderTitle } from './Header/getHeaderTitle'; +export { default as Header } from './Header/Header'; +export { default as HeaderBackButton } from './Header/HeaderBackButton'; +export { default as HeaderBackContext } from './Header/HeaderBackContext'; +export { default as HeaderBackground } from './Header/HeaderBackground'; +export { default as HeaderHeightContext } from './Header/HeaderHeightContext'; +export { default as HeaderShownContext } from './Header/HeaderShownContext'; +export { default as HeaderTitle } from './Header/HeaderTitle'; +export { default as useHeaderHeight } from './Header/useHeaderHeight'; +export { default as MissingIcon } from './MissingIcon'; +export { default as PlatformPressable } from './PlatformPressable'; +export { default as ResourceSavingView } from './ResourceSavingView'; +export { default as SafeAreaProviderCompat } from './SafeAreaProviderCompat'; +export { default as Screen } from './Screen'; +export declare const Assets: any[]; +export * from './types'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/index.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/index.d.ts.map new file mode 100644 index 00000000..975b40a8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,MAAM,OAKlB,CAAC;AAEF,cAAc,SAAS,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/types.d.ts b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/types.d.ts new file mode 100644 index 00000000..50dd64f7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/types.d.ts @@ -0,0 +1,222 @@ +/// +import type { Animated, LayoutChangeEvent, StyleProp, TextStyle, ViewStyle } from 'react-native'; +export declare type Layout = { + width: number; + height: number; +}; +export declare type HeaderOptions = { + /** + * String or a function that returns a React Element to be used by the header. + * Defaults to screen `title` or route name. + * + * It receives `allowFontScaling`, `tintColor`, `style` and `children` in the options object as an argument. + * The title string is passed in `children`. + */ + headerTitle?: string | ((props: HeaderTitleProps) => React.ReactNode); + /** + * How to align the the header title. + * Defaults to `center` on iOS and `left` on Android. + */ + headerTitleAlign?: 'left' | 'center'; + /** + * Style object for the title component. + */ + headerTitleStyle?: Animated.WithAnimatedValue>; + /** + * Style object for the container of the `headerTitle` element. + */ + headerTitleContainerStyle?: Animated.WithAnimatedValue>; + /** + * Whether header title font should scale to respect Text Size accessibility settings. Defaults to `false`. + */ + headerTitleAllowFontScaling?: boolean; + /** + * Function which returns a React Element to display on the left side of the header. + */ + headerLeft?: (props: { + tintColor?: string; + pressColor?: string; + pressOpacity?: number; + labelVisible?: boolean; + }) => React.ReactNode; + /** + * Whether a label is visible in the left button. Used to add extra padding. + */ + headerLeftLabelVisible?: boolean; + /** + * Style object for the container of the `headerLeft` element`. + */ + headerLeftContainerStyle?: Animated.WithAnimatedValue>; + /** + * Function which returns a React Element to display on the right side of the header. + */ + headerRight?: (props: { + tintColor?: string; + pressColor?: string; + pressOpacity?: number; + }) => React.ReactNode; + /** + * Style object for the container of the `headerRight` element. + */ + headerRightContainerStyle?: Animated.WithAnimatedValue>; + /** + * Color for material ripple (Android >= 5.0 only). + */ + headerPressColor?: string; + /** + * Color for material ripple (Android >= 5.0 only). + */ + headerPressOpacity?: number; + /** + * Tint color for the header. + */ + headerTintColor?: string; + /** + * Function which returns a React Element to render as the background of the header. + * This is useful for using backgrounds such as an image, a gradient, blur effect etc. + * You can use this with `headerTransparent` to render a blur view, for example, to create a translucent header. + */ + headerBackground?: (props: { + style: Animated.WithAnimatedValue>; + }) => React.ReactNode; + /** + * Style object for the container of the `headerBackground` element. + */ + headerBackgroundContainerStyle?: Animated.WithAnimatedValue>; + /** + * Defaults to `false`. If `true`, the header will not have a background unless you explicitly provide it with `headerBackground`. + * The header will also float over the screen so that it overlaps the content underneath. + * This is useful if you want to render a semi-transparent header or a blurred background. + */ + headerTransparent?: boolean; + /** + * Style object for the header. You can specify a custom background color here, for example. + */ + headerStyle?: Animated.WithAnimatedValue>; + /** + * Whether to hide the elevation shadow (Android) or the bottom border (iOS) on the header. + * + * This is a short-hand for the following styles: + * + * ```js + * { + * elevation: 0, + * shadowOpacity: 0, + * borderBottomWidth: 0, + * } + * ``` + * + * If the above styles are specified in `headerStyle` along with `headerShadowVisible: false`, + * then `headerShadowVisible: false` will take precedence. + */ + headerShadowVisible?: boolean; + /** + * Extra padding to add at the top of header to account for translucent status bar. + * By default, it uses the top value from the safe area insets of the device. + * Pass 0 or a custom value to disable the default behaviour, and customize the height. + */ + headerStatusBarHeight?: number; +}; +export declare type HeaderTitleProps = { + /** + * The title text of the header. + */ + children: string; + /** + * Whether title font should scale to respect Text Size accessibility settings. + */ + allowFontScaling?: boolean; + /** + * Tint color for the header. + */ + tintColor?: string; + /** + * Callback to trigger when the size of the title element changes. + */ + onLayout?: (e: LayoutChangeEvent) => void; + /** + * Style object for the title element. + */ + style?: Animated.WithAnimatedValue>; +}; +export declare type HeaderButtonProps = { + /** + * Tint color for the header button. + */ + tintColor?: string; + /** + * Color for material ripple (Android >= 5.0 only). + */ + pressColor?: string; + /** + * Opacity when the button is pressed, used when ripple is not supported. + */ + pressOpacity?: number; + /** + * Whether it's possible to navigate back in stack. + */ + canGoBack?: boolean; +}; +export declare type HeaderBackButtonProps = HeaderButtonProps & { + /** + * Whether the button is disabled. + */ + disabled?: boolean; + /** + * Callback to call when the button is pressed. + */ + onPress?: () => void; + /** + * Function which returns a React Element to display custom image in header's back button. + */ + backImage?: (props: { + tintColor: string; + }) => React.ReactNode; + /** + * Label text for the button. Usually the title of the previous screen. + * By default, this is only shown on iOS. + */ + label?: string; + /** + * Label text to show when there isn't enough space for the full label. + */ + truncatedLabel?: string; + /** + * Whether the label text is visible. + * Defaults to `true` on iOS and `false` on Android. + */ + labelVisible?: boolean; + /** + * Style object for the label. + */ + labelStyle?: Animated.WithAnimatedValue>; + /** + * Whether label font should scale to respect Text Size accessibility settings. + */ + allowFontScaling?: boolean; + /** + * Callback to trigger when the size of the label changes. + */ + onLabelLayout?: (e: LayoutChangeEvent) => void; + /** + * Layout of the screen. + */ + screenLayout?: Layout; + /** + * Layout of the title element in the header. + */ + titleLayout?: Layout; + /** + * Accessibility label for the button for screen readers. + */ + accessibilityLabel?: string; + /** + * ID to locate this button in tests. + */ + testID?: string; + /** + * Style object for the button. + */ + style?: StyleProp; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/types.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/types.d.ts.map new file mode 100644 index 00000000..3dcbb0bd --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/lib/typescript/src/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,oBAAY,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,oBAAY,aAAa,GAAG;IAC1B;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IACtE;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACrC;;OAEG;IACH,gBAAgB,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS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IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9D;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/package.json b/iut-expo-starter/node_modules/@react-navigation/elements/package.json new file mode 100644 index 00000000..3bdbed93 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/package.json @@ -0,0 +1,72 @@ +{ + "name": "@react-navigation/elements", + "description": "UI Components for React Navigation", + "version": "1.3.14", + "keywords": [ + "react-native", + "react-navigation", + "ios", + "android" + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/react-navigation/react-navigation.git", + "directory": "packages/elements" + }, + "bugs": { + "url": "https://github.com/react-navigation/react-navigation/issues" + }, + "homepage": "https://reactnavigation.org", + "main": "lib/commonjs/index.js", + "react-native": "src/index.tsx", + "source": "src/index.tsx", + "module": "lib/module/index.js", + "types": "lib/typescript/src/index.d.ts", + "files": [ + "src", + "lib", + "!**/__tests__" + ], + "sideEffects": false, + "publishConfig": { + "access": "public" + }, + "scripts": { + "prepack": "bob build", + "clean": "del lib" + }, + "devDependencies": { + "@react-native-masked-view/masked-view": "0.2.7", + "@react-navigation/native": "^6.1.3", + "@testing-library/react-native": "^11.5.0", + "@types/react": "~18.0.0", + "@types/react-native": "~0.69.1", + "del-cli": "^3.0.1", + "react": "18.0.0", + "react-native": "0.69.5", + "react-native-builder-bob": "^0.20.3", + "typescript": "^4.7.4" + }, + "peerDependencies": { + "@react-navigation/native": "^6.0.0", + "react": "*", + "react-native": "*", + "react-native-safe-area-context": ">= 3.0.0" + }, + "react-native-builder-bob": { + "source": "src", + "output": "lib", + "targets": [ + "commonjs", + "module", + [ + "typescript", + { + "project": "tsconfig.build.json" + } + ] + ] + }, + "gitHead": "ef3f7377ef1a5623bc38273b63663b0f7bd39815" +} diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/Background.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/Background.tsx new file mode 100644 index 00000000..986609c5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/Background.tsx @@ -0,0 +1,18 @@ +import { useTheme } from '@react-navigation/native'; +import * as React from 'react'; +import { View, ViewProps } from 'react-native'; + +type Props = ViewProps & { + children: React.ReactNode; +}; + +export default function Background({ style, ...rest }: Props) { + const { colors } = useTheme(); + + return ( + + ); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/Header.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/Header.tsx new file mode 100644 index 00000000..12c570d2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/Header.tsx @@ -0,0 +1,316 @@ +import * as React from 'react'; +import { Animated, Platform, StyleSheet, View, ViewStyle } from 'react-native'; +import { + useSafeAreaFrame, + useSafeAreaInsets, +} from 'react-native-safe-area-context'; + +import type { HeaderOptions, Layout } from '../types'; +import getDefaultHeaderHeight from './getDefaultHeaderHeight'; +import HeaderBackground from './HeaderBackground'; +import HeaderShownContext from './HeaderShownContext'; +import HeaderTitle from './HeaderTitle'; + +type Props = HeaderOptions & { + /** + * Whether the header is in a modal + */ + modal?: boolean; + /** + * Layout of the screen. + */ + layout?: Layout; + /** + * Title text for the header. + */ + title: string; +}; + +const warnIfHeaderStylesDefined = (styles: Record) => { + Object.keys(styles).forEach((styleProp) => { + const value = styles[styleProp]; + + if (styleProp === 'position' && value === 'absolute') { + console.warn( + "position: 'absolute' is not supported on headerStyle. If you would like to render content under the header, use the 'headerTransparent' option." + ); + } else if (value !== undefined) { + console.warn( + `${styleProp} was given a value of ${value}, this has no effect on headerStyle.` + ); + } + }); +}; + +export default function Header(props: Props) { + const insets = useSafeAreaInsets(); + const frame = useSafeAreaFrame(); + + const isParentHeaderShown = React.useContext(HeaderShownContext); + + const { + layout = frame, + modal = false, + title, + headerTitle: customTitle, + headerTitleAlign = Platform.select({ + ios: 'center', + default: 'left', + }), + headerLeft, + headerLeftLabelVisible, + headerTransparent, + headerTintColor, + headerBackground, + headerRight, + headerTitleAllowFontScaling: titleAllowFontScaling, + headerTitleStyle: titleStyle, + headerLeftContainerStyle: leftContainerStyle, + headerRightContainerStyle: rightContainerStyle, + headerTitleContainerStyle: titleContainerStyle, + headerBackgroundContainerStyle: backgroundContainerStyle, + headerStyle: customHeaderStyle, + headerShadowVisible, + headerPressColor, + headerPressOpacity, + headerStatusBarHeight = isParentHeaderShown ? 0 : insets.top, + } = props; + + const defaultHeight = getDefaultHeaderHeight( + layout, + modal, + headerStatusBarHeight + ); + + const { + height = defaultHeight, + minHeight, + maxHeight, + backgroundColor, + borderBottomColor, + borderBottomEndRadius, + borderBottomLeftRadius, + borderBottomRightRadius, + borderBottomStartRadius, + borderBottomWidth, + borderColor, + borderEndColor, + borderEndWidth, + borderLeftColor, + borderLeftWidth, + borderRadius, + borderRightColor, + borderRightWidth, + borderStartColor, + borderStartWidth, + borderStyle, + borderTopColor, + borderTopEndRadius, + borderTopLeftRadius, + borderTopRightRadius, + borderTopStartRadius, + borderTopWidth, + borderWidth, + // @ts-expect-error: web support for shadow + boxShadow, + elevation, + shadowColor, + shadowOffset, + shadowOpacity, + shadowRadius, + opacity, + transform, + ...unsafeStyles + } = StyleSheet.flatten(customHeaderStyle || {}) as ViewStyle; + + if (process.env.NODE_ENV !== 'production') { + warnIfHeaderStylesDefined(unsafeStyles); + } + + const safeStyles: ViewStyle = { + backgroundColor, + borderBottomColor, + borderBottomEndRadius, + borderBottomLeftRadius, + borderBottomRightRadius, + borderBottomStartRadius, + borderBottomWidth, + borderColor, + borderEndColor, + borderEndWidth, + borderLeftColor, + borderLeftWidth, + borderRadius, + borderRightColor, + borderRightWidth, + borderStartColor, + borderStartWidth, + borderStyle, + borderTopColor, + borderTopEndRadius, + borderTopLeftRadius, + borderTopRightRadius, + borderTopStartRadius, + borderTopWidth, + borderWidth, + // @ts-expect-error: boxShadow is only for Web + boxShadow, + elevation, + shadowColor, + shadowOffset, + shadowOpacity, + shadowRadius, + opacity, + transform, + }; + + // Setting a property to undefined triggers default style + // So we need to filter them out + // Users can use `null` instead + for (const styleProp in safeStyles) { + // @ts-expect-error: typescript wrongly complains that styleProp cannot be used to index safeStyles + if (safeStyles[styleProp] === undefined) { + // @ts-expect-error + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete safeStyles[styleProp]; + } + } + + const backgroundStyle = [ + safeStyles, + headerShadowVisible === false && { + elevation: 0, + shadowOpacity: 0, + borderBottomWidth: 0, + }, + ]; + + const leftButton = headerLeft + ? headerLeft({ + tintColor: headerTintColor, + pressColor: headerPressColor, + pressOpacity: headerPressOpacity, + labelVisible: headerLeftLabelVisible, + }) + : null; + + const rightButton = headerRight + ? headerRight({ + tintColor: headerTintColor, + pressColor: headerPressColor, + pressOpacity: headerPressOpacity, + }) + : null; + + const headerTitle = + typeof customTitle !== 'function' + ? (props: React.ComponentProps) => ( + + ) + : customTitle; + + return ( + + + {headerBackground ? ( + headerBackground({ style: backgroundStyle }) + ) : headerTransparent ? null : ( + + )} + + + + + + {leftButton} + + + {headerTitle({ + children: title, + allowFontScaling: titleAllowFontScaling, + tintColor: headerTintColor, + style: titleStyle, + })} + + + {rightButton} + + + + + ); +} + +const styles = StyleSheet.create({ + content: { + flex: 1, + flexDirection: 'row', + alignItems: 'stretch', + }, + title: { + marginHorizontal: 16, + justifyContent: 'center', + }, + left: { + justifyContent: 'center', + alignItems: 'flex-start', + }, + right: { + justifyContent: 'center', + alignItems: 'flex-end', + }, + expand: { + flexGrow: 1, + flexBasis: 0, + }, +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderBackButton.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderBackButton.tsx new file mode 100644 index 00000000..3977e85f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderBackButton.tsx @@ -0,0 +1,241 @@ +import { useTheme } from '@react-navigation/native'; +import * as React from 'react'; +import { + Animated, + I18nManager, + Image, + LayoutChangeEvent, + Platform, + StyleSheet, + View, +} from 'react-native'; + +import MaskedView from '../MaskedView'; +import PlatformPressable from '../PlatformPressable'; +import type { HeaderBackButtonProps } from '../types'; + +export default function HeaderBackButton({ + disabled, + allowFontScaling, + backImage, + label, + labelStyle, + labelVisible, + onLabelLayout, + onPress, + pressColor, + pressOpacity, + screenLayout, + tintColor: customTintColor, + titleLayout, + truncatedLabel = 'Back', + accessibilityLabel = label && label !== 'Back' ? `${label}, back` : 'Go back', + testID, + style, +}: HeaderBackButtonProps) { + const { colors } = useTheme(); + + const [initialLabelWidth, setInitialLabelWidth] = React.useState< + undefined | number + >(undefined); + + const tintColor = + customTintColor !== undefined + ? customTintColor + : Platform.select({ + ios: colors.primary, + default: colors.text, + }); + + const handleLabelLayout = (e: LayoutChangeEvent) => { + onLabelLayout?.(e); + + setInitialLabelWidth(e.nativeEvent.layout.x + e.nativeEvent.layout.width); + }; + + const shouldTruncateLabel = () => { + return ( + !label || + (initialLabelWidth && + titleLayout && + screenLayout && + (screenLayout.width - titleLayout.width) / 2 < initialLabelWidth + 26) + ); + }; + + const renderBackImage = () => { + if (backImage) { + return backImage({ tintColor }); + } else { + return ( + + ); + } + }; + + const renderLabel = () => { + const leftLabelText = shouldTruncateLabel() ? truncatedLabel : label; + + if (!labelVisible || leftLabelText === undefined) { + return null; + } + + const labelElement = ( + + + {leftLabelText} + + + ); + + if (backImage || Platform.OS !== 'ios') { + // When a custom backimage is specified, we can't mask the label + // Otherwise there might be weird effect due to our mask not being the same as the image + return labelElement; + } + + return ( + + + + + } + > + {labelElement} + + ); + }; + + const handlePress = () => onPress && requestAnimationFrame(onPress); + + return ( + + + {renderBackImage()} + {renderLabel()} + + + ); +} + +const styles = StyleSheet.create({ + container: { + alignItems: 'center', + flexDirection: 'row', + minWidth: StyleSheet.hairlineWidth, // Avoid collapsing when title is long + ...Platform.select({ + ios: null, + default: { + marginVertical: 3, + marginHorizontal: 11, + }, + }), + }, + disabled: { + opacity: 0.5, + }, + label: { + fontSize: 17, + // Title and back label are a bit different width due to title being bold + // Adjusting the letterSpacing makes them coincide better + letterSpacing: 0.35, + }, + labelWrapper: { + // These styles will make sure that the label doesn't fill the available space + // Otherwise it messes with the measurement of the label + flexDirection: 'row', + alignItems: 'flex-start', + }, + icon: Platform.select({ + ios: { + height: 21, + width: 13, + marginLeft: 8, + marginRight: 22, + marginVertical: 12, + resizeMode: 'contain', + transform: [{ scaleX: I18nManager.getConstants().isRTL ? -1 : 1 }], + }, + default: { + height: 24, + width: 24, + margin: 3, + resizeMode: 'contain', + transform: [{ scaleX: I18nManager.getConstants().isRTL ? -1 : 1 }], + }, + }), + iconWithLabel: + Platform.OS === 'ios' + ? { + marginRight: 6, + } + : {}, + iconMaskContainer: { + flex: 1, + flexDirection: 'row', + justifyContent: 'center', + }, + iconMaskFillerRect: { + flex: 1, + backgroundColor: '#000', + }, + iconMask: { + height: 21, + width: 13, + marginLeft: -14.5, + marginVertical: 12, + alignSelf: 'center', + resizeMode: 'contain', + transform: [{ scaleX: I18nManager.getConstants().isRTL ? -1 : 1 }], + }, +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderBackContext.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderBackContext.tsx new file mode 100644 index 00000000..f99c41c2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderBackContext.tsx @@ -0,0 +1,8 @@ +import getNamedContext from '../getNamedContext'; + +const HeaderBackContext = getNamedContext<{ title: string } | undefined>( + 'HeaderBackContext', + undefined +); + +export default HeaderBackContext; diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderBackground.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderBackground.tsx new file mode 100644 index 00000000..0f8696bf --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderBackground.tsx @@ -0,0 +1,56 @@ +import { useTheme } from '@react-navigation/native'; +import * as React from 'react'; +import { + Animated, + Platform, + StyleProp, + StyleSheet, + ViewProps, + ViewStyle, +} from 'react-native'; + +type Props = Omit & { + style?: Animated.WithAnimatedValue>; + children?: React.ReactNode; +}; + +export default function HeaderBackground({ style, ...rest }: Props) { + const { colors } = useTheme(); + + return ( + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + ...Platform.select({ + android: { + elevation: 4, + }, + ios: { + shadowOpacity: 0.85, + shadowRadius: 0, + shadowOffset: { + width: 0, + height: StyleSheet.hairlineWidth, + }, + }, + default: { + borderBottomWidth: StyleSheet.hairlineWidth, + }, + }), + }, +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderHeightContext.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderHeightContext.tsx new file mode 100644 index 00000000..eaec95c5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderHeightContext.tsx @@ -0,0 +1,8 @@ +import getNamedContext from '../getNamedContext'; + +const HeaderHeightContext = getNamedContext( + 'HeaderHeightContext', + undefined +); + +export default HeaderHeightContext; diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderShownContext.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderShownContext.tsx new file mode 100644 index 00000000..783bde2a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderShownContext.tsx @@ -0,0 +1,5 @@ +import getNamedContext from '../getNamedContext'; + +const HeaderShownContext = getNamedContext('HeaderShownContext', false); + +export default HeaderShownContext; diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderTitle.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderTitle.tsx new file mode 100644 index 00000000..7dda9818 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/HeaderTitle.tsx @@ -0,0 +1,51 @@ +import { useTheme } from '@react-navigation/native'; +import * as React from 'react'; +import { + Animated, + Platform, + StyleProp, + StyleSheet, + TextProps, + TextStyle, +} from 'react-native'; + +type Props = Omit & { + tintColor?: string; + style?: Animated.WithAnimatedValue>; +}; + +export default function HeaderTitle({ tintColor, style, ...rest }: Props) { + const { colors } = useTheme(); + + return ( + + ); +} + +const styles = StyleSheet.create({ + title: Platform.select({ + ios: { + fontSize: 17, + fontWeight: '600', + }, + android: { + fontSize: 20, + fontFamily: 'sans-serif-medium', + fontWeight: 'normal', + }, + default: { + fontSize: 18, + fontWeight: '500', + }, + }), +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/getDefaultHeaderHeight.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/getDefaultHeaderHeight.tsx new file mode 100644 index 00000000..cb117b90 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/getDefaultHeaderHeight.tsx @@ -0,0 +1,39 @@ +import { Platform } from 'react-native'; + +import type { Layout } from '../types'; + +export default function getDefaultHeaderHeight( + layout: Layout, + modalPresentation: boolean, + statusBarHeight: number +): number { + let headerHeight; + + const isLandscape = layout.width > layout.height; + + if (Platform.OS === 'ios') { + if (Platform.isPad || Platform.isTV) { + if (modalPresentation) { + headerHeight = 56; + } else { + headerHeight = 50; + } + } else { + if (isLandscape) { + headerHeight = 32; + } else { + if (modalPresentation) { + headerHeight = 56; + } else { + headerHeight = 44; + } + } + } + } else if (Platform.OS === 'android') { + headerHeight = 56; + } else { + headerHeight = 64; + } + + return headerHeight + statusBarHeight; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/getHeaderTitle.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/getHeaderTitle.tsx new file mode 100644 index 00000000..ad4ca1a4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/getHeaderTitle.tsx @@ -0,0 +1,12 @@ +import type { HeaderOptions } from '../types'; + +export default function getHeaderTitle( + options: { title?: string; headerTitle?: HeaderOptions['headerTitle'] }, + fallback: string +): string { + return typeof options.headerTitle === 'string' + ? options.headerTitle + : options.title !== undefined + ? options.title + : fallback; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/useHeaderHeight.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/useHeaderHeight.tsx new file mode 100644 index 00000000..3ee33527 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/Header/useHeaderHeight.tsx @@ -0,0 +1,15 @@ +import * as React from 'react'; + +import HeaderHeightContext from './HeaderHeightContext'; + +export default function useHeaderHeight() { + const height = React.useContext(HeaderHeightContext); + + if (height === undefined) { + throw new Error( + "Couldn't find the header height. Are you inside a screen in a navigator with a header?" + ); + } + + return height; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedView.android.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedView.android.tsx new file mode 100644 index 00000000..6d13a2ad --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedView.android.tsx @@ -0,0 +1 @@ +export { default } from './MaskedViewNative'; diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedView.ios.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedView.ios.tsx new file mode 100644 index 00000000..6d13a2ad --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedView.ios.tsx @@ -0,0 +1 @@ +export { default } from './MaskedViewNative'; diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedView.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedView.tsx new file mode 100644 index 00000000..bd1b89b7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedView.tsx @@ -0,0 +1,13 @@ +/** + * Use a stub for MaskedView on all Platforms that don't support it. + */ +import type * as React from 'react'; + +type Props = { + maskElement: React.ReactElement; + children: React.ReactElement; +}; + +export default function MaskedView({ children }: Props) { + return children; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedViewNative.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedViewNative.tsx new file mode 100644 index 00000000..85548658 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/MaskedViewNative.tsx @@ -0,0 +1,33 @@ +/** + * The native MaskedView that we explicitly re-export for supported platforms: Android, iOS. + */ +import * as React from 'react'; +import { UIManager } from 'react-native'; + +type MaskedViewType = + typeof import('@react-native-masked-view/masked-view').default; + +type Props = React.ComponentProps & { + children: React.ReactElement; +}; + +let RNCMaskedView: MaskedViewType | undefined; + +try { + // Add try/catch to support usage even if it's not installed, since it's optional. + // Newer versions of Metro will handle it properly. + RNCMaskedView = require('@react-native-masked-view/masked-view').default; +} catch (e) { + // Ignore +} + +const isMaskedViewAvailable = + UIManager.getViewManagerConfig('RNCMaskedView') != null; + +export default function MaskedView({ children, ...rest }: Props) { + if (isMaskedViewAvailable && RNCMaskedView) { + return {children}; + } + + return children; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/MissingIcon.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/MissingIcon.tsx new file mode 100644 index 00000000..39813797 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/MissingIcon.tsx @@ -0,0 +1,18 @@ +import * as React from 'react'; +import { StyleProp, StyleSheet, Text, TextStyle } from 'react-native'; + +type Props = { + color?: string; + size?: number; + style?: StyleProp; +}; + +export default function MissingIcon({ color, size, style }: Props) { + return ; +} + +const styles = StyleSheet.create({ + icon: { + backgroundColor: 'transparent', + }, +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/PlatformPressable.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/PlatformPressable.tsx new file mode 100644 index 00000000..bed505d4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/PlatformPressable.tsx @@ -0,0 +1,86 @@ +import { useTheme } from '@react-navigation/native'; +import * as React from 'react'; +import { + Animated, + Easing, + GestureResponderEvent, + Platform, + Pressable, + PressableProps, + StyleProp, + ViewStyle, +} from 'react-native'; + +export type Props = Omit & { + pressColor?: string; + pressOpacity?: number; + style?: Animated.WithAnimatedValue>; + children: React.ReactNode; +}; + +const AnimatedPressable = Animated.createAnimatedComponent(Pressable); + +const ANDROID_VERSION_LOLLIPOP = 21; +const ANDROID_SUPPORTS_RIPPLE = + Platform.OS === 'android' && Platform.Version >= ANDROID_VERSION_LOLLIPOP; + +/** + * PlatformPressable provides an abstraction on top of Pressable to handle platform differences. + */ +export default function PlatformPressable({ + onPressIn, + onPressOut, + android_ripple, + pressColor, + pressOpacity = 0.3, + style, + ...rest +}: Props) { + const { dark } = useTheme(); + const [opacity] = React.useState(() => new Animated.Value(1)); + + const animateTo = (toValue: number, duration: number) => { + if (ANDROID_SUPPORTS_RIPPLE) { + return; + } + + Animated.timing(opacity, { + toValue, + duration, + easing: Easing.inOut(Easing.quad), + useNativeDriver: true, + }).start(); + }; + + const handlePressIn = (e: GestureResponderEvent) => { + animateTo(pressOpacity, 0); + onPressIn?.(e); + }; + + const handlePressOut = (e: GestureResponderEvent) => { + animateTo(1, 200); + onPressOut?.(e); + }; + + return ( + + ); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/ResourceSavingView.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/ResourceSavingView.tsx new file mode 100644 index 00000000..1d453863 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/ResourceSavingView.tsx @@ -0,0 +1,70 @@ +import * as React from 'react'; +import { Platform, StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; + +type Props = { + visible: boolean; + children: React.ReactNode; + style?: StyleProp; +}; + +const FAR_FAR_AWAY = 30000; // this should be big enough to move the whole view out of its container + +export default function ResourceSavingScene({ + visible, + children, + style, + ...rest +}: Props) { + if (Platform.OS === 'web') { + return ( + + ); + } + + return ( + + + {children} + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + overflow: 'hidden', + }, + attached: { + flex: 1, + }, + detached: { + flex: 1, + top: FAR_FAR_AWAY, + }, +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/SafeAreaProviderCompat.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/SafeAreaProviderCompat.tsx new file mode 100644 index 00000000..72cbe978 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/SafeAreaProviderCompat.tsx @@ -0,0 +1,61 @@ +import * as React from 'react'; +import { + Dimensions, + Platform, + StyleProp, + StyleSheet, + View, + ViewStyle, +} from 'react-native'; +import { + initialWindowMetrics, + SafeAreaInsetsContext, + SafeAreaProvider, +} from 'react-native-safe-area-context'; + +type Props = { + children: React.ReactNode; + style?: StyleProp; +}; + +const { width = 0, height = 0 } = Dimensions.get('window'); + +// To support SSR on web, we need to have empty insets for initial values +// Otherwise there can be mismatch between SSR and client output +// We also need to specify empty values to support tests environments +const initialMetrics = + Platform.OS === 'web' || initialWindowMetrics == null + ? { + frame: { x: 0, y: 0, width, height }, + insets: { top: 0, left: 0, right: 0, bottom: 0 }, + } + : initialWindowMetrics; + +export default function SafeAreaProviderCompat({ children, style }: Props) { + return ( + + {(insets) => { + if (insets) { + // If we already have insets, don't wrap the stack in another safe area provider + // This avoids an issue with updates at the cost of potentially incorrect values + // https://github.com/react-navigation/react-navigation/issues/174 + return {children}; + } + + return ( + + {children} + + ); + }} + + ); +} + +SafeAreaProviderCompat.initialMetrics = initialMetrics; + +const styles = StyleSheet.create({ + container: { + flex: 1, + }, +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/Screen.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/Screen.tsx new file mode 100644 index 00000000..6ea25974 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/Screen.tsx @@ -0,0 +1,109 @@ +import { + NavigationContext, + NavigationProp, + NavigationRouteContext, + ParamListBase, + RouteProp, +} from '@react-navigation/native'; +import * as React from 'react'; +import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; +import { + useSafeAreaFrame, + useSafeAreaInsets, +} from 'react-native-safe-area-context'; + +import Background from './Background'; +import getDefaultHeaderHeight from './Header/getDefaultHeaderHeight'; +import HeaderHeightContext from './Header/HeaderHeightContext'; +import HeaderShownContext from './Header/HeaderShownContext'; + +type Props = { + focused: boolean; + modal?: boolean; + navigation: NavigationProp; + route: RouteProp; + header: React.ReactNode; + headerShown?: boolean; + headerStatusBarHeight?: number; + headerTransparent?: boolean; + style?: StyleProp; + children: React.ReactNode; +}; + +export default function Screen(props: Props) { + const dimensions = useSafeAreaFrame(); + const insets = useSafeAreaInsets(); + + const isParentHeaderShown = React.useContext(HeaderShownContext); + const parentHeaderHeight = React.useContext(HeaderHeightContext); + + const { + focused, + modal = false, + header, + headerShown = true, + headerTransparent, + headerStatusBarHeight = isParentHeaderShown ? 0 : insets.top, + navigation, + route, + children, + style, + } = props; + + const [headerHeight, setHeaderHeight] = React.useState(() => + getDefaultHeaderHeight(dimensions, modal, headerStatusBarHeight) + ); + + return ( + + + + + {children} + + + + {headerShown ? ( + + + { + const { height } = e.nativeEvent.layout; + + setHeaderHeight(height); + }} + style={headerTransparent ? styles.absolute : null} + > + {header} + + + + ) : null} + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + flexDirection: 'column-reverse', + }, + // This is necessary to avoid applying 'column-reverse' to screen content + content: { + flex: 1, + }, + absolute: { + position: 'absolute', + top: 0, + left: 0, + right: 0, + }, +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon-mask.png b/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon-mask.png new file mode 100644 index 0000000000000000000000000000000000000000..9de72420073c10f588cd89d0eb473707735a5f7f GIT binary patch literal 913 zcmeAS@N?(olHy`uVBq!ia0vp^MnD|O!2%=~9Nn{1`6_P!I zd>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N!t9$=lt9;eUJonf*W> zdx@v7EBg~hW-b|X+fI&mK>3-TE{-7?_x9fO&K7YLVE=Hgcv6g5v(ug#3mpG2X~l^g z=?)jRW#8LT#}HWH+b8!|sEezKLr7ksgQH16e{<+n+u3K|wTS9}T$F9n`BriBYpL&s zwwFV#zyH1X`Ng_l(}U*KU#;EHaQ>^>t^L!(5AakXC4PMo>S zmG{@b!ud_d&X)NZyM-TeZd9&dwx6=iN;qyp!IZp1QYET33T6wU1CGvp=aP4Xtw6u0 zTG&!h`he`3ue$vTs7ZD2Sf7`0E}Q{v&)dm@5LS z6{-}TGTr;;T;h6)HTa5jU5B1WYM0o@)%uH+gJv#b|8X?exZLF$-y`QAY+}07o2+{K zFBorRUwP(1^q+ULf3Qc+JtltRgZ~!AXB~B&_7)vtLT6un-*D1d<-~KzzammGEKy5C zEV$1vXq@&w=%dPBwJ@f&i6FYf@ppS*D>*f2Rb9v59`RLSlXktfE5555;`r{`p^ziIX)a4v zg`eWP@NdFyd%>4mj#RlVe7F7TarZMF9!iQ+)~aY;EPOV_L*u=W*SjdmloLHFnOVK2 zzPZm1xvbe)@F_>nSpAMuP&2R5c$UjS%S+_~a>*m2vfi-K&BLtUD`4w>?{Cn8NdWPaP*On#R-0&WlZdFTM zBT7;dOH!?pi&B9UgOP!efv$m}u7Pogp@Ef=g_Wt1wt<0_fx++E&@dDYx%nxXX_dG& UbSb=j1=PUc>FVdQ&MBb@0A#a%=>Px# literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon.png b/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..17e52e8550e5668f7117bcb755beb70c3a21c9e9 GIT binary patch literal 207 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD0wg^q?%xcgrg^$JhEy=Vy>(TP*-+rv1Kz7M z%I*XNJ!(VLzdH4Ge@o8ai4)e^3vK%P+bZq#{MQci z?P`C0d3kxcKa^1~`zt>B;jiLd|K_aKfAEz>edFmDy)D6SUw`+o@R*?B*u=sqq~bB* zgRIJrKN^lr3+tD}bFTI}~XjubmVU5CWQ(LZ;AgeuH{an^LB{Ts5E|^v% literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@1.5x.android.png b/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@1.5x.android.png new file mode 100644 index 0000000000000000000000000000000000000000..ad03a63bf3caba175695f5acca85a690dda2d02c GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8K;ucwP+NCjiE#Ight69&c5o}c_J zydef`Jl72k0*^~vo0xKDg<-rzRAUa4zKP)712eEBi<7^`H41)~>Hx;YuoOk;-zgG+pdOq&u`AY6N zNs%Ez@O2lA1Ar9y4M-g3PK&fS5t%Rm4Z&hHN5D ze!OHv(#0SvMkMX7>7>hv>qcQ)8D!H)r^yYOK!*Hb$B3k!LG~2nSt6-%O(#=+d}tt5 z%mPlRNQiQey7;(O3VZoBjMPO6X%u*Y$9!}eEnj{cPU;e%&A?WZU@gX4Y`hICS+hn1 z+v2eRbw--IZ^KJQR{c6p3by|?#3WW}V23>Bqs+igyg_8Kkrm4ypA_s&BFknQP-tKm zJQg8O{`{z5bM~KX>}63{4EscG-5(CbzmW{uhb&EM1UP^aDA14@z%Y_vpcViC0~i7* TCI99@00000NkvXXu0mjfD=e6J literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@1x.android.png b/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@1x.android.png new file mode 100644 index 0000000000000000000000000000000000000000..083db295f474b9903408258c71818c2c49151d35 GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM0wlfaz7_*1ZBG}+kP60RiDL^GIXr{@&3`D~ x%$9kI*}bEvW6`UVO)xQz+sFfYmle_k4J{c^Y-u@of;y~NbrRr@}xDqOoe#7(!ujI zW)IKPtpOg9x^ZGiV^G!WUnY384Jwg^1?qzoV?Vqi%~F-r131d0cdTWi1E3pVgr)a^ zbA?Lk#0WF#3+Yvg4uEz<4l(HmchxGX6;goJ^ovoWl9~bgne?yCQ=RAlXaeYC>D}3~ oOlpASO$!ea%F`=`*pIb34xO&@x>?fx0{{R307*qoM6N<$f~pOBr2qf` literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@2x.android.png b/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@2x.android.png new file mode 100644 index 0000000000000000000000000000000000000000..6de0a1cbb365dfd5d9274890d243ca2321f32235 GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}a}tUr!gukP61P(+)Bo5D;KluXOkB z|6f;`Uoa>nrTyP5;4+Jm;dJDxe#>oP@r$y*#>rHDd13s5eN)8##R;WH*ZD4M;?i1i i;i&z7`QNqd4J-@3aX4v+{p181%;4$j=d#Wzp$P!F!7nZV literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@2x.ios.png b/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@2x.ios.png new file mode 100644 index 0000000000000000000000000000000000000000..63de0e303aae4f3f09bbf5834290131501232f64 GIT binary patch literal 405 zcmV;G0c!q$3ng)KwR%cav2NeVj#yi|twB8nJ$ zhJ9XSgC81to-du2Xkr{|@HcXhBf~opLkgz`JWJYh7b%=;afNgn{8BUDujC*_hPNS> z7&ls+kwoI8u%elk7pg@(StZ8P4^;l-*^fZJ1`5~OHBd;D;qqM+{Bs~b$&5^qEx(K8 zx9Nf9ZEAjO1n+^rUo`oHziD{zE6kAXuYyr+hHU>u3T%dKe|C&IvG2#fso;0*pv4!B zOc_R!8Jq}55TlLyCq{c8swLA2SGn}>CsPgp4HtE6hRq5700000NkvXXu0mjfokp-j literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@3x.android.png b/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@3x.android.png new file mode 100644 index 0000000000000000000000000000000000000000..15a983a67d97c9a6c39d91550a528c37c53a9e3e GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY0wn)GsXhaw@;qG}Ln;{G-aN{9*nr0&aBl6p z15q2fw>DO<$f$_t-m`#N(R0!@qfL6}is!BA-aP5mqcux*S)AYDzOuXc@WF!zU-mWw z!RNIrdq3B7GJgpV3USMNx+#Bt3lxOZSlm}!I$z&?|8f=2ODy@*gQAaCs?P@6%;4$j K=d#Wzp$P!X&_+4{ literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@3x.ios.png b/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@3x.ios.png new file mode 100644 index 0000000000000000000000000000000000000000..2320fd74d1781dc8a74cc131d8c3bb17fc52bae4 GIT binary patch literal 761 zcmVAUlM5g1Q_DYVitMm-$7Tx z*ro&sTZ*z6>QNY&<*{MBLwj|YS(XqXD^V764Y9I1Okis$Okg8b+mr|wUq@l0HcEq; zVTpm+Kw?IyI+FyL&Ez%>QDU|-7*wFaOtGZEY$rQ2K-HNzTzn^q>8HU=v}CyWZt?*4 zR&^#h0``%e>7l`lw-g9CKz639sxv7OaEQQsKxaB>Fyky00*;WF4yw+iM!+!&6ScM) z%veiJ{LO>gk?HFakuuxmtTUZbi;r*1=ySHXQyoauVV}3fsCFdksL$Qv?Q2bBWbLdnCsmVuHOp65Sf{(`X7f(3UB_ENM%STv@ zvIOdikIG_Hb<}I(pkKw$XH%o9lBnz0zU=BVRS7|_2-Hp7L=H8o0zzIAXX+Lzml{=$ zMBTymK^Jb-%uZCPG}qfJds0JQ2XB$6bg6-+U-Ef=(TP*-+rv1Kz7M z%I*XNJ!(VLzdH4Ge@o8ai4)e^3vK%P+bZq#{MQci z?P`C0d3kxcKa^1~`zt>B;jiLd|K_aKfAEz>edFmDy)D6SUw`+o@R*?B*u=sqq~bB* zgRIJrKN^lr3+tD}bFTI}~XjubmVU5CWQ(LZ;AgeuH{an^LB{Ts5E|^v% literal 0 HcmV?d00001 diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@4x.ios.png b/iut-expo-starter/node_modules/@react-navigation/elements/src/assets/back-icon@4x.ios.png new file mode 100644 index 0000000000000000000000000000000000000000..790102d4348ae0c20ee057b955442e35a4833136 GIT binary patch literal 812 zcmV+{1JnG8P)Nkl?98VCerpWz z2npul7f4C~wkz;ok${q{%%=iirvfj=$|xp&w+ipeEDnCIqy}KGGV{|}nNI`2er4vT zaqzPxEi!jVgGWqcWj+Y_Bg(SzIrv$U4vimEW_~;?^Xbv}aV35%2R~CXAoC~V=Quw@ zGNJL)%F$*xt86j@e^#0KA*{@2LF4C@nIFi?d{*EuD)7I6@6W+cmuvuBQsJ%i;ov>V zfw-c~d{0){z_8-VL7yeC~)vt@Y@Hx*^`(*&dwEAx4QzpcVsY0tvv z2jGsPYhWdupj z-)`eJJcZhF=E+gzo$%OqA_$PfnojV~31HhL5C@f`(>; +} + +// We use a global variable to keep our contexts so that we can reuse same contexts across packages +global[contexts] = global[contexts] ?? new Map>(); + +export default function getNamedContext( + name: string, + initialValue: T +): React.Context { + let context = global[contexts].get(name); + + if (context) { + return context; + } + + context = React.createContext(initialValue); + context.displayName = name; + + global[contexts].set(name, context); + + return context; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/index.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/index.tsx new file mode 100644 index 00000000..aa6cafc1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/index.tsx @@ -0,0 +1,25 @@ +export { default as Background } from './Background'; +export { default as getDefaultHeaderHeight } from './Header/getDefaultHeaderHeight'; +export { default as getHeaderTitle } from './Header/getHeaderTitle'; +export { default as Header } from './Header/Header'; +export { default as HeaderBackButton } from './Header/HeaderBackButton'; +export { default as HeaderBackContext } from './Header/HeaderBackContext'; +export { default as HeaderBackground } from './Header/HeaderBackground'; +export { default as HeaderHeightContext } from './Header/HeaderHeightContext'; +export { default as HeaderShownContext } from './Header/HeaderShownContext'; +export { default as HeaderTitle } from './Header/HeaderTitle'; +export { default as useHeaderHeight } from './Header/useHeaderHeight'; +export { default as MissingIcon } from './MissingIcon'; +export { default as PlatformPressable } from './PlatformPressable'; +export { default as ResourceSavingView } from './ResourceSavingView'; +export { default as SafeAreaProviderCompat } from './SafeAreaProviderCompat'; +export { default as Screen } from './Screen'; + +export const Assets = [ + // eslint-disable-next-line import/no-commonjs + require('./assets/back-icon.png'), + // eslint-disable-next-line import/no-commonjs + require('./assets/back-icon-mask.png'), +]; + +export * from './types'; diff --git a/iut-expo-starter/node_modules/@react-navigation/elements/src/types.tsx b/iut-expo-starter/node_modules/@react-navigation/elements/src/types.tsx new file mode 100644 index 00000000..c76c1cea --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/elements/src/types.tsx @@ -0,0 +1,228 @@ +import type { + Animated, + LayoutChangeEvent, + StyleProp, + TextStyle, + ViewStyle, +} from 'react-native'; + +export type Layout = { width: number; height: number }; + +export type HeaderOptions = { + /** + * String or a function that returns a React Element to be used by the header. + * Defaults to screen `title` or route name. + * + * It receives `allowFontScaling`, `tintColor`, `style` and `children` in the options object as an argument. + * The title string is passed in `children`. + */ + headerTitle?: string | ((props: HeaderTitleProps) => React.ReactNode); + /** + * How to align the the header title. + * Defaults to `center` on iOS and `left` on Android. + */ + headerTitleAlign?: 'left' | 'center'; + /** + * Style object for the title component. + */ + headerTitleStyle?: Animated.WithAnimatedValue>; + /** + * Style object for the container of the `headerTitle` element. + */ + headerTitleContainerStyle?: Animated.WithAnimatedValue>; + /** + * Whether header title font should scale to respect Text Size accessibility settings. Defaults to `false`. + */ + headerTitleAllowFontScaling?: boolean; + /** + * Function which returns a React Element to display on the left side of the header. + */ + headerLeft?: (props: { + tintColor?: string; + pressColor?: string; + pressOpacity?: number; + labelVisible?: boolean; + }) => React.ReactNode; + /** + * Whether a label is visible in the left button. Used to add extra padding. + */ + headerLeftLabelVisible?: boolean; + /** + * Style object for the container of the `headerLeft` element`. + */ + headerLeftContainerStyle?: Animated.WithAnimatedValue>; + /** + * Function which returns a React Element to display on the right side of the header. + */ + headerRight?: (props: { + tintColor?: string; + pressColor?: string; + pressOpacity?: number; + }) => React.ReactNode; + /** + * Style object for the container of the `headerRight` element. + */ + headerRightContainerStyle?: Animated.WithAnimatedValue>; + /** + * Color for material ripple (Android >= 5.0 only). + */ + headerPressColor?: string; + /** + * Color for material ripple (Android >= 5.0 only). + */ + headerPressOpacity?: number; + /** + * Tint color for the header. + */ + headerTintColor?: string; + /** + * Function which returns a React Element to render as the background of the header. + * This is useful for using backgrounds such as an image, a gradient, blur effect etc. + * You can use this with `headerTransparent` to render a blur view, for example, to create a translucent header. + */ + headerBackground?: (props: { + style: Animated.WithAnimatedValue>; + }) => React.ReactNode; + /** + * Style object for the container of the `headerBackground` element. + */ + headerBackgroundContainerStyle?: Animated.WithAnimatedValue< + StyleProp + >; + /** + * Defaults to `false`. If `true`, the header will not have a background unless you explicitly provide it with `headerBackground`. + * The header will also float over the screen so that it overlaps the content underneath. + * This is useful if you want to render a semi-transparent header or a blurred background. + */ + headerTransparent?: boolean; + /** + * Style object for the header. You can specify a custom background color here, for example. + */ + headerStyle?: Animated.WithAnimatedValue>; + /** + * Whether to hide the elevation shadow (Android) or the bottom border (iOS) on the header. + * + * This is a short-hand for the following styles: + * + * ```js + * { + * elevation: 0, + * shadowOpacity: 0, + * borderBottomWidth: 0, + * } + * ``` + * + * If the above styles are specified in `headerStyle` along with `headerShadowVisible: false`, + * then `headerShadowVisible: false` will take precedence. + */ + headerShadowVisible?: boolean; + /** + * Extra padding to add at the top of header to account for translucent status bar. + * By default, it uses the top value from the safe area insets of the device. + * Pass 0 or a custom value to disable the default behaviour, and customize the height. + */ + headerStatusBarHeight?: number; +}; + +export type HeaderTitleProps = { + /** + * The title text of the header. + */ + children: string; + /** + * Whether title font should scale to respect Text Size accessibility settings. + */ + allowFontScaling?: boolean; + /** + * Tint color for the header. + */ + tintColor?: string; + /** + * Callback to trigger when the size of the title element changes. + */ + onLayout?: (e: LayoutChangeEvent) => void; + /** + * Style object for the title element. + */ + style?: Animated.WithAnimatedValue>; +}; + +export type HeaderButtonProps = { + /** + * Tint color for the header button. + */ + tintColor?: string; + /** + * Color for material ripple (Android >= 5.0 only). + */ + pressColor?: string; + /** + * Opacity when the button is pressed, used when ripple is not supported. + */ + pressOpacity?: number; + /** + * Whether it's possible to navigate back in stack. + */ + canGoBack?: boolean; +}; + +export type HeaderBackButtonProps = HeaderButtonProps & { + /** + * Whether the button is disabled. + */ + disabled?: boolean; + /** + * Callback to call when the button is pressed. + */ + onPress?: () => void; + /** + * Function which returns a React Element to display custom image in header's back button. + */ + backImage?: (props: { tintColor: string }) => React.ReactNode; + /** + * Label text for the button. Usually the title of the previous screen. + * By default, this is only shown on iOS. + */ + label?: string; + /** + * Label text to show when there isn't enough space for the full label. + */ + truncatedLabel?: string; + /** + * Whether the label text is visible. + * Defaults to `true` on iOS and `false` on Android. + */ + labelVisible?: boolean; + /** + * Style object for the label. + */ + labelStyle?: Animated.WithAnimatedValue>; + /** + * Whether label font should scale to respect Text Size accessibility settings. + */ + allowFontScaling?: boolean; + /** + * Callback to trigger when the size of the label changes. + */ + onLabelLayout?: (e: LayoutChangeEvent) => void; + /** + * Layout of the screen. + */ + screenLayout?: Layout; + /** + * Layout of the title element in the header. + */ + titleLayout?: Layout; + /** + * Accessibility label for the button for screen readers. + */ + accessibilityLabel?: string; + /** + * ID to locate this button in tests. + */ + testID?: string; + /** + * Style object for the button. + */ + style?: StyleProp; +}; diff --git a/iut-expo-starter/node_modules/@react-navigation/native/LICENSE b/iut-expo-starter/node_modules/@react-navigation/native/LICENSE new file mode 100644 index 00000000..9d268cb0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 React Navigation Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/iut-expo-starter/node_modules/@react-navigation/native/README.md b/iut-expo-starter/node_modules/@react-navigation/native/README.md new file mode 100644 index 00000000..c40e4d1a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/README.md @@ -0,0 +1,5 @@ +# `@react-navigation/native` + +React Native integration for React Navigation. + +Installation instructions and documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/getting-started/). diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/Link.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/Link.js new file mode 100644 index 00000000..c8ac7272 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/Link.js @@ -0,0 +1,51 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = Link; +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +var _useLinkProps = _interopRequireDefault(require("./useLinkProps")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Component to render link to another screen using a path. + * Uses an anchor tag on the web. + * + * @param props.to Absolute path to screen (e.g. `/feeds/hot`). + * @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config. + * @param props.children Child elements to render the content. + */ +function Link(_ref) { + let { + to, + action, + ...rest + } = _ref; + const props = (0, _useLinkProps.default)({ + to, + action + }); + const onPress = e => { + if ('onPress' in rest) { + var _rest$onPress; + (_rest$onPress = rest.onPress) === null || _rest$onPress === void 0 ? void 0 : _rest$onPress.call(rest, e); + } + props.onPress(e); + }; + return /*#__PURE__*/React.createElement(_reactNative.Text, { + ...props, + ...rest, + ..._reactNative.Platform.select({ + web: { + onClick: onPress + }, + default: { + onPress + } + }) + }); +} +//# sourceMappingURL=Link.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/Link.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/Link.js.map new file mode 100644 index 00000000..3886f494 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/Link.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Link","to","action","rest","props","useLinkProps","onPress","e","React","createElement","Text","Platform","select","web","onClick","default"],"sourceRoot":"../../src","sources":["Link.tsx"],"mappings":";;;;;;AACA;AACA;AAEA;AAA0C;AAAA;AAAA;AAY1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,IAAI,OAIP;EAAA,IAJyD;IAC5EC,EAAE;IACFC,MAAM;IACN,GAAGC;EACa,CAAC;EACjB,MAAMC,KAAK,GAAG,IAAAC,qBAAY,EAAY;IAAEJ,EAAE;IAAEC;EAAO,CAAC,CAAC;EAErD,MAAMI,OAAO,GACXC,CAA0E,IACvE;IACH,IAAI,SAAS,IAAIJ,IAAI,EAAE;MAAA;MACrB,iBAAAA,IAAI,CAACG,OAAO,kDAAZ,mBAAAH,IAAI,EAAWI,CAAC,CAAC;IACnB;IAEAH,KAAK,CAACE,OAAO,CAACC,CAAC,CAAC;EAClB,CAAC;EAED,oBAAOC,KAAK,CAACC,aAAa,CAACC,iBAAI,EAAE;IAC/B,GAAGN,KAAK;IACR,GAAGD,IAAI;IACP,GAAGQ,qBAAQ,CAACC,MAAM,CAAC;MACjBC,GAAG,EAAE;QAAEC,OAAO,EAAER;MAAQ,CAAQ;MAChCS,OAAO,EAAE;QAAET;MAAQ;IACrB,CAAC;EACH,CAAC,CAAC;AACJ"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/LinkingContext.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/LinkingContext.js new file mode 100644 index 00000000..faff7f66 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/LinkingContext.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const LinkingContext = /*#__PURE__*/React.createContext({ + options: undefined +}); +LinkingContext.displayName = 'LinkingContext'; +var _default = LinkingContext; +exports.default = _default; +//# sourceMappingURL=LinkingContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/LinkingContext.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/LinkingContext.js.map new file mode 100644 index 00000000..f40ca010 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/LinkingContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["LinkingContext","React","createContext","options","undefined","displayName"],"sourceRoot":"../../src","sources":["LinkingContext.tsx"],"mappings":";;;;;;AACA;AAA+B;AAAA;AAI/B,MAAMA,cAAc,gBAAGC,KAAK,CAACC,aAAa,CAEvC;EAAEC,OAAO,EAAEC;AAAU,CAAC,CAAC;AAE1BJ,cAAc,CAACK,WAAW,GAAG,gBAAgB;AAAC,eAE/BL,cAAc;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/NavigationContainer.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/NavigationContainer.js new file mode 100644 index 00000000..b52a6f3a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/NavigationContainer.js @@ -0,0 +1,111 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _core = require("@react-navigation/core"); +var React = _interopRequireWildcard(require("react")); +var _LinkingContext = _interopRequireDefault(require("./LinkingContext")); +var _DefaultTheme = _interopRequireDefault(require("./theming/DefaultTheme")); +var _ThemeProvider = _interopRequireDefault(require("./theming/ThemeProvider")); +var _useBackButton = _interopRequireDefault(require("./useBackButton")); +var _useDocumentTitle = _interopRequireDefault(require("./useDocumentTitle")); +var _useLinking = _interopRequireDefault(require("./useLinking")); +var _useThenable = _interopRequireDefault(require("./useThenable")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +global.REACT_NAVIGATION_DEVTOOLS = new WeakMap(); +/** + * Container component which holds the navigation state designed for React Native apps. + * This should be rendered at the root wrapping the whole app. + * + * @param props.initialState Initial state object for the navigation tree. When deep link handling is enabled, this will override deep links when specified. Make sure that you don't specify an `initialState` when there's a deep link (`Linking.getInitialURL()`). + * @param props.onReady Callback which is called after the navigation tree mounts. + * @param props.onStateChange Callback which is called with the latest navigation state when it changes. + * @param props.theme Theme object for the navigators. + * @param props.linking Options for deep linking. Deep link handling is enabled when this prop is provided, unless `linking.enabled` is `false`. + * @param props.fallback Fallback component to render until we have finished getting initial state when linking is enabled. Defaults to `null`. + * @param props.documentTitle Options to configure the document title on Web. Updating document title is handled by default unless `documentTitle.enabled` is `false`. + * @param props.children Child elements to render the content. + * @param props.ref Ref object which refers to the navigation object containing helper methods. + */ +function NavigationContainerInner(_ref, ref) { + let { + theme = _DefaultTheme.default, + linking, + fallback = null, + documentTitle, + onReady, + ...rest + } = _ref; + const isLinkingEnabled = linking ? linking.enabled !== false : false; + if (linking !== null && linking !== void 0 && linking.config) { + (0, _core.validatePathConfig)(linking.config); + } + const refContainer = React.useRef(null); + (0, _useBackButton.default)(refContainer); + (0, _useDocumentTitle.default)(refContainer, documentTitle); + const { + getInitialState + } = (0, _useLinking.default)(refContainer, { + independent: rest.independent, + enabled: isLinkingEnabled, + prefixes: [], + ...linking + }); + + // Add additional linking related info to the ref + // This will be used by the devtools + React.useEffect(() => { + if (refContainer.current) { + REACT_NAVIGATION_DEVTOOLS.set(refContainer.current, { + get linking() { + return { + ...linking, + enabled: isLinkingEnabled, + prefixes: (linking === null || linking === void 0 ? void 0 : linking.prefixes) ?? [], + getStateFromPath: (linking === null || linking === void 0 ? void 0 : linking.getStateFromPath) ?? _core.getStateFromPath, + getPathFromState: (linking === null || linking === void 0 ? void 0 : linking.getPathFromState) ?? _core.getPathFromState, + getActionFromState: (linking === null || linking === void 0 ? void 0 : linking.getActionFromState) ?? _core.getActionFromState + }; + } + }); + } + }); + const [isResolved, initialState] = (0, _useThenable.default)(getInitialState); + React.useImperativeHandle(ref, () => refContainer.current); + const linkingContext = React.useMemo(() => ({ + options: linking + }), [linking]); + const isReady = rest.initialState != null || !isLinkingEnabled || isResolved; + const onReadyRef = React.useRef(onReady); + React.useEffect(() => { + onReadyRef.current = onReady; + }); + React.useEffect(() => { + if (isReady) { + var _onReadyRef$current; + (_onReadyRef$current = onReadyRef.current) === null || _onReadyRef$current === void 0 ? void 0 : _onReadyRef$current.call(onReadyRef); + } + }, [isReady]); + if (!isReady) { + // This is temporary until we have Suspense for data-fetching + // Then the fallback will be handled by a parent `Suspense` component + return fallback; + } + return /*#__PURE__*/React.createElement(_LinkingContext.default.Provider, { + value: linkingContext + }, /*#__PURE__*/React.createElement(_ThemeProvider.default, { + value: theme + }, /*#__PURE__*/React.createElement(_core.BaseNavigationContainer, _extends({}, rest, { + initialState: rest.initialState == null ? initialState : rest.initialState, + ref: refContainer + })))); +} +const NavigationContainer = /*#__PURE__*/React.forwardRef(NavigationContainerInner); +var _default = NavigationContainer; +exports.default = _default; +//# sourceMappingURL=NavigationContainer.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/NavigationContainer.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/NavigationContainer.js.map new file mode 100644 index 00000000..5c0fc8f8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/NavigationContainer.js.map @@ -0,0 +1 @@ +{"version":3,"names":["global","REACT_NAVIGATION_DEVTOOLS","WeakMap","NavigationContainerInner","ref","theme","DefaultTheme","linking","fallback","documentTitle","onReady","rest","isLinkingEnabled","enabled","config","validatePathConfig","refContainer","React","useRef","useBackButton","useDocumentTitle","getInitialState","useLinking","independent","prefixes","useEffect","current","set","getStateFromPath","getPathFromState","getActionFromState","isResolved","initialState","useThenable","useImperativeHandle","linkingContext","useMemo","options","isReady","onReadyRef","NavigationContainer","forwardRef"],"sourceRoot":"../../src","sources":["NavigationContainer.tsx"],"mappings":";;;;;;AAAA;AAUA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAwC;AAAA;AAAA;AAAA;AASxCA,MAAM,CAACC,yBAAyB,GAAG,IAAIC,OAAO,EAAE;AAUhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,wBAAwB,OAS/BC,GAA6D,EAC7D;EAAA,IATA;IACEC,KAAK,GAAGC,qBAAY;IACpBC,OAAO;IACPC,QAAQ,GAAG,IAAI;IACfC,aAAa;IACbC,OAAO;IACP,GAAGC;EACiB,CAAC;EAGvB,MAAMC,gBAAgB,GAAGL,OAAO,GAAGA,OAAO,CAACM,OAAO,KAAK,KAAK,GAAG,KAAK;EAEpE,IAAIN,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEO,MAAM,EAAE;IACnB,IAAAC,wBAAkB,EAACR,OAAO,CAACO,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,CAACmB,OAAO,CAAC,OAAO;IAAEC,OAAO,EAAE9B;EAAQ,CAAC,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAE7E,MAAM+B,OAAO,GAAG3B,IAAI,CAACqB,YAAY,IAAI,IAAI,IAAI,CAACpB,gBAAgB,IAAImB,UAAU;EAE5E,MAAMQ,UAAU,GAAGtB,KAAK,CAACC,MAAM,CAACR,OAAO,CAAC;EAExCO,KAAK,CAACQ,SAAS,CAAC,MAAM;IACpBc,UAAU,CAACb,OAAO,GAAGhB,OAAO;EAC9B,CAAC,CAAC;EAEFO,KAAK,CAACQ,SAAS,CAAC,MAAM;IACpB,IAAIa,OAAO,EAAE;MAAA;MACX,uBAAAC,UAAU,CAACb,OAAO,wDAAlB,yBAAAa,UAAU,CAAY;IACxB;EACF,CAAC,EAAE,CAACD,OAAO,CAAC,CAAC;EAEb,IAAI,CAACA,OAAO,EAAE;IACZ;IACA;IACA,OAAO9B,QAAQ;EACjB;EAEA,oBACE,oBAAC,uBAAc,CAAC,QAAQ;IAAC,KAAK,EAAE2B;EAAe,gBAC7C,oBAAC,sBAAa;IAAC,KAAK,EAAE9B;EAAM,gBAC1B,oBAAC,6BAAuB,eAClBM,IAAI;IACR,YAAY,EACVA,IAAI,CAACqB,YAAY,IAAI,IAAI,GAAGA,YAAY,GAAGrB,IAAI,CAACqB,YACjD;IACD,GAAG,EAAEhB;EAAa,GAClB,CACY,CACQ;AAE9B;AAEA,MAAMwB,mBAAmB,gBAAGvB,KAAK,CAACwB,UAAU,CAACtC,wBAAwB,CAM9C;AAAC,eAETqC,mBAAmB;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContainer.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContainer.js new file mode 100644 index 00000000..f8c29451 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContainer.js @@ -0,0 +1,56 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _core = require("@react-navigation/core"); +var React = _interopRequireWildcard(require("react")); +var _ServerContext = _interopRequireDefault(require("./ServerContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Container component for server rendering. + * + * @param props.location Location object to base the initial URL for SSR. + * @param props.children Child elements to render the content. + * @param props.ref Ref object which contains helper methods. + */ +var _default = /*#__PURE__*/React.forwardRef(function ServerContainer(_ref, ref) { + let { + children, + location + } = _ref; + React.useEffect(() => { + console.error("'ServerContainer' should only be used on the server with 'react-dom/server' for SSR."); + }, []); + const current = {}; + if (ref) { + const value = { + getCurrentOptions() { + return current.options; + } + }; + + // We write to the `ref` during render instead of `React.useImperativeHandle` + // This is because `useImperativeHandle` will update the ref after 'commit', + // and there's no 'commit' phase during SSR. + // Mutating ref during render is unsafe in concurrent mode, but we don't care about it for SSR. + if (typeof ref === 'function') { + ref(value); + } else { + // @ts-expect-error: the TS types are incorrect and say that ref.current is readonly + ref.current = value; + } + } + return /*#__PURE__*/React.createElement(_ServerContext.default.Provider, { + value: { + location + } + }, /*#__PURE__*/React.createElement(_core.CurrentRenderContext.Provider, { + value: current + }, children)); +}); +exports.default = _default; +//# sourceMappingURL=ServerContainer.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContainer.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContainer.js.map new file mode 100644 index 00000000..82ef5582 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContainer.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","forwardRef","ServerContainer","ref","children","location","useEffect","console","error","current","value","getCurrentOptions","options"],"sourceRoot":"../../src","sources":["ServerContainer.tsx"],"mappings":";;;;;;AAAA;AACA;AAEA;AAAmE;AAAA;AAAA;AAOnE;AACA;AACA;AACA;AACA;AACA;AACA;AANA,4BAOeA,KAAK,CAACC,UAAU,CAAC,SAASC,eAAe,OAEtDC,GAAkC,EAClC;EAAA,IAFA;IAAEC,QAAQ;IAAEC;EAAgB,CAAC;EAG7BL,KAAK,CAACM,SAAS,CAAC,MAAM;IACpBC,OAAO,CAACC,KAAK,CACX,sFAAsF,CACvF;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMC,OAA6B,GAAG,CAAC,CAAC;EAExC,IAAIN,GAAG,EAAE;IACP,MAAMO,KAAK,GAAG;MACZC,iBAAiB,GAAG;QAClB,OAAOF,OAAO,CAACG,OAAO;MACxB;IACF,CAAC;;IAED;IACA;IACA;IACA;IACA,IAAI,OAAOT,GAAG,KAAK,UAAU,EAAE;MAC7BA,GAAG,CAACO,KAAK,CAAC;IACZ,CAAC,MAAM;MACL;MACAP,GAAG,CAACM,OAAO,GAAGC,KAAK;IACrB;EACF;EAEA,oBACE,oBAAC,sBAAa,CAAC,QAAQ;IAAC,KAAK,EAAE;MAAEL;IAAS;EAAE,gBAC1C,oBAAC,0BAAoB,CAAC,QAAQ;IAAC,KAAK,EAAEI;EAAQ,GAC3CL,QAAQ,CACqB,CACT;AAE7B,CAAC,CAAC;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContext.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContext.js new file mode 100644 index 00000000..0517d825 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContext.js @@ -0,0 +1,13 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const ServerContext = /*#__PURE__*/React.createContext(undefined); +var _default = ServerContext; +exports.default = _default; +//# sourceMappingURL=ServerContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContext.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContext.js.map new file mode 100644 index 00000000..70086019 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/ServerContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["ServerContext","React","createContext","undefined"],"sourceRoot":"../../src","sources":["ServerContext.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAS/B,MAAMA,aAAa,gBAAGC,KAAK,CAACC,aAAa,CACvCC,SAAS,CACV;AAAC,eAEaH,aAAa;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/createMemoryHistory.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/createMemoryHistory.js new file mode 100644 index 00000000..42b1a28d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/createMemoryHistory.js @@ -0,0 +1,223 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = createMemoryHistory; +var _nonSecure = require("nanoid/non-secure"); +function createMemoryHistory() { + let index = 0; + let items = []; + + // Pending callbacks for `history.go(n)` + // We might modify the callback stored if it was interrupted, so we have a ref to identify it + const pending = []; + const interrupt = () => { + // If another history operation was performed we need to interrupt existing ones + // This makes sure that calls such as `history.replace` after `history.go` don't happen + // Since otherwise it won't be correct if something else has changed + pending.forEach(it => { + const cb = it.cb; + it.cb = () => cb(true); + }); + }; + const history = { + get index() { + var _window$history$state; + // We store an id in the state instead of an index + // Index could get out of sync with in-memory values if page reloads + const id = (_window$history$state = window.history.state) === null || _window$history$state === void 0 ? void 0 : _window$history$state.id; + if (id) { + const index = items.findIndex(item => item.id === id); + return index > -1 ? index : 0; + } + return 0; + }, + get(index) { + return items[index]; + }, + backIndex(_ref) { + let { + path + } = _ref; + // We need to find the index from the element before current to get closest path to go back to + for (let i = index - 1; i >= 0; i--) { + const item = items[i]; + if (item.path === path) { + return i; + } + } + return -1; + }, + push(_ref2) { + let { + path, + state + } = _ref2; + interrupt(); + const id = (0, _nonSecure.nanoid)(); + + // When a new entry is pushed, all the existing entries after index will be inaccessible + // So we remove any existing entries after the current index to clean them up + items = items.slice(0, index + 1); + items.push({ + path, + state, + id + }); + index = items.length - 1; + + // We pass empty string for title because it's ignored in all browsers except safari + // We don't store state object in history.state because: + // - browsers have limits on how big it can be, and we don't control the size + // - while not recommended, there could be non-serializable data in state + window.history.pushState({ + id + }, '', path); + }, + replace(_ref3) { + var _window$history$state2; + let { + path, + state + } = _ref3; + interrupt(); + const id = ((_window$history$state2 = window.history.state) === null || _window$history$state2 === void 0 ? void 0 : _window$history$state2.id) ?? (0, _nonSecure.nanoid)(); + + // Need to keep the hash part of the path if there was no previous history entry + // or the previous history entry had the same path + let pathWithHash = path; + if (!items.length || items.findIndex(item => item.id === id) < 0) { + // There are two scenarios for creating an array with only one history record: + // - When loaded id not found in the items array, this function by default will replace + // the first item. We need to keep only the new updated object, otherwise it will break + // the page when navigating forward in history. + // - This is the first time any state modifications are done + // So we need to push the entry as there's nothing to replace + pathWithHash = pathWithHash + location.hash; + items = [{ + path: pathWithHash, + state, + id + }]; + index = 0; + } else { + if (items[index].path === path) { + pathWithHash = pathWithHash + location.hash; + } + items[index] = { + path, + state, + id + }; + } + window.history.replaceState({ + id + }, '', pathWithHash); + }, + // `history.go(n)` is asynchronous, there are couple of things to keep in mind: + // - it won't do anything if we can't go `n` steps, the `popstate` event won't fire. + // - each `history.go(n)` call will trigger a separate `popstate` event with correct location. + // - the `popstate` event fires before the next frame after calling `history.go(n)`. + // This method differs from `history.go(n)` in the sense that it'll go back as many steps it can. + go(n) { + interrupt(); + + // To guard against unexpected navigation out of the app we will assume that browser history is only as deep as the length of our memory + // history. If we don't have an item to navigate to then update our index and navigate as far as we can without taking the user out of the app. + const nextIndex = index + n; + const lastItemIndex = items.length - 1; + if (n < 0 && !items[nextIndex]) { + // Attempted to navigate beyond the first index. Negating the current index will align the browser history with the first item. + n = -index; + index = 0; + } else if (n > 0 && nextIndex > lastItemIndex) { + // Attempted to navigate past the last index. Calculate how many indices away from the last index and go there. + n = lastItemIndex - index; + index = lastItemIndex; + } else { + index = nextIndex; + } + if (n === 0) { + return; + } + + // When we call `history.go`, `popstate` will fire when there's history to go back to + // So we need to somehow handle following cases: + // - There's history to go back, `history.go` is called, and `popstate` fires + // - `history.go` is called multiple times, we need to resolve on respective `popstate` + // - No history to go back, but `history.go` was called, browser has no API to detect it + return new Promise((resolve, reject) => { + const done = interrupted => { + clearTimeout(timer); + if (interrupted) { + reject(new Error('History was changed during navigation.')); + return; + } + + // There seems to be a bug in Chrome regarding updating the title + // If we set a title just before calling `history.go`, the title gets lost + // However the value of `document.title` is still what we set it to + // It's just not displayed in the tab bar + // To update the tab bar, we need to reset the title to something else first (e.g. '') + // And set the title to what it was before so it gets applied + // It won't work without setting it to empty string coz otherwise title isn't changing + // Which means that the browser won't do anything after setting the title + const { + title + } = window.document; + window.document.title = ''; + window.document.title = title; + resolve(); + }; + pending.push({ + ref: done, + cb: done + }); + + // If navigation didn't happen within 100ms, assume that it won't happen + // This may not be accurate, but hopefully it won't take so much time + // In Chrome, navigation seems to happen instantly in next microtask + // But on Firefox, it seems to take much longer, around 50ms from our testing + // We're using a hacky timeout since there doesn't seem to be way to know for sure + const timer = setTimeout(() => { + const index = pending.findIndex(it => it.ref === done); + if (index > -1) { + pending[index].cb(); + pending.splice(index, 1); + } + }, 100); + const onPopState = () => { + var _window$history$state3; + const id = (_window$history$state3 = window.history.state) === null || _window$history$state3 === void 0 ? void 0 : _window$history$state3.id; + const currentIndex = items.findIndex(item => item.id === id); + + // Fix createMemoryHistory.index variable's value + // as it may go out of sync when navigating in the browser. + index = Math.max(currentIndex, 0); + const last = pending.pop(); + window.removeEventListener('popstate', onPopState); + last === null || last === void 0 ? void 0 : last.cb(); + }; + window.addEventListener('popstate', onPopState); + window.history.go(n); + }); + }, + // The `popstate` event is triggered when history changes, except `pushState` and `replaceState` + // If we call `history.go(n)` ourselves, we don't want it to trigger the listener + // Here we normalize it so that only external changes (e.g. user pressing back/forward) trigger the listener + listen(listener) { + const onPopState = () => { + if (pending.length) { + // This was triggered by `history.go(n)`, we shouldn't call the listener + return; + } + listener(); + }; + window.addEventListener('popstate', onPopState); + return () => window.removeEventListener('popstate', onPopState); + } + }; + return history; +} +//# sourceMappingURL=createMemoryHistory.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/createMemoryHistory.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/createMemoryHistory.js.map new file mode 100644 index 00000000..77d25177 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/createMemoryHistory.js.map @@ -0,0 +1 @@ +{"version":3,"names":["createMemoryHistory","index","items","pending","interrupt","forEach","it","cb","history","id","window","state","findIndex","item","get","backIndex","path","i","push","nanoid","slice","length","pushState","replace","pathWithHash","location","hash","replaceState","go","n","nextIndex","lastItemIndex","Promise","resolve","reject","done","interrupted","clearTimeout","timer","Error","title","document","ref","setTimeout","splice","onPopState","currentIndex","Math","max","last","pop","removeEventListener","addEventListener","listen","listener"],"sourceRoot":"../../src","sources":["createMemoryHistory.tsx"],"mappings":";;;;;;AACA;AAWe,SAASA,mBAAmB,GAAG;EAC5C,IAAIC,KAAK,GAAG,CAAC;EACb,IAAIC,KAAsB,GAAG,EAAE;;EAE/B;EACA;EACA,MAAMC,OAAgE,GAAG,EAAE;EAE3E,MAAMC,SAAS,GAAG,MAAM;IACtB;IACA;IACA;IACAD,OAAO,CAACE,OAAO,CAAEC,EAAE,IAAK;MACtB,MAAMC,EAAE,GAAGD,EAAE,CAACC,EAAE;MAChBD,EAAE,CAACC,EAAE,GAAG,MAAMA,EAAE,CAAC,IAAI,CAAC;IACxB,CAAC,CAAC;EACJ,CAAC;EAED,MAAMC,OAAO,GAAG;IACd,IAAIP,KAAK,GAAW;MAAA;MAClB;MACA;MACA,MAAMQ,EAAE,4BAAGC,MAAM,CAACF,OAAO,CAACG,KAAK,0DAApB,sBAAsBF,EAAE;MAEnC,IAAIA,EAAE,EAAE;QACN,MAAMR,KAAK,GAAGC,KAAK,CAACU,SA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GAAG5C,KAAK,CAACU,SAAS,CAAEC,IAAI,IAAKA,IAAI,CAACJ,EAAE,KAAKA,EAAE,CAAC;;UAE9D;UACA;UACAR,KAAK,GAAG8C,IAAI,CAACC,GAAG,CAACF,YAAY,EAAE,CAAC,CAAC;UAEjC,MAAMG,IAAI,GAAG9C,OAAO,CAAC+C,GAAG,EAAE;UAE1BxC,MAAM,CAACyC,mBAAmB,CAAC,UAAU,EAAEN,UAAU,CAAC;UAClDI,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAE1C,EAAE,EAAE;QACZ,CAAC;QAEDG,MAAM,CAAC0C,gBAAgB,CAAC,UAAU,EAAEP,UAAU,CAAC;QAC/CnC,MAAM,CAACF,OAAO,CAACoB,EAAE,CAACC,CAAC,CAAC;MACtB,CAAC,CAAC;IACJ,CAAC;IAED;IACA;IACA;IACAwB,MAAM,CAACC,QAAoB,EAAE;MAC3B,MAAMT,UAAU,GAAG,MAAM;QACvB,IAAI1C,OAAO,CAACkB,MAAM,EAAE;UAClB;UACA;QACF;QAEAiC,QAAQ,EAAE;MACZ,CAAC;MAED5C,MAAM,CAAC0C,gBAAgB,CAAC,UAAU,EAAEP,UAAU,CAAC;MAE/C,OAAO,MAAMnC,MAAM,CAACyC,mBAAmB,CAAC,UAAU,EAAEN,UAAU,CAAC;IACjE;EACF,CAAC;EAED,OAAOrC,OAAO;AAChB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/extractPathFromURL.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/extractPathFromURL.js new file mode 100644 index 00000000..5b30c3f0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/extractPathFromURL.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = extractPathFromURL; +var _escapeStringRegexp = _interopRequireDefault(require("escape-string-regexp")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function extractPathFromURL(prefixes, url) { + for (const prefix of prefixes) { + var _prefix$match; + const protocol = ((_prefix$match = prefix.match(/^[^:]+:/)) === null || _prefix$match === void 0 ? void 0 : _prefix$match[0]) ?? ''; + const host = prefix.replace(new RegExp(`^${(0, _escapeStringRegexp.default)(protocol)}`), '').replace(/\/+/g, '/') // Replace multiple slash (//) with single ones + .replace(/^\//, ''); // Remove extra leading slash + + const prefixRegex = new RegExp(`^${(0, _escapeStringRegexp.default)(protocol)}(/)*${host.split('.').map(it => it === '*' ? '[^/]+' : (0, _escapeStringRegexp.default)(it)).join('\\.')}`); + const normalizedURL = url.replace(/\/+/g, '/'); + if (prefixRegex.test(normalizedURL)) { + return normalizedURL.replace(prefixRegex, ''); + } + } + return undefined; +} +//# sourceMappingURL=extractPathFromURL.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/extractPathFromURL.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/extractPathFromURL.js.map new file mode 100644 index 00000000..887dbd13 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/extractPathFromURL.js.map @@ -0,0 +1 @@ +{"version":3,"names":["extractPathFromURL","prefixes","url","prefix","protocol","match","host","replace","RegExp","escapeStringRegexp","prefixRegex","split","map","it","join","normalizedURL","test","undefined"],"sourceRoot":"../../src","sources":["extractPathFromURL.tsx"],"mappings":";;;;;;AAAA;AAAsD;AAEvC,SAASA,kBAAkB,CAACC,QAAkB,EAAEC,GAAW,EAAE;EAC1E,KAAK,MAAMC,MAAM,IAAIF,QAAQ,EAAE;IAAA;IAC7B,MAAMG,QAAQ,GAAG,kBAAAD,MAAM,CAACE,KAAK,CAAC,SAAS,CAAC,kDAAvB,cAA0B,CAAC,CAAC,KAAI,EAAE;IACnD,MAAMC,IAAI,GAAGH,MAAM,CAChBI,OAAO,CAAC,IAAIC,MAAM,CAAE,IAAG,IAAAC,2BAAkB,EAACL,QAAQ,CAAE,EAAC,CAAC,EAAE,EAAE,CAAC,CAC3DG,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAA,CACrBA,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;;IAEvB,MAAMG,WAAW,GAAG,IAAIF,MAAM,CAC3B,IAAG,IAAAC,2BAAkB,EAACL,QAAQ,CAAE,OAAME,IAAI,CACxCK,KAAK,CAAC,GAAG,CAAC,CACVC,GAAG,CAAEC,EAAE,IAAMA,EAAE,KAAK,GAAG,GAAG,OAAO,GAAG,IAAAJ,2BAAkB,EAACI,EAAE,CAAE,CAAC,CAC5DC,IAAI,CAAC,KAAK,CAAE,EAAC,CACjB;IAED,MAAMC,aAAa,GAAGb,GAAG,CAACK,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;IAE9C,IAAIG,WAAW,CAACM,IAAI,CAACD,aAAa,CAAC,EAAE;MACnC,OAAOA,aAAa,CAACR,OAAO,CAACG,WAAW,EAAE,EAAE,CAAC;IAC/C;EACF;EAEA,OAAOO,SAAS;AAClB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/index.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/index.js new file mode 100644 index 00000000..fa744ed3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/index.js @@ -0,0 +1,129 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _exportNames = { + Link: true, + LinkingContext: true, + NavigationContainer: true, + ServerContainer: true, + DarkTheme: true, + DefaultTheme: true, + ThemeProvider: true, + useTheme: true, + useLinkBuilder: true, + useLinkProps: true, + useLinkTo: true, + useScrollToTop: true +}; +Object.defineProperty(exports, "DarkTheme", { + enumerable: true, + get: function () { + return _DarkTheme.default; + } +}); +Object.defineProperty(exports, "DefaultTheme", { + enumerable: true, + get: function () { + return _DefaultTheme.default; + } +}); +Object.defineProperty(exports, "Link", { + enumerable: true, + get: function () { + return _Link.default; + } +}); +Object.defineProperty(exports, "LinkingContext", { + enumerable: true, + get: function () { + return _LinkingContext.default; + } +}); +Object.defineProperty(exports, "NavigationContainer", { + enumerable: true, + get: function () { + return _NavigationContainer.default; + } +}); +Object.defineProperty(exports, "ServerContainer", { + enumerable: true, + get: function () { + return _ServerContainer.default; + } +}); +Object.defineProperty(exports, "ThemeProvider", { + enumerable: true, + get: function () { + return _ThemeProvider.default; + } +}); +Object.defineProperty(exports, "useLinkBuilder", { + enumerable: true, + get: function () { + return _useLinkBuilder.default; + } +}); +Object.defineProperty(exports, "useLinkProps", { + enumerable: true, + get: function () { + return _useLinkProps.default; + } +}); +Object.defineProperty(exports, "useLinkTo", { + enumerable: true, + get: function () { + return _useLinkTo.default; + } +}); +Object.defineProperty(exports, "useScrollToTop", { + enumerable: true, + get: function () { + return _useScrollToTop.default; + } +}); +Object.defineProperty(exports, "useTheme", { + enumerable: true, + get: function () { + return _useTheme.default; + } +}); +var _Link = _interopRequireDefault(require("./Link")); +var _LinkingContext = _interopRequireDefault(require("./LinkingContext")); +var _NavigationContainer = _interopRequireDefault(require("./NavigationContainer")); +var _ServerContainer = _interopRequireDefault(require("./ServerContainer")); +var _DarkTheme = _interopRequireDefault(require("./theming/DarkTheme")); +var _DefaultTheme = _interopRequireDefault(require("./theming/DefaultTheme")); +var _ThemeProvider = _interopRequireDefault(require("./theming/ThemeProvider")); +var _useTheme = _interopRequireDefault(require("./theming/useTheme")); +var _types = require("./types"); +Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _types[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _types[key]; + } + }); +}); +var _useLinkBuilder = _interopRequireDefault(require("./useLinkBuilder")); +var _useLinkProps = _interopRequireDefault(require("./useLinkProps")); +var _useLinkTo = _interopRequireDefault(require("./useLinkTo")); +var _useScrollToTop = _interopRequireDefault(require("./useScrollToTop")); +var _core = require("@react-navigation/core"); +Object.keys(_core).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _core[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _core[key]; + } + }); +}); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/index.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/index.js.map new file mode 100644 index 00000000..ef14ada2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAAuC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DarkTheme.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DarkTheme.js new file mode 100644 index 00000000..08f32d32 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DarkTheme.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +const DarkTheme = { + dark: true, + colors: { + primary: 'rgb(10, 132, 255)', + background: 'rgb(1, 1, 1)', + card: 'rgb(18, 18, 18)', + text: 'rgb(229, 229, 231)', + border: 'rgb(39, 39, 41)', + notification: 'rgb(255, 69, 58)' + } +}; +var _default = DarkTheme; +exports.default = _default; +//# sourceMappingURL=DarkTheme.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DarkTheme.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DarkTheme.js.map new file mode 100644 index 00000000..b7980f9d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DarkTheme.js.map @@ -0,0 +1 @@ +{"version":3,"names":["DarkTheme","dark","colors","primary","background","card","text","border","notification"],"sourceRoot":"../../src","sources":["DarkTheme.tsx"],"mappings":";;;;;;AAEA,MAAMA,SAAgB,GAAG;EACvBC,IAAI,EAAE,IAAI;EACVC,MAAM,EAAE;IACNC,OAAO,EAAE,mBAAmB;IAC5BC,UAAU,EAAE,cAAc;IAC1BC,IAAI,EAAE,iBAAiB;IACvBC,IAAI,EAAE,oBAAoB;IAC1BC,MAAM,EAAE,iBAAiB;IACzBC,YAAY,EAAE;EAChB;AACF,CAAC;AAAC,eAEaR,SAAS;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DefaultTheme.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DefaultTheme.js new file mode 100644 index 00000000..42bbdcb8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DefaultTheme.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +const DefaultTheme = { + dark: false, + colors: { + primary: 'rgb(0, 122, 255)', + background: 'rgb(242, 242, 242)', + card: 'rgb(255, 255, 255)', + text: 'rgb(28, 28, 30)', + border: 'rgb(216, 216, 216)', + notification: 'rgb(255, 59, 48)' + } +}; +var _default = DefaultTheme; +exports.default = _default; +//# sourceMappingURL=DefaultTheme.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DefaultTheme.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DefaultTheme.js.map new file mode 100644 index 00000000..c6a96024 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/DefaultTheme.js.map @@ -0,0 +1 @@ +{"version":3,"names":["DefaultTheme","dark","colors","primary","background","card","text","border","notification"],"sourceRoot":"../../src","sources":["DefaultTheme.tsx"],"mappings":";;;;;;AAEA,MAAMA,YAAmB,GAAG;EAC1BC,IAAI,EAAE,KAAK;EACXC,MAAM,EAAE;IACNC,OAAO,EAAE,kBAAkB;IAC3BC,UAAU,EAAE,oBAAoB;IAChCC,IAAI,EAAE,oBAAoB;IAC1BC,IAAI,EAAE,iBAAiB;IACvBC,MAAM,EAAE,oBAAoB;IAC5BC,YAAY,EAAE;EAChB;AACF,CAAC;AAAC,eAEaR,YAAY;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeContext.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeContext.js new file mode 100644 index 00000000..e8003194 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeContext.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +var _DefaultTheme = _interopRequireDefault(require("./DefaultTheme")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const ThemeContext = /*#__PURE__*/React.createContext(_DefaultTheme.default); +ThemeContext.displayName = 'ThemeContext'; +var _default = ThemeContext; +exports.default = _default; +//# sourceMappingURL=ThemeContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeContext.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeContext.js.map new file mode 100644 index 00000000..bb8a8204 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["ThemeContext","React","createContext","DefaultTheme","displayName"],"sourceRoot":"../../src","sources":["ThemeContext.tsx"],"mappings":";;;;;;AAAA;AAGA;AAA0C;AAAA;AAAA;AAE1C,MAAMA,YAAY,gBAAGC,KAAK,CAACC,aAAa,CAAQC,qBAAY,CAAC;AAE7DH,YAAY,CAACI,WAAW,GAAG,cAAc;AAAC,eAE3BJ,YAAY;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeProvider.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeProvider.js new file mode 100644 index 00000000..9f8b18a5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeProvider.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = ThemeProvider; +var React = _interopRequireWildcard(require("react")); +var _ThemeContext = _interopRequireDefault(require("./ThemeContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function ThemeProvider(_ref) { + let { + value, + children + } = _ref; + return /*#__PURE__*/React.createElement(_ThemeContext.default.Provider, { + value: value + }, children); +} +//# sourceMappingURL=ThemeProvider.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeProvider.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeProvider.js.map new file mode 100644 index 00000000..c0395038 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/ThemeProvider.js.map @@ -0,0 +1 @@ +{"version":3,"names":["ThemeProvider","value","children"],"sourceRoot":"../../src","sources":["ThemeProvider.tsx"],"mappings":";;;;;;AAAA;AAGA;AAA0C;AAAA;AAAA;AAO3B,SAASA,aAAa,OAA6B;EAAA,IAA5B;IAAEC,KAAK;IAAEC;EAAgB,CAAC;EAC9D,oBACE,oBAAC,qBAAY,CAAC,QAAQ;IAAC,KAAK,EAAED;EAAM,GAAEC,QAAQ,CAAyB;AAE3E"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/useTheme.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/useTheme.js new file mode 100644 index 00000000..20dd0e62 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/useTheme.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useTheme; +var React = _interopRequireWildcard(require("react")); +var _ThemeContext = _interopRequireDefault(require("./ThemeContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function useTheme() { + const theme = React.useContext(_ThemeContext.default); + return theme; +} +//# sourceMappingURL=useTheme.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/useTheme.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/useTheme.js.map new file mode 100644 index 00000000..592785d8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/theming/useTheme.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useTheme","theme","React","useContext","ThemeContext"],"sourceRoot":"../../src","sources":["useTheme.tsx"],"mappings":";;;;;;AAAA;AAEA;AAA0C;AAAA;AAAA;AAE3B,SAASA,QAAQ,GAAG;EACjC,MAAMC,KAAK,GAAGC,KAAK,CAACC,UAAU,CAACC,qBAAY,CAAC;EAE5C,OAAOH,KAAK;AACd"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/types.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/types.js new file mode 100644 index 00000000..239667a3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/types.js @@ -0,0 +1,6 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/types.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/types.js.map new file mode 100644 index 00000000..e7ae1280 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/types.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":""} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useBackButton.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useBackButton.js new file mode 100644 index 00000000..a7988688 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useBackButton.js @@ -0,0 +1,27 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useBackButton; +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function useBackButton(ref) { + React.useEffect(() => { + const subscription = _reactNative.BackHandler.addEventListener('hardwareBackPress', () => { + const navigation = ref.current; + if (navigation == null) { + return false; + } + if (navigation.canGoBack()) { + navigation.goBack(); + return true; + } + return false; + }); + return () => subscription.remove(); + }, [ref]); +} +//# sourceMappingURL=useBackButton.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useBackButton.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useBackButton.js.map new file mode 100644 index 00000000..af39eaa7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useBackButton.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useBackButton","ref","React","useEffect","subscription","BackHandler","addEventListener","navigation","current","canGoBack","goBack","remove"],"sourceRoot":"../../src","sources":["useBackButton.tsx"],"mappings":";;;;;;AAIA;AACA;AAA2C;AAAA;AAE5B,SAASA,aAAa,CACnCC,GAA2D,EAC3D;EACAC,KAAK,CAACC,SAAS,CAAC,MAAM;IACpB,MAAMC,YAAY,GAAGC,wBAAW,CAACC,gBAAgB,CAC/C,mBAAmB,EACnB,MAAM;MACJ,MAAMC,UAAU,GAAGN,GAAG,CAACO,OAAO;MAE9B,IAAID,UAAU,IAAI,IAAI,EAAE;QACtB,OAAO,KAAK;MACd;MAEA,IAAIA,UAAU,CAACE,SAAS,EAAE,EAAE;QAC1BF,UAAU,CAACG,MAAM,EAAE;QAEnB,OAAO,IAAI;MACb;MAEA,OAAO,KAAK;IACd,CAAC,CACF;IAED,OAAO,MAAMN,YAAY,CAACO,MAAM,EAAE;EACpC,CAAC,EAAE,CAACV,GAAG,CAAC,CAAC;AACX"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.js new file mode 100644 index 00000000..77822b08 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useDocumentTitle; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * Set the document title for the active screen + */ +function useDocumentTitle(ref) { + let { + enabled = true, + formatter = (options, route) => (options === null || options === void 0 ? void 0 : options.title) ?? (route === null || route === void 0 ? void 0 : route.name) + } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + React.useEffect(() => { + if (!enabled) { + return; + } + const navigation = ref.current; + if (navigation) { + const title = formatter(navigation.getCurrentOptions(), navigation.getCurrentRoute()); + document.title = title; + } + return navigation === null || navigation === void 0 ? void 0 : navigation.addListener('options', e => { + const title = formatter(e.data.options, navigation === null || navigation === void 0 ? void 0 : navigation.getCurrentRoute()); + document.title = title; + }); + }); +} +//# sourceMappingURL=useDocumentTitle.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.js.map new file mode 100644 index 00000000..7d3b64e5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useDocumentTitle","ref","enabled","formatter","options","route","title","name","React","useEffect","navigation","current","getCurrentOptions","getCurrentRoute","document","addListener","e","data"],"sourceRoot":"../../src","sources":["useDocumentTitle.tsx"],"mappings":";;;;;;AAIA;AAA+B;AAAA;AAI/B;AACA;AACA;AACe,SAASA,gBAAgB,CACtCC,GAA2D,EAK3D;EAAA,IAJA;IACEC,OAAO,GAAG,IAAI;IACdC,SAAS,GAAG,CAACC,OAAO,EAAEC,KAAK,KAAK,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,KAAK,MAAID,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEE,IAAI;EACzC,CAAC,uEAAG,CAAC,CAAC;EAE5BC,KAAK,CAACC,SAAS,CAAC,MAAM;IACpB,IAAI,CAACP,OAAO,EAAE;MACZ;IACF;IAEA,MAAMQ,UAAU,GAAGT,GAAG,CAACU,OAAO;IAE9B,IAAID,UAAU,EAAE;MACd,MAAMJ,KAAK,GAAGH,SAAS,CACrBO,UAAU,CAACE,iBAAiB,EAAE,EAC9BF,UAAU,CAACG,eAAe,EAAE,CAC7B;MAEDC,QAAQ,CAACR,KAAK,GAAGA,KAAK;IACxB;IAEA,OAAOI,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEK,WAAW,CAAC,SAAS,EAAGC,CAAC,IAAK;MAC/C,MAAMV,KAAK,GAAGH,SAAS,CAACa,CAAC,CAACC,IAAI,CAACb,OAAO,EAAEM,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEG,eAAe,EAAE,CAAC;MAEtEC,QAAQ,CAACR,KAAK,GAAGA,KAAK;IACxB,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.native.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.native.js new file mode 100644 index 00000000..97a0722b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.native.js @@ -0,0 +1,10 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useDocumentTitle; +function useDocumentTitle() { + // Noop for React Native +} +//# sourceMappingURL=useDocumentTitle.native.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.native.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.native.js.map new file mode 100644 index 00000000..8a18421a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useDocumentTitle.native.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useDocumentTitle"],"sourceRoot":"../../src","sources":["useDocumentTitle.native.tsx"],"mappings":";;;;;;AAAe,SAASA,gBAAgB,GAAG;EACzC;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkBuilder.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkBuilder.js new file mode 100644 index 00000000..ce8a77dd --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkBuilder.js @@ -0,0 +1,63 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useLinkBuilder; +var _core = require("@react-navigation/core"); +var React = _interopRequireWildcard(require("react")); +var _LinkingContext = _interopRequireDefault(require("./LinkingContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const getRootStateForNavigate = (navigation, state) => { + const parent = navigation.getParent(); + if (parent) { + const parentState = parent.getState(); + return getRootStateForNavigate(parent, { + index: 0, + routes: [{ + ...parentState.routes[parentState.index], + state: state + }] + }); + } + return state; +}; + +/** + * Build destination link for a navigate action. + * Useful for showing anchor tags on the web for buttons that perform navigation. + */ +function useLinkBuilder() { + const navigation = React.useContext(_core.NavigationHelpersContext); + const linking = React.useContext(_LinkingContext.default); + const buildLink = React.useCallback((name, params) => { + const { + options + } = linking; + if ((options === null || options === void 0 ? void 0 : options.enabled) === false) { + return undefined; + } + const state = navigation ? getRootStateForNavigate(navigation, { + index: 0, + routes: [{ + name, + params + }] + }) : + // If we couldn't find a navigation object in context, we're at root + // So we'll construct a basic state object to use + { + index: 0, + routes: [{ + name, + params + }] + }; + const path = options !== null && options !== void 0 && options.getPathFromState ? options.getPathFromState(state, options === null || options === void 0 ? void 0 : options.config) : (0, _core.getPathFromState)(state, options === null || options === void 0 ? void 0 : options.config); + return path; + }, [linking, navigation]); + return buildLink; +} +//# sourceMappingURL=useLinkBuilder.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkBuilder.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkBuilder.js.map new file mode 100644 index 00000000..00277653 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkBuilder.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getRootStateForNavigate","navigation","state","parent","getParent","parentState","getState","index","routes","useLinkBuilder","React","useContext","NavigationHelpersContext","linking","LinkingContext","buildLink","useCallback","name","params","options","enabled","undefined","path","getPathFromState","config"],"sourceRoot":"../../src","sources":["useLinkBuilder.tsx"],"mappings":";;;;;;AAAA;AAOA;AAEA;AAA8C;AAAA;AAAA;AAW9C,MAAMA,uBAAuB,GAAG,CAC9BC,UAA4B,EAC5BC,KAAmB,KACF;EACjB,MAAMC,MAAM,GAAGF,UAAU,CAACG,SAAS,EAAE;EAErC,IAAID,MAAM,EAAE;IACV,MAAME,WAAW,GAAGF,MAAM,CAACG,QAAQ,EAAE;IAErC,OAAON,uBAAuB,CAACG,MAAM,EAAE;MACrCI,KAAK,EA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;AAClB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkProps.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkProps.js new file mode 100644 index 00000000..19293a72 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkProps.js @@ -0,0 +1,98 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useLinkProps; +var _core = require("@react-navigation/core"); +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +var _LinkingContext = _interopRequireDefault(require("./LinkingContext")); +var _useLinkTo = _interopRequireDefault(require("./useLinkTo")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const getStateFromParams = params => { + if (params !== null && params !== void 0 && params.state) { + return params.state; + } + if (params !== null && params !== void 0 && params.screen) { + return { + routes: [{ + name: params.screen, + params: params.params, + // @ts-expect-error + state: params.screen ? getStateFromParams(params.params) : undefined + }] + }; + } + return undefined; +}; + +/** + * Hook to get props for an anchor tag so it can work with in page navigation. + * + * @param props.to Absolute path to screen (e.g. `/feeds/hot`). + * @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config. + */ +function useLinkProps(_ref) { + let { + to, + action + } = _ref; + const root = React.useContext(_core.NavigationContainerRefContext); + const navigation = React.useContext(_core.NavigationHelpersContext); + const { + options + } = React.useContext(_LinkingContext.default); + const linkTo = (0, _useLinkTo.default)(); + const onPress = e => { + var _e$currentTarget; + let shouldHandle = false; + if (_reactNative.Platform.OS !== 'web' || !e) { + shouldHandle = e ? !e.defaultPrevented : true; + } else if (!e.defaultPrevented && + // onPress prevented default + // @ts-expect-error: these properties exist on web, but not in React Native + !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && ( + // ignore clicks with modifier keys + // @ts-expect-error: these properties exist on web, but not in React Native + e.button == null || e.button === 0) && + // ignore everything but left clicks + // @ts-expect-error: these properties exist on web, but not in React Native + [undefined, null, '', 'self'].includes((_e$currentTarget = e.currentTarget) === null || _e$currentTarget === void 0 ? void 0 : _e$currentTarget.target) // let browser handle "target=_blank" etc. + ) { + e.preventDefault(); + shouldHandle = true; + } + if (shouldHandle) { + if (action) { + if (navigation) { + navigation.dispatch(action); + } else if (root) { + root.dispatch(action); + } else { + throw new Error("Couldn't find a navigation object. Is your component inside NavigationContainer?"); + } + } else { + linkTo(to); + } + } + }; + const getPathFromStateHelper = (options === null || options === void 0 ? void 0 : options.getPathFromState) ?? _core.getPathFromState; + const href = typeof to === 'string' ? to : getPathFromStateHelper({ + routes: [{ + name: to.screen, + // @ts-expect-error + params: to.params, + // @ts-expect-error + state: getStateFromParams(to.params) + }] + }, options === null || options === void 0 ? void 0 : options.config); + return { + href, + accessibilityRole: 'link', + onPress + }; +} +//# sourceMappingURL=useLinkProps.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkProps.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkProps.js.map new file mode 100644 index 00000000..5993f4a7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkProps.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getStateFromParams","params","state","screen","routes","name","undefined","useLinkProps","to","action","root","React","useContext","NavigationContainerRefContext","navigation","NavigationHelpersContext","options","LinkingContext","linkTo","useLinkTo","onPress","e","shouldHandle","Platform","OS","defaultPrevented","metaKey","altKey","ctrlKey","shiftKey","button","includes","currentTarget","target","preventDefault","dispatch","Error","getPathFromStateHelper","getPathFromState","href","config","accessibilityRole"],"sourceRoot":"../../src","sources":["useLinkProps.tsx"],"mappings":";;;;;;AAAA;AASA;AACA;AAEA;AACA;AAA4C;AAAA;AAAA;AAO5C,MAAMA,kBAAkB,GACtBC,MAAyE,IACT;EAChE,IAAIA,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEC,KAAK,EAAE;IACjB,OAAOD,MAAM,CAACC,KAAK;EACrB;EAEA,IAAID,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEE,MAAM,EAAE;IAClB,OAAO;MACLC,MAAM,EAAE,CACN;QACEC,IAAI,EAAEJ,MAAM,CAACE,MAAM;QACnBF,MAAM,EAAEA,MAAM,CAACA,MAAM;QACrB;QACAC,KAAK,EAAED,MAAM,CAACE,MAAM,GAChBH,kBAAkB,CAChBC,MAAM,CAACA,MAAM,CAGd,GACDK;MACN,CAAC;IAEL,CAAC;EACH;EAEA,OAAOA,SAAS;AAClB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,YAAY,OAEA;EAAA,IAAlC;IAAEC,EAAE;IAAEC;EAAyB,CAAC;EAChC,MAAMC,IAAI,GAAGC,KAAK,CAACC,UAAU,CAACC,mCAA6B,CAAC;EAC5D,MAAMC,UAAU,GAAGH,KAAK,CAACC,UAAU,CAACG,8BAAwB,CAAC;EAC7D,MAAM;IAAEC;EAAQ,CAAC,GAAGL,KAAK,CAACC,UAAU,CAACK,u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,GACR,OAAO/B,EAAE,KAAK,QAAQ,GAClBA,EAAE,GACF6B,sBAAsB,CACpB;IACEjC,MAAM,EAAE,CACN;MACEC,IAAI,EAAEG,EAAE,CAACL,MAAM;MACf;MACAF,MAAM,EAAEO,EAAE,CAACP,MAAM;MACjB;MACAC,KAAK,EAAEF,kBAAkB,CAACQ,EAAE,CAACP,MAAM;IACrC,CAAC;EAEL,CAAC,EACDe,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEwB,MAAM,CAChB;EAEP,OAAO;IACLD,IAAI;IACJE,iBAAiB,EAAE,MAAe;IAClCrB;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkTo.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkTo.js new file mode 100644 index 00000000..f5560275 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkTo.js @@ -0,0 +1,45 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useLinkTo; +var _core = require("@react-navigation/core"); +var React = _interopRequireWildcard(require("react")); +var _LinkingContext = _interopRequireDefault(require("./LinkingContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function useLinkTo() { + const navigation = React.useContext(_core.NavigationContainerRefContext); + const linking = React.useContext(_LinkingContext.default); + const linkTo = React.useCallback(to => { + if (navigation === undefined) { + throw new Error("Couldn't find a navigation object. Is your component inside NavigationContainer?"); + } + if (typeof to !== 'string') { + // @ts-expect-error: This is fine + navigation.navigate(to.screen, to.params); + return; + } + if (!to.startsWith('/')) { + throw new Error(`The path must start with '/' (${to}).`); + } + const { + options + } = linking; + const state = options !== null && options !== void 0 && options.getStateFromPath ? options.getStateFromPath(to, options.config) : (0, _core.getStateFromPath)(to, options === null || options === void 0 ? void 0 : options.config); + if (state) { + const action = (0, _core.getActionFromState)(state, options === null || options === void 0 ? void 0 : options.config); + if (action !== undefined) { + navigation.dispatch(action); + } else { + navigation.reset(state); + } + } else { + throw new Error('Failed to parse the path to a navigation state.'); + } + }, [linking, navigation]); + return linkTo; +} +//# sourceMappingURL=useLinkTo.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkTo.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkTo.js.map new file mode 100644 index 00000000..a450c681 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinkTo.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useLinkTo","navigation","React","useContext","NavigationContainerRefContext","linking","LinkingContext","linkTo","useCallback","to","undefined","Error","navigate","screen","params","startsWith","options","state","getStateFromPath","config","action","getActionFromState","dispatch","reset"],"sourceRoot":"../../src","sources":["useLinkTo.tsx"],"mappings":";;;;;;AAAA;AAKA;AAEA;AAA8C;AAAA;AAAA;AAiB/B,SAASA,SAAS,GAE7B;EACF,MAAMC,UAAU,GAAGC,KAA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ED,OAAOM,MAAM;AACf"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.js new file mode 100644 index 00000000..64ce4278 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.js @@ -0,0 +1,322 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useLinking; +var _core = require("@react-navigation/core"); +var _fastDeepEqual = _interopRequireDefault(require("fast-deep-equal")); +var React = _interopRequireWildcard(require("react")); +var _createMemoryHistory = _interopRequireDefault(require("./createMemoryHistory")); +var _ServerContext = _interopRequireDefault(require("./ServerContext")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * Find the matching navigation state that changed between 2 navigation states + * e.g.: a -> b -> c -> d and a -> b -> c -> e -> f, if history in b changed, b is the matching state + */ +const findMatchingState = (a, b) => { + if (a === undefined || b === undefined || a.key !== b.key) { + return [undefined, undefined]; + } + + // Tab and drawer will have `history` property, but stack will have history in `routes` + const aHistoryLength = a.history ? a.history.length : a.routes.length; + const bHistoryLength = b.history ? b.history.length : b.routes.length; + const aRoute = a.routes[a.index]; + const bRoute = b.routes[b.index]; + const aChildState = aRoute.state; + const bChildState = bRoute.state; + + // Stop here if this is the state object that changed: + // - history length is different + // - focused routes are different + // - one of them doesn't have child state + // - child state keys are different + if (aHistoryLength !== bHistoryLength || aRoute.key !== bRoute.key || aChildState === undefined || bChildState === undefined || aChildState.key !== bChildState.key) { + return [a, b]; + } + return findMatchingState(aChildState, bChildState); +}; + +/** + * Run async function in series as it's called. + */ +const series = cb => { + // Whether we're currently handling a callback + let handling = false; + let queue = []; + const callback = async () => { + try { + if (handling) { + // If we're currently handling a previous event, wait before handling this one + // Add the callback to the beginning of the queue + queue.unshift(callback); + return; + } + handling = true; + await cb(); + } finally { + handling = false; + if (queue.length) { + // If we have queued items, handle the last one + const last = queue.pop(); + last === null || last === void 0 ? void 0 : last(); + } + } + }; + return callback; +}; +let linkingHandlers = []; +function useLinking(ref, _ref) { + let { + independent, + enabled = true, + config, + getStateFromPath = _core.getStateFromPath, + getPathFromState = _core.getPathFromState, + getActionFromState = _core.getActionFromState + } = _ref; + React.useEffect(() => { + if (process.env.NODE_ENV === 'production') { + return undefined; + } + if (independent) { + return undefined; + } + if (enabled !== false && linkingHandlers.length) { + console.error(['Looks like you have configured linking in multiple places. This is likely an error since deep links should only be handled in one place to avoid conflicts. Make sure that:', "- You don't have multiple NavigationContainers in the app each with 'linking' enabled", '- Only a single instance of the root component is rendered'].join('\n').trim()); + } + const handler = Symbol(); + if (enabled !== false) { + linkingHandlers.push(handler); + } + return () => { + const index = linkingHandlers.indexOf(handler); + if (index > -1) { + linkingHandlers.splice(index, 1); + } + }; + }, [enabled, independent]); + const [history] = React.useState(_createMemoryHistory.default); + + // We store these options in ref to avoid re-creating getInitialState and re-subscribing listeners + // This lets user avoid wrapping the items in `React.useCallback` or `React.useMemo` + // Not re-creating `getInitialState` is important coz it makes it easier for the user to use in an effect + const enabledRef = React.useRef(enabled); + const configRef = React.useRef(config); + const getStateFromPathRef = React.useRef(getStateFromPath); + const getPathFromStateRef = React.useRef(getPathFromState); + const getActionFromStateRef = React.useRef(getActionFromState); + React.useEffect(() => { + enabledRef.current = enabled; + configRef.current = config; + getStateFromPathRef.current = getStateFromPath; + getPathFromStateRef.current = getPathFromState; + getActionFromStateRef.current = getActionFromState; + }); + const server = React.useContext(_ServerContext.default); + const getInitialState = React.useCallback(() => { + let value; + if (enabledRef.current) { + const location = (server === null || server === void 0 ? void 0 : server.location) ?? (typeof window !== 'undefined' ? window.location : undefined); + const path = location ? location.pathname + location.search : undefined; + if (path) { + value = getStateFromPathRef.current(path, configRef.current); + } + } + const thenable = { + then(onfulfilled) { + return Promise.resolve(onfulfilled ? onfulfilled(value) : value); + }, + catch() { + return thenable; + } + }; + return thenable; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + const previousIndexRef = React.useRef(undefined); + const previousStateRef = React.useRef(undefined); + const pendingPopStatePathRef = React.useRef(undefined); + React.useEffect(() => { + previousIndexRef.current = history.index; + return history.listen(() => { + const navigation = ref.current; + if (!navigation || !enabled) { + return; + } + const path = location.pathname + location.search; + const index = history.index; + const previousIndex = previousIndexRef.current ?? 0; + previousIndexRef.current = index; + pendingPopStatePathRef.current = path; + + // When browser back/forward is clicked, we first need to check if state object for this index exists + // If it does we'll reset to that state object + // Otherwise, we'll handle it like a regular deep link + const record = history.get(index); + if ((record === null || record === void 0 ? void 0 : record.path) === path && record !== null && record !== void 0 && record.state) { + navigation.resetRoot(record.state); + return; + } + const state = getStateFromPathRef.current(path, configRef.current); + + // We should only dispatch an action when going forward + // Otherwise the action will likely add items to history, which would mess things up + if (state) { + // Make sure that the routes in the state exist in the root navigator + // Otherwise there's an error in the linking configuration + const rootState = navigation.getRootState(); + if (state.routes.some(r => !(rootState !== null && rootState !== void 0 && rootState.routeNames.includes(r.name)))) { + console.warn("The navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration."); + return; + } + if (index > previousIndex) { + const action = getActionFromStateRef.current(state, configRef.current); + if (action !== undefined) { + try { + navigation.dispatch(action); + } catch (e) { + // Ignore any errors from deep linking. + // This could happen in case of malformed links, navigation object not being initialized etc. + console.warn(`An error occurred when trying to handle the link '${path}': ${typeof e === 'object' && e != null && 'message' in e ? + // @ts-expect-error: we're already checking for this + e.message : e}`); + } + } else { + navigation.resetRoot(state); + } + } else { + navigation.resetRoot(state); + } + } else { + // if current path didn't return any state, we should revert to initial state + navigation.resetRoot(state); + } + }); + }, [enabled, history, ref]); + React.useEffect(() => { + var _ref$current; + if (!enabled) { + return; + } + const getPathForRoute = (route, state) => { + // If the `route` object contains a `path`, use that path as long as `route.name` and `params` still match + // This makes sure that we preserve the original URL for wildcard routes + if (route !== null && route !== void 0 && route.path) { + const stateForPath = getStateFromPathRef.current(route.path, configRef.current); + if (stateForPath) { + const focusedRoute = (0, _core.findFocusedRoute)(stateForPath); + if (focusedRoute && focusedRoute.name === route.name && (0, _fastDeepEqual.default)(focusedRoute.params, route.params)) { + return route.path; + } + } + } + return getPathFromStateRef.current(state, configRef.current); + }; + if (ref.current) { + // We need to record the current metadata on the first render if they aren't set + // This will allow the initial state to be in the history entry + const state = ref.current.getRootState(); + if (state) { + const route = (0, _core.findFocusedRoute)(state); + const path = getPathForRoute(route, state); + if (previousStateRef.current === undefined) { + previousStateRef.current = state; + } + history.replace({ + path, + state + }); + } + } + const onStateChange = async () => { + const navigation = ref.current; + if (!navigation || !enabled) { + return; + } + const previousState = previousStateRef.current; + const state = navigation.getRootState(); + + // root state may not available, for example when root navigators switch inside the container + if (!state) { + return; + } + const pendingPath = pendingPopStatePathRef.current; + const route = (0, _core.findFocusedRoute)(state); + const path = getPathForRoute(route, state); + previousStateRef.current = state; + pendingPopStatePathRef.current = undefined; + + // To detect the kind of state change, we need to: + // - Find the common focused navigation state in previous and current state + // - If only the route keys changed, compare history/routes.length to check if we go back/forward/replace + // - If no common focused navigation state found, it's a replace + const [previousFocusedState, focusedState] = findMatchingState(previousState, state); + if (previousFocusedState && focusedState && + // We should only handle push/pop if path changed from what was in last `popstate` + // Otherwise it's likely a change triggered by `popstate` + path !== pendingPath) { + const historyDelta = (focusedState.history ? focusedState.history.length : focusedState.routes.length) - (previousFocusedState.history ? previousFocusedState.history.length : previousFocusedState.routes.length); + if (historyDelta > 0) { + // If history length is increased, we should pushState + // Note that path might not actually change here, for example, drawer open should pushState + history.push({ + path, + state + }); + } else if (historyDelta < 0) { + // If history length is decreased, i.e. entries were removed, we want to go back + + const nextIndex = history.backIndex({ + path + }); + const currentIndex = history.index; + try { + if (nextIndex !== -1 && nextIndex < currentIndex) { + // An existing entry for this path exists and it's less than current index, go back to that + await history.go(nextIndex - currentIndex); + } else { + // We couldn't find an existing entry to go back to, so we'll go back by the delta + // This won't be correct if multiple routes were pushed in one go before + // Usually this shouldn't happen and this is a fallback for that + await history.go(historyDelta); + } + + // Store the updated state as well as fix the path if incorrect + history.replace({ + path, + state + }); + } catch (e) { + // The navigation was interrupted + } + } else { + // If history length is unchanged, we want to replaceState + history.replace({ + path, + state + }); + } + } else { + // If no common navigation state was found, assume it's a replace + // This would happen if the user did a reset/conditionally changed navigators + history.replace({ + path, + state + }); + } + }; + + // We debounce onStateChange coz we don't want multiple state changes to be handled at one time + // This could happen since `history.go(n)` is asynchronous + // If `pushState` or `replaceState` were called before `history.go(n)` completes, it'll mess stuff up + return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.addListener('state', series(onStateChange)); + }, [enabled, history, ref]); + return { + getInitialState + }; +} +//# sourceMappingURL=useLinking.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.js.map new file mode 100644 index 00000000..7ebc2739 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.js.map @@ -0,0 +1 @@ +{"version":3,"names":["findMatchingState","a","b","undefined","key","aHistoryLength","history","length","routes","bHistoryLength","aRoute","index","bRoute","aChildState","state","bChildState","series","cb","handling","queue","callback","unshift","last","pop","linkingHandlers","useLinking","ref","independent","enabled","config","getStateFromPath","getStateFromPathDefault","getPathFromState","getPathFromStateDefault","getActionFromState","getActionFromStateDefault","React","useEffect","process","env","NODE_ENV","console","error","join","trim","handler","Symbol","push","indexOf","splice","useState","createMemoryHistory","enabledRef","useRef","configRef","getStateFromPathRef","getPathFromStateRef","getActionFromStateRef","current","server","useContext","ServerContext","getInitialState","useCallback","value","location","window","path","pathname","search","thenable","then","onfulfilled","Promise","resolve","catch","previousIndexRef","previousStateRef","pendingPopStatePathRef","listen","navigation","previousIndex","record","get","resetRoot","rootState","getRootState","some","r","routeNames","includes","name","warn","action","dispatch","e","message","getPathForRoute","route","stateForPath","focusedRoute","findFocusedRoute","isEqual","params","replace","onStateChange","previousState","pendingPath","previousFocusedState","focusedState","historyDelta","nextIndex","backIndex","currentIndex","go","addListener"],"sourceRoot":"../../src","sources":["useLinking.tsx"],"mappings":";;;;;;AAAA;AASA;AACA;AAEA;AACA;AAA4C;AAAA;AAAA;AAK5C;AACA;AACA;AACA;AACA,MAAMA,iBAAiB,GAAG,CACxBC,CAAgB,EAChBC,CAAgB,KACmB;EACnC,IAAID,CAAC,KAAKE,SAAS,IAAID,CAAC,KAAKC,SAAS,IAAIF,CAAC,CAACG,GAAG,KAAKF,CAAC,CAACE,GAAG,EAAE;IACzD,OAAO,CAACD,SAAS,EAAEA,SAAS,CAAC;EAC/B;;EAEA;EACA,MAAME,cAAc,GAAGJ,CAAC,CAACK,OAAO,GAAGL,CAAC,CAACK,OAAO,CAACC,MAAM,GAAGN,CAAC,CAACO,MAAM,CAACD,MAAM;EACrE,MAAME,cAAc,GAAGP,CAAC,CAACI,OA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,CAAC;YAC5C,CAAC,MAAM;cACL;cACA;cACA;cACA,MAAM3G,OAAO,CAAC4G,EAAE,CAACJ,YAAY,CAAC;YAChC;;YAEA;YACAxG,OAAO,CAACkG,OAAO,CAAC;cAAErC,IAAI;cAAErD;YAAM,CAAC,CAAC;UAClC,CAAC,CAAC,OAAOiF,CAAC,EAAE;YACV;UAAA;QAEJ,CAAC,MAAM;UACL;UACAzF,OAAO,CAACkG,OAAO,CAAC;YAAErC,IAAI;YAAErD;UAAM,CAAC,CAAC;QAClC;MACF,CAAC,MAAM;QACL;QACA;QACAR,OAAO,CAACkG,OAAO,CAAC;UAAErC,IAAI;UAAErD;QAAM,CAAC,CAAC;MAClC;IACF,CAAC;;IAED;IACA;IACA;IACA,uBAAOY,GAAG,CAACgC,OAAO,iDAAX,aAAayD,WAAW,CAAC,OAAO,EAAEnG,MAAM,CAACyF,aAAa,CAAC,CAAC;EACjE,CAAC,EAAE,CAAC7E,OAAO,EAAEtB,OAAO,EAAEoB,GAAG,CAAC,CAAC;EAE3B,OAAO;IACLoC;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.native.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.native.js new file mode 100644 index 00000000..c16dd257 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.native.js @@ -0,0 +1,157 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useLinking; +var _core = require("@react-navigation/core"); +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +var _extractPathFromURL = _interopRequireDefault(require("./extractPathFromURL")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +let linkingHandlers = []; +function useLinking(ref, _ref) { + let { + independent, + enabled = true, + prefixes, + filter, + config, + getInitialURL = () => Promise.race([_reactNative.Linking.getInitialURL(), new Promise(resolve => + // Timeout in 150ms if `getInitialState` doesn't resolve + // Workaround for https://github.com/facebook/react-native/issues/25675 + setTimeout(resolve, 150))]), + subscribe = listener => { + var _Linking$removeEventL; + const callback = _ref2 => { + let { + url + } = _ref2; + return listener(url); + }; + const subscription = _reactNative.Linking.addEventListener('url', callback); + + // Storing this in a local variable stops Jest from complaining about import after teardown + const removeEventListener = (_Linking$removeEventL = _reactNative.Linking.removeEventListener) === null || _Linking$removeEventL === void 0 ? void 0 : _Linking$removeEventL.bind(_reactNative.Linking); + return () => { + // https://github.com/facebook/react-native/commit/6d1aca806cee86ad76de771ed3a1cc62982ebcd7 + if (subscription !== null && subscription !== void 0 && subscription.remove) { + subscription.remove(); + } else { + removeEventListener === null || removeEventListener === void 0 ? void 0 : removeEventListener('url', callback); + } + }; + }, + getStateFromPath = _core.getStateFromPath, + getActionFromState = _core.getActionFromState + } = _ref; + React.useEffect(() => { + if (process.env.NODE_ENV === 'production') { + return undefined; + } + if (independent) { + return undefined; + } + if (enabled !== false && linkingHandlers.length) { + console.error(['Looks like you have configured linking in multiple places. This is likely an error since deep links should only be handled in one place to avoid conflicts. Make sure that:', "- You don't have multiple NavigationContainers in the app each with 'linking' enabled", '- Only a single instance of the root component is rendered', _reactNative.Platform.OS === 'android' ? "- You have set 'android:launchMode=singleTask' in the '' section of the 'AndroidManifest.xml' file to avoid launching multiple instances" : ''].join('\n').trim()); + } + const handler = Symbol(); + if (enabled !== false) { + linkingHandlers.push(handler); + } + return () => { + const index = linkingHandlers.indexOf(handler); + if (index > -1) { + linkingHandlers.splice(index, 1); + } + }; + }, [enabled, independent]); + + // We store these options in ref to avoid re-creating getInitialState and re-subscribing listeners + // This lets user avoid wrapping the items in `React.useCallback` or `React.useMemo` + // Not re-creating `getInitialState` is important coz it makes it easier for the user to use in an effect + const enabledRef = React.useRef(enabled); + const prefixesRef = React.useRef(prefixes); + const filterRef = React.useRef(filter); + const configRef = React.useRef(config); + const getInitialURLRef = React.useRef(getInitialURL); + const getStateFromPathRef = React.useRef(getStateFromPath); + const getActionFromStateRef = React.useRef(getActionFromState); + React.useEffect(() => { + enabledRef.current = enabled; + prefixesRef.current = prefixes; + filterRef.current = filter; + configRef.current = config; + getInitialURLRef.current = getInitialURL; + getStateFromPathRef.current = getStateFromPath; + getActionFromStateRef.current = getActionFromState; + }); + const getStateFromURL = React.useCallback(url => { + if (!url || filterRef.current && !filterRef.current(url)) { + return undefined; + } + const path = (0, _extractPathFromURL.default)(prefixesRef.current, url); + return path !== undefined ? getStateFromPathRef.current(path, configRef.current) : undefined; + }, []); + const getInitialState = React.useCallback(() => { + let state; + if (enabledRef.current) { + const url = getInitialURLRef.current(); + if (url != null && typeof url !== 'string') { + return url.then(url => { + const state = getStateFromURL(url); + return state; + }); + } + state = getStateFromURL(url); + } + const thenable = { + then(onfulfilled) { + return Promise.resolve(onfulfilled ? onfulfilled(state) : state); + }, + catch() { + return thenable; + } + }; + return thenable; + }, [getStateFromURL]); + React.useEffect(() => { + const listener = url => { + if (!enabled) { + return; + } + const navigation = ref.current; + const state = navigation ? getStateFromURL(url) : undefined; + if (navigation && state) { + // Make sure that the routes in the state exist in the root navigator + // Otherwise there's an error in the linking configuration + const rootState = navigation.getRootState(); + if (state.routes.some(r => !(rootState !== null && rootState !== void 0 && rootState.routeNames.includes(r.name)))) { + console.warn("The navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration."); + return; + } + const action = getActionFromStateRef.current(state, configRef.current); + if (action !== undefined) { + try { + navigation.dispatch(action); + } catch (e) { + // Ignore any errors from deep linking. + // This could happen in case of malformed links, navigation object not being initialized etc. + console.warn(`An error occurred when trying to handle the link '${url}': ${typeof e === 'object' && e != null && 'message' in e ? + // @ts-expect-error: we're already checking for this + e.message : e}`); + } + } else { + navigation.resetRoot(state); + } + } + }; + return subscribe(listener); + }, [enabled, getStateFromURL, ref, subscribe]); + return { + getInitialState + }; +} +//# sourceMappingURL=useLinking.native.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.native.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.native.js.map new file mode 100644 index 00000000..3dcac268 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useLinking.native.js.map @@ -0,0 +1 @@ +{"version":3,"names":["linkingHandlers","useLinking","ref","independent","enabled","prefixes","filter","config","getInitialURL","Promise","race","Linking","resolve","setTimeout","subscribe","listener","callback","url","subscription","addEventListener","removeEventListener","bind","remove","getStateFromPath","getStateFromPathDefault","getActionFromState","getActionFromStateDefault","React","useEffect","process","env","NODE_ENV","undefined","length","console","error","Platform","OS","join","trim","handler","Symbol","push","index","indexOf","splice","enabledRef","useRef","prefixesRef","filterRef","configRef","getInitialURLRef","getStateFromPathRef","getActionFromStateRef","current","getStateFromURL","useCallback","path","extractPathFromURL","getInitialState","state","then","thenable","onfulfilled","catch","navigation","rootState","getRootState","routes","some","r","routeNames","includes","name","warn","action","dispatch","e","message","resetRoot"],"sourceRoot":"../../src","sources":["useLinking.native.tsx"],"mappings":";;;;;;AAAA;AAMA;AACA;AAEA;AAAsD;AAAA;AAAA;AAStD,IAAIA,eAAyB,GAAG,EAAE;AAEnB,SAASC,UAAU,CAChCC,GAA2D,QAsC3D;EAAA,IArCA;IACEC,WAAW;IACXC,OAAO,GAAG,IAAI;IACdC,QAAQ;IACRC,MAAM;IACNC,MAAM;IACNC,aAAa,GAAG,MACdC,OAAO,CAACC,IAAI,CAAC,CACXC,oBAAO,CAACH,aAAa,EAAE,EACvB,IAAIC,OAAO,CAAaG,OAAO;IAC7B;IACA;IACAC,UAAU,CAACD,OAAO,EAAE,GAAG,CAAC,CACzB,CACF,CAAC;IACJE,SAAS,GAAIC,QAAQ,IAAK;MAAA;MACxB,MAAMC,QAAQ,GAAG;QAAA,IAAC;UAAEC;QAAqB,CAAC;QAAA,OAAKF,QAAQ,CAACE,GAAG,CAAC;MAAA;MAE5D,MAAMC,YAAY,GAAGP,oBAAO,CAACQ,gBAAgB,CAAC,KAAK,EAAEH,QAAQ,CAEhD;;MAEb;MACA,MAAMI,mBAAmB,4BAAGT,oBAAO,CAACS,mBAAmB,0DAA3B,sBAA6BC,IAAI,CAACV,oBAAO,CAAC;MAEtE,OAAO,MAAM;QACX;QACA,IAAIO,YAAY,aAAZA,YAAY,eAAZA,YAAY,CAAEI,MAAM,EAAE;UACxBJ,YAAY,CAACI,MAAM,EAAE;QACvB,CAAC,MAAM;UACLF,mBAAmB,aAAnBA,mBAAmB,uBAAnBA,mBAAmB,CAAG,KAAK,EAAEJ,QAAQ,CAAC;QACxC;MACF,CAAC;IACH,CAAC;IACDO,gBAAgB,GAAGC,sBAAuB;IAC1CC,kBAAkB,GAAGC;EACd,CAAC;EAEVC,KAAK,CAACC,SAAS,CAAC,MAAM;IACpB,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;MACzC,OAAOC,SAAS;IAClB;IA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AC;YAChD;YACAA,CAAC,CAACC,OAAO,GACTD,CACL,EAAC,CACH;UACH;QACF,CAAC,MAAM;UACLZ,UAAU,CAACc,SAAS,CAACnB,KAAK,CAAC;QAC7B;MACF;IACF,CAAC;IAED,OAAO9C,SAAS,CAACC,QAAQ,CAAC;EAC5B,CAAC,EAAE,CAACX,OAAO,EAAEmD,eAAe,EAAErD,GAAG,EAAEY,SAAS,CAAC,CAAC;EAE9C,OAAO;IACL6C;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useScrollToTop.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useScrollToTop.js new file mode 100644 index 00000000..2eb68c8e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useScrollToTop.js @@ -0,0 +1,95 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useScrollToTop; +var _core = require("@react-navigation/core"); +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function getScrollableNode(ref) { + if (ref.current == null) { + return null; + } + if ('scrollToTop' in ref.current || 'scrollTo' in ref.current || 'scrollToOffset' in ref.current || 'scrollResponderScrollTo' in ref.current) { + // This is already a scrollable node. + return ref.current; + } else if ('getScrollResponder' in ref.current) { + // If the view is a wrapper like FlatList, SectionList etc. + // We need to use `getScrollResponder` to get access to the scroll responder + return ref.current.getScrollResponder(); + } else if ('getNode' in ref.current) { + // When a `ScrollView` is wraped in `Animated.createAnimatedComponent` + // we need to use `getNode` to get the ref to the actual scrollview. + // Note that `getNode` is deprecated in newer versions of react-native + // this is why we check if we already have a scrollable node above. + return ref.current.getNode(); + } else { + return ref.current; + } +} +function useScrollToTop(ref) { + const navigation = (0, _core.useNavigation)(); + const route = (0, _core.useRoute)(); + React.useEffect(() => { + let tabNavigations = []; + let currentNavigation = navigation; + + // If the screen is nested inside multiple tab navigators, we should scroll to top for any of them + // So we need to find all the parent tab navigators and add the listeners there + while (currentNavigation) { + if (currentNavigation.getState().type === 'tab') { + tabNavigations.push(currentNavigation); + } + currentNavigation = currentNavigation.getParent(); + } + if (tabNavigations.length === 0) { + return; + } + const unsubscribers = tabNavigations.map(tab => { + return tab.addListener( + // We don't wanna import tab types here to avoid extra deps + // in addition, there are multiple tab implementations + // @ts-expect-error + 'tabPress', e => { + // We should scroll to top only when the screen is focused + const isFocused = navigation.isFocused(); + + // In a nested stack navigator, tab press resets the stack to first screen + // So we should scroll to top only when we are on first screen + const isFirst = tabNavigations.includes(navigation) || navigation.getState().routes[0].key === route.key; + + // Run the operation in the next frame so we're sure all listeners have been run + // This is necessary to know if preventDefault() has been called + requestAnimationFrame(() => { + const scrollable = getScrollableNode(ref); + if (isFocused && isFirst && scrollable && !e.defaultPrevented) { + if ('scrollToTop' in scrollable) { + scrollable.scrollToTop(); + } else if ('scrollTo' in scrollable) { + scrollable.scrollTo({ + y: 0, + animated: true + }); + } else if ('scrollToOffset' in scrollable) { + scrollable.scrollToOffset({ + offset: 0, + animated: true + }); + } else if ('scrollResponderScrollTo' in scrollable) { + scrollable.scrollResponderScrollTo({ + y: 0, + animated: true + }); + } + } + }); + }); + }); + return () => { + unsubscribers.forEach(unsubscribe => unsubscribe()); + }; + }, [navigation, ref, route.key]); +} +//# sourceMappingURL=useScrollToTop.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useScrollToTop.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useScrollToTop.js.map new file mode 100644 index 00000000..9ff27095 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useScrollToTop.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getScrollableNode","ref","current","getScrollResponder","getNode","useScrollToTop","navigation","useNavigation","route","useRoute","React","useEffect","tabNavigations","currentNavigation","getState","type","push","getParent","length","unsubscribers","map","tab","addListener","e","isFocused","isFirst","includes","routes","key","requestAnimationFrame","scrollable","defaultPrevented","scrollToTop","scrollTo","y","animated","scrollToOffset","offset","scrollResponderScrollTo","forEach","unsubscribe"],"sourceRoot":"../../src","sources":["useScrollToTop.tsx"],"mappings":";;;;;;AAAA;AAMA;AAA+B;AAAA;AAe/B,SAASA,iBAAiB,CAACC,GAAuC,EAAE;EAClE,IAAIA,GAAG,CAACC,OAAO,IAAI,IAAI,EAAE;IACvB,OAAO,IAAI;EACb;EAEA,IACE,aAAa,IAAID,GAAG,CAACC,OAAO,IAC5B,UAAU,IAAID,GAAG,CAACC,OAAO,IACzB,gBAAgB,IAAID,GAAG,CAACC,OAAO,IAC/B,yBAAyB,IAAID,GAAG,CAACC,OAAO,EACxC;IACA;IACA,OAAOD,GAAG,CAACC,OAAO;EACpB,CAAC,MAAM,IAAI,oBAAoB,IAAID,GAAG,CAACC,OAAO,EAAE;IAC9C;IACA;IACA,OAAOD,GAAG,CAACC,OAAO,CAACC,kBAAkB,EAAE;EACzC,CAAC,MAAM,IAAI,SAAS,IAAIF,GAAG,CAACC,OAAO,EAAE;IACnC;IAC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;cAC/BA,UAAU,CAACE,WAAW,EAAE;YAC1B,CAAC,MAAM,IAAI,UAAU,IAAIF,UAAU,EAAE;cACnCA,UAAU,CAACG,QAAQ,CAAC;gBAAEC,CAAC,EAAE,CAAC;gBAAEC,QAAQ,EAAE;cAAK,CAAC,CAAC;YAC/C,CAAC,MAAM,IAAI,gBAAgB,IAAIL,UAAU,EAAE;cACzCA,UAAU,CAACM,cAAc,CAAC;gBAAEC,MAAM,EAAE,CAAC;gBAAEF,QAAQ,EAAE;cAAK,CAAC,CAAC;YAC1D,CAAC,MAAM,IAAI,yBAAyB,IAAIL,UAAU,EAAE;cAClDA,UAAU,CAACQ,uBAAuB,CAAC;gBAAEJ,CAAC,EAAE,CAAC;gBAAEC,QAAQ,EAAE;cAAK,CAAC,CAAC;YAC9D;UACF;QACF,CAAC,CAAC;MACJ,CAAC,CACF;IACH,CAAC,CAAC;IAEF,OAAO,MAAM;MACXhB,aAAa,CAACoB,OAAO,CAAEC,WAAW,IAAKA,WAAW,EAAE,CAAC;IACvD,CAAC;EACH,CAAC,EAAE,CAAClC,UAAU,EAAEL,GAAG,EAAEO,KAAK,CAACoB,GAAG,CAAC,CAAC;AAClC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useThenable.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useThenable.js new file mode 100644 index 00000000..bf21dbfb --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useThenable.js @@ -0,0 +1,41 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useThenable; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function useThenable(create) { + const [promise] = React.useState(create); + let initialState = [false, undefined]; + + // Check if our thenable is synchronous + promise.then(result => { + initialState = [true, result]; + }); + const [state, setState] = React.useState(initialState); + const [resolved] = state; + React.useEffect(() => { + let cancelled = false; + const resolve = async () => { + let result; + try { + result = await promise; + } finally { + if (!cancelled) { + setState([true, result]); + } + } + }; + if (!resolved) { + resolve(); + } + return () => { + cancelled = true; + }; + }, [promise, resolved]); + return state; +} +//# sourceMappingURL=useThenable.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useThenable.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useThenable.js.map new file mode 100644 index 00000000..6714a36c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/commonjs/useThenable.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useThenable","create","promise","React","useState","initialState","undefined","then","result","state","setState","resolved","useEffect","cancelled","resolve"],"sourceRoot":"../../src","sources":["useThenable.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAEhB,SAASA,WAAW,CAAIC,MAA4B,EAAE;EACnE,MAAM,CAACC,OAAO,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAACH,MAAM,CAAC;EAExC,IAAII,YAAsC,GAAG,CAAC,KAAK,EAAEC,SAAS,CAAC;;EAE/D;EACAJ,OAAO,CAACK,IAAI,CAAEC,MAAM,IAAK;IACvBH,YAAY,GAAG,CAAC,IAAI,EAAEG,MAAM,CAAC;EAC/B,CAAC,CAAC;EAEF,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGP,KAAK,CAACC,QAAQ,CAACC,YAAY,CAAC;EACtD,MAAM,CAACM,QAAQ,CAAC,GAAGF,KAAK;EAExBN,KAAK,CAACS,SAAS,CAAC,MAAM;IACpB,IAAIC,SAAS,GAAG,KAAK;IAErB,MAAMC,OAAO,GAAG,YAAY;MAC1B,IAAIN,MAAM;MAEV,IAAI;QACFA,MAAM,GAAG,MAAMN,OAAO;MACxB,CAAC,SAAS;QACR,IAAI,CAACW,SAAS,EAAE;UACdH,QAAQ,CAAC,CAAC,IAAI,EAAEF,MAAM,CAAC,CAAC;QAC1B;MACF;IACF,CAAC;IAED,IAAI,CAACG,QAAQ,EAAE;MACbG,OAAO,EAAE;IACX;IAEA,OAAO,MAAM;MACXD,SAAS,GAAG,IAAI;IAClB,CAAC;EACH,CAAC,EAAE,CAACX,OAAO,EAAES,QAAQ,CAAC,CAAC;EAEvB,OAAOF,KAAK;AACd"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/Link.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/Link.js new file mode 100644 index 00000000..29acec7c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/Link.js @@ -0,0 +1,42 @@ +import * as React from 'react'; +import { Platform, Text } from 'react-native'; +import useLinkProps from './useLinkProps'; +/** + * Component to render link to another screen using a path. + * Uses an anchor tag on the web. + * + * @param props.to Absolute path to screen (e.g. `/feeds/hot`). + * @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config. + * @param props.children Child elements to render the content. + */ +export default function Link(_ref) { + let { + to, + action, + ...rest + } = _ref; + const props = useLinkProps({ + to, + action + }); + const onPress = e => { + if ('onPress' in rest) { + var _rest$onPress; + (_rest$onPress = rest.onPress) === null || _rest$onPress === void 0 ? void 0 : _rest$onPress.call(rest, e); + } + props.onPress(e); + }; + return /*#__PURE__*/React.createElement(Text, { + ...props, + ...rest, + ...Platform.select({ + web: { + onClick: onPress + }, + default: { + onPress + } + }) + }); +} +//# sourceMappingURL=Link.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/Link.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/Link.js.map new file mode 100644 index 00000000..5e19d68c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/Link.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","Platform","Text","useLinkProps","Link","to","action","rest","props","onPress","e","createElement","select","web","onClick","default"],"sourceRoot":"../../src","sources":["Link.tsx"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAAgCC,QAAQ,EAAEC,IAAI,QAAmB,cAAc;AAE/E,OAAOC,YAAY,MAAM,gBAAgB;AAYzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,IAAI,OAIP;EAAA,IAJyD;IAC5EC,EAAE;IACFC,MAAM;IACN,GAAGC;EACa,CAAC;EACjB,MAAMC,KAAK,GAAGL,YAAY,CAAY;IAAEE,EAAE;IAAEC;EAAO,CAAC,CAAC;EAErD,MAAMG,OAAO,GACXC,CAA0E,IACvE;IACH,IAAI,SAAS,IAAIH,IAAI,EAAE;MAAA;MACrB,iBAAAA,IAAI,CAACE,OAAO,kDAAZ,mBAAAF,IAAI,EAAWG,CAAC,CAAC;IACnB;IAEAF,KAAK,CAACC,OAAO,CAACC,CAAC,CAAC;EAClB,CAAC;EAED,oBAAOV,KAAK,CAACW,aAAa,CAACT,IAAI,EAAE;IAC/B,GAAGM,KAAK;IACR,GAAGD,IAAI;IACP,GAAGN,QAAQ,CAACW,MAAM,CAAC;MACjBC,GAAG,EAAE;QAAEC,OAAO,EAAEL;MAAQ,CAAQ;MAChCM,OAAO,EAAE;QAAEN;MAAQ;IACrB,CAAC;EACH,CAAC,CAAC;AACJ"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/LinkingContext.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/LinkingContext.js new file mode 100644 index 00000000..d333a63c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/LinkingContext.js @@ -0,0 +1,7 @@ +import * as React from 'react'; +const LinkingContext = /*#__PURE__*/React.createContext({ + options: undefined +}); +LinkingContext.displayName = 'LinkingContext'; +export default LinkingContext; +//# sourceMappingURL=LinkingContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/LinkingContext.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/LinkingContext.js.map new file mode 100644 index 00000000..9c723c65 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/LinkingContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","LinkingContext","createContext","options","undefined","displayName"],"sourceRoot":"../../src","sources":["LinkingContext.tsx"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAI9B,MAAMC,cAAc,gBAAGD,KAAK,CAACE,aAAa,CAEvC;EAAEC,OAAO,EAAEC;AAAU,CAAC,CAAC;AAE1BH,cAAc,CAACI,WAAW,GAAG,gBAAgB;AAE7C,eAAeJ,cAAc"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/NavigationContainer.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/NavigationContainer.js new file mode 100644 index 00000000..954dabf1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/NavigationContainer.js @@ -0,0 +1,101 @@ +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +import { BaseNavigationContainer, getActionFromState, getPathFromState, getStateFromPath, validatePathConfig } from '@react-navigation/core'; +import * as React from 'react'; +import LinkingContext from './LinkingContext'; +import DefaultTheme from './theming/DefaultTheme'; +import ThemeProvider from './theming/ThemeProvider'; +import useBackButton from './useBackButton'; +import useDocumentTitle from './useDocumentTitle'; +import useLinking from './useLinking'; +import useThenable from './useThenable'; +global.REACT_NAVIGATION_DEVTOOLS = new WeakMap(); +/** + * Container component which holds the navigation state designed for React Native apps. + * This should be rendered at the root wrapping the whole app. + * + * @param props.initialState Initial state object for the navigation tree. When deep link handling is enabled, this will override deep links when specified. Make sure that you don't specify an `initialState` when there's a deep link (`Linking.getInitialURL()`). + * @param props.onReady Callback which is called after the navigation tree mounts. + * @param props.onStateChange Callback which is called with the latest navigation state when it changes. + * @param props.theme Theme object for the navigators. + * @param props.linking Options for deep linking. Deep link handling is enabled when this prop is provided, unless `linking.enabled` is `false`. + * @param props.fallback Fallback component to render until we have finished getting initial state when linking is enabled. Defaults to `null`. + * @param props.documentTitle Options to configure the document title on Web. Updating document title is handled by default unless `documentTitle.enabled` is `false`. + * @param props.children Child elements to render the content. + * @param props.ref Ref object which refers to the navigation object containing helper methods. + */ +function NavigationContainerInner(_ref, ref) { + let { + theme = DefaultTheme, + linking, + fallback = null, + documentTitle, + onReady, + ...rest + } = _ref; + const isLinkingEnabled = linking ? linking.enabled !== false : false; + if (linking !== null && linking !== void 0 && linking.config) { + validatePathConfig(linking.config); + } + const refContainer = React.useRef(null); + useBackButton(refContainer); + useDocumentTitle(refContainer, documentTitle); + const { + getInitialState + } = useLinking(refContainer, { + independent: rest.independent, + enabled: isLinkingEnabled, + prefixes: [], + ...linking + }); + + // Add additional linking related info to the ref + // This will be used by the devtools + React.useEffect(() => { + if (refContainer.current) { + REACT_NAVIGATION_DEVTOOLS.set(refContainer.current, { + get linking() { + return { + ...linking, + enabled: isLinkingEnabled, + prefixes: (linking === null || linking === void 0 ? void 0 : linking.prefixes) ?? [], + getStateFromPath: (linking === null || linking === void 0 ? void 0 : linking.getStateFromPath) ?? getStateFromPath, + getPathFromState: (linking === null || linking === void 0 ? void 0 : linking.getPathFromState) ?? getPathFromState, + getActionFromState: (linking === null || linking === void 0 ? void 0 : linking.getActionFromState) ?? getActionFromState + }; + } + }); + } + }); + const [isResolved, initialState] = useThenable(getInitialState); + React.useImperativeHandle(ref, () => refContainer.current); + const linkingContext = React.useMemo(() => ({ + options: linking + }), [linking]); + const isReady = rest.initialState != null || !isLinkingEnabled || isResolved; + const onReadyRef = React.useRef(onReady); + React.useEffect(() => { + onReadyRef.current = onReady; + }); + React.useEffect(() => { + if (isReady) { + var _onReadyRef$current; + (_onReadyRef$current = onReadyRef.current) === null || _onReadyRef$current === void 0 ? void 0 : _onReadyRef$current.call(onReadyRef); + } + }, [isReady]); + if (!isReady) { + // This is temporary until we have Suspense for data-fetching + // Then the fallback will be handled by a parent `Suspense` component + return fallback; + } + return /*#__PURE__*/React.createElement(LinkingContext.Provider, { + value: linkingContext + }, /*#__PURE__*/React.createElement(ThemeProvider, { + value: theme + }, /*#__PURE__*/React.createElement(BaseNavigationContainer, _extends({}, rest, { + initialState: rest.initialState == null ? initialState : rest.initialState, + ref: refContainer + })))); +} +const NavigationContainer = /*#__PURE__*/React.forwardRef(NavigationContainerInner); +export default NavigationContainer; +//# sourceMappingURL=NavigationContainer.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/NavigationContainer.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/NavigationContainer.js.map new file mode 100644 index 00000000..a7335903 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/NavigationContainer.js.map @@ -0,0 +1 @@ +{"version":3,"names":["BaseNavigationContainer","getActionFromState","getPathFromState","getStateFromPath","validatePathConfig","React","LinkingContext","DefaultTheme","ThemeProvider","useBackButton","useDocumentTitle","useLinking","useThenable","global","REACT_NAVIGATION_DEVTOOLS","WeakMap","NavigationContainerInner","ref","theme","linking","fallback","documentTitle","onReady","rest","isLinkingEnabled","enabled","config","refContainer","useRef","getInitialState","independent","prefixes","useEffect","current","set","isResolved","initialState","useImperativeHandle","linkingContext","useMemo","options","isReady","onReadyRef","NavigationContainer","forwardRef"],"sourceRoot":"../../src","sources":["NavigationContainer.tsx"],"mappings":";AAAA,SACEA,uBAAuB,EACvBC,kBAAkB,EAClBC,gBAAgB,EAChBC,gBAAgB,EAIhBC,kBAAkB,QACb,wBAAwB;AAC/B,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,YAAY,MAAM,wBAAwB;AACjD,OAAOC,aAAa,MAAM,yBAAyB;AAEnD,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,WAAW,MAAM,eAAe;AASvCC,MAAM,CAACC,yBAAyB,GAAG,IAAIC,OAAO,EAAE;AAUhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,wBAAwB,OAS/BC,GAA6D,EAC7D;EAAA,IATA;IACEC,KAAK,GAAGX,YAAY;IACpBY,OAAO;IACPC,QAAQ,GAAG,IAAI;IACfC,aAAa;IACbC,OAAO;IACP,GAAGC;EACiB,CAAC;EAGvB,MAAMC,gBAAgB,GAAGL,OAAO,GAAGA,OAAO,CAACM,OAAO,KAAK,KAAK,GAAG,KAAK;EAEpE,IAAIN,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEO,MAAM,EAAE;IACnBtB,kBAAkB,CAACe,OAAO,CAACO,MAAM,CAAC;EACpC;EAEA,MAAMC,YAAY,GAChBtB,KAAK,CAACuB,MAAM,CAAwC,IAAI,CAAC;EAE3DnB,aAAa,CAACkB,YAAY,CAAC;EAC3BjB,gBAAgB,CAACiB,YAAY,EAAEN,aAAa,CAAC;EAE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EAE5E,MAAMO,UAAU,GAAGrC,KAAK,CAACuB,MAAM,CAACN,OAAO,CAAC;EAExCjB,KAAK,CAAC2B,SAAS,CAAC,MAAM;IACpBU,UAAU,CAACT,OAAO,GAAGX,OAAO;EAC9B,CAAC,CAAC;EAEFjB,KAAK,CAAC2B,SAAS,CAAC,MAAM;IACpB,IAAIS,OAAO,EAAE;MAAA;MACX,uBAAAC,UAAU,CAACT,OAAO,wDAAlB,yBAAAS,UAAU,CAAY;IACxB;EACF,CAAC,EAAE,CAACD,OAAO,CAAC,CAAC;EAEb,IAAI,CAACA,OAAO,EAAE;IACZ;IACA;IACA,OAAOrB,QAAQ;EACjB;EAEA,oBACE,oBAAC,cAAc,CAAC,QAAQ;IAAC,KAAK,EAAEkB;EAAe,gBAC7C,oBAAC,aAAa;IAAC,KAAK,EAAEpB;EAAM,gBAC1B,oBAAC,uBAAuB,eAClBK,IAAI;IACR,YAAY,EACVA,IAAI,CAACa,YAAY,IAAI,IAAI,GAAGA,YAAY,GAAGb,IAAI,CAACa,YACjD;IACD,GAAG,EAAET;EAAa,GAClB,CACY,CACQ;AAE9B;AAEA,MAAMgB,mBAAmB,gBAAGtC,KAAK,CAACuC,UAAU,CAAC5B,wBAAwB,CAM9C;AAEvB,eAAe2B,mBAAmB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContainer.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContainer.js new file mode 100644 index 00000000..493b12a3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContainer.js @@ -0,0 +1,46 @@ +import { CurrentRenderContext } from '@react-navigation/core'; +import * as React from 'react'; +import ServerContext from './ServerContext'; +/** + * Container component for server rendering. + * + * @param props.location Location object to base the initial URL for SSR. + * @param props.children Child elements to render the content. + * @param props.ref Ref object which contains helper methods. + */ +export default /*#__PURE__*/React.forwardRef(function ServerContainer(_ref, ref) { + let { + children, + location + } = _ref; + React.useEffect(() => { + console.error("'ServerContainer' should only be used on the server with 'react-dom/server' for SSR."); + }, []); + const current = {}; + if (ref) { + const value = { + getCurrentOptions() { + return current.options; + } + }; + + // We write to the `ref` during render instead of `React.useImperativeHandle` + // This is because `useImperativeHandle` will update the ref after 'commit', + // and there's no 'commit' phase during SSR. + // Mutating ref during render is unsafe in concurrent mode, but we don't care about it for SSR. + if (typeof ref === 'function') { + ref(value); + } else { + // @ts-expect-error: the TS types are incorrect and say that ref.current is readonly + ref.current = value; + } + } + return /*#__PURE__*/React.createElement(ServerContext.Provider, { + value: { + location + } + }, /*#__PURE__*/React.createElement(CurrentRenderContext.Provider, { + value: current + }, children)); +}); +//# sourceMappingURL=ServerContainer.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContainer.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContainer.js.map new file mode 100644 index 00000000..164243e4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContainer.js.map @@ -0,0 +1 @@ +{"version":3,"names":["CurrentRenderContext","React","ServerContext","forwardRef","ServerContainer","ref","children","location","useEffect","console","error","current","value","getCurrentOptions","options"],"sourceRoot":"../../src","sources":["ServerContainer.tsx"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,wBAAwB;AAC7D,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,OAAOC,aAAa,MAA6B,iBAAiB;AAOlE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAAeD,KAAK,CAACE,UAAU,CAAC,SAASC,eAAe,OAEtDC,GAAkC,EAClC;EAAA,IAFA;IAAEC,QAAQ;IAAEC;EAAgB,CAAC;EAG7BN,KAAK,CAACO,SAAS,CAAC,MAAM;IACpBC,OAAO,CAACC,KAAK,CACX,sFAAsF,CACvF;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMC,OAA6B,GAAG,CAAC,CAAC;EAExC,IAAIN,GAAG,EAAE;IACP,MAAMO,KAAK,GAAG;MACZC,iBAAiB,GAAG;QAClB,OAAOF,OAAO,CAACG,OAAO;MACxB;IACF,CAAC;;IAED;IACA;IACA;IACA;IACA,IAAI,OAAOT,GAAG,KAAK,UAAU,EAAE;MAC7BA,GAAG,CAACO,KAAK,CAAC;IACZ,CAAC,MAAM;MACL;MACAP,GAAG,CAACM,OAAO,GAAGC,KAAK;IACrB;EACF;EAEA,oBACE,oBAAC,aAAa,CAAC,QAAQ;IAAC,KAAK,EAAE;MAAEL;IAAS;EAAE,gBAC1C,oBAAC,oBAAoB,CAAC,QAAQ;IAAC,KAAK,EAAEI;EAAQ,GAC3CL,QAAQ,CACqB,CACT;AAE7B,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContext.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContext.js new file mode 100644 index 00000000..e187026f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContext.js @@ -0,0 +1,4 @@ +import * as React from 'react'; +const ServerContext = /*#__PURE__*/React.createContext(undefined); +export default ServerContext; +//# sourceMappingURL=ServerContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContext.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContext.js.map new file mode 100644 index 00000000..df82f618 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/ServerContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","ServerContext","createContext","undefined"],"sourceRoot":"../../src","sources":["ServerContext.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAS9B,MAAMC,aAAa,gBAAGD,KAAK,CAACE,aAAa,CACvCC,SAAS,CACV;AAED,eAAeF,aAAa"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/createMemoryHistory.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/createMemoryHistory.js new file mode 100644 index 00000000..16fdbef8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/createMemoryHistory.js @@ -0,0 +1,217 @@ +import { nanoid } from 'nanoid/non-secure'; +export default function createMemoryHistory() { + let index = 0; + let items = []; + + // Pending callbacks for `history.go(n)` + // We might modify the callback stored if it was interrupted, so we have a ref to identify it + const pending = []; + const interrupt = () => { + // If another history operation was performed we need to interrupt existing ones + // This makes sure that calls such as `history.replace` after `history.go` don't happen + // Since otherwise it won't be correct if something else has changed + pending.forEach(it => { + const cb = it.cb; + it.cb = () => cb(true); + }); + }; + const history = { + get index() { + var _window$history$state; + // We store an id in the state instead of an index + // Index could get out of sync with in-memory values if page reloads + const id = (_window$history$state = window.history.state) === null || _window$history$state === void 0 ? void 0 : _window$history$state.id; + if (id) { + const index = items.findIndex(item => item.id === id); + return index > -1 ? index : 0; + } + return 0; + }, + get(index) { + return items[index]; + }, + backIndex(_ref) { + let { + path + } = _ref; + // We need to find the index from the element before current to get closest path to go back to + for (let i = index - 1; i >= 0; i--) { + const item = items[i]; + if (item.path === path) { + return i; + } + } + return -1; + }, + push(_ref2) { + let { + path, + state + } = _ref2; + interrupt(); + const id = nanoid(); + + // When a new entry is pushed, all the existing entries after index will be inaccessible + // So we remove any existing entries after the current index to clean them up + items = items.slice(0, index + 1); + items.push({ + path, + state, + id + }); + index = items.length - 1; + + // We pass empty string for title because it's ignored in all browsers except safari + // We don't store state object in history.state because: + // - browsers have limits on how big it can be, and we don't control the size + // - while not recommended, there could be non-serializable data in state + window.history.pushState({ + id + }, '', path); + }, + replace(_ref3) { + var _window$history$state2; + let { + path, + state + } = _ref3; + interrupt(); + const id = ((_window$history$state2 = window.history.state) === null || _window$history$state2 === void 0 ? void 0 : _window$history$state2.id) ?? nanoid(); + + // Need to keep the hash part of the path if there was no previous history entry + // or the previous history entry had the same path + let pathWithHash = path; + if (!items.length || items.findIndex(item => item.id === id) < 0) { + // There are two scenarios for creating an array with only one history record: + // - When loaded id not found in the items array, this function by default will replace + // the first item. We need to keep only the new updated object, otherwise it will break + // the page when navigating forward in history. + // - This is the first time any state modifications are done + // So we need to push the entry as there's nothing to replace + pathWithHash = pathWithHash + location.hash; + items = [{ + path: pathWithHash, + state, + id + }]; + index = 0; + } else { + if (items[index].path === path) { + pathWithHash = pathWithHash + location.hash; + } + items[index] = { + path, + state, + id + }; + } + window.history.replaceState({ + id + }, '', pathWithHash); + }, + // `history.go(n)` is asynchronous, there are couple of things to keep in mind: + // - it won't do anything if we can't go `n` steps, the `popstate` event won't fire. + // - each `history.go(n)` call will trigger a separate `popstate` event with correct location. + // - the `popstate` event fires before the next frame after calling `history.go(n)`. + // This method differs from `history.go(n)` in the sense that it'll go back as many steps it can. + go(n) { + interrupt(); + + // To guard against unexpected navigation out of the app we will assume that browser history is only as deep as the length of our memory + // history. If we don't have an item to navigate to then update our index and navigate as far as we can without taking the user out of the app. + const nextIndex = index + n; + const lastItemIndex = items.length - 1; + if (n < 0 && !items[nextIndex]) { + // Attempted to navigate beyond the first index. Negating the current index will align the browser history with the first item. + n = -index; + index = 0; + } else if (n > 0 && nextIndex > lastItemIndex) { + // Attempted to navigate past the last index. Calculate how many indices away from the last index and go there. + n = lastItemIndex - index; + index = lastItemIndex; + } else { + index = nextIndex; + } + if (n === 0) { + return; + } + + // When we call `history.go`, `popstate` will fire when there's history to go back to + // So we need to somehow handle following cases: + // - There's history to go back, `history.go` is called, and `popstate` fires + // - `history.go` is called multiple times, we need to resolve on respective `popstate` + // - No history to go back, but `history.go` was called, browser has no API to detect it + return new Promise((resolve, reject) => { + const done = interrupted => { + clearTimeout(timer); + if (interrupted) { + reject(new Error('History was changed during navigation.')); + return; + } + + // There seems to be a bug in Chrome regarding updating the title + // If we set a title just before calling `history.go`, the title gets lost + // However the value of `document.title` is still what we set it to + // It's just not displayed in the tab bar + // To update the tab bar, we need to reset the title to something else first (e.g. '') + // And set the title to what it was before so it gets applied + // It won't work without setting it to empty string coz otherwise title isn't changing + // Which means that the browser won't do anything after setting the title + const { + title + } = window.document; + window.document.title = ''; + window.document.title = title; + resolve(); + }; + pending.push({ + ref: done, + cb: done + }); + + // If navigation didn't happen within 100ms, assume that it won't happen + // This may not be accurate, but hopefully it won't take so much time + // In Chrome, navigation seems to happen instantly in next microtask + // But on Firefox, it seems to take much longer, around 50ms from our testing + // We're using a hacky timeout since there doesn't seem to be way to know for sure + const timer = setTimeout(() => { + const index = pending.findIndex(it => it.ref === done); + if (index > -1) { + pending[index].cb(); + pending.splice(index, 1); + } + }, 100); + const onPopState = () => { + var _window$history$state3; + const id = (_window$history$state3 = window.history.state) === null || _window$history$state3 === void 0 ? void 0 : _window$history$state3.id; + const currentIndex = items.findIndex(item => item.id === id); + + // Fix createMemoryHistory.index variable's value + // as it may go out of sync when navigating in the browser. + index = Math.max(currentIndex, 0); + const last = pending.pop(); + window.removeEventListener('popstate', onPopState); + last === null || last === void 0 ? void 0 : last.cb(); + }; + window.addEventListener('popstate', onPopState); + window.history.go(n); + }); + }, + // The `popstate` event is triggered when history changes, except `pushState` and `replaceState` + // If we call `history.go(n)` ourselves, we don't want it to trigger the listener + // Here we normalize it so that only external changes (e.g. user pressing back/forward) trigger the listener + listen(listener) { + const onPopState = () => { + if (pending.length) { + // This was triggered by `history.go(n)`, we shouldn't call the listener + return; + } + listener(); + }; + window.addEventListener('popstate', onPopState); + return () => window.removeEventListener('popstate', onPopState); + } + }; + return history; +} +//# sourceMappingURL=createMemoryHistory.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/createMemoryHistory.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/createMemoryHistory.js.map new file mode 100644 index 00000000..4a0ee9e7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/createMemoryHistory.js.map @@ -0,0 +1 @@ +{"version":3,"names":["nanoid","createMemoryHistory","index","items","pending","interrupt","forEach","it","cb","history","id","window","state","findIndex","item","get","backIndex","path","i","push","slice","length","pushState","replace","pathWithHash","location","hash","replaceState","go","n","nextIndex","lastItemIndex","Promise","resolve","reject","done","interrupted","clearTimeout","timer","Error","title","document","ref","setTimeout","splice","onPopState","currentIndex","Math","max","last","pop","removeEventListener","addEventListener","listen","listener"],"sourceRoot":"../../src","sources":["createMemoryHistory.tsx"],"mappings":"AACA,SAASA,MAAM,QAAQ,mBAAmB;AAW1C,eAAe,SAASC,mBAAmB,GAAG;EAC5C,IAAIC,KAAK,GAAG,CAAC;EACb,IAAIC,KAAsB,GAAG,EAAE;;EAE/B;EACA;EACA,MAAMC,OAAgE,GAAG,EAAE;EAE3E,MAAMC,SAAS,GAAG,MAAM;IACtB;IACA;IACA;IACAD,OAAO,CAACE,OAAO,CAAEC,EAAE,IAAK;MACtB,MAAMC,EAAE,GAAGD,EAAE,CAACC,EAAE;MAChBD,EAAE,CAACC,EAAE,GAAG,MAAMA,EAAE,CAAC,IAAI,CAAC;IACxB,CAAC,CAAC;EACJ,CAAC;EAED,MAAMC,OAAO,GAAG;IACd,IAAIP,KAAK,GAAW;MAAA;MAClB;MACA;MACA,MAAMQ,EAAE,4BAAGC,MAAM,CAACF,OAAO,CAACG,KAAK,0DAApB,sBAAsBF,EAAE;MAEnC,IAAIA,EAAE,EAAE;QACN,MAAMR,KAAK,GAAGC,KAAK,CAACU,SAAS,CAAEC,IAAI,IAAKA,IAAI,CAACJ,EAAE,KAAKA,EAAE,CAAC;QAEvD,OAAOR,KAAK,GAAG,CAAC,CAAC,GAAGA,KAAK,GAAG,CAAC;MAC/B;MAEA,OAAO,CAAC;IACV,CAAC;IAEDa,GAAG,CAACb,KAAa,EAAE;MACjB,OAAOC,KAAK,CAACD,KAAK,CAAC;IACrB,CAAC;IAEDc,SAAS,OAA6B;MAAA,IAA5B;QAAEC;MAAuB,CAAC;MAClC;MACA,KAAK,IAAIC,CAAC,GAAGhB,KAAK,GAAG,CAAC,EAAEgB,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE;QACnC,MAAMJ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AM,CAACF,OAAO,CAACmB,EAAE,CAACC,CAAC,CAAC;MACtB,CAAC,CAAC;IACJ,CAAC;IAED;IACA;IACA;IACAwB,MAAM,CAACC,QAAoB,EAAE;MAC3B,MAAMT,UAAU,GAAG,MAAM;QACvB,IAAIzC,OAAO,CAACiB,MAAM,EAAE;UAClB;UACA;QACF;QAEAiC,QAAQ,EAAE;MACZ,CAAC;MAED3C,MAAM,CAACyC,gBAAgB,CAAC,UAAU,EAAEP,UAAU,CAAC;MAE/C,OAAO,MAAMlC,MAAM,CAACwC,mBAAmB,CAAC,UAAU,EAAEN,UAAU,CAAC;IACjE;EACF,CAAC;EAED,OAAOpC,OAAO;AAChB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/extractPathFromURL.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/extractPathFromURL.js new file mode 100644 index 00000000..45a430c8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/extractPathFromURL.js @@ -0,0 +1,17 @@ +import escapeStringRegexp from 'escape-string-regexp'; +export default function extractPathFromURL(prefixes, url) { + for (const prefix of prefixes) { + var _prefix$match; + const protocol = ((_prefix$match = prefix.match(/^[^:]+:/)) === null || _prefix$match === void 0 ? void 0 : _prefix$match[0]) ?? ''; + const host = prefix.replace(new RegExp(`^${escapeStringRegexp(protocol)}`), '').replace(/\/+/g, '/') // Replace multiple slash (//) with single ones + .replace(/^\//, ''); // Remove extra leading slash + + const prefixRegex = new RegExp(`^${escapeStringRegexp(protocol)}(/)*${host.split('.').map(it => it === '*' ? '[^/]+' : escapeStringRegexp(it)).join('\\.')}`); + const normalizedURL = url.replace(/\/+/g, '/'); + if (prefixRegex.test(normalizedURL)) { + return normalizedURL.replace(prefixRegex, ''); + } + } + return undefined; +} +//# sourceMappingURL=extractPathFromURL.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/extractPathFromURL.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/extractPathFromURL.js.map new file mode 100644 index 00000000..9986faf8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/extractPathFromURL.js.map @@ -0,0 +1 @@ +{"version":3,"names":["escapeStringRegexp","extractPathFromURL","prefixes","url","prefix","protocol","match","host","replace","RegExp","prefixRegex","split","map","it","join","normalizedURL","test","undefined"],"sourceRoot":"../../src","sources":["extractPathFromURL.tsx"],"mappings":"AAAA,OAAOA,kBAAkB,MAAM,sBAAsB;AAErD,eAAe,SAASC,kBAAkB,CAACC,QAAkB,EAAEC,GAAW,EAAE;EAC1E,KAAK,MAAMC,MAAM,IAAIF,QAAQ,EAAE;IAAA;IAC7B,MAAMG,QAAQ,GAAG,kBAAAD,MAAM,CAACE,KAAK,CAAC,SAAS,CAAC,kDAAvB,cAA0B,CAAC,CAAC,KAAI,EAAE;IACnD,MAAMC,IAAI,GAAGH,MAAM,CAChBI,OAAO,CAAC,IAAIC,MAAM,CAAE,IAAGT,kBAAkB,CAACK,QAAQ,CAAE,EAAC,CAAC,EAAE,EAAE,CAAC,CAC3DG,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAA,CACrBA,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;;IAEvB,MAAME,WAAW,GAAG,IAAID,MAAM,CAC3B,IAAGT,kBAAkB,CAACK,QAAQ,CAAE,OAAME,IAAI,CACxCI,KAAK,CAAC,GAAG,CAAC,CACVC,GAAG,CAAEC,EAAE,IAAMA,EAAE,KAAK,GAAG,GAAG,OAAO,GAAGb,kBAAkB,CAACa,EAAE,CAAE,CAAC,CAC5DC,IAAI,CAAC,KAAK,CAAE,EAAC,CACjB;IAED,MAAMC,aAAa,GAAGZ,GAAG,CAACK,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;IAE9C,IAAIE,WAAW,CAACM,IAAI,CAACD,aAAa,CAAC,EAAE;MACnC,OAAOA,aAAa,CAACP,OAAO,CAACE,WAAW,EAAE,EAAE,CAAC;IAC/C;EACF;EAEA,OAAOO,SAAS;AAClB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/index.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/index.js new file mode 100644 index 00000000..c596c2b9 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/index.js @@ -0,0 +1,15 @@ +export { default as Link } from './Link'; +export { default as LinkingContext } from './LinkingContext'; +export { default as NavigationContainer } from './NavigationContainer'; +export { default as ServerContainer } from './ServerContainer'; +export { default as DarkTheme } from './theming/DarkTheme'; +export { default as DefaultTheme } from './theming/DefaultTheme'; +export { default as ThemeProvider } from './theming/ThemeProvider'; +export { default as useTheme } from './theming/useTheme'; +export * from './types'; +export { default as useLinkBuilder } from './useLinkBuilder'; +export { default as useLinkProps } from './useLinkProps'; +export { default as useLinkTo } from './useLinkTo'; +export { default as useScrollToTop } from './useScrollToTop'; +export * from '@react-navigation/core'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/index.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/index.js.map new file mode 100644 index 00000000..97101ded --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["default","Link","LinkingContext","NavigationContainer","ServerContainer","DarkTheme","DefaultTheme","ThemeProvider","useTheme","useLinkBuilder","useLinkProps","useLinkTo","useScrollToTop"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,OAAO,IAAIC,IAAI,QAAQ,QAAQ;AACxC,SAASD,OAAO,IAAIE,cAAc,QAAQ,kBAAkB;AAC5D,SAASF,OAAO,IAAIG,mBAAmB,QAAQ,uBAAuB;AACtE,SAASH,OAAO,IAAII,eAAe,QAAQ,mBAAmB;AAC9D,SAASJ,OAAO,IAAIK,SAAS,QAAQ,qBAAqB;AAC1D,SAASL,OAAO,IAAIM,YAAY,QAAQ,wBAAwB;AAChE,SAASN,OAAO,IAAIO,aAAa,QAAQ,yBAAyB;AAClE,SAASP,OAAO,IAAIQ,QAAQ,QAAQ,oBAAoB;AACxD,cAAc,SAAS;AACvB,SAASR,OAAO,IAAIS,cAAc,QAAQ,kBAAkB;AAC5D,SAAST,OAAO,IAAIU,YAAY,QAAQ,gBAAgB;AACxD,SAASV,OAAO,IAAIW,SAAS,QAAQ,aAAa;AAClD,SAASX,OAAO,IAAIY,cAAc,QAAQ,kBAAkB;AAC5D,cAAc,wBAAwB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DarkTheme.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DarkTheme.js new file mode 100644 index 00000000..153f12f6 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DarkTheme.js @@ -0,0 +1,13 @@ +const DarkTheme = { + dark: true, + colors: { + primary: 'rgb(10, 132, 255)', + background: 'rgb(1, 1, 1)', + card: 'rgb(18, 18, 18)', + text: 'rgb(229, 229, 231)', + border: 'rgb(39, 39, 41)', + notification: 'rgb(255, 69, 58)' + } +}; +export default DarkTheme; +//# sourceMappingURL=DarkTheme.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DarkTheme.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DarkTheme.js.map new file mode 100644 index 00000000..8e43e563 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DarkTheme.js.map @@ -0,0 +1 @@ +{"version":3,"names":["DarkTheme","dark","colors","primary","background","card","text","border","notification"],"sourceRoot":"../../src","sources":["DarkTheme.tsx"],"mappings":"AAEA,MAAMA,SAAgB,GAAG;EACvBC,IAAI,EAAE,IAAI;EACVC,MAAM,EAAE;IACNC,OAAO,EAAE,mBAAmB;IAC5BC,UAAU,EAAE,cAAc;IAC1BC,IAAI,EAAE,iBAAiB;IACvBC,IAAI,EAAE,oBAAoB;IAC1BC,MAAM,EAAE,iBAAiB;IACzBC,YAAY,EAAE;EAChB;AACF,CAAC;AAED,eAAeR,SAAS"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DefaultTheme.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DefaultTheme.js new file mode 100644 index 00000000..00fbbe41 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DefaultTheme.js @@ -0,0 +1,13 @@ +const DefaultTheme = { + dark: false, + colors: { + primary: 'rgb(0, 122, 255)', + background: 'rgb(242, 242, 242)', + card: 'rgb(255, 255, 255)', + text: 'rgb(28, 28, 30)', + border: 'rgb(216, 216, 216)', + notification: 'rgb(255, 59, 48)' + } +}; +export default DefaultTheme; +//# sourceMappingURL=DefaultTheme.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DefaultTheme.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DefaultTheme.js.map new file mode 100644 index 00000000..2b61dc74 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/DefaultTheme.js.map @@ -0,0 +1 @@ +{"version":3,"names":["DefaultTheme","dark","colors","primary","background","card","text","border","notification"],"sourceRoot":"../../src","sources":["DefaultTheme.tsx"],"mappings":"AAEA,MAAMA,YAAmB,GAAG;EAC1BC,IAAI,EAAE,KAAK;EACXC,MAAM,EAAE;IACNC,OAAO,EAAE,kBAAkB;IAC3BC,UAAU,EAAE,oBAAoB;IAChCC,IAAI,EAAE,oBAAoB;IAC1BC,IAAI,EAAE,iBAAiB;IACvBC,MAAM,EAAE,oBAAoB;IAC5BC,YAAY,EAAE;EAChB;AACF,CAAC;AAED,eAAeR,YAAY"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeContext.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeContext.js new file mode 100644 index 00000000..072d61d7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeContext.js @@ -0,0 +1,6 @@ +import * as React from 'react'; +import DefaultTheme from './DefaultTheme'; +const ThemeContext = /*#__PURE__*/React.createContext(DefaultTheme); +ThemeContext.displayName = 'ThemeContext'; +export default ThemeContext; +//# sourceMappingURL=ThemeContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeContext.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeContext.js.map new file mode 100644 index 00000000..627c24f5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","DefaultTheme","ThemeContext","createContext","displayName"],"sourceRoot":"../../src","sources":["ThemeContext.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,OAAOC,YAAY,MAAM,gBAAgB;AAEzC,MAAMC,YAAY,gBAAGF,KAAK,CAACG,aAAa,CAAQF,YAAY,CAAC;AAE7DC,YAAY,CAACE,WAAW,GAAG,cAAc;AAEzC,eAAeF,YAAY"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeProvider.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeProvider.js new file mode 100644 index 00000000..9a06eb92 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeProvider.js @@ -0,0 +1,12 @@ +import * as React from 'react'; +import ThemeContext from './ThemeContext'; +export default function ThemeProvider(_ref) { + let { + value, + children + } = _ref; + return /*#__PURE__*/React.createElement(ThemeContext.Provider, { + value: value + }, children); +} +//# sourceMappingURL=ThemeProvider.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeProvider.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeProvider.js.map new file mode 100644 index 00000000..0eba2a75 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/ThemeProvider.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","ThemeContext","ThemeProvider","value","children"],"sourceRoot":"../../src","sources":["ThemeProvider.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,OAAOC,YAAY,MAAM,gBAAgB;AAOzC,eAAe,SAASC,aAAa,OAA6B;EAAA,IAA5B;IAAEC,KAAK;IAAEC;EAAgB,CAAC;EAC9D,oBACE,oBAAC,YAAY,CAAC,QAAQ;IAAC,KAAK,EAAED;EAAM,GAAEC,QAAQ,CAAyB;AAE3E"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/useTheme.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/useTheme.js new file mode 100644 index 00000000..59918dc3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/useTheme.js @@ -0,0 +1,7 @@ +import * as React from 'react'; +import ThemeContext from './ThemeContext'; +export default function useTheme() { + const theme = React.useContext(ThemeContext); + return theme; +} +//# sourceMappingURL=useTheme.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/useTheme.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/useTheme.js.map new file mode 100644 index 00000000..06a8009c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/theming/useTheme.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","ThemeContext","useTheme","theme","useContext"],"sourceRoot":"../../src","sources":["useTheme.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,YAAY,MAAM,gBAAgB;AAEzC,eAAe,SAASC,QAAQ,GAAG;EACjC,MAAMC,KAAK,GAAGH,KAAK,CAACI,UAAU,CAACH,YAAY,CAAC;EAE5C,OAAOE,KAAK;AACd"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/types.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/types.js new file mode 100644 index 00000000..718fd38a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/types.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/types.js.map new file mode 100644 index 00000000..e7ae1280 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/types.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":""} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useBackButton.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useBackButton.js new file mode 100644 index 00000000..e016a69a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useBackButton.js @@ -0,0 +1,19 @@ +import * as React from 'react'; +import { BackHandler } from 'react-native'; +export default function useBackButton(ref) { + React.useEffect(() => { + const subscription = BackHandler.addEventListener('hardwareBackPress', () => { + const navigation = ref.current; + if (navigation == null) { + return false; + } + if (navigation.canGoBack()) { + navigation.goBack(); + return true; + } + return false; + }); + return () => subscription.remove(); + }, [ref]); +} +//# sourceMappingURL=useBackButton.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useBackButton.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useBackButton.js.map new file mode 100644 index 00000000..1aad4fcc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useBackButton.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","BackHandler","useBackButton","ref","useEffect","subscription","addEventListener","navigation","current","canGoBack","goBack","remove"],"sourceRoot":"../../src","sources":["useBackButton.tsx"],"mappings":"AAIA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,WAAW,QAAQ,cAAc;AAE1C,eAAe,SAASC,aAAa,CACnCC,GAA2D,EAC3D;EACAH,KAAK,CAACI,SAAS,CAAC,MAAM;IACpB,MAAMC,YAAY,GAAGJ,WAAW,CAACK,gBAAgB,CAC/C,mBAAmB,EACnB,MAAM;MACJ,MAAMC,UAAU,GAAGJ,GAAG,CAACK,OAAO;MAE9B,IAAID,UAAU,IAAI,IAAI,EAAE;QACtB,OAAO,KAAK;MACd;MAEA,IAAIA,UAAU,CAACE,SAAS,EAAE,EAAE;QAC1BF,UAAU,CAACG,MAAM,EAAE;QAEnB,OAAO,IAAI;MACb;MAEA,OAAO,KAAK;IACd,CAAC,CACF;IAED,OAAO,MAAML,YAAY,CAACM,MAAM,EAAE;EACpC,CAAC,EAAE,CAACR,GAAG,CAAC,CAAC;AACX"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.js new file mode 100644 index 00000000..345c57d9 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.js @@ -0,0 +1,25 @@ +import * as React from 'react'; +/** + * Set the document title for the active screen + */ +export default function useDocumentTitle(ref) { + let { + enabled = true, + formatter = (options, route) => (options === null || options === void 0 ? void 0 : options.title) ?? (route === null || route === void 0 ? void 0 : route.name) + } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + React.useEffect(() => { + if (!enabled) { + return; + } + const navigation = ref.current; + if (navigation) { + const title = formatter(navigation.getCurrentOptions(), navigation.getCurrentRoute()); + document.title = title; + } + return navigation === null || navigation === void 0 ? void 0 : navigation.addListener('options', e => { + const title = formatter(e.data.options, navigation === null || navigation === void 0 ? void 0 : navigation.getCurrentRoute()); + document.title = title; + }); + }); +} +//# sourceMappingURL=useDocumentTitle.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.js.map new file mode 100644 index 00000000..aea7569f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","useDocumentTitle","ref","enabled","formatter","options","route","title","name","useEffect","navigation","current","getCurrentOptions","getCurrentRoute","document","addListener","e","data"],"sourceRoot":"../../src","sources":["useDocumentTitle.tsx"],"mappings":"AAIA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAI9B;AACA;AACA;AACA,eAAe,SAASC,gBAAgB,CACtCC,GAA2D,EAK3D;EAAA,IAJA;IACEC,OAAO,GAAG,IAAI;IACdC,SAAS,GAAG,CAACC,OAAO,EAAEC,KAAK,KAAK,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,KAAK,MAAID,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEE,IAAI;EACzC,CAAC,uEAAG,CAAC,CAAC;EAE5BR,KAAK,CAACS,SAAS,CAAC,MAAM;IACpB,IAAI,CAACN,OAAO,EAAE;MACZ;IACF;IAEA,MAAMO,UAAU,GAAGR,GAAG,CAACS,OAAO;IAE9B,IAAID,UAAU,EAAE;MACd,MAAMH,KAAK,GAAGH,SAAS,CACrBM,UAAU,CAACE,iBAAiB,EAAE,EAC9BF,UAAU,CAACG,eAAe,EAAE,CAC7B;MAEDC,QAAQ,CAACP,KAAK,GAAGA,KAAK;IACxB;IAEA,OAAOG,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEK,WAAW,CAAC,SAAS,EAAGC,CAAC,IAAK;MAC/C,MAAMT,KAAK,GAAGH,SAAS,CAACY,CAAC,CAACC,IAAI,CAACZ,OAAO,EAAEK,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEG,eAAe,EAAE,CAAC;MAEtEC,QAAQ,CAACP,KAAK,GAAGA,KAAK;IACxB,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.native.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.native.js new file mode 100644 index 00000000..3b8bbee2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.native.js @@ -0,0 +1,4 @@ +export default function useDocumentTitle() { + // Noop for React Native +} +//# sourceMappingURL=useDocumentTitle.native.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.native.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.native.js.map new file mode 100644 index 00000000..2c7c7850 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useDocumentTitle.native.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useDocumentTitle"],"sourceRoot":"../../src","sources":["useDocumentTitle.native.tsx"],"mappings":"AAAA,eAAe,SAASA,gBAAgB,GAAG;EACzC;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkBuilder.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkBuilder.js new file mode 100644 index 00000000..9c3dc1ae --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkBuilder.js @@ -0,0 +1,54 @@ +import { getPathFromState, NavigationHelpersContext } from '@react-navigation/core'; +import * as React from 'react'; +import LinkingContext from './LinkingContext'; +const getRootStateForNavigate = (navigation, state) => { + const parent = navigation.getParent(); + if (parent) { + const parentState = parent.getState(); + return getRootStateForNavigate(parent, { + index: 0, + routes: [{ + ...parentState.routes[parentState.index], + state: state + }] + }); + } + return state; +}; + +/** + * Build destination link for a navigate action. + * Useful for showing anchor tags on the web for buttons that perform navigation. + */ +export default function useLinkBuilder() { + const navigation = React.useContext(NavigationHelpersContext); + const linking = React.useContext(LinkingContext); + const buildLink = React.useCallback((name, params) => { + const { + options + } = linking; + if ((options === null || options === void 0 ? void 0 : options.enabled) === false) { + return undefined; + } + const state = navigation ? getRootStateForNavigate(navigation, { + index: 0, + routes: [{ + name, + params + }] + }) : + // If we couldn't find a navigation object in context, we're at root + // So we'll construct a basic state object to use + { + index: 0, + routes: [{ + name, + params + }] + }; + const path = options !== null && options !== void 0 && options.getPathFromState ? options.getPathFromState(state, options === null || options === void 0 ? void 0 : options.config) : getPathFromState(state, options === null || options === void 0 ? void 0 : options.config); + return path; + }, [linking, navigation]); + return buildLink; +} +//# sourceMappingURL=useLinkBuilder.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkBuilder.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkBuilder.js.map new file mode 100644 index 00000000..2b9287af --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkBuilder.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getPathFromState","NavigationHelpersContext","React","LinkingContext","getRootStateForNavigate","navigation","state","parent","getParent","parentState","getState","index","routes","useLinkBuilder","useContext","linking","buildLink","useCallback","name","params","options","enabled","undefined","path","config"],"sourceRoot":"../../src","sources":["useLinkBuilder.tsx"],"mappings":"AAAA,SACEA,gBAAgB,EAEhBC,wBAAwB,QAGnB,wBAAwB;AAC/B,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,OAAOC,cAAc,MAAM,kBAAkB;AAW7C,MAAMC,uBAAuB,GAAG,CAC9BC,UAA4B,EAC5BC,KAAmB,KACF;EACjB,MAAMC,MAAM,GAAGF,UAAU,CAACG,SAAS,EAAE;EAErC,IAAID,MAAM,EAAE;IACV,MAAME,WAAW,GAAGF,MAAM,CAACG,QAAQ,EAAE;IAErC,OAAON,uBAAuB,CAACG,MAAM,EAAE;MACrCI,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE,CACN;QAC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node_modules/@react-navigation/native/lib/module/useLinkProps.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkProps.js new file mode 100644 index 00000000..717cf409 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkProps.js @@ -0,0 +1,89 @@ +import { getPathFromState, NavigationContainerRefContext, NavigationHelpersContext } from '@react-navigation/core'; +import * as React from 'react'; +import { Platform } from 'react-native'; +import LinkingContext from './LinkingContext'; +import useLinkTo from './useLinkTo'; +const getStateFromParams = params => { + if (params !== null && params !== void 0 && params.state) { + return params.state; + } + if (params !== null && params !== void 0 && params.screen) { + return { + routes: [{ + name: params.screen, + params: params.params, + // @ts-expect-error + state: params.screen ? getStateFromParams(params.params) : undefined + }] + }; + } + return undefined; +}; + +/** + * Hook to get props for an anchor tag so it can work with in page navigation. + * + * @param props.to Absolute path to screen (e.g. `/feeds/hot`). + * @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config. + */ +export default function useLinkProps(_ref) { + let { + to, + action + } = _ref; + const root = React.useContext(NavigationContainerRefContext); + const navigation = React.useContext(NavigationHelpersContext); + const { + options + } = React.useContext(LinkingContext); + const linkTo = useLinkTo(); + const onPress = e => { + var _e$currentTarget; + let shouldHandle = false; + if (Platform.OS !== 'web' || !e) { + shouldHandle = e ? !e.defaultPrevented : true; + } else if (!e.defaultPrevented && + // onPress prevented default + // @ts-expect-error: these properties exist on web, but not in React Native + !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && ( + // ignore clicks with modifier keys + // @ts-expect-error: these properties exist on web, but not in React Native + e.button == null || e.button === 0) && + // ignore everything but left clicks + // @ts-expect-error: these properties exist on web, but not in React Native + [undefined, null, '', 'self'].includes((_e$currentTarget = e.currentTarget) === null || _e$currentTarget === void 0 ? void 0 : _e$currentTarget.target) // let browser handle "target=_blank" etc. + ) { + e.preventDefault(); + shouldHandle = true; + } + if (shouldHandle) { + if (action) { + if (navigation) { + navigation.dispatch(action); + } else if (root) { + root.dispatch(action); + } else { + throw new Error("Couldn't find a navigation object. Is your component inside NavigationContainer?"); + } + } else { + linkTo(to); + } + } + }; + const getPathFromStateHelper = (options === null || options === void 0 ? void 0 : options.getPathFromState) ?? getPathFromState; + const href = typeof to === 'string' ? to : getPathFromStateHelper({ + routes: [{ + name: to.screen, + // @ts-expect-error + params: to.params, + // @ts-expect-error + state: getStateFromParams(to.params) + }] + }, options === null || options === void 0 ? void 0 : options.config); + return { + href, + accessibilityRole: 'link', + onPress + }; +} +//# sourceMappingURL=useLinkProps.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkProps.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkProps.js.map new file mode 100644 index 00000000..4394d694 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkProps.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getPathFromState","NavigationContainerRefContext","NavigationHelpersContext","React","Platform","LinkingContext","useLinkTo","getStateFromParams","params","state","screen","routes","name","undefined","useLinkProps","to","action","root","useContext","navigation","options","linkTo","onPress","e","shouldHandle","OS","defaultPrevented","metaKey","altKey","ctrlKey","shiftKey","button","includes","currentTarget","target","preventDefault","dispatch","Error","getPathFromStateHelper","href","config","accessibilityRole"],"sourceRoot":"../../src","sources":["useLinkProps.tsx"],"mappings":"AAAA,SACEA,gBAAgB,EAEhBC,6BAA6B,EAC7BC,wBAAwB,QAGnB,wBAAwB;AAE/B,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAAgCC,QAAQ,QAAQ,cAAc;AAE9D,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,SAAS,MAAc,aAAa;AAO3C,MAAMC,kBAAkB,GACtBC,MAAyE,IACT;EAChE,IAAIA,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEC,KAAK,EAAE;IACjB,OAAOD,MAAM,CAACC,KAAK;EACrB;EAEA,IAAID,MAAM,aAANA,MAAM,eAANA,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ACT,CAAC,CAACU,aAAa,qDAAf,iBAAiBC,MAAM,CAAC,CAAC;IAAA,EAChE;MACAX,CAAC,CAACY,cAAc,EAAE;MAClBX,YAAY,GAAG,IAAI;IACrB;IAEA,IAAIA,YAAY,EAAE;MAChB,IAAIR,MAAM,EAAE;QACV,IAAIG,UAAU,EAAE;UACdA,UAAU,CAACiB,QAAQ,CAACpB,MAAM,CAAC;QAC7B,CAAC,MAAM,IAAIC,IAAI,EAAE;UACfA,IAAI,CAACmB,QAAQ,CAACpB,MAAM,CAAC;QACvB,CAAC,MAAM;UACL,MAAM,IAAIqB,KAAK,CACb,kFAAkF,CACnF;QACH;MACF,CAAC,MAAM;QACLhB,MAAM,CAACN,EAAE,CAAC;MACZ;IACF;EACF,CAAC;EAED,MAAMuB,sBAAsB,GAAG,CAAAlB,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEpB,gBAAgB,KAAIA,gBAAgB;EAE5E,MAAMuC,IAAI,GACR,OAAOxB,EAAE,KAAK,QAAQ,GAClBA,EAAE,GACFuB,sBAAsB,CACpB;IACE3B,MAAM,EAAE,CACN;MACEC,IAAI,EAAEG,EAAE,CAACL,MAAM;MACf;MACAF,MAAM,EAAEO,EAAE,CAACP,MAAM;MACjB;MACAC,KAAK,EAAEF,kBAAkB,CAACQ,EAAE,CAACP,MAAM;IACrC,CAAC;EAEL,CAAC,EACDY,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEoB,MAAM,CAChB;EAEP,OAAO;IACLD,IAAI;IACJE,iBAAiB,EAAE,MAAe;IAClCnB;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkTo.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkTo.js new file mode 100644 index 00000000..75624ed4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkTo.js @@ -0,0 +1,36 @@ +import { getActionFromState, getStateFromPath, NavigationContainerRefContext } from '@react-navigation/core'; +import * as React from 'react'; +import LinkingContext from './LinkingContext'; +export default function useLinkTo() { + const navigation = React.useContext(NavigationContainerRefContext); + const linking = React.useContext(LinkingContext); + const linkTo = React.useCallback(to => { + if (navigation === undefined) { + throw new Error("Couldn't find a navigation object. Is your component inside NavigationContainer?"); + } + if (typeof to !== 'string') { + // @ts-expect-error: This is fine + navigation.navigate(to.screen, to.params); + return; + } + if (!to.startsWith('/')) { + throw new Error(`The path must start with '/' (${to}).`); + } + const { + options + } = linking; + const state = options !== null && options !== void 0 && options.getStateFromPath ? options.getStateFromPath(to, options.config) : getStateFromPath(to, options === null || options === void 0 ? void 0 : options.config); + if (state) { + const action = getActionFromState(state, options === null || options === void 0 ? void 0 : options.config); + if (action !== undefined) { + navigation.dispatch(action); + } else { + navigation.reset(state); + } + } else { + throw new Error('Failed to parse the path to a navigation state.'); + } + }, [linking, navigation]); + return linkTo; +} +//# sourceMappingURL=useLinkTo.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkTo.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkTo.js.map new file mode 100644 index 00000000..64dd5a54 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinkTo.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getActionFromState","getStateFromPath","NavigationContainerRefContext","React","LinkingContext","useLinkTo","navigation","useContext","linking","linkTo","useCallback","to","undefined","Error","navigate","screen","params","startsWith","options","state","config","action","dispatch","reset"],"sourceRoot":"../../src","sources":["useLinkTo.tsx"],"mappings":"AAAA,SACEA,kBAAkB,EAClBC,gBAAgB,EAChBC,6BAA6B,QACxB,wBAAwB;AAC/B,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,OAAOC,cAAc,MAAM,kBAAkB;AAiB7C,eAAe,SAASC,SAAS,GAE7B;EACF,MAAMC,UAAU,GAAGH,KAAK,CAACI,UAAU,CAACL,6BAA6B,CAAC;EAClE,MAAM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/@react-navigation/native/lib/module/useLinking.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinking.js new file mode 100644 index 00000000..5bf2a88f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinking.js @@ -0,0 +1,313 @@ +import { findFocusedRoute, getActionFromState as getActionFromStateDefault, getPathFromState as getPathFromStateDefault, getStateFromPath as getStateFromPathDefault } from '@react-navigation/core'; +import isEqual from 'fast-deep-equal'; +import * as React from 'react'; +import createMemoryHistory from './createMemoryHistory'; +import ServerContext from './ServerContext'; +/** + * Find the matching navigation state that changed between 2 navigation states + * e.g.: a -> b -> c -> d and a -> b -> c -> e -> f, if history in b changed, b is the matching state + */ +const findMatchingState = (a, b) => { + if (a === undefined || b === undefined || a.key !== b.key) { + return [undefined, undefined]; + } + + // Tab and drawer will have `history` property, but stack will have history in `routes` + const aHistoryLength = a.history ? a.history.length : a.routes.length; + const bHistoryLength = b.history ? b.history.length : b.routes.length; + const aRoute = a.routes[a.index]; + const bRoute = b.routes[b.index]; + const aChildState = aRoute.state; + const bChildState = bRoute.state; + + // Stop here if this is the state object that changed: + // - history length is different + // - focused routes are different + // - one of them doesn't have child state + // - child state keys are different + if (aHistoryLength !== bHistoryLength || aRoute.key !== bRoute.key || aChildState === undefined || bChildState === undefined || aChildState.key !== bChildState.key) { + return [a, b]; + } + return findMatchingState(aChildState, bChildState); +}; + +/** + * Run async function in series as it's called. + */ +const series = cb => { + // Whether we're currently handling a callback + let handling = false; + let queue = []; + const callback = async () => { + try { + if (handling) { + // If we're currently handling a previous event, wait before handling this one + // Add the callback to the beginning of the queue + queue.unshift(callback); + return; + } + handling = true; + await cb(); + } finally { + handling = false; + if (queue.length) { + // If we have queued items, handle the last one + const last = queue.pop(); + last === null || last === void 0 ? void 0 : last(); + } + } + }; + return callback; +}; +let linkingHandlers = []; +export default function useLinking(ref, _ref) { + let { + independent, + enabled = true, + config, + getStateFromPath = getStateFromPathDefault, + getPathFromState = getPathFromStateDefault, + getActionFromState = getActionFromStateDefault + } = _ref; + React.useEffect(() => { + if (process.env.NODE_ENV === 'production') { + return undefined; + } + if (independent) { + return undefined; + } + if (enabled !== false && linkingHandlers.length) { + console.error(['Looks like you have configured linking in multiple places. This is likely an error since deep links should only be handled in one place to avoid conflicts. Make sure that:', "- You don't have multiple NavigationContainers in the app each with 'linking' enabled", '- Only a single instance of the root component is rendered'].join('\n').trim()); + } + const handler = Symbol(); + if (enabled !== false) { + linkingHandlers.push(handler); + } + return () => { + const index = linkingHandlers.indexOf(handler); + if (index > -1) { + linkingHandlers.splice(index, 1); + } + }; + }, [enabled, independent]); + const [history] = React.useState(createMemoryHistory); + + // We store these options in ref to avoid re-creating getInitialState and re-subscribing listeners + // This lets user avoid wrapping the items in `React.useCallback` or `React.useMemo` + // Not re-creating `getInitialState` is important coz it makes it easier for the user to use in an effect + const enabledRef = React.useRef(enabled); + const configRef = React.useRef(config); + const getStateFromPathRef = React.useRef(getStateFromPath); + const getPathFromStateRef = React.useRef(getPathFromState); + const getActionFromStateRef = React.useRef(getActionFromState); + React.useEffect(() => { + enabledRef.current = enabled; + configRef.current = config; + getStateFromPathRef.current = getStateFromPath; + getPathFromStateRef.current = getPathFromState; + getActionFromStateRef.current = getActionFromState; + }); + const server = React.useContext(ServerContext); + const getInitialState = React.useCallback(() => { + let value; + if (enabledRef.current) { + const location = (server === null || server === void 0 ? void 0 : server.location) ?? (typeof window !== 'undefined' ? window.location : undefined); + const path = location ? location.pathname + location.search : undefined; + if (path) { + value = getStateFromPathRef.current(path, configRef.current); + } + } + const thenable = { + then(onfulfilled) { + return Promise.resolve(onfulfilled ? onfulfilled(value) : value); + }, + catch() { + return thenable; + } + }; + return thenable; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + const previousIndexRef = React.useRef(undefined); + const previousStateRef = React.useRef(undefined); + const pendingPopStatePathRef = React.useRef(undefined); + React.useEffect(() => { + previousIndexRef.current = history.index; + return history.listen(() => { + const navigation = ref.current; + if (!navigation || !enabled) { + return; + } + const path = location.pathname + location.search; + const index = history.index; + const previousIndex = previousIndexRef.current ?? 0; + previousIndexRef.current = index; + pendingPopStatePathRef.current = path; + + // When browser back/forward is clicked, we first need to check if state object for this index exists + // If it does we'll reset to that state object + // Otherwise, we'll handle it like a regular deep link + const record = history.get(index); + if ((record === null || record === void 0 ? void 0 : record.path) === path && record !== null && record !== void 0 && record.state) { + navigation.resetRoot(record.state); + return; + } + const state = getStateFromPathRef.current(path, configRef.current); + + // We should only dispatch an action when going forward + // Otherwise the action will likely add items to history, which would mess things up + if (state) { + // Make sure that the routes in the state exist in the root navigator + // Otherwise there's an error in the linking configuration + const rootState = navigation.getRootState(); + if (state.routes.some(r => !(rootState !== null && rootState !== void 0 && rootState.routeNames.includes(r.name)))) { + console.warn("The navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration."); + return; + } + if (index > previousIndex) { + const action = getActionFromStateRef.current(state, configRef.current); + if (action !== undefined) { + try { + navigation.dispatch(action); + } catch (e) { + // Ignore any errors from deep linking. + // This could happen in case of malformed links, navigation object not being initialized etc. + console.warn(`An error occurred when trying to handle the link '${path}': ${typeof e === 'object' && e != null && 'message' in e ? + // @ts-expect-error: we're already checking for this + e.message : e}`); + } + } else { + navigation.resetRoot(state); + } + } else { + navigation.resetRoot(state); + } + } else { + // if current path didn't return any state, we should revert to initial state + navigation.resetRoot(state); + } + }); + }, [enabled, history, ref]); + React.useEffect(() => { + var _ref$current; + if (!enabled) { + return; + } + const getPathForRoute = (route, state) => { + // If the `route` object contains a `path`, use that path as long as `route.name` and `params` still match + // This makes sure that we preserve the original URL for wildcard routes + if (route !== null && route !== void 0 && route.path) { + const stateForPath = getStateFromPathRef.current(route.path, configRef.current); + if (stateForPath) { + const focusedRoute = findFocusedRoute(stateForPath); + if (focusedRoute && focusedRoute.name === route.name && isEqual(focusedRoute.params, route.params)) { + return route.path; + } + } + } + return getPathFromStateRef.current(state, configRef.current); + }; + if (ref.current) { + // We need to record the current metadata on the first render if they aren't set + // This will allow the initial state to be in the history entry + const state = ref.current.getRootState(); + if (state) { + const route = findFocusedRoute(state); + const path = getPathForRoute(route, state); + if (previousStateRef.current === undefined) { + previousStateRef.current = state; + } + history.replace({ + path, + state + }); + } + } + const onStateChange = async () => { + const navigation = ref.current; + if (!navigation || !enabled) { + return; + } + const previousState = previousStateRef.current; + const state = navigation.getRootState(); + + // root state may not available, for example when root navigators switch inside the container + if (!state) { + return; + } + const pendingPath = pendingPopStatePathRef.current; + const route = findFocusedRoute(state); + const path = getPathForRoute(route, state); + previousStateRef.current = state; + pendingPopStatePathRef.current = undefined; + + // To detect the kind of state change, we need to: + // - Find the common focused navigation state in previous and current state + // - If only the route keys changed, compare history/routes.length to check if we go back/forward/replace + // - If no common focused navigation state found, it's a replace + const [previousFocusedState, focusedState] = findMatchingState(previousState, state); + if (previousFocusedState && focusedState && + // We should only handle push/pop if path changed from what was in last `popstate` + // Otherwise it's likely a change triggered by `popstate` + path !== pendingPath) { + const historyDelta = (focusedState.history ? focusedState.history.length : focusedState.routes.length) - (previousFocusedState.history ? previousFocusedState.history.length : previousFocusedState.routes.length); + if (historyDelta > 0) { + // If history length is increased, we should pushState + // Note that path might not actually change here, for example, drawer open should pushState + history.push({ + path, + state + }); + } else if (historyDelta < 0) { + // If history length is decreased, i.e. entries were removed, we want to go back + + const nextIndex = history.backIndex({ + path + }); + const currentIndex = history.index; + try { + if (nextIndex !== -1 && nextIndex < currentIndex) { + // An existing entry for this path exists and it's less than current index, go back to that + await history.go(nextIndex - currentIndex); + } else { + // We couldn't find an existing entry to go back to, so we'll go back by the delta + // This won't be correct if multiple routes were pushed in one go before + // Usually this shouldn't happen and this is a fallback for that + await history.go(historyDelta); + } + + // Store the updated state as well as fix the path if incorrect + history.replace({ + path, + state + }); + } catch (e) { + // The navigation was interrupted + } + } else { + // If history length is unchanged, we want to replaceState + history.replace({ + path, + state + }); + } + } else { + // If no common navigation state was found, assume it's a replace + // This would happen if the user did a reset/conditionally changed navigators + history.replace({ + path, + state + }); + } + }; + + // We debounce onStateChange coz we don't want multiple state changes to be handled at one time + // This could happen since `history.go(n)` is asynchronous + // If `pushState` or `replaceState` were called before `history.go(n)` completes, it'll mess stuff up + return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.addListener('state', series(onStateChange)); + }, [enabled, history, ref]); + return { + getInitialState + }; +} +//# sourceMappingURL=useLinking.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinking.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinking.js.map new file mode 100644 index 00000000..e6cd4ead --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinking.js.map @@ -0,0 +1 @@ +{"version":3,"names":["findFocusedRoute","getActionFromState","getActionFromStateDefault","getPathFromState","getPathFromStateDefault","getStateFromPath","getStateFromPathDefault","isEqual","React","createMemoryHistory","ServerContext","findMatchingState","a","b","undefined","key","aHistoryLength","history","length","routes","bHistoryLength","aRoute","index","bRoute","aChildState","state","bChildState","series","cb","handling","queue","callback","unshift","last","pop","linkingHandlers","useLinking","ref","independent","enabled","config","useEffect","process","env","NODE_ENV","console","error","join","trim","handler","Symbol","push","indexOf","splice","useState","enabledRef","useRef","configRef","getStateFromPathRef","getPathFromStateRef","getActionFromStateRef","current","server","useContext","getInitialState","useCallback","value","location","window","path","pathname","search","thenable","then","onfulfilled","Promise","resolve","catch","previousIndexRef","previousStateRef","pendingPopStatePathRef","listen","navigation","previousIndex","record","get","resetRoot","rootState","getRootState","some","r","routeNames","includes","name","warn","action","dispatch","e","message","getPathForRoute","route","stateForPath","focusedRoute","params","replace","onStateChange","previousState","pendingPath","previousFocusedState","focusedState","historyDelta","nextIndex","backIndex","currentIndex","go","addListener"],"sourceRoot":"../../src","sources":["useLinking.tsx"],"mappings":"AAAA,SACEA,gBAAgB,EAChBC,kBAAkB,I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,CAAC;EACjE,CAAC,EAAE,CAAClE,OAAO,EAAEtB,OAAO,EAAEoB,GAAG,CAAC,CAAC;EAE3B,OAAO;IACL2B;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinking.native.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinking.native.js new file mode 100644 index 00000000..2ff27717 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinking.native.js @@ -0,0 +1,148 @@ +import { getActionFromState as getActionFromStateDefault, getStateFromPath as getStateFromPathDefault } from '@react-navigation/core'; +import * as React from 'react'; +import { Linking, Platform } from 'react-native'; +import extractPathFromURL from './extractPathFromURL'; +let linkingHandlers = []; +export default function useLinking(ref, _ref) { + let { + independent, + enabled = true, + prefixes, + filter, + config, + getInitialURL = () => Promise.race([Linking.getInitialURL(), new Promise(resolve => + // Timeout in 150ms if `getInitialState` doesn't resolve + // Workaround for https://github.com/facebook/react-native/issues/25675 + setTimeout(resolve, 150))]), + subscribe = listener => { + var _Linking$removeEventL; + const callback = _ref2 => { + let { + url + } = _ref2; + return listener(url); + }; + const subscription = Linking.addEventListener('url', callback); + + // Storing this in a local variable stops Jest from complaining about import after teardown + const removeEventListener = (_Linking$removeEventL = Linking.removeEventListener) === null || _Linking$removeEventL === void 0 ? void 0 : _Linking$removeEventL.bind(Linking); + return () => { + // https://github.com/facebook/react-native/commit/6d1aca806cee86ad76de771ed3a1cc62982ebcd7 + if (subscription !== null && subscription !== void 0 && subscription.remove) { + subscription.remove(); + } else { + removeEventListener === null || removeEventListener === void 0 ? void 0 : removeEventListener('url', callback); + } + }; + }, + getStateFromPath = getStateFromPathDefault, + getActionFromState = getActionFromStateDefault + } = _ref; + React.useEffect(() => { + if (process.env.NODE_ENV === 'production') { + return undefined; + } + if (independent) { + return undefined; + } + if (enabled !== false && linkingHandlers.length) { + console.error(['Looks like you have configured linking in multiple places. This is likely an error since deep links should only be handled in one place to avoid conflicts. Make sure that:', "- You don't have multiple NavigationContainers in the app each with 'linking' enabled", '- Only a single instance of the root component is rendered', Platform.OS === 'android' ? "- You have set 'android:launchMode=singleTask' in the '' section of the 'AndroidManifest.xml' file to avoid launching multiple instances" : ''].join('\n').trim()); + } + const handler = Symbol(); + if (enabled !== false) { + linkingHandlers.push(handler); + } + return () => { + const index = linkingHandlers.indexOf(handler); + if (index > -1) { + linkingHandlers.splice(index, 1); + } + }; + }, [enabled, independent]); + + // We store these options in ref to avoid re-creating getInitialState and re-subscribing listeners + // This lets user avoid wrapping the items in `React.useCallback` or `React.useMemo` + // Not re-creating `getInitialState` is important coz it makes it easier for the user to use in an effect + const enabledRef = React.useRef(enabled); + const prefixesRef = React.useRef(prefixes); + const filterRef = React.useRef(filter); + const configRef = React.useRef(config); + const getInitialURLRef = React.useRef(getInitialURL); + const getStateFromPathRef = React.useRef(getStateFromPath); + const getActionFromStateRef = React.useRef(getActionFromState); + React.useEffect(() => { + enabledRef.current = enabled; + prefixesRef.current = prefixes; + filterRef.current = filter; + configRef.current = config; + getInitialURLRef.current = getInitialURL; + getStateFromPathRef.current = getStateFromPath; + getActionFromStateRef.current = getActionFromState; + }); + const getStateFromURL = React.useCallback(url => { + if (!url || filterRef.current && !filterRef.current(url)) { + return undefined; + } + const path = extractPathFromURL(prefixesRef.current, url); + return path !== undefined ? getStateFromPathRef.current(path, configRef.current) : undefined; + }, []); + const getInitialState = React.useCallback(() => { + let state; + if (enabledRef.current) { + const url = getInitialURLRef.current(); + if (url != null && typeof url !== 'string') { + return url.then(url => { + const state = getStateFromURL(url); + return state; + }); + } + state = getStateFromURL(url); + } + const thenable = { + then(onfulfilled) { + return Promise.resolve(onfulfilled ? onfulfilled(state) : state); + }, + catch() { + return thenable; + } + }; + return thenable; + }, [getStateFromURL]); + React.useEffect(() => { + const listener = url => { + if (!enabled) { + return; + } + const navigation = ref.current; + const state = navigation ? getStateFromURL(url) : undefined; + if (navigation && state) { + // Make sure that the routes in the state exist in the root navigator + // Otherwise there's an error in the linking configuration + const rootState = navigation.getRootState(); + if (state.routes.some(r => !(rootState !== null && rootState !== void 0 && rootState.routeNames.includes(r.name)))) { + console.warn("The navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration."); + return; + } + const action = getActionFromStateRef.current(state, configRef.current); + if (action !== undefined) { + try { + navigation.dispatch(action); + } catch (e) { + // Ignore any errors from deep linking. + // This could happen in case of malformed links, navigation object not being initialized etc. + console.warn(`An error occurred when trying to handle the link '${url}': ${typeof e === 'object' && e != null && 'message' in e ? + // @ts-expect-error: we're already checking for this + e.message : e}`); + } + } else { + navigation.resetRoot(state); + } + } + }; + return subscribe(listener); + }, [enabled, getStateFromURL, ref, subscribe]); + return { + getInitialState + }; +} +//# sourceMappingURL=useLinking.native.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinking.native.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinking.native.js.map new file mode 100644 index 00000000..41512e60 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useLinking.native.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getActionFromState","getActionFromStateDefault","getStateFromPath","getStateFromPathDefault","React","Linking","Platform","extractPathFromURL","linkingHandlers","useLinking","ref","independent","enabled","prefixes","filter","config","getInitialURL","Promise","race","resolve","setTimeout","subscribe","listener","callback","url","subscription","addEventListener","removeEventListener","bind","remove","useEffect","process","env","NODE_ENV","undefined","length","console","error","OS","join","trim","handler","Symbol","push","index","indexOf","splice","enabledRef","useRef","prefixesRef","filterRef","configRef","getInitialURLRef","getStateFromPathRef","getActionFromStateRef","current","getStateFromURL","useCallback","path","getInitialState","state","then","thenable","onfulfilled","catch","navigation","rootState","getRootState","routes","some","r","routeNames","includes","name","warn","action","dispatch","e","message","resetRoot"],"sourceRoot":"../../src","sources":["useLinking.native.tsx"],"mappings":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IAAI,CACT,qDAAoDlD,GAAI,MACvD,OAAOqD,CAAC,KAAK,QAAQ,IAAIA,CAAC,IAAI,IAAI,IAAI,SAAS,IAAIA,CAAC;YAChD;YACAA,CAAC,CAACC,OAAO,GACTD,CACL,EAAC,CACH;UACH;QACF,CAAC,MAAM;UACLZ,UAAU,CAACc,SAAS,CAACnB,KAAK,CAAC;QAC7B;MACF;IACF,CAAC;IAED,OAAOvC,SAAS,CAACC,QAAQ,CAAC;EAC5B,CAAC,EAAE,CAACV,OAAO,EAAE4C,eAAe,EAAE9C,GAAG,EAAEW,SAAS,CAAC,CAAC;EAE9C,OAAO;IACLsC;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useScrollToTop.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useScrollToTop.js new file mode 100644 index 00000000..54e7871a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useScrollToTop.js @@ -0,0 +1,87 @@ +import { useNavigation, useRoute } from '@react-navigation/core'; +import * as React from 'react'; +function getScrollableNode(ref) { + if (ref.current == null) { + return null; + } + if ('scrollToTop' in ref.current || 'scrollTo' in ref.current || 'scrollToOffset' in ref.current || 'scrollResponderScrollTo' in ref.current) { + // This is already a scrollable node. + return ref.current; + } else if ('getScrollResponder' in ref.current) { + // If the view is a wrapper like FlatList, SectionList etc. + // We need to use `getScrollResponder` to get access to the scroll responder + return ref.current.getScrollResponder(); + } else if ('getNode' in ref.current) { + // When a `ScrollView` is wraped in `Animated.createAnimatedComponent` + // we need to use `getNode` to get the ref to the actual scrollview. + // Note that `getNode` is deprecated in newer versions of react-native + // this is why we check if we already have a scrollable node above. + return ref.current.getNode(); + } else { + return ref.current; + } +} +export default function useScrollToTop(ref) { + const navigation = useNavigation(); + const route = useRoute(); + React.useEffect(() => { + let tabNavigations = []; + let currentNavigation = navigation; + + // If the screen is nested inside multiple tab navigators, we should scroll to top for any of them + // So we need to find all the parent tab navigators and add the listeners there + while (currentNavigation) { + if (currentNavigation.getState().type === 'tab') { + tabNavigations.push(currentNavigation); + } + currentNavigation = currentNavigation.getParent(); + } + if (tabNavigations.length === 0) { + return; + } + const unsubscribers = tabNavigations.map(tab => { + return tab.addListener( + // We don't wanna import tab types here to avoid extra deps + // in addition, there are multiple tab implementations + // @ts-expect-error + 'tabPress', e => { + // We should scroll to top only when the screen is focused + const isFocused = navigation.isFocused(); + + // In a nested stack navigator, tab press resets the stack to first screen + // So we should scroll to top only when we are on first screen + const isFirst = tabNavigations.includes(navigation) || navigation.getState().routes[0].key === route.key; + + // Run the operation in the next frame so we're sure all listeners have been run + // This is necessary to know if preventDefault() has been called + requestAnimationFrame(() => { + const scrollable = getScrollableNode(ref); + if (isFocused && isFirst && scrollable && !e.defaultPrevented) { + if ('scrollToTop' in scrollable) { + scrollable.scrollToTop(); + } else if ('scrollTo' in scrollable) { + scrollable.scrollTo({ + y: 0, + animated: true + }); + } else if ('scrollToOffset' in scrollable) { + scrollable.scrollToOffset({ + offset: 0, + animated: true + }); + } else if ('scrollResponderScrollTo' in scrollable) { + scrollable.scrollResponderScrollTo({ + y: 0, + animated: true + }); + } + } + }); + }); + }); + return () => { + unsubscribers.forEach(unsubscribe => unsubscribe()); + }; + }, [navigation, ref, route.key]); +} +//# sourceMappingURL=useScrollToTop.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useScrollToTop.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useScrollToTop.js.map new file mode 100644 index 00000000..7805d90e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useScrollToTop.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useNavigation","useRoute","React","getScrollableNode","ref","current","getScrollResponder","getNode","useScrollToTop","navigation","route","useEffect","tabNavigations","currentNavigation","getState","type","push","getParent","length","unsubscribers","map","tab","addListener","e","isFocused","isFirst","includes","routes","key","requestAnimationFrame","scrollable","defaultPrevented","scrollToTop","scrollTo","y","animated","scrollToOffset","offset","scrollResponderScrollTo","forEach","unsubscribe"],"sourceRoot":"../../src","sources":["useScrollToTop.tsx"],"mappings":"AAAA,SAGEA,aAAa,EACbC,QAAQ,QACH,wBAAwB;AAC/B,OAAO,KAAKC,KAAK,MAAM,OAAO;AAe9B,SAASC,iBAAiB,CAACC,GAAuC,EAAE;EAClE,IAAIA,GAAG,CAACC,OAAO,IAAI,IAAI,EAAE;IACvB,OAAO,IAAI;EACb;EAEA,IACE,aAAa,IAAID,GAAG,CAACC,OAAO,IAC5B,UAAU,IAAID,GAAG,CAACC,OAAO,IACzB,gBAAgB,IAAID,GAAG,CAACC,OAAO,IAC/B,yBAAyB,IAAID,GAAG,CAACC,OAAO,EACxC;IACA;IACA,OAAOD,GAAG,CAACC,OAAO;EACpB,CAAC,MAAM,IAAI,oBAAoB,IAAID,GAAG,CAACC,OAAO,EAAE;IAC9C;IACA;IACA,OAAOD,GAAG,CAACC,OAAO,CAACC,kBAAkB,EAAE;EACzC,CAAC,MAAM,IAAI,SAAS,IAAIF,GAAG,CAACC,OAAO,EAAE;IACnC;IACA;IACA;IACA;IACA,OAAOD,GAAG,CAACC,OAAO,CAACE,OAAO,EAAE;EAC9B,CAAC,MAAM;IACL,OAAOH,GAAG,CAACC,OAAO;EACpB;AACF;AAEA,eAAe,SAASG,cAAc,CACpCJ,GAAuC,EACvC;EACA,MAAMK,UAAU,GAAGT,aAAa,EAAE;EAClC,MAAMU,KAAK,GAAGT,QAAQ,EAAE;EAExBC,KAAK,CAACS,SAAS,CAAC,MAAM;IACpB,IAAIC,cAA+D,GAAG,EAAE;IACxE,IAAIC,iBAAiB,GAAGJ,UAAU;;IAElC;IACA;IACA,OAAOI,iBAAiB,EAAE;MACxB,IAAIA,iBAAiB,CAACC,QAAQ,EAAE,CAACC,IAAI,KAAK,KAAK,EAAE;QAC/CH,cAAc,CAACI,IAAI,CAACH,iBAAiB,CAAC;MACxC;MAEAA,iBAAiB,GAAGA,iB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AAC;IAEF,OAAO,MAAM;MACXhB,aAAa,CAACoB,OAAO,CAAEC,WAAW,IAAKA,WAAW,EAAE,CAAC;IACvD,CAAC;EACH,CAAC,EAAE,CAAC/B,UAAU,EAAEL,GAAG,EAAEM,KAAK,CAACkB,GAAG,CAAC,CAAC;AAClC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useThenable.js b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useThenable.js new file mode 100644 index 00000000..8eb7b13d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useThenable.js @@ -0,0 +1,33 @@ +import * as React from 'react'; +export default function useThenable(create) { + const [promise] = React.useState(create); + let initialState = [false, undefined]; + + // Check if our thenable is synchronous + promise.then(result => { + initialState = [true, result]; + }); + const [state, setState] = React.useState(initialState); + const [resolved] = state; + React.useEffect(() => { + let cancelled = false; + const resolve = async () => { + let result; + try { + result = await promise; + } finally { + if (!cancelled) { + setState([true, result]); + } + } + }; + if (!resolved) { + resolve(); + } + return () => { + cancelled = true; + }; + }, [promise, resolved]); + return state; +} +//# sourceMappingURL=useThenable.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useThenable.js.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useThenable.js.map new file mode 100644 index 00000000..371e825b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/module/useThenable.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","useThenable","create","promise","useState","initialState","undefined","then","result","state","setState","resolved","useEffect","cancelled","resolve"],"sourceRoot":"../../src","sources":["useThenable.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,eAAe,SAASC,WAAW,CAAIC,MAA4B,EAAE;EACnE,MAAM,CAACC,OAAO,CAAC,GAAGH,KAAK,CAACI,QAAQ,CAACF,MAAM,CAAC;EAExC,IAAIG,YAAsC,GAAG,CAAC,KAAK,EAAEC,SAAS,CAAC;;EAE/D;EACAH,OAAO,CAACI,IAAI,CAAEC,MAAM,IAAK;IACvBH,YAAY,GAAG,CAAC,IAAI,EAAEG,MAAM,CAAC;EAC/B,CAAC,CAAC;EAEF,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGV,KAAK,CAACI,QAAQ,CAACC,YAAY,CAAC;EACtD,MAAM,CAACM,QAAQ,CAAC,GAAGF,KAAK;EAExBT,KAAK,CAACY,SAAS,CAAC,MAAM;IACpB,IAAIC,SAAS,GAAG,KAAK;IAErB,MAAMC,OAAO,GAAG,YAAY;MAC1B,IAAIN,MAAM;MAEV,IAAI;QACFA,MAAM,GAAG,MAAML,OAAO;MACxB,CAAC,SAAS;QACR,IAAI,CAACU,SAAS,EAAE;UACdH,QAAQ,CAAC,CAAC,IAAI,EAAEF,MAAM,CAAC,CAAC;QAC1B;MACF;IACF,CAAC;IAED,IAAI,CAACG,QAAQ,EAAE;MACbG,OAAO,EAAE;IACX;IAEA,OAAO,MAAM;MACXD,SAAS,GAAG,IAAI;IAClB,CAAC;EACH,CAAC,EAAE,CAACV,OAAO,EAAEQ,QAAQ,CAAC,CAAC;EAEvB,OAAOF,KAAK;AACd"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/Link.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/Link.d.ts new file mode 100644 index 00000000..e17af947 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/Link.d.ts @@ -0,0 +1,23 @@ +import type { NavigationAction } from '@react-navigation/core'; +import * as React from 'react'; +import { GestureResponderEvent, Text, TextProps } from 'react-native'; +import type { To } from './useLinkTo'; +declare type Props = { + to: To; + action?: NavigationAction; + target?: string; + onPress?: (e: React.MouseEvent | GestureResponderEvent) => void; +} & (TextProps & { + children: React.ReactNode; +}); +/** + * Component to render link to another screen using a path. + * Uses an anchor tag on the web. + * + * @param props.to Absolute path to screen (e.g. `/feeds/hot`). + * @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config. + * @param props.children Child elements to render the content. + */ +export default function Link({ to, action, ...rest }: Props): React.CElement; +export {}; +//# sourceMappingURL=Link.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/Link.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/Link.d.ts.map new file mode 100644 index 00000000..05727853 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/Link.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAY,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhF,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEtC,aAAK,KAAK,CAAC,SAAS,SAAS,eAAe,CAAC,aAAa,IAAI;IAC5D,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC;IAClB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,CACR,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG,qBAAqB,KACvE,IAAI,CAAC;CACX,GAAG,CAAC,SAAS,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,SAAS,SAAS,eAAe,CAAC,aAAa,EAAE,EAC5E,EAAE,EACF,MAAM,EACN,GAAG,IAAI,EACR,EAAE,KAAK,CAAC,SAAS,CAAC,mCAqBlB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/LinkingContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/LinkingContext.d.ts new file mode 100644 index 00000000..eb12487e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/LinkingContext.d.ts @@ -0,0 +1,8 @@ +import type { ParamListBase } from '@react-navigation/core'; +import * as React from 'react'; +import type { LinkingOptions } from './types'; +declare const LinkingContext: React.Context<{ + options: LinkingOptions | undefined; +}>; +export default LinkingContext; +//# sourceMappingURL=LinkingContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/LinkingContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/LinkingContext.d.ts.map new file mode 100644 index 00000000..4f20eb5d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/LinkingContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"LinkingContext.d.ts","sourceRoot":"","sources":["../../../src/LinkingContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,QAAA,MAAM,cAAc;aACT,eAAe,aAAa,CAAC,GAAG,SAAS;EAC1B,CAAC;AAI3B,eAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/NavigationContainer.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/NavigationContainer.d.ts new file mode 100644 index 00000000..b3a3609e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/NavigationContainer.d.ts @@ -0,0 +1,26 @@ +import { NavigationContainerProps, NavigationContainerRef } from '@react-navigation/core'; +import * as React from 'react'; +import type { DocumentTitleOptions, LinkingOptions, Theme } from './types'; +declare global { + var REACT_NAVIGATION_DEVTOOLS: WeakMap, { + readonly linking: LinkingOptions; + }>; +} +declare type Props = NavigationContainerProps & { + theme?: Theme; + linking?: LinkingOptions; + fallback?: React.ReactNode; + documentTitle?: DocumentTitleOptions; + onReady?: () => void; +}; +declare const NavigationContainer: (props: NavigationContainerProps & { + theme?: Theme | undefined; + linking?: LinkingOptions | undefined; + fallback?: React.ReactNode; + documentTitle?: DocumentTitleOptions | undefined; + onReady?: (() => void) | undefined; +} & { + ref?: React.Ref> | undefined; +}) => React.ReactElement; +export default NavigationContainer; +//# sourceMappingURL=NavigationContainer.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/NavigationContainer.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/NavigationContainer.d.ts.map new file mode 100644 index 00000000..e318cc4f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/NavigationContainer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NavigationContainer.d.ts","sourceRoot":"","sources":["../../../src/NavigationContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,wBAAwB,EACxB,sBAAsB,EAGvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAM3E,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,yBAAyB,EAAE,OAAO,CACpC,sBAAsB,CAAC,GAAG,CAAC,EAC3B;QAAE,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,GAAG,CAAC,CAAA;KAAE,CAC1C,CAAC;CACH;AAID,aAAK,KAAK,CAAC,SAAS,SAAS,EAAE,IAAI,wBAAwB,GAAG;IAC5D,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AA2GF,QAAA,MAAM,mBAAmB;;;eA9GZ,MAAM,SAAS;;qBAEV,IAAI;;;MAkHjB,MAAM,YAAY,CAAC;AAExB,eAAe,mBAAmB,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContainer.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContainer.d.ts new file mode 100644 index 00000000..86b49b7f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContainer.d.ts @@ -0,0 +1,15 @@ +import * as React from 'react'; +import { ServerContextType } from './ServerContext'; +import type { ServerContainerRef } from './types'; +/** + * Container component for server rendering. + * + * @param props.location Location object to base the initial URL for SSR. + * @param props.children Child elements to render the content. + * @param props.ref Ref object which contains helper methods. + */ +declare const _default: React.ForwardRefExoticComponent>; +export default _default; +//# sourceMappingURL=ServerContainer.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContainer.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContainer.d.ts.map new file mode 100644 index 00000000..dfed9e36 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContainer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ServerContainer.d.ts","sourceRoot":"","sources":["../../../src/ServerContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAsB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAMlD;;;;;;GAMG;;;;AACH,wBAsCG"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContext.d.ts new file mode 100644 index 00000000..930ff442 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContext.d.ts @@ -0,0 +1,10 @@ +import * as React from 'react'; +export declare type ServerContextType = { + location?: { + pathname: string; + search: string; + }; +}; +declare const ServerContext: React.Context; +export default ServerContext; +//# sourceMappingURL=ServerContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContext.d.ts.map new file mode 100644 index 00000000..e5d5cdbc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/ServerContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ServerContext.d.ts","sourceRoot":"","sources":["../../../src/ServerContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,oBAAY,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,EAAE;QACT,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC;AAEF,QAAA,MAAM,aAAa,8CAElB,CAAC;AAEF,eAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/__mocks__/window.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/__mocks__/window.d.ts new file mode 100644 index 00000000..fa5fdbd2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/__mocks__/window.d.ts @@ -0,0 +1,19 @@ +declare const window: { + document: { + title: string; + }; + location: URL; + history: { + readonly state: any; + pushState(state: any, _: string, path: string): void; + replaceState(state: any, _: string, path: string): void; + go(n: number): void; + back(): void; + forward(): void; + }; + addEventListener: (type: 'popstate', listener: () => void) => void; + removeEventListener: (type: 'popstate', listener: () => void) => void; + readonly window: any; +}; +export default window; +//# sourceMappingURL=window.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/__mocks__/window.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/__mocks__/window.d.ts.map new file mode 100644 index 00000000..8e16719f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/__mocks__/window.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../../src/__mocks__/window.tsx"],"names":[],"mappings":"AAiEA,QAAA,MAAM,MAAM;;;;;;;yBApDO,GAAG,KAAK,MAAM,QAAQ,MAAM;4BASzB,GAAG,KAAK,MAAM,QAAQ,MAAM;cAO1C,MAAM;;;;6BAwBkB,UAAU,YAAY,MAAM,IAAI;gCAM7B,UAAU,YAAY,MAAM,IAAI;;CAelE,CAAC;AAEF,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/createMemoryHistory.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/createMemoryHistory.d.ts new file mode 100644 index 00000000..3a29fc01 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/createMemoryHistory.d.ts @@ -0,0 +1,25 @@ +import type { NavigationState } from '@react-navigation/core'; +declare type HistoryRecord = { + id: string; + state: NavigationState; + path: string; +}; +export default function createMemoryHistory(): { + readonly index: number; + get(index: number): HistoryRecord; + backIndex({ path }: { + path: string; + }): number; + push({ path, state }: { + path: string; + state: NavigationState; + }): void; + replace({ path, state }: { + path: string; + state: NavigationState; + }): void; + go(n: number): Promise | undefined; + listen(listener: () => void): () => void; +}; +export {}; +//# sourceMappingURL=createMemoryHistory.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/createMemoryHistory.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/createMemoryHistory.d.ts.map new file mode 100644 index 00000000..7fa48111 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/createMemoryHistory.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createMemoryHistory.d.ts","sourceRoot":"","sources":["../../../src/createMemoryHistory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAG9D,aAAK,aAAa,GAAG;IAEnB,EAAE,EAAE,MAAM,CAAC;IAEX,KAAK,EAAE,eAAe,CAAC;IAEvB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,mBAAmB;;eAiC5B,MAAM;;cAIW,MAAM;;;cAaJ,MAAM;eAAS,eAAe;;;cAmB3B,MAAM;eAAS,eAAe;;UAkCzD,MAAM;qBA2FK,MAAM,IAAI;EAiB9B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/extractPathFromURL.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/extractPathFromURL.d.ts new file mode 100644 index 00000000..bcb22bdf --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/extractPathFromURL.d.ts @@ -0,0 +1,2 @@ +export default function extractPathFromURL(prefixes: string[], url: string): string | undefined; +//# sourceMappingURL=extractPathFromURL.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/extractPathFromURL.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/extractPathFromURL.d.ts.map new file mode 100644 index 00000000..a416c62e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/extractPathFromURL.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"extractPathFromURL.d.ts","sourceRoot":"","sources":["../../../src/extractPathFromURL.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,sBAuBzE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/index.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/index.d.ts new file mode 100644 index 00000000..2c38b5e3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/index.d.ts @@ -0,0 +1,15 @@ +export { default as Link } from './Link'; +export { default as LinkingContext } from './LinkingContext'; +export { default as NavigationContainer } from './NavigationContainer'; +export { default as ServerContainer } from './ServerContainer'; +export { default as DarkTheme } from './theming/DarkTheme'; +export { default as DefaultTheme } from './theming/DefaultTheme'; +export { default as ThemeProvider } from './theming/ThemeProvider'; +export { default as useTheme } from './theming/useTheme'; +export * from './types'; +export { default as useLinkBuilder } from './useLinkBuilder'; +export { default as useLinkProps } from './useLinkProps'; +export { default as useLinkTo } from './useLinkTo'; +export { default as useScrollToTop } from './useScrollToTop'; +export * from '@react-navigation/core'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/index.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/index.d.ts.map new file mode 100644 index 00000000..253afd8a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACzD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,cAAc,wBAAwB,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DarkTheme.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DarkTheme.d.ts new file mode 100644 index 00000000..1078b15e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DarkTheme.d.ts @@ -0,0 +1,4 @@ +import type { Theme } from '../types'; +declare const DarkTheme: Theme; +export default DarkTheme; +//# sourceMappingURL=DarkTheme.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DarkTheme.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DarkTheme.d.ts.map new file mode 100644 index 00000000..982379e8 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DarkTheme.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DarkTheme.d.ts","sourceRoot":"","sources":["../../../../src/theming/DarkTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,QAAA,MAAM,SAAS,EAAE,KAUhB,CAAC;AAEF,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DefaultTheme.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DefaultTheme.d.ts new file mode 100644 index 00000000..e7319fd0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DefaultTheme.d.ts @@ -0,0 +1,4 @@ +import type { Theme } from '../types'; +declare const DefaultTheme: Theme; +export default DefaultTheme; +//# sourceMappingURL=DefaultTheme.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DefaultTheme.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DefaultTheme.d.ts.map new file mode 100644 index 00000000..cb646d0a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/DefaultTheme.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DefaultTheme.d.ts","sourceRoot":"","sources":["../../../../src/theming/DefaultTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,QAAA,MAAM,YAAY,EAAE,KAUnB,CAAC;AAEF,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeContext.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeContext.d.ts new file mode 100644 index 00000000..e50ba11a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeContext.d.ts @@ -0,0 +1,5 @@ +import * as React from 'react'; +import type { Theme } from '../types'; +declare const ThemeContext: React.Context; +export default ThemeContext; +//# sourceMappingURL=ThemeContext.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeContext.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeContext.d.ts.map new file mode 100644 index 00000000..c78abf33 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/theming/ThemeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGtC,QAAA,MAAM,YAAY,sBAA2C,CAAC;AAI9D,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeProvider.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeProvider.d.ts new file mode 100644 index 00000000..9966c82e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeProvider.d.ts @@ -0,0 +1,9 @@ +import * as React from 'react'; +import type { Theme } from '../types'; +declare type Props = { + value: Theme; + children: React.ReactNode; +}; +export default function ThemeProvider({ value, children }: Props): JSX.Element; +export {}; +//# sourceMappingURL=ThemeProvider.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeProvider.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeProvider.d.ts.map new file mode 100644 index 00000000..22f82033 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/ThemeProvider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/theming/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGtC,aAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK,eAI/D"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/useTheme.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/useTheme.d.ts new file mode 100644 index 00000000..2ab7362d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/useTheme.d.ts @@ -0,0 +1,2 @@ +export default function useTheme(): import("..").Theme; +//# sourceMappingURL=useTheme.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/useTheme.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/useTheme.d.ts.map new file mode 100644 index 00000000..996d7bac --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/theming/useTheme.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/theming/useTheme.tsx"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,QAAQ,uBAI/B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/types.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/types.d.ts new file mode 100644 index 00000000..cf1fd523 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/types.d.ts @@ -0,0 +1,127 @@ +import type { getActionFromState as getActionFromStateDefault, getPathFromState as getPathFromStateDefault, getStateFromPath as getStateFromPathDefault, PathConfigMap, Route } from '@react-navigation/core'; +export declare type Theme = { + dark: boolean; + colors: { + primary: string; + background: string; + card: string; + text: string; + border: string; + notification: string; + }; +}; +export declare type LinkingOptions = { + /** + * Whether deep link handling should be enabled. + * Defaults to true. + */ + enabled?: boolean; + /** + * The prefixes are stripped from the URL before parsing them. + * Usually they are the `scheme` + `host` (e.g. `myapp://chat?user=jane`) + * + * This is not supported on Web. + * + * @example + * ```js + * { + * prefixes: [ + * "myapp://", // App-specific scheme + * "https://example.com", // Prefix for universal links + * "https://*.example.com" // Prefix which matches any subdomain + * ] + * } + * ``` + */ + prefixes: string[]; + /** + * Optional function which takes an incoming URL returns a boolean + * indicating whether React Navigation should handle it. + * + * This can be used to disable deep linking for specific URLs. + * e.g. URLs used for authentication, and not for deep linking to screens. + * + * This is not supported on Web. + * + * @example + * ```js + * { + * // Filter out URLs used by expo-auth-session + * filter: (url) => !url.includes('+expo-auth-session') + * } + * ``` + */ + filter?: (url: string) => boolean; + /** + * Config to fine-tune how to parse the path. + * + * @example + * ```js + * { + * Chat: { + * path: 'chat/:author/:id', + * parse: { id: Number } + * } + * } + * ``` + */ + config?: { + initialRouteName?: keyof ParamList; + screens: PathConfigMap; + }; + /** + * Custom function to get the initial URL used for linking. + * Uses `Linking.getInitialURL()` by default. + * + * This is not supported on Web. + * + * @example + * ```js + * { + * getInitialURL () => Linking.getInitialURL(), + * } + * ``` + */ + getInitialURL?: () => string | null | undefined | Promise; + /** + * Custom function to get subscribe to URL updates. + * Uses `Linking.addEventListener('url', callback)` by default. + * + * This is not supported on Web. + * + * @example + * ```js + * { + * subscribe: (listener) => { + * const onReceiveURL = ({ url }) => listener(url); + * + * Linking.addEventListener('url', onReceiveURL); + * + * return () => Linking.removeEventListener('url', onReceiveURL); + * } + * } + * ``` + */ + subscribe?: (listener: (url: string) => void) => undefined | void | (() => void); + /** + * Custom function to parse the URL to a valid navigation state (advanced). + */ + getStateFromPath?: typeof getStateFromPathDefault; + /** + * Custom function to convert the state object to a valid URL (advanced). + * Only applicable on Web. + */ + getPathFromState?: typeof getPathFromStateDefault; + /** + * Custom function to convert the state object to a valid action (advanced). + */ + getActionFromState?: typeof getActionFromStateDefault; +}; +export declare type DocumentTitleOptions = { + enabled?: boolean; + formatter?: (options: Record | undefined, route: Route | undefined) => string; +}; +export declare type ServerContainerRef = { + getCurrentOptions(): Record | undefined; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/types.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/types.d.ts.map new file mode 100644 index 00000000..a70adfcc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,IAAI,yBAAyB,EAC/C,gBAAgB,IAAI,uBAAuB,EAC3C,gBAAgB,IAAI,uBAAuB,EAC3C,aAAa,EACb,KAAK,EACN,MAAM,wBAAwB,CAAC;AAEhC,oBAAY,KAAK,GAAG;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,oBAAY,cAAc,CAAC,SAAS,SAAS,EAAE,IAAI;IACjD;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAClC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE;QACP,gBAAgB,CAAC,EAAE,MAAM,SAAS,CAAC;QACnC,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;KACnC,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,EAAE,MACZ,MAAM,GACN,IAAI,GACJ,SAAS,GACT,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACvC;;;;;;;;;;;;;;;;;;OAkBG;IACH,SAAS,CAAC,EAAE,CACV,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,KAC5B,SAAS,GAAG,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IACrC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,uBAAuB,CAAC;IAClD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,uBAAuB,CAAC;IAClD;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,yBAAyB,CAAC;CACvD,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,CACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,EACxC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,KAC7B,MAAM,CAAC;CACb,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC;CACtD,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useBackButton.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useBackButton.d.ts new file mode 100644 index 00000000..1e60e732 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useBackButton.d.ts @@ -0,0 +1,4 @@ +import type { NavigationContainerRef, ParamListBase } from '@react-navigation/core'; +import * as React from 'react'; +export default function useBackButton(ref: React.RefObject>): void; +//# sourceMappingURL=useBackButton.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useBackButton.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useBackButton.d.ts.map new file mode 100644 index 00000000..f9d185be --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useBackButton.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useBackButton.d.ts","sourceRoot":"","sources":["../../../src/useBackButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,QAwB5D"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.d.ts new file mode 100644 index 00000000..f0eaadbf --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.d.ts @@ -0,0 +1,8 @@ +import type { NavigationContainerRef, ParamListBase } from '@react-navigation/core'; +import * as React from 'react'; +import type { DocumentTitleOptions } from './types'; +/** + * Set the document title for the active screen + */ +export default function useDocumentTitle(ref: React.RefObject>, { enabled, formatter, }?: DocumentTitleOptions): void; +//# sourceMappingURL=useDocumentTitle.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.d.ts.map new file mode 100644 index 00000000..4e87e68d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useDocumentTitle.d.ts","sourceRoot":"","sources":["../../../src/useDocumentTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,EAC3D,EACE,OAAc,EACd,SAA6D,GAC9D,GAAE,oBAAyB,QAwB7B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.native.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.native.d.ts new file mode 100644 index 00000000..d814bedc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.native.d.ts @@ -0,0 +1,2 @@ +export default function useDocumentTitle(): void; +//# sourceMappingURL=useDocumentTitle.native.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.native.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.native.d.ts.map new file mode 100644 index 00000000..56a89a9f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useDocumentTitle.native.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useDocumentTitle.native.d.ts","sourceRoot":"","sources":["../../../src/useDocumentTitle.native.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,gBAAgB,SAEvC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkBuilder.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkBuilder.d.ts new file mode 100644 index 00000000..69cfba94 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkBuilder.d.ts @@ -0,0 +1,6 @@ +/** + * Build destination link for a navigate action. + * Useful for showing anchor tags on the web for buttons that perform navigation. + */ +export default function useLinkBuilder(): (name: string, params?: object) => string | undefined; +//# sourceMappingURL=useLinkBuilder.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkBuilder.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkBuilder.d.ts.map new file mode 100644 index 00000000..6eb838a4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkBuilder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useLinkBuilder.d.ts","sourceRoot":"","sources":["../../../src/useLinkBuilder.tsx"],"names":[],"mappings":"AA2CA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,WAK3B,MAAM,WAAW,MAAM,wBA6BjC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkProps.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkProps.d.ts new file mode 100644 index 00000000..f2e1f7e0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkProps.d.ts @@ -0,0 +1,21 @@ +import { NavigationAction } from '@react-navigation/core'; +import * as React from 'react'; +import { GestureResponderEvent } from 'react-native'; +import { To } from './useLinkTo'; +declare type Props = { + to: To; + action?: NavigationAction; +}; +/** + * Hook to get props for an anchor tag so it can work with in page navigation. + * + * @param props.to Absolute path to screen (e.g. `/feeds/hot`). + * @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config. + */ +export default function useLinkProps({ to, action }: Props): { + href: string; + accessibilityRole: "link"; + onPress: (e?: React.MouseEvent | GestureResponderEvent) => void; +}; +export {}; +//# sourceMappingURL=useLinkProps.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkProps.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkProps.d.ts.map new file mode 100644 index 00000000..36262148 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkProps.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useLinkProps.d.ts","sourceRoot":"","sources":["../../../src/useLinkProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAKjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAY,MAAM,cAAc,CAAC;AAG/D,OAAkB,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAE5C,aAAK,KAAK,CAAC,SAAS,SAAS,eAAe,CAAC,aAAa,IAAI;IAC5D,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC;IAClB,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B,CAAC;AA+BF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,SAAS,SAAS,eAAe,CAAC,aAAa,EAC/C,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,SAAS,CAAC;;;kBAO1B,gBAAgB,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG,qBAAqB;EA6D9E"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkTo.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkTo.d.ts new file mode 100644 index 00000000..5c54b808 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkTo.d.ts @@ -0,0 +1,9 @@ +export declare type To = string | (undefined extends ParamList[RouteName] ? { + screen: Extract; + params?: ParamList[RouteName]; +} : { + screen: Extract; + params: ParamList[RouteName]; +}); +export default function useLinkTo(): (to: To) => void; +//# sourceMappingURL=useLinkTo.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkTo.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkTo.d.ts.map new file mode 100644 index 00000000..507d1459 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinkTo.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useLinkTo.d.ts","sourceRoot":"","sources":["../../../src/useLinkTo.tsx"],"names":[],"mappings":"AASA,oBAAY,EAAE,CACZ,SAAS,SAAS,eAAe,CAAC,aAAa,GAAG,eAAe,CAAC,aAAa,EAC/E,SAAS,SAAS,MAAM,SAAS,GAAG,MAAM,SAAS,IAEjD,MAAM,GACN,CAAC,SAAS,SAAS,SAAS,CAAC,SAAS,CAAC,GACnC;IACE,MAAM,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC/B,GACD;IACE,MAAM,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACnC,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC,CAAC;AAEX,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,SAAS,SAAS,eAAe,CAAC,aAAa,UAMxC,GAAG,SAAS,CAAC,UAuCrB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.d.ts new file mode 100644 index 00000000..9e05e29a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.d.ts @@ -0,0 +1,51 @@ +import { NavigationContainerRef, ParamListBase } from '@react-navigation/core'; +import * as React from 'react'; +import type { LinkingOptions } from './types'; +declare type Options = LinkingOptions & { + independent?: boolean; +}; +export default function useLinking(ref: React.RefObject>, { independent, enabled, config, getStateFromPath, getPathFromState, getActionFromState, }: Options): { + getInitialState: () => PromiseLike<(Partial & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | import("@react-navigation/core").PartialState> | undefined; + })[]; + type: string; + stale: false; + }>, "stale" | "routes">> & Readonly<{ + stale?: true | undefined; + routes: import("@react-navigation/core").PartialRoute>[]; + }> & { + state?: (Partial & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | import("@react-navigation/core").PartialState> | undefined; + })[]; + type: string; + stale: false; + }>, "stale" | "routes">> & Readonly<{ + stale?: true | undefined; + routes: import("@react-navigation/core").PartialRoute>[]; + }> & any) | undefined; + }) | undefined>; +}; +export {}; +//# sourceMappingURL=useLinking.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.d.ts.map new file mode 100644 index 00000000..147ebeac --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useLinking.d.ts","sourceRoot":"","sources":["../../../src/useLinking.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,sBAAsB,EAEtB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAiF9C,aAAK,OAAO,GAAG,cAAc,CAAC,aAAa,CAAC,GAAG;IAC7C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,EAC3D,EACE,WAAW,EACX,OAAc,EACd,MAAM,EACN,gBAA0C,EAC1C,gBAA0C,EAC1C,kBAA8C,GAC/C,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuTX"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.native.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.native.d.ts new file mode 100644 index 00000000..1f4233c3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.native.d.ts @@ -0,0 +1,51 @@ +import { NavigationContainerRef, ParamListBase } from '@react-navigation/core'; +import * as React from 'react'; +import type { LinkingOptions } from './types'; +declare type Options = LinkingOptions & { + independent?: boolean; +}; +export default function useLinking(ref: React.RefObject>, { independent, enabled, prefixes, filter, config, getInitialURL, subscribe, getStateFromPath, getActionFromState, }: Options): { + getInitialState: () => PromiseLike<(Partial & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | import("@react-navigation/core").PartialState> | undefined; + })[]; + type: string; + stale: false; + }>, "stale" | "routes">> & Readonly<{ + stale?: true | undefined; + routes: import("@react-navigation/core").PartialRoute>[]; + }> & { + state?: (Partial & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | import("@react-navigation/core").PartialState> | undefined; + })[]; + type: string; + stale: false; + }>, "stale" | "routes">> & Readonly<{ + stale?: true | undefined; + routes: import("@react-navigation/core").PartialRoute>[]; + }> & any) | undefined; + }) | undefined>; +}; +export {}; +//# sourceMappingURL=useLinking.native.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.native.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.native.d.ts.map new file mode 100644 index 00000000..d775fa42 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useLinking.native.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useLinking.native.d.ts","sourceRoot":"","sources":["../../../src/useLinking.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,sBAAsB,EACtB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAI9C,aAAK,OAAO,GAAG,cAAc,CAAC,aAAa,CAAC,GAAG;IAC7C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,EAC3D,EACE,WAAW,EACX,OAAc,EACd,QAAQ,EACR,MAAM,EACN,MAAM,EACN,aAQI,EACJ,SAkBC,EACD,gBAA0C,EAC1C,kBAA8C,GAC/C,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4JX"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useScrollToTop.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useScrollToTop.d.ts new file mode 100644 index 00000000..682c3bba --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useScrollToTop.d.ts @@ -0,0 +1,26 @@ +import * as React from 'react'; +declare type ScrollOptions = { + x?: number; + y?: number; + animated?: boolean; +}; +declare type ScrollableView = { + scrollToTop(): void; +} | { + scrollTo(options: ScrollOptions): void; +} | { + scrollToOffset(options: { + offset?: number; + animated?: boolean; + }): void; +} | { + scrollResponderScrollTo(options: ScrollOptions): void; +}; +declare type ScrollableWrapper = { + getScrollResponder(): React.ReactNode; +} | { + getNode(): ScrollableView; +} | ScrollableView; +export default function useScrollToTop(ref: React.RefObject): void; +export {}; +//# sourceMappingURL=useScrollToTop.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useScrollToTop.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useScrollToTop.d.ts.map new file mode 100644 index 00000000..aee3fd23 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useScrollToTop.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useScrollToTop.d.ts","sourceRoot":"","sources":["../../../src/useScrollToTop.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,aAAK,aAAa,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpE,aAAK,cAAc,GACf;IAAE,WAAW,IAAI,IAAI,CAAA;CAAE,GACvB;IAAE,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;CAAE,GAC1C;IAAE,cAAc,CAAC,OAAO,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;CAAE,GAC1E;IAAE,uBAAuB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;CAAE,CAAC;AAE9D,aAAK,iBAAiB,GAClB;IAAE,kBAAkB,IAAI,KAAK,CAAC,SAAS,CAAA;CAAE,GACzC;IAAE,OAAO,IAAI,cAAc,CAAA;CAAE,GAC7B,cAAc,CAAC;AA8BnB,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,QAgExC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useThenable.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useThenable.d.ts new file mode 100644 index 00000000..a0f4a329 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useThenable.d.ts @@ -0,0 +1,2 @@ +export default function useThenable(create: () => PromiseLike): [boolean, T | undefined]; +//# sourceMappingURL=useThenable.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useThenable.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useThenable.d.ts.map new file mode 100644 index 00000000..41427784 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/lib/typescript/src/useThenable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useThenable.d.ts","sourceRoot":"","sources":["../../../src/useThenable.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,4BAsClE"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/index.d.ts b/iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/index.d.ts new file mode 100644 index 00000000..7d34edc7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/index.d.ts @@ -0,0 +1,18 @@ +/** +Escape RegExp special characters. + +You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class. + +@example +``` +import escapeStringRegexp = require('escape-string-regexp'); + +const escapedString = escapeStringRegexp('How much $ for a 🦄?'); +//=> 'How much \\$ for a 🦄\\?' + +new RegExp(escapedString); +``` +*/ +declare const escapeStringRegexp: (string: string) => string; + +export = escapeStringRegexp; diff --git a/iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/index.js b/iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/index.js new file mode 100644 index 00000000..387c5615 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/index.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = string => { + if (typeof string !== 'string') { + throw new TypeError('Expected a string'); + } + + // Escape characters with special meaning either inside or outside character sets. + // Use a simple backslash escape when it’s always valid, and a \unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar. + return string + .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&') + .replace(/-/g, '\\x2d'); +}; diff --git a/iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/license b/iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/license new file mode 100644 index 00000000..fa7ceba3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/package.json b/iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/package.json new file mode 100644 index 00000000..c6eb4a91 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/package.json @@ -0,0 +1,38 @@ +{ + "name": "escape-string-regexp", + "version": "4.0.0", + "description": "Escape RegExp special characters", + "license": "MIT", + "repository": "sindresorhus/escape-string-regexp", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "escape", + "regex", + "regexp", + "regular", + "expression", + "string", + "special", + "characters" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.11.0", + "xo": "^0.28.3" + } +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/readme.md b/iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/readme.md new file mode 100644 index 00000000..2945dfcb --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/node_modules/escape-string-regexp/readme.md @@ -0,0 +1,34 @@ +# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp) + +> Escape RegExp special characters + +## Install + +``` +$ npm install escape-string-regexp +``` + +## Usage + +```js +const escapeStringRegexp = require('escape-string-regexp'); + +const escapedString = escapeStringRegexp('How much $ for a 🦄?'); +//=> 'How much \\$ for a 🦄\\?' + +new RegExp(escapedString); +``` + +You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class. + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/iut-expo-starter/node_modules/@react-navigation/native/package.json b/iut-expo-starter/node_modules/@react-navigation/native/package.json new file mode 100644 index 00000000..4d94fa1a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/package.json @@ -0,0 +1,76 @@ +{ + "name": "@react-navigation/native", + "description": "React Native integration for React Navigation", + "version": "6.1.3", + "keywords": [ + "react-native", + "react-navigation", + "ios", + "android" + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/react-navigation/react-navigation.git", + "directory": "packages/native" + }, + "bugs": { + "url": "https://github.com/react-navigation/react-navigation/issues" + }, + "homepage": "https://reactnavigation.org", + "main": "lib/commonjs/index.js", + "react-native": "src/index.tsx", + "source": "src/index.tsx", + "module": "lib/module/index.js", + "types": "lib/typescript/src/index.d.ts", + "files": [ + "src", + "lib", + "!**/__tests__" + ], + "sideEffects": false, + "publishConfig": { + "access": "public" + }, + "scripts": { + "prepack": "bob build", + "clean": "del lib" + }, + "dependencies": { + "@react-navigation/core": "^6.4.6", + "escape-string-regexp": "^4.0.0", + "fast-deep-equal": "^3.1.3", + "nanoid": "^3.1.23" + }, + "devDependencies": { + "@testing-library/react-native": "^11.5.0", + "@types/react": "~18.0.0", + "@types/react-dom": "~18.0.0", + "@types/react-native": "~0.69.1", + "del-cli": "^3.0.1", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.5", + "react-native-builder-bob": "^0.20.3", + "typescript": "^4.7.4" + }, + "peerDependencies": { + "react": "*", + "react-native": "*" + }, + "react-native-builder-bob": { + "source": "src", + "output": "lib", + "targets": [ + "commonjs", + "module", + [ + "typescript", + { + "project": "tsconfig.build.json" + } + ] + ] + }, + "gitHead": "ef3f7377ef1a5623bc38273b63663b0f7bd39815" +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/Link.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/Link.tsx new file mode 100644 index 00000000..34eeb66f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/Link.tsx @@ -0,0 +1,50 @@ +import type { NavigationAction } from '@react-navigation/core'; +import * as React from 'react'; +import { GestureResponderEvent, Platform, Text, TextProps } from 'react-native'; + +import useLinkProps from './useLinkProps'; +import type { To } from './useLinkTo'; + +type Props = { + to: To; + action?: NavigationAction; + target?: string; + onPress?: ( + e: React.MouseEvent | GestureResponderEvent + ) => void; +} & (TextProps & { children: React.ReactNode }); + +/** + * Component to render link to another screen using a path. + * Uses an anchor tag on the web. + * + * @param props.to Absolute path to screen (e.g. `/feeds/hot`). + * @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config. + * @param props.children Child elements to render the content. + */ +export default function Link({ + to, + action, + ...rest +}: Props) { + const props = useLinkProps({ to, action }); + + const onPress = ( + e: React.MouseEvent | GestureResponderEvent + ) => { + if ('onPress' in rest) { + rest.onPress?.(e); + } + + props.onPress(e); + }; + + return React.createElement(Text, { + ...props, + ...rest, + ...Platform.select({ + web: { onClick: onPress } as any, + default: { onPress }, + }), + }); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/LinkingContext.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/LinkingContext.tsx new file mode 100644 index 00000000..e862dce4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/LinkingContext.tsx @@ -0,0 +1,12 @@ +import type { ParamListBase } from '@react-navigation/core'; +import * as React from 'react'; + +import type { LinkingOptions } from './types'; + +const LinkingContext = React.createContext<{ + options: LinkingOptions | undefined; +}>({ options: undefined }); + +LinkingContext.displayName = 'LinkingContext'; + +export default LinkingContext; diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/NavigationContainer.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/NavigationContainer.tsx new file mode 100644 index 00000000..6d0d56f1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/NavigationContainer.tsx @@ -0,0 +1,152 @@ +import { + BaseNavigationContainer, + getActionFromState, + getPathFromState, + getStateFromPath, + NavigationContainerProps, + NavigationContainerRef, + ParamListBase, + validatePathConfig, +} from '@react-navigation/core'; +import * as React from 'react'; + +import LinkingContext from './LinkingContext'; +import DefaultTheme from './theming/DefaultTheme'; +import ThemeProvider from './theming/ThemeProvider'; +import type { DocumentTitleOptions, LinkingOptions, Theme } from './types'; +import useBackButton from './useBackButton'; +import useDocumentTitle from './useDocumentTitle'; +import useLinking from './useLinking'; +import useThenable from './useThenable'; + +declare global { + var REACT_NAVIGATION_DEVTOOLS: WeakMap< + NavigationContainerRef, + { readonly linking: LinkingOptions } + >; +} + +global.REACT_NAVIGATION_DEVTOOLS = new WeakMap(); + +type Props = NavigationContainerProps & { + theme?: Theme; + linking?: LinkingOptions; + fallback?: React.ReactNode; + documentTitle?: DocumentTitleOptions; + onReady?: () => void; +}; + +/** + * Container component which holds the navigation state designed for React Native apps. + * This should be rendered at the root wrapping the whole app. + * + * @param props.initialState Initial state object for the navigation tree. When deep link handling is enabled, this will override deep links when specified. Make sure that you don't specify an `initialState` when there's a deep link (`Linking.getInitialURL()`). + * @param props.onReady Callback which is called after the navigation tree mounts. + * @param props.onStateChange Callback which is called with the latest navigation state when it changes. + * @param props.theme Theme object for the navigators. + * @param props.linking Options for deep linking. Deep link handling is enabled when this prop is provided, unless `linking.enabled` is `false`. + * @param props.fallback Fallback component to render until we have finished getting initial state when linking is enabled. Defaults to `null`. + * @param props.documentTitle Options to configure the document title on Web. Updating document title is handled by default unless `documentTitle.enabled` is `false`. + * @param props.children Child elements to render the content. + * @param props.ref Ref object which refers to the navigation object containing helper methods. + */ +function NavigationContainerInner( + { + theme = DefaultTheme, + linking, + fallback = null, + documentTitle, + onReady, + ...rest + }: Props, + ref?: React.Ref | null> +) { + const isLinkingEnabled = linking ? linking.enabled !== false : false; + + if (linking?.config) { + validatePathConfig(linking.config); + } + + const refContainer = + React.useRef>(null); + + useBackButton(refContainer); + useDocumentTitle(refContainer, documentTitle); + + const { getInitialState } = useLinking(refContainer, { + independent: rest.independent, + enabled: isLinkingEnabled, + prefixes: [], + ...linking, + }); + + // Add additional linking related info to the ref + // This will be used by the devtools + React.useEffect(() => { + if (refContainer.current) { + REACT_NAVIGATION_DEVTOOLS.set(refContainer.current, { + get linking() { + return { + ...linking, + enabled: isLinkingEnabled, + prefixes: linking?.prefixes ?? [], + getStateFromPath: linking?.getStateFromPath ?? getStateFromPath, + getPathFromState: linking?.getPathFromState ?? getPathFromState, + getActionFromState: + linking?.getActionFromState ?? getActionFromState, + }; + }, + }); + } + }); + + const [isResolved, initialState] = useThenable(getInitialState); + + React.useImperativeHandle(ref, () => refContainer.current); + + const linkingContext = React.useMemo(() => ({ options: linking }), [linking]); + + const isReady = rest.initialState != null || !isLinkingEnabled || isResolved; + + const onReadyRef = React.useRef(onReady); + + React.useEffect(() => { + onReadyRef.current = onReady; + }); + + React.useEffect(() => { + if (isReady) { + onReadyRef.current?.(); + } + }, [isReady]); + + if (!isReady) { + // This is temporary until we have Suspense for data-fetching + // Then the fallback will be handled by a parent `Suspense` component + return fallback as React.ReactElement; + } + + return ( + + + + + + ); +} + +const NavigationContainer = React.forwardRef(NavigationContainerInner) as < + RootParamList extends {} = ReactNavigation.RootParamList +>( + props: Props & { + ref?: React.Ref>; + } +) => React.ReactElement; + +export default NavigationContainer; diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/ServerContainer.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/ServerContainer.tsx new file mode 100644 index 00000000..927a90db --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/ServerContainer.tsx @@ -0,0 +1,56 @@ +import { CurrentRenderContext } from '@react-navigation/core'; +import * as React from 'react'; + +import ServerContext, { ServerContextType } from './ServerContext'; +import type { ServerContainerRef } from './types'; + +type Props = ServerContextType & { + children: React.ReactNode; +}; + +/** + * Container component for server rendering. + * + * @param props.location Location object to base the initial URL for SSR. + * @param props.children Child elements to render the content. + * @param props.ref Ref object which contains helper methods. + */ +export default React.forwardRef(function ServerContainer( + { children, location }: Props, + ref: React.Ref +) { + React.useEffect(() => { + console.error( + "'ServerContainer' should only be used on the server with 'react-dom/server' for SSR." + ); + }, []); + + const current: { options?: object } = {}; + + if (ref) { + const value = { + getCurrentOptions() { + return current.options; + }, + }; + + // We write to the `ref` during render instead of `React.useImperativeHandle` + // This is because `useImperativeHandle` will update the ref after 'commit', + // and there's no 'commit' phase during SSR. + // Mutating ref during render is unsafe in concurrent mode, but we don't care about it for SSR. + if (typeof ref === 'function') { + ref(value); + } else { + // @ts-expect-error: the TS types are incorrect and say that ref.current is readonly + ref.current = value; + } + } + + return ( + + + {children} + + + ); +}); diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/ServerContext.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/ServerContext.tsx new file mode 100644 index 00000000..2c199bbc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/ServerContext.tsx @@ -0,0 +1,14 @@ +import * as React from 'react'; + +export type ServerContextType = { + location?: { + pathname: string; + search: string; + }; +}; + +const ServerContext = React.createContext( + undefined +); + +export default ServerContext; diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/__mocks__/window.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/__mocks__/window.tsx new file mode 100644 index 00000000..01fc617e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/__mocks__/window.tsx @@ -0,0 +1,77 @@ +const location = new URL('', 'http://example.com'); + +let listeners: (() => void)[] = []; +let entries = [{ state: null, href: location.href }]; +let index = 0; + +let currentState: any = null; + +const history = { + get state() { + return currentState; + }, + + pushState(state: any, _: string, path: string) { + Object.assign(location, new URL(path, location.origin)); + + currentState = state; + entries = entries.slice(0, index + 1); + entries.push({ state, href: location.href }); + index = entries.length - 1; + }, + + replaceState(state: any, _: string, path: string) { + Object.assign(location, new URL(path, location.origin)); + + currentState = state; + entries[index] = { state, href: location.href }; + }, + + go(n: number) { + setTimeout(() => { + if ( + (n > 0 && n < entries.length - index) || + (n < 0 && Math.abs(n) <= index) + ) { + index += n; + const entry = entries[index]; + Object.assign(location, new URL(entry.href)); + currentState = entry.state; + listeners.forEach((cb) => cb()); + } + }, 0); + }, + + back() { + this.go(-1); + }, + + forward() { + this.go(1); + }, +}; + +const addEventListener = (type: 'popstate', listener: () => void) => { + if (type === 'popstate') { + listeners.push(listener); + } +}; + +const removeEventListener = (type: 'popstate', listener: () => void) => { + if (type === 'popstate') { + listeners = listeners.filter((cb) => cb !== listener); + } +}; + +const window = { + document: { title: '' }, + location, + history, + addEventListener, + removeEventListener, + get window() { + return window; + }, +}; + +export default window; diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/createMemoryHistory.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/createMemoryHistory.tsx new file mode 100644 index 00000000..10929ac1 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/createMemoryHistory.tsx @@ -0,0 +1,224 @@ +import type { NavigationState } from '@react-navigation/core'; +import { nanoid } from 'nanoid/non-secure'; + +type HistoryRecord = { + // Unique identifier for this record to match it with window.history.state + id: string; + // Navigation state object for the history entry + state: NavigationState; + // Path of the history entry + path: string; +}; + +export default function createMemoryHistory() { + let index = 0; + let items: HistoryRecord[] = []; + + // Pending callbacks for `history.go(n)` + // We might modify the callback stored if it was interrupted, so we have a ref to identify it + const pending: { ref: unknown; cb: (interrupted?: boolean) => void }[] = []; + + const interrupt = () => { + // If another history operation was performed we need to interrupt existing ones + // This makes sure that calls such as `history.replace` after `history.go` don't happen + // Since otherwise it won't be correct if something else has changed + pending.forEach((it) => { + const cb = it.cb; + it.cb = () => cb(true); + }); + }; + + const history = { + get index(): number { + // We store an id in the state instead of an index + // Index could get out of sync with in-memory values if page reloads + const id = window.history.state?.id; + + if (id) { + const index = items.findIndex((item) => item.id === id); + + return index > -1 ? index : 0; + } + + return 0; + }, + + get(index: number) { + return items[index]; + }, + + backIndex({ path }: { path: string }) { + // We need to find the index from the element before current to get closest path to go back to + for (let i = index - 1; i >= 0; i--) { + const item = items[i]; + + if (item.path === path) { + return i; + } + } + + return -1; + }, + + push({ path, state }: { path: string; state: NavigationState }) { + interrupt(); + + const id = nanoid(); + + // When a new entry is pushed, all the existing entries after index will be inaccessible + // So we remove any existing entries after the current index to clean them up + items = items.slice(0, index + 1); + + items.push({ path, state, id }); + index = items.length - 1; + + // We pass empty string for title because it's ignored in all browsers except safari + // We don't store state object in history.state because: + // - browsers have limits on how big it can be, and we don't control the size + // - while not recommended, there could be non-serializable data in state + window.history.pushState({ id }, '', path); + }, + + replace({ path, state }: { path: string; state: NavigationState }) { + interrupt(); + + const id = window.history.state?.id ?? nanoid(); + + // Need to keep the hash part of the path if there was no previous history entry + // or the previous history entry had the same path + let pathWithHash = path; + + if (!items.length || items.findIndex((item) => item.id === id) < 0) { + // There are two scenarios for creating an array with only one history record: + // - When loaded id not found in the items array, this function by default will replace + // the first item. We need to keep only the new updated object, otherwise it will break + // the page when navigating forward in history. + // - This is the first time any state modifications are done + // So we need to push the entry as there's nothing to replace + pathWithHash = pathWithHash + location.hash; + items = [{ path: pathWithHash, state, id }]; + index = 0; + } else { + if (items[index].path === path) { + pathWithHash = pathWithHash + location.hash; + } + items[index] = { path, state, id }; + } + + window.history.replaceState({ id }, '', pathWithHash); + }, + + // `history.go(n)` is asynchronous, there are couple of things to keep in mind: + // - it won't do anything if we can't go `n` steps, the `popstate` event won't fire. + // - each `history.go(n)` call will trigger a separate `popstate` event with correct location. + // - the `popstate` event fires before the next frame after calling `history.go(n)`. + // This method differs from `history.go(n)` in the sense that it'll go back as many steps it can. + go(n: number) { + interrupt(); + + // To guard against unexpected navigation out of the app we will assume that browser history is only as deep as the length of our memory + // history. If we don't have an item to navigate to then update our index and navigate as far as we can without taking the user out of the app. + const nextIndex = index + n; + const lastItemIndex = items.length - 1; + if (n < 0 && !items[nextIndex]) { + // Attempted to navigate beyond the first index. Negating the current index will align the browser history with the first item. + n = -index; + index = 0; + } else if (n > 0 && nextIndex > lastItemIndex) { + // Attempted to navigate past the last index. Calculate how many indices away from the last index and go there. + n = lastItemIndex - index; + index = lastItemIndex; + } else { + index = nextIndex; + } + + if (n === 0) { + return; + } + + // When we call `history.go`, `popstate` will fire when there's history to go back to + // So we need to somehow handle following cases: + // - There's history to go back, `history.go` is called, and `popstate` fires + // - `history.go` is called multiple times, we need to resolve on respective `popstate` + // - No history to go back, but `history.go` was called, browser has no API to detect it + return new Promise((resolve, reject) => { + const done = (interrupted?: boolean) => { + clearTimeout(timer); + + if (interrupted) { + reject(new Error('History was changed during navigation.')); + return; + } + + // There seems to be a bug in Chrome regarding updating the title + // If we set a title just before calling `history.go`, the title gets lost + // However the value of `document.title` is still what we set it to + // It's just not displayed in the tab bar + // To update the tab bar, we need to reset the title to something else first (e.g. '') + // And set the title to what it was before so it gets applied + // It won't work without setting it to empty string coz otherwise title isn't changing + // Which means that the browser won't do anything after setting the title + const { title } = window.document; + + window.document.title = ''; + window.document.title = title; + + resolve(); + }; + + pending.push({ ref: done, cb: done }); + + // If navigation didn't happen within 100ms, assume that it won't happen + // This may not be accurate, but hopefully it won't take so much time + // In Chrome, navigation seems to happen instantly in next microtask + // But on Firefox, it seems to take much longer, around 50ms from our testing + // We're using a hacky timeout since there doesn't seem to be way to know for sure + const timer = setTimeout(() => { + const index = pending.findIndex((it) => it.ref === done); + + if (index > -1) { + pending[index].cb(); + pending.splice(index, 1); + } + }, 100); + + const onPopState = () => { + const id = window.history.state?.id; + const currentIndex = items.findIndex((item) => item.id === id); + + // Fix createMemoryHistory.index variable's value + // as it may go out of sync when navigating in the browser. + index = Math.max(currentIndex, 0); + + const last = pending.pop(); + + window.removeEventListener('popstate', onPopState); + last?.cb(); + }; + + window.addEventListener('popstate', onPopState); + window.history.go(n); + }); + }, + + // The `popstate` event is triggered when history changes, except `pushState` and `replaceState` + // If we call `history.go(n)` ourselves, we don't want it to trigger the listener + // Here we normalize it so that only external changes (e.g. user pressing back/forward) trigger the listener + listen(listener: () => void) { + const onPopState = () => { + if (pending.length) { + // This was triggered by `history.go(n)`, we shouldn't call the listener + return; + } + + listener(); + }; + + window.addEventListener('popstate', onPopState); + + return () => window.removeEventListener('popstate', onPopState); + }, + }; + + return history; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/extractPathFromURL.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/extractPathFromURL.tsx new file mode 100644 index 00000000..1a124037 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/extractPathFromURL.tsx @@ -0,0 +1,26 @@ +import escapeStringRegexp from 'escape-string-regexp'; + +export default function extractPathFromURL(prefixes: string[], url: string) { + for (const prefix of prefixes) { + const protocol = prefix.match(/^[^:]+:/)?.[0] ?? ''; + const host = prefix + .replace(new RegExp(`^${escapeStringRegexp(protocol)}`), '') + .replace(/\/+/g, '/') // Replace multiple slash (//) with single ones + .replace(/^\//, ''); // Remove extra leading slash + + const prefixRegex = new RegExp( + `^${escapeStringRegexp(protocol)}(/)*${host + .split('.') + .map((it) => (it === '*' ? '[^/]+' : escapeStringRegexp(it))) + .join('\\.')}` + ); + + const normalizedURL = url.replace(/\/+/g, '/'); + + if (prefixRegex.test(normalizedURL)) { + return normalizedURL.replace(prefixRegex, ''); + } + } + + return undefined; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/index.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/index.tsx new file mode 100644 index 00000000..8290d53e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/index.tsx @@ -0,0 +1,14 @@ +export { default as Link } from './Link'; +export { default as LinkingContext } from './LinkingContext'; +export { default as NavigationContainer } from './NavigationContainer'; +export { default as ServerContainer } from './ServerContainer'; +export { default as DarkTheme } from './theming/DarkTheme'; +export { default as DefaultTheme } from './theming/DefaultTheme'; +export { default as ThemeProvider } from './theming/ThemeProvider'; +export { default as useTheme } from './theming/useTheme'; +export * from './types'; +export { default as useLinkBuilder } from './useLinkBuilder'; +export { default as useLinkProps } from './useLinkProps'; +export { default as useLinkTo } from './useLinkTo'; +export { default as useScrollToTop } from './useScrollToTop'; +export * from '@react-navigation/core'; diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/theming/DarkTheme.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/theming/DarkTheme.tsx new file mode 100644 index 00000000..68566ca6 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/theming/DarkTheme.tsx @@ -0,0 +1,15 @@ +import type { Theme } from '../types'; + +const DarkTheme: Theme = { + dark: true, + colors: { + primary: 'rgb(10, 132, 255)', + background: 'rgb(1, 1, 1)', + card: 'rgb(18, 18, 18)', + text: 'rgb(229, 229, 231)', + border: 'rgb(39, 39, 41)', + notification: 'rgb(255, 69, 58)', + }, +}; + +export default DarkTheme; diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/theming/DefaultTheme.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/theming/DefaultTheme.tsx new file mode 100644 index 00000000..7fd4b935 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/theming/DefaultTheme.tsx @@ -0,0 +1,15 @@ +import type { Theme } from '../types'; + +const DefaultTheme: Theme = { + dark: false, + colors: { + primary: 'rgb(0, 122, 255)', + background: 'rgb(242, 242, 242)', + card: 'rgb(255, 255, 255)', + text: 'rgb(28, 28, 30)', + border: 'rgb(216, 216, 216)', + notification: 'rgb(255, 59, 48)', + }, +}; + +export default DefaultTheme; diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/theming/ThemeContext.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/theming/ThemeContext.tsx new file mode 100644 index 00000000..7e1e4030 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/theming/ThemeContext.tsx @@ -0,0 +1,10 @@ +import * as React from 'react'; + +import type { Theme } from '../types'; +import DefaultTheme from './DefaultTheme'; + +const ThemeContext = React.createContext(DefaultTheme); + +ThemeContext.displayName = 'ThemeContext'; + +export default ThemeContext; diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/theming/ThemeProvider.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/theming/ThemeProvider.tsx new file mode 100644 index 00000000..d3a8edda --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/theming/ThemeProvider.tsx @@ -0,0 +1,15 @@ +import * as React from 'react'; + +import type { Theme } from '../types'; +import ThemeContext from './ThemeContext'; + +type Props = { + value: Theme; + children: React.ReactNode; +}; + +export default function ThemeProvider({ value, children }: Props) { + return ( + {children} + ); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/theming/useTheme.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/theming/useTheme.tsx new file mode 100644 index 00000000..3c1017a2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/theming/useTheme.tsx @@ -0,0 +1,9 @@ +import * as React from 'react'; + +import ThemeContext from './ThemeContext'; + +export default function useTheme() { + const theme = React.useContext(ThemeContext); + + return theme; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/types.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/types.tsx new file mode 100644 index 00000000..20282f6b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/types.tsx @@ -0,0 +1,145 @@ +import type { + getActionFromState as getActionFromStateDefault, + getPathFromState as getPathFromStateDefault, + getStateFromPath as getStateFromPathDefault, + PathConfigMap, + Route, +} from '@react-navigation/core'; + +export type Theme = { + dark: boolean; + colors: { + primary: string; + background: string; + card: string; + text: string; + border: string; + notification: string; + }; +}; + +export type LinkingOptions = { + /** + * Whether deep link handling should be enabled. + * Defaults to true. + */ + enabled?: boolean; + /** + * The prefixes are stripped from the URL before parsing them. + * Usually they are the `scheme` + `host` (e.g. `myapp://chat?user=jane`) + * + * This is not supported on Web. + * + * @example + * ```js + * { + * prefixes: [ + * "myapp://", // App-specific scheme + * "https://example.com", // Prefix for universal links + * "https://*.example.com" // Prefix which matches any subdomain + * ] + * } + * ``` + */ + prefixes: string[]; + /** + * Optional function which takes an incoming URL returns a boolean + * indicating whether React Navigation should handle it. + * + * This can be used to disable deep linking for specific URLs. + * e.g. URLs used for authentication, and not for deep linking to screens. + * + * This is not supported on Web. + * + * @example + * ```js + * { + * // Filter out URLs used by expo-auth-session + * filter: (url) => !url.includes('+expo-auth-session') + * } + * ``` + */ + filter?: (url: string) => boolean; + /** + * Config to fine-tune how to parse the path. + * + * @example + * ```js + * { + * Chat: { + * path: 'chat/:author/:id', + * parse: { id: Number } + * } + * } + * ``` + */ + config?: { + initialRouteName?: keyof ParamList; + screens: PathConfigMap; + }; + /** + * Custom function to get the initial URL used for linking. + * Uses `Linking.getInitialURL()` by default. + * + * This is not supported on Web. + * + * @example + * ```js + * { + * getInitialURL () => Linking.getInitialURL(), + * } + * ``` + */ + getInitialURL?: () => + | string + | null + | undefined + | Promise; + /** + * Custom function to get subscribe to URL updates. + * Uses `Linking.addEventListener('url', callback)` by default. + * + * This is not supported on Web. + * + * @example + * ```js + * { + * subscribe: (listener) => { + * const onReceiveURL = ({ url }) => listener(url); + * + * Linking.addEventListener('url', onReceiveURL); + * + * return () => Linking.removeEventListener('url', onReceiveURL); + * } + * } + * ``` + */ + subscribe?: ( + listener: (url: string) => void + ) => undefined | void | (() => void); + /** + * Custom function to parse the URL to a valid navigation state (advanced). + */ + getStateFromPath?: typeof getStateFromPathDefault; + /** + * Custom function to convert the state object to a valid URL (advanced). + * Only applicable on Web. + */ + getPathFromState?: typeof getPathFromStateDefault; + /** + * Custom function to convert the state object to a valid action (advanced). + */ + getActionFromState?: typeof getActionFromStateDefault; +}; + +export type DocumentTitleOptions = { + enabled?: boolean; + formatter?: ( + options: Record | undefined, + route: Route | undefined + ) => string; +}; + +export type ServerContainerRef = { + getCurrentOptions(): Record | undefined; +}; diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/useBackButton.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/useBackButton.tsx new file mode 100644 index 00000000..0d4b4fc9 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/useBackButton.tsx @@ -0,0 +1,33 @@ +import type { + NavigationContainerRef, + ParamListBase, +} from '@react-navigation/core'; +import * as React from 'react'; +import { BackHandler } from 'react-native'; + +export default function useBackButton( + ref: React.RefObject> +) { + React.useEffect(() => { + const subscription = BackHandler.addEventListener( + 'hardwareBackPress', + () => { + const navigation = ref.current; + + if (navigation == null) { + return false; + } + + if (navigation.canGoBack()) { + navigation.goBack(); + + return true; + } + + return false; + } + ); + + return () => subscription.remove(); + }, [ref]); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/useDocumentTitle.native.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/useDocumentTitle.native.tsx new file mode 100644 index 00000000..2ee565de --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/useDocumentTitle.native.tsx @@ -0,0 +1,3 @@ +export default function useDocumentTitle() { + // Noop for React Native +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/useDocumentTitle.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/useDocumentTitle.tsx new file mode 100644 index 00000000..311f103c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/useDocumentTitle.tsx @@ -0,0 +1,41 @@ +import type { + NavigationContainerRef, + ParamListBase, +} from '@react-navigation/core'; +import * as React from 'react'; + +import type { DocumentTitleOptions } from './types'; + +/** + * Set the document title for the active screen + */ +export default function useDocumentTitle( + ref: React.RefObject>, + { + enabled = true, + formatter = (options, route) => options?.title ?? route?.name, + }: DocumentTitleOptions = {} +) { + React.useEffect(() => { + if (!enabled) { + return; + } + + const navigation = ref.current; + + if (navigation) { + const title = formatter( + navigation.getCurrentOptions(), + navigation.getCurrentRoute() + ); + + document.title = title; + } + + return navigation?.addListener('options', (e) => { + const title = formatter(e.data.options, navigation?.getCurrentRoute()); + + document.title = title; + }); + }); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/useLinkBuilder.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/useLinkBuilder.tsx new file mode 100644 index 00000000..c14e222f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/useLinkBuilder.tsx @@ -0,0 +1,82 @@ +import { + getPathFromState, + NavigationHelpers, + NavigationHelpersContext, + NavigationProp, + ParamListBase, +} from '@react-navigation/core'; +import * as React from 'react'; + +import LinkingContext from './LinkingContext'; + +type NavigationObject = + | NavigationHelpers + | NavigationProp; + +type MinimalState = { + index: number; + routes: { name: string; params?: object; state?: MinimalState }[]; +}; + +const getRootStateForNavigate = ( + navigation: NavigationObject, + state: MinimalState +): MinimalState => { + const parent = navigation.getParent(); + + if (parent) { + const parentState = parent.getState(); + + return getRootStateForNavigate(parent, { + index: 0, + routes: [ + { + ...parentState.routes[parentState.index], + state: state, + }, + ], + }); + } + + return state; +}; + +/** + * Build destination link for a navigate action. + * Useful for showing anchor tags on the web for buttons that perform navigation. + */ +export default function useLinkBuilder() { + const navigation = React.useContext(NavigationHelpersContext); + const linking = React.useContext(LinkingContext); + + const buildLink = React.useCallback( + (name: string, params?: object) => { + const { options } = linking; + + if (options?.enabled === false) { + return undefined; + } + + const state = navigation + ? getRootStateForNavigate(navigation, { + index: 0, + routes: [{ name, params }], + }) + : // If we couldn't find a navigation object in context, we're at root + // So we'll construct a basic state object to use + { + index: 0, + routes: [{ name, params }], + }; + + const path = options?.getPathFromState + ? options.getPathFromState(state, options?.config) + : getPathFromState(state, options?.config); + + return path; + }, + [linking, navigation] + ); + + return buildLink; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/useLinkProps.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/useLinkProps.tsx new file mode 100644 index 00000000..569071c7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/useLinkProps.tsx @@ -0,0 +1,126 @@ +import { + getPathFromState, + NavigationAction, + NavigationContainerRefContext, + NavigationHelpersContext, + NavigatorScreenParams, + ParamListBase, +} from '@react-navigation/core'; +import type { NavigationState, PartialState } from '@react-navigation/routers'; +import * as React from 'react'; +import { GestureResponderEvent, Platform } from 'react-native'; + +import LinkingContext from './LinkingContext'; +import useLinkTo, { To } from './useLinkTo'; + +type Props = { + to: To; + action?: NavigationAction; +}; + +const getStateFromParams = ( + params: NavigatorScreenParams | undefined +): PartialState | NavigationState | undefined => { + if (params?.state) { + return params.state; + } + + if (params?.screen) { + return { + routes: [ + { + name: params.screen, + params: params.params, + // @ts-expect-error + state: params.screen + ? getStateFromParams( + params.params as + | NavigatorScreenParams + | undefined + ) + : undefined, + }, + ], + }; + } + + return undefined; +}; + +/** + * Hook to get props for an anchor tag so it can work with in page navigation. + * + * @param props.to Absolute path to screen (e.g. `/feeds/hot`). + * @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config. + */ +export default function useLinkProps< + ParamList extends ReactNavigation.RootParamList +>({ to, action }: Props) { + const root = React.useContext(NavigationContainerRefContext); + const navigation = React.useContext(NavigationHelpersContext); + const { options } = React.useContext(LinkingContext); + const linkTo = useLinkTo(); + + const onPress = ( + e?: React.MouseEvent | GestureResponderEvent + ) => { + let shouldHandle = false; + + if (Platform.OS !== 'web' || !e) { + shouldHandle = e ? !e.defaultPrevented : true; + } else if ( + !e.defaultPrevented && // onPress prevented default + // @ts-expect-error: these properties exist on web, but not in React Native + !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && // ignore clicks with modifier keys + // @ts-expect-error: these properties exist on web, but not in React Native + (e.button == null || e.button === 0) && // ignore everything but left clicks + // @ts-expect-error: these properties exist on web, but not in React Native + [undefined, null, '', 'self'].includes(e.currentTarget?.target) // let browser handle "target=_blank" etc. + ) { + e.preventDefault(); + shouldHandle = true; + } + + if (shouldHandle) { + if (action) { + if (navigation) { + navigation.dispatch(action); + } else if (root) { + root.dispatch(action); + } else { + throw new Error( + "Couldn't find a navigation object. Is your component inside NavigationContainer?" + ); + } + } else { + linkTo(to); + } + } + }; + + const getPathFromStateHelper = options?.getPathFromState ?? getPathFromState; + + const href = + typeof to === 'string' + ? to + : getPathFromStateHelper( + { + routes: [ + { + name: to.screen, + // @ts-expect-error + params: to.params, + // @ts-expect-error + state: getStateFromParams(to.params), + }, + ], + }, + options?.config + ); + + return { + href, + accessibilityRole: 'link' as const, + onPress, + }; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/useLinkTo.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/useLinkTo.tsx new file mode 100644 index 00000000..078f2aa4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/useLinkTo.tsx @@ -0,0 +1,71 @@ +import { + getActionFromState, + getStateFromPath, + NavigationContainerRefContext, +} from '@react-navigation/core'; +import * as React from 'react'; + +import LinkingContext from './LinkingContext'; + +export type To< + ParamList extends ReactNavigation.RootParamList = ReactNavigation.RootParamList, + RouteName extends keyof ParamList = keyof ParamList +> = + | string + | (undefined extends ParamList[RouteName] + ? { + screen: Extract; + params?: ParamList[RouteName]; + } + : { + screen: Extract; + params: ParamList[RouteName]; + }); + +export default function useLinkTo< + ParamList extends ReactNavigation.RootParamList +>() { + const navigation = React.useContext(NavigationContainerRefContext); + const linking = React.useContext(LinkingContext); + + const linkTo = React.useCallback( + (to: To) => { + if (navigation === undefined) { + throw new Error( + "Couldn't find a navigation object. Is your component inside NavigationContainer?" + ); + } + + if (typeof to !== 'string') { + // @ts-expect-error: This is fine + navigation.navigate(to.screen, to.params); + return; + } + + if (!to.startsWith('/')) { + throw new Error(`The path must start with '/' (${to}).`); + } + + const { options } = linking; + + const state = options?.getStateFromPath + ? options.getStateFromPath(to, options.config) + : getStateFromPath(to, options?.config); + + if (state) { + const action = getActionFromState(state, options?.config); + + if (action !== undefined) { + navigation.dispatch(action); + } else { + navigation.reset(state); + } + } else { + throw new Error('Failed to parse the path to a navigation state.'); + } + }, + [linking, navigation] + ); + + return linkTo; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/useLinking.native.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/useLinking.native.tsx new file mode 100644 index 00000000..759c8ecb --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/useLinking.native.tsx @@ -0,0 +1,215 @@ +import { + getActionFromState as getActionFromStateDefault, + getStateFromPath as getStateFromPathDefault, + NavigationContainerRef, + ParamListBase, +} from '@react-navigation/core'; +import * as React from 'react'; +import { Linking, Platform } from 'react-native'; + +import extractPathFromURL from './extractPathFromURL'; +import type { LinkingOptions } from './types'; + +type ResultState = ReturnType; + +type Options = LinkingOptions & { + independent?: boolean; +}; + +let linkingHandlers: Symbol[] = []; + +export default function useLinking( + ref: React.RefObject>, + { + independent, + enabled = true, + prefixes, + filter, + config, + getInitialURL = () => + Promise.race([ + Linking.getInitialURL(), + new Promise((resolve) => + // Timeout in 150ms if `getInitialState` doesn't resolve + // Workaround for https://github.com/facebook/react-native/issues/25675 + setTimeout(resolve, 150) + ), + ]), + subscribe = (listener) => { + const callback = ({ url }: { url: string }) => listener(url); + + const subscription = Linking.addEventListener('url', callback) as + | { remove(): void } + | undefined; + + // Storing this in a local variable stops Jest from complaining about import after teardown + const removeEventListener = Linking.removeEventListener?.bind(Linking); + + return () => { + // https://github.com/facebook/react-native/commit/6d1aca806cee86ad76de771ed3a1cc62982ebcd7 + if (subscription?.remove) { + subscription.remove(); + } else { + removeEventListener?.('url', callback); + } + }; + }, + getStateFromPath = getStateFromPathDefault, + getActionFromState = getActionFromStateDefault, + }: Options +) { + React.useEffect(() => { + if (process.env.NODE_ENV === 'production') { + return undefined; + } + + if (independent) { + return undefined; + } + + if (enabled !== false && linkingHandlers.length) { + console.error( + [ + 'Looks like you have configured linking in multiple places. This is likely an error since deep links should only be handled in one place to avoid conflicts. Make sure that:', + "- You don't have multiple NavigationContainers in the app each with 'linking' enabled", + '- Only a single instance of the root component is rendered', + Platform.OS === 'android' + ? "- You have set 'android:launchMode=singleTask' in the '' section of the 'AndroidManifest.xml' file to avoid launching multiple instances" + : '', + ] + .join('\n') + .trim() + ); + } + + const handler = Symbol(); + + if (enabled !== false) { + linkingHandlers.push(handler); + } + + return () => { + const index = linkingHandlers.indexOf(handler); + + if (index > -1) { + linkingHandlers.splice(index, 1); + } + }; + }, [enabled, independent]); + + // We store these options in ref to avoid re-creating getInitialState and re-subscribing listeners + // This lets user avoid wrapping the items in `React.useCallback` or `React.useMemo` + // Not re-creating `getInitialState` is important coz it makes it easier for the user to use in an effect + const enabledRef = React.useRef(enabled); + const prefixesRef = React.useRef(prefixes); + const filterRef = React.useRef(filter); + const configRef = React.useRef(config); + const getInitialURLRef = React.useRef(getInitialURL); + const getStateFromPathRef = React.useRef(getStateFromPath); + const getActionFromStateRef = React.useRef(getActionFromState); + + React.useEffect(() => { + enabledRef.current = enabled; + prefixesRef.current = prefixes; + filterRef.current = filter; + configRef.current = config; + getInitialURLRef.current = getInitialURL; + getStateFromPathRef.current = getStateFromPath; + getActionFromStateRef.current = getActionFromState; + }); + + const getStateFromURL = React.useCallback( + (url: string | null | undefined) => { + if (!url || (filterRef.current && !filterRef.current(url))) { + return undefined; + } + + const path = extractPathFromURL(prefixesRef.current, url); + + return path !== undefined + ? getStateFromPathRef.current(path, configRef.current) + : undefined; + }, + [] + ); + + const getInitialState = React.useCallback(() => { + let state: ResultState | undefined; + + if (enabledRef.current) { + const url = getInitialURLRef.current(); + + if (url != null && typeof url !== 'string') { + return url.then((url) => { + const state = getStateFromURL(url); + + return state; + }); + } + + state = getStateFromURL(url); + } + + const thenable = { + then(onfulfilled?: (state: ResultState | undefined) => void) { + return Promise.resolve(onfulfilled ? onfulfilled(state) : state); + }, + catch() { + return thenable; + }, + }; + + return thenable as PromiseLike; + }, [getStateFromURL]); + + React.useEffect(() => { + const listener = (url: string) => { + if (!enabled) { + return; + } + + const navigation = ref.current; + const state = navigation ? getStateFromURL(url) : undefined; + + if (navigation && state) { + // Make sure that the routes in the state exist in the root navigator + // Otherwise there's an error in the linking configuration + const rootState = navigation.getRootState(); + + if (state.routes.some((r) => !rootState?.routeNames.includes(r.name))) { + console.warn( + "The navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration." + ); + return; + } + + const action = getActionFromStateRef.current(state, configRef.current); + + if (action !== undefined) { + try { + navigation.dispatch(action); + } catch (e) { + // Ignore any errors from deep linking. + // This could happen in case of malformed links, navigation object not being initialized etc. + console.warn( + `An error occurred when trying to handle the link '${url}': ${ + typeof e === 'object' && e != null && 'message' in e + ? // @ts-expect-error: we're already checking for this + e.message + : e + }` + ); + } + } else { + navigation.resetRoot(state); + } + } + }; + + return subscribe(listener); + }, [enabled, getStateFromURL, ref, subscribe]); + + return { + getInitialState, + }; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/useLinking.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/useLinking.tsx new file mode 100644 index 00000000..8598cb16 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/useLinking.tsx @@ -0,0 +1,420 @@ +import { + findFocusedRoute, + getActionFromState as getActionFromStateDefault, + getPathFromState as getPathFromStateDefault, + getStateFromPath as getStateFromPathDefault, + NavigationContainerRef, + NavigationState, + ParamListBase, +} from '@react-navigation/core'; +import isEqual from 'fast-deep-equal'; +import * as React from 'react'; + +import createMemoryHistory from './createMemoryHistory'; +import ServerContext from './ServerContext'; +import type { LinkingOptions } from './types'; + +type ResultState = ReturnType; + +/** + * Find the matching navigation state that changed between 2 navigation states + * e.g.: a -> b -> c -> d and a -> b -> c -> e -> f, if history in b changed, b is the matching state + */ +const findMatchingState = ( + a: T | undefined, + b: T | undefined +): [T | undefined, T | undefined] => { + if (a === undefined || b === undefined || a.key !== b.key) { + return [undefined, undefined]; + } + + // Tab and drawer will have `history` property, but stack will have history in `routes` + const aHistoryLength = a.history ? a.history.length : a.routes.length; + const bHistoryLength = b.history ? b.history.length : b.routes.length; + + const aRoute = a.routes[a.index]; + const bRoute = b.routes[b.index]; + + const aChildState = aRoute.state as T | undefined; + const bChildState = bRoute.state as T | undefined; + + // Stop here if this is the state object that changed: + // - history length is different + // - focused routes are different + // - one of them doesn't have child state + // - child state keys are different + if ( + aHistoryLength !== bHistoryLength || + aRoute.key !== bRoute.key || + aChildState === undefined || + bChildState === undefined || + aChildState.key !== bChildState.key + ) { + return [a, b]; + } + + return findMatchingState(aChildState, bChildState); +}; + +/** + * Run async function in series as it's called. + */ +const series = (cb: () => Promise) => { + // Whether we're currently handling a callback + let handling = false; + let queue: (() => Promise)[] = []; + + const callback = async () => { + try { + if (handling) { + // If we're currently handling a previous event, wait before handling this one + // Add the callback to the beginning of the queue + queue.unshift(callback); + return; + } + + handling = true; + + await cb(); + } finally { + handling = false; + + if (queue.length) { + // If we have queued items, handle the last one + const last = queue.pop(); + + last?.(); + } + } + }; + + return callback; +}; + +let linkingHandlers: Symbol[] = []; + +type Options = LinkingOptions & { + independent?: boolean; +}; + +export default function useLinking( + ref: React.RefObject>, + { + independent, + enabled = true, + config, + getStateFromPath = getStateFromPathDefault, + getPathFromState = getPathFromStateDefault, + getActionFromState = getActionFromStateDefault, + }: Options +) { + React.useEffect(() => { + if (process.env.NODE_ENV === 'production') { + return undefined; + } + + if (independent) { + return undefined; + } + + if (enabled !== false && linkingHandlers.length) { + console.error( + [ + 'Looks like you have configured linking in multiple places. This is likely an error since deep links should only be handled in one place to avoid conflicts. Make sure that:', + "- You don't have multiple NavigationContainers in the app each with 'linking' enabled", + '- Only a single instance of the root component is rendered', + ] + .join('\n') + .trim() + ); + } + + const handler = Symbol(); + + if (enabled !== false) { + linkingHandlers.push(handler); + } + + return () => { + const index = linkingHandlers.indexOf(handler); + + if (index > -1) { + linkingHandlers.splice(index, 1); + } + }; + }, [enabled, independent]); + + const [history] = React.useState(createMemoryHistory); + + // We store these options in ref to avoid re-creating getInitialState and re-subscribing listeners + // This lets user avoid wrapping the items in `React.useCallback` or `React.useMemo` + // Not re-creating `getInitialState` is important coz it makes it easier for the user to use in an effect + const enabledRef = React.useRef(enabled); + const configRef = React.useRef(config); + const getStateFromPathRef = React.useRef(getStateFromPath); + const getPathFromStateRef = React.useRef(getPathFromState); + const getActionFromStateRef = React.useRef(getActionFromState); + + React.useEffect(() => { + enabledRef.current = enabled; + configRef.current = config; + getStateFromPathRef.current = getStateFromPath; + getPathFromStateRef.current = getPathFromState; + getActionFromStateRef.current = getActionFromState; + }); + + const server = React.useContext(ServerContext); + + const getInitialState = React.useCallback(() => { + let value: ResultState | undefined; + + if (enabledRef.current) { + const location = + server?.location ?? + (typeof window !== 'undefined' ? window.location : undefined); + + const path = location ? location.pathname + location.search : undefined; + + if (path) { + value = getStateFromPathRef.current(path, configRef.current); + } + } + + const thenable = { + then(onfulfilled?: (state: ResultState | undefined) => void) { + return Promise.resolve(onfulfilled ? onfulfilled(value) : value); + }, + catch() { + return thenable; + }, + }; + + return thenable as PromiseLike; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + const previousIndexRef = React.useRef(undefined); + const previousStateRef = React.useRef(undefined); + const pendingPopStatePathRef = React.useRef(undefined); + + React.useEffect(() => { + previousIndexRef.current = history.index; + + return history.listen(() => { + const navigation = ref.current; + + if (!navigation || !enabled) { + return; + } + + const path = location.pathname + location.search; + const index = history.index; + + const previousIndex = previousIndexRef.current ?? 0; + + previousIndexRef.current = index; + pendingPopStatePathRef.current = path; + + // When browser back/forward is clicked, we first need to check if state object for this index exists + // If it does we'll reset to that state object + // Otherwise, we'll handle it like a regular deep link + const record = history.get(index); + + if (record?.path === path && record?.state) { + navigation.resetRoot(record.state); + return; + } + + const state = getStateFromPathRef.current(path, configRef.current); + + // We should only dispatch an action when going forward + // Otherwise the action will likely add items to history, which would mess things up + if (state) { + // Make sure that the routes in the state exist in the root navigator + // Otherwise there's an error in the linking configuration + const rootState = navigation.getRootState(); + + if (state.routes.some((r) => !rootState?.routeNames.includes(r.name))) { + console.warn( + "The navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration." + ); + return; + } + + if (index > previousIndex) { + const action = getActionFromStateRef.current( + state, + configRef.current + ); + + if (action !== undefined) { + try { + navigation.dispatch(action); + } catch (e) { + // Ignore any errors from deep linking. + // This could happen in case of malformed links, navigation object not being initialized etc. + console.warn( + `An error occurred when trying to handle the link '${path}': ${ + typeof e === 'object' && e != null && 'message' in e + ? // @ts-expect-error: we're already checking for this + e.message + : e + }` + ); + } + } else { + navigation.resetRoot(state); + } + } else { + navigation.resetRoot(state); + } + } else { + // if current path didn't return any state, we should revert to initial state + navigation.resetRoot(state); + } + }); + }, [enabled, history, ref]); + + React.useEffect(() => { + if (!enabled) { + return; + } + + const getPathForRoute = ( + route: ReturnType, + state: NavigationState + ): string => { + // If the `route` object contains a `path`, use that path as long as `route.name` and `params` still match + // This makes sure that we preserve the original URL for wildcard routes + if (route?.path) { + const stateForPath = getStateFromPathRef.current( + route.path, + configRef.current + ); + + if (stateForPath) { + const focusedRoute = findFocusedRoute(stateForPath); + + if ( + focusedRoute && + focusedRoute.name === route.name && + isEqual(focusedRoute.params, route.params) + ) { + return route.path; + } + } + } + + return getPathFromStateRef.current(state, configRef.current); + }; + + if (ref.current) { + // We need to record the current metadata on the first render if they aren't set + // This will allow the initial state to be in the history entry + const state = ref.current.getRootState(); + + if (state) { + const route = findFocusedRoute(state); + const path = getPathForRoute(route, state); + + if (previousStateRef.current === undefined) { + previousStateRef.current = state; + } + + history.replace({ path, state }); + } + } + + const onStateChange = async () => { + const navigation = ref.current; + + if (!navigation || !enabled) { + return; + } + + const previousState = previousStateRef.current; + const state = navigation.getRootState(); + + // root state may not available, for example when root navigators switch inside the container + if (!state) { + return; + } + + const pendingPath = pendingPopStatePathRef.current; + const route = findFocusedRoute(state); + const path = getPathForRoute(route, state); + + previousStateRef.current = state; + pendingPopStatePathRef.current = undefined; + + // To detect the kind of state change, we need to: + // - Find the common focused navigation state in previous and current state + // - If only the route keys changed, compare history/routes.length to check if we go back/forward/replace + // - If no common focused navigation state found, it's a replace + const [previousFocusedState, focusedState] = findMatchingState( + previousState, + state + ); + + if ( + previousFocusedState && + focusedState && + // We should only handle push/pop if path changed from what was in last `popstate` + // Otherwise it's likely a change triggered by `popstate` + path !== pendingPath + ) { + const historyDelta = + (focusedState.history + ? focusedState.history.length + : focusedState.routes.length) - + (previousFocusedState.history + ? previousFocusedState.history.length + : previousFocusedState.routes.length); + + if (historyDelta > 0) { + // If history length is increased, we should pushState + // Note that path might not actually change here, for example, drawer open should pushState + history.push({ path, state }); + } else if (historyDelta < 0) { + // If history length is decreased, i.e. entries were removed, we want to go back + + const nextIndex = history.backIndex({ path }); + const currentIndex = history.index; + + try { + if (nextIndex !== -1 && nextIndex < currentIndex) { + // An existing entry for this path exists and it's less than current index, go back to that + await history.go(nextIndex - currentIndex); + } else { + // We couldn't find an existing entry to go back to, so we'll go back by the delta + // This won't be correct if multiple routes were pushed in one go before + // Usually this shouldn't happen and this is a fallback for that + await history.go(historyDelta); + } + + // Store the updated state as well as fix the path if incorrect + history.replace({ path, state }); + } catch (e) { + // The navigation was interrupted + } + } else { + // If history length is unchanged, we want to replaceState + history.replace({ path, state }); + } + } else { + // If no common navigation state was found, assume it's a replace + // This would happen if the user did a reset/conditionally changed navigators + history.replace({ path, state }); + } + }; + + // We debounce onStateChange coz we don't want multiple state changes to be handled at one time + // This could happen since `history.go(n)` is asynchronous + // If `pushState` or `replaceState` were called before `history.go(n)` completes, it'll mess stuff up + return ref.current?.addListener('state', series(onStateChange)); + }, [enabled, history, ref]); + + return { + getInitialState, + }; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/useScrollToTop.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/useScrollToTop.tsx new file mode 100644 index 00000000..1a6331a3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/useScrollToTop.tsx @@ -0,0 +1,115 @@ +import { + EventArg, + NavigationProp, + useNavigation, + useRoute, +} from '@react-navigation/core'; +import * as React from 'react'; + +type ScrollOptions = { x?: number; y?: number; animated?: boolean }; + +type ScrollableView = + | { scrollToTop(): void } + | { scrollTo(options: ScrollOptions): void } + | { scrollToOffset(options: { offset?: number; animated?: boolean }): void } + | { scrollResponderScrollTo(options: ScrollOptions): void }; + +type ScrollableWrapper = + | { getScrollResponder(): React.ReactNode } + | { getNode(): ScrollableView } + | ScrollableView; + +function getScrollableNode(ref: React.RefObject) { + if (ref.current == null) { + return null; + } + + if ( + 'scrollToTop' in ref.current || + 'scrollTo' in ref.current || + 'scrollToOffset' in ref.current || + 'scrollResponderScrollTo' in ref.current + ) { + // This is already a scrollable node. + return ref.current; + } else if ('getScrollResponder' in ref.current) { + // If the view is a wrapper like FlatList, SectionList etc. + // We need to use `getScrollResponder` to get access to the scroll responder + return ref.current.getScrollResponder(); + } else if ('getNode' in ref.current) { + // When a `ScrollView` is wraped in `Animated.createAnimatedComponent` + // we need to use `getNode` to get the ref to the actual scrollview. + // Note that `getNode` is deprecated in newer versions of react-native + // this is why we check if we already have a scrollable node above. + return ref.current.getNode(); + } else { + return ref.current; + } +} + +export default function useScrollToTop( + ref: React.RefObject +) { + const navigation = useNavigation(); + const route = useRoute(); + + React.useEffect(() => { + let tabNavigations: NavigationProp[] = []; + let currentNavigation = navigation; + + // If the screen is nested inside multiple tab navigators, we should scroll to top for any of them + // So we need to find all the parent tab navigators and add the listeners there + while (currentNavigation) { + if (currentNavigation.getState().type === 'tab') { + tabNavigations.push(currentNavigation); + } + + currentNavigation = currentNavigation.getParent(); + } + + if (tabNavigations.length === 0) { + return; + } + + const unsubscribers = tabNavigations.map((tab) => { + return tab.addListener( + // We don't wanna import tab types here to avoid extra deps + // in addition, there are multiple tab implementations + // @ts-expect-error + 'tabPress', + (e: EventArg<'tabPress', true>) => { + // We should scroll to top only when the screen is focused + const isFocused = navigation.isFocused(); + + // In a nested stack navigator, tab press resets the stack to first screen + // So we should scroll to top only when we are on first screen + const isFirst = + tabNavigations.includes(navigation) || + navigation.getState().routes[0].key === route.key; + + // Run the operation in the next frame so we're sure all listeners have been run + // This is necessary to know if preventDefault() has been called + requestAnimationFrame(() => { + const scrollable = getScrollableNode(ref) as ScrollableWrapper; + + if (isFocused && isFirst && scrollable && !e.defaultPrevented) { + if ('scrollToTop' in scrollable) { + scrollable.scrollToTop(); + } else if ('scrollTo' in scrollable) { + scrollable.scrollTo({ y: 0, animated: true }); + } else if ('scrollToOffset' in scrollable) { + scrollable.scrollToOffset({ offset: 0, animated: true }); + } else if ('scrollResponderScrollTo' in scrollable) { + scrollable.scrollResponderScrollTo({ y: 0, animated: true }); + } + } + }); + } + ); + }); + + return () => { + unsubscribers.forEach((unsubscribe) => unsubscribe()); + }; + }, [navigation, ref, route.key]); +} diff --git a/iut-expo-starter/node_modules/@react-navigation/native/src/useThenable.tsx b/iut-expo-starter/node_modules/@react-navigation/native/src/useThenable.tsx new file mode 100644 index 00000000..208f8bd3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/native/src/useThenable.tsx @@ -0,0 +1,41 @@ +import * as React from 'react'; + +export default function useThenable(create: () => PromiseLike) { + const [promise] = React.useState(create); + + let initialState: [boolean, T | undefined] = [false, undefined]; + + // Check if our thenable is synchronous + promise.then((result) => { + initialState = [true, result]; + }); + + const [state, setState] = React.useState(initialState); + const [resolved] = state; + + React.useEffect(() => { + let cancelled = false; + + const resolve = async () => { + let result; + + try { + result = await promise; + } finally { + if (!cancelled) { + setState([true, result]); + } + } + }; + + if (!resolved) { + resolve(); + } + + return () => { + cancelled = true; + }; + }, [promise, resolved]); + + return state; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/LICENSE b/iut-expo-starter/node_modules/@react-navigation/routers/LICENSE new file mode 100644 index 00000000..9d268cb0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 React Navigation Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/README.md b/iut-expo-starter/node_modules/@react-navigation/routers/README.md new file mode 100644 index 00000000..5141672c --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/README.md @@ -0,0 +1,17 @@ +# `@react-navigation/routers` + +Routers to help build custom navigators. + +You probably don't need to use this package directly if you're not building custom navigators. + +## Installation + +Open a Terminal in your project's folder and run, + +```sh +yarn add @react-navigation/routers +``` + +## Usage + +Documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/custom-routers/). diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/BaseRouter.js b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/BaseRouter.js new file mode 100644 index 00000000..e4787245 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/BaseRouter.js @@ -0,0 +1,62 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _nonSecure = require("nanoid/non-secure"); +/** + * Base router object that can be used when writing custom routers. + * This provides few helper methods to handle common actions such as `RESET`. + */ +const BaseRouter = { + getStateForAction(state, action) { + switch (action.type) { + case 'SET_PARAMS': + { + const index = action.source ? state.routes.findIndex(r => r.key === action.source) : state.index; + if (index === -1) { + return null; + } + return { + ...state, + routes: state.routes.map((r, i) => i === index ? { + ...r, + params: { + ...r.params, + ...action.payload.params + } + } : r) + }; + } + case 'RESET': + { + const nextState = action.payload; + if (nextState.routes.length === 0 || nextState.routes.some(route => !state.routeNames.includes(route.name))) { + return null; + } + if (nextState.stale === false) { + if (state.routeNames.length !== nextState.routeNames.length || nextState.routeNames.some(name => !state.routeNames.includes(name))) { + return null; + } + return { + ...nextState, + routes: nextState.routes.map(route => route.key ? route : { + ...route, + key: `${route.name}-${(0, _nonSecure.nanoid)()}` + }) + }; + } + return nextState; + } + default: + return null; + } + }, + shouldActionChangeFocus(action) { + return action.type === 'NAVIGATE'; + } +}; +var _default = BaseRouter; +exports.default = _default; +//# sourceMappingURL=BaseRouter.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/BaseRouter.js.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/BaseRouter.js.map new file mode 100644 index 00000000..0a10d79d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/BaseRouter.js.map @@ -0,0 +1 @@ +{"version":3,"names":["BaseRouter","getStateForAction","state","action","type","index","source","routes","findIndex","r","key","map","i","params","payload","nextState","length","some","route","routeNames","includes","name","stale","nanoid","shouldActionChangeFocus"],"sourceRoot":"../../src","sources":["BaseRouter.tsx"],"mappings":";;;;;;AAAA;AAQA;AACA;AACA;AACA;AACA,MAAMA,UAAU,GAAG;EACjBC,iBAAiB,CACfC,KAAY,EACZC,MAA8B,EACM;IACpC,QAAQA,MAAM,CAACC,IAAI;MACjB,KAAK,YAAY;QAAE;UACjB,MAAMC,KAAK,GAAGF,MAAM,CAACG,MAAM,GACvBJ,KAAK,CAACK,MAAM,CAACC,SAAS,CAAEC,CAAC,IAAKA,CAAC,CAACC,GAAG,KAAKP,MAAM,CAACG,MAAM,CAAC,GACtDJ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SAAS;QAClB;MAEA;QACE,OAAO,IAAI;IAAC;EAElB,CAAC;EAEDS,uBAAuB,CAACrB,MAA8B,EAAE;IACtD,OAAOA,MAAM,CAACC,IAAI,KAAK,UAAU;EACnC;AACF,CAAC;AAAC,eAEaJ,UAAU;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/CommonActions.js b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/CommonActions.js new file mode 100644 index 00000000..9cd6e642 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/CommonActions.js @@ -0,0 +1,50 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.goBack = goBack; +exports.navigate = navigate; +exports.reset = reset; +exports.setParams = setParams; +function goBack() { + return { + type: 'GO_BACK' + }; +} +// eslint-disable-next-line no-redeclare +function navigate() { + if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'string') { + return { + type: 'NAVIGATE', + payload: { + name: arguments.length <= 0 ? undefined : arguments[0], + params: arguments.length <= 1 ? undefined : arguments[1] + } + }; + } else { + const payload = (arguments.length <= 0 ? undefined : arguments[0]) || {}; + if (!payload.hasOwnProperty('key') && !payload.hasOwnProperty('name')) { + throw new Error('You need to specify name or key when calling navigate with an object as the argument. See https://reactnavigation.org/docs/navigation-actions#navigate for usage.'); + } + return { + type: 'NAVIGATE', + payload + }; + } +} +function reset(state) { + return { + type: 'RESET', + payload: state + }; +} +function setParams(params) { + return { + type: 'SET_PARAMS', + payload: { + params + } + }; +} +//# sourceMappingURL=CommonActions.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/CommonActions.js.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/CommonActions.js.map new file mode 100644 index 00000000..83d53e35 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/CommonActions.js.map @@ -0,0 +1 @@ +{"version":3,"names":["goBack","type","navigate","payload","name","params","hasOwnProperty","Error","reset","state","setParams"],"sourceRoot":"../../src","sources":["CommonActions.tsx"],"mappings":";;;;;;;;;AAgDO,SAASA,MAAM,GAAW;EAC/B,OAAO;IAAEC,IAAI,EAAE;EAAU,CAAC;AAC5B;AAeA;AACO,SAASC,QAAQ,GAAuB;EAC7C,IAAI,yDAAc,KAAK,QAAQ,EAAE;IAC/B,OAAO;MAAED,IAAI,EAAE,UAAU;MAAEE,OAAO,EAAE;QAAEC,IAAI,kDAAS;QAAEC,MAAM;MAAU;IAAE,CAAC;EAC1E,CAAC,MAAM;IACL,MAAMF,OAAO,GAAG,sDAAW,CAAC,CAAC;IAE7B,IAAI,CAACA,OAAO,CAACG,cAAc,CAAC,KAAK,CAAC,IAAI,CAACH,OAAO,CAACG,cAAc,CAAC,MAAM,CAAC,EAAE;MACrE,MAAM,IAAIC,KAAK,CACb,mKAAmK,CACpK;IACH;IAEA,OAAO;MAAEN,IAAI,EAAE,UAAU;MAAEE;IAAQ,CAAC;EACtC;AACF;AAEO,SAASK,KAAK,CAACC,KAA6B,EAAU;EAC3D,OAAO;IAAER,IAAI,EAAE,OAAO;IAAEE,OAAO,EAAEM;EAAM,CAAC;AAC1C;AAEO,SAASC,SAAS,CAACL,MAAc,EAAU;EAChD,OAAO;IAAEJ,IAAI,EAAE,YAAY;IAAEE,OAAO,EAAE;MAAEE;IAAO;EAAE,CAAC;AACpD"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/DrawerRouter.js b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/DrawerRouter.js new file mode 100644 index 00000000..d7755cac --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/DrawerRouter.js @@ -0,0 +1,158 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.DrawerActions = void 0; +exports.default = DrawerRouter; +var _nonSecure = require("nanoid/non-secure"); +var _TabRouter = _interopRequireWildcard(require("./TabRouter")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const DrawerActions = { + ..._TabRouter.TabActions, + openDrawer() { + return { + type: 'OPEN_DRAWER' + }; + }, + closeDrawer() { + return { + type: 'CLOSE_DRAWER' + }; + }, + toggleDrawer() { + return { + type: 'TOGGLE_DRAWER' + }; + } +}; +exports.DrawerActions = DrawerActions; +function DrawerRouter(_ref) { + let { + defaultStatus = 'closed', + ...rest + } = _ref; + const router = (0, _TabRouter.default)(rest); + const isDrawerInHistory = state => { + var _state$history; + return Boolean((_state$history = state.history) === null || _state$history === void 0 ? void 0 : _state$history.some(it => it.type === 'drawer')); + }; + const addDrawerToHistory = state => { + if (isDrawerInHistory(state)) { + return state; + } + return { + ...state, + history: [...state.history, { + type: 'drawer', + status: defaultStatus === 'open' ? 'closed' : 'open' + }] + }; + }; + const removeDrawerFromHistory = state => { + if (!isDrawerInHistory(state)) { + return state; + } + return { + ...state, + history: state.history.filter(it => it.type !== 'drawer') + }; + }; + const openDrawer = state => { + if (defaultStatus === 'open') { + return removeDrawerFromHistory(state); + } + return addDrawerToHistory(state); + }; + const closeDrawer = state => { + if (defaultStatus === 'open') { + return addDrawerToHistory(state); + } + return removeDrawerFromHistory(state); + }; + return { + ...router, + type: 'drawer', + getInitialState(_ref2) { + let { + routeNames, + routeParamList, + routeGetIdList + } = _ref2; + const state = router.getInitialState({ + routeNames, + routeParamList, + routeGetIdList + }); + return { + ...state, + default: defaultStatus, + stale: false, + type: 'drawer', + key: `drawer-${(0, _nonSecure.nanoid)()}` + }; + }, + getRehydratedState(partialState, _ref3) { + let { + routeNames, + routeParamList, + routeGetIdList + } = _ref3; + if (partialState.stale === false) { + return partialState; + } + let state = router.getRehydratedState(partialState, { + routeNames, + routeParamList, + routeGetIdList + }); + if (isDrawerInHistory(partialState)) { + // Re-sync the drawer entry in history to correct it if it was wrong + state = removeDrawerFromHistory(state); + state = addDrawerToHistory(state); + } + return { + ...state, + default: defaultStatus, + type: 'drawer', + key: `drawer-${(0, _nonSecure.nanoid)()}` + }; + }, + getStateForRouteFocus(state, key) { + const result = router.getStateForRouteFocus(state, key); + return closeDrawer(result); + }, + getStateForAction(state, action, options) { + switch (action.type) { + case 'OPEN_DRAWER': + return openDrawer(state); + case 'CLOSE_DRAWER': + return closeDrawer(state); + case 'TOGGLE_DRAWER': + if (isDrawerInHistory(state)) { + return removeDrawerFromHistory(state); + } + return addDrawerToHistory(state); + case 'JUMP_TO': + case 'NAVIGATE': + { + const result = router.getStateForAction(state, action, options); + if (result != null && result.index !== state.index) { + return closeDrawer(result); + } + return result; + } + case 'GO_BACK': + if (isDrawerInHistory(state)) { + return removeDrawerFromHistory(state); + } + return router.getStateForAction(state, action, options); + default: + return router.getStateForAction(state, action, options); + } + }, + actionCreators: DrawerActions + }; +} +//# sourceMappingURL=DrawerRouter.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/DrawerRouter.js.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/DrawerRouter.js.map new file mode 100644 index 00000000..f48d6b68 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/DrawerRouter.js.map @@ -0,0 +1 @@ +{"version":3,"names":["DrawerActions","TabActions","openDrawer","type","closeDrawer","toggleDrawer","DrawerRouter","defaultStatus","rest","router","TabRouter","isDrawerInHistory","state","Boolean","history","some","it","addDrawerToHistory","status","removeDrawerFromHistory","filter","getInitialState","routeNames","routeParamList","routeGetIdList","default","stale","key","nanoid","getRehydratedState","partialState","getStateForRouteFocus","result","getStateForAction","action","options","index","actionCreators"],"sourceRoot":"../../src","sources":["DrawerRouter.tsx"],"mappings":";;;;;;;AAAA;AAEA;AAMqB;AAAA;AA4Dd,MAAMA,aAAa,GAAG;EAC3B,GAAGC,qBAAU;EACbC,UAAU,GAAqB;IAC7B,OAAO;MAAEC,IAAI,EAAE;IAAc,CAAC;EAChC,CAAC;EACDC,WAAW,GAAqB;IAC9B,OAAO;MAAED,IAAI,EAAE;IAAe,CAAC;EACjC,CAAC;EACDE,YAAY,GAAqB;IAC/B,OAAO;MAAEF,IAAI,EAAE;IAAgB,CAAC;EAClC;AACF,CAAC;AAAC;AAEa,SAASG,YAAY,OAMlC;EAAA,IANmC;IACnCC,aAAa,GAAG,QAAQ;IACxB,GAAGC;EACgB,CAAC;EAIpB,MAAMC,MAAM,GAAG,IAAAC,kBAAS,EAACF,IAAI,CAG5B;EAED,MAAMG,iBAAiB,GACrBC,KAEsD;IAAA;IAAA,OACnDC,OAAO,mBAACD,KAAK,CAACE,OAAO,mDAAb,eAAeC,IAAI,CAAEC,EAAE,IAAKA,EAAE,CAACb,IAAI,KAAK,QAAQ,CAAC,CAAC;EAAA;EAE/D,MAAMc,kBAAkB,GACtBL,KAA2C,IACF;IACzC,IAAID,iBAAiB,CAACC,KAAK,CAAC,EAAE;MAC5B,OAAOA,KAAK;IACd;IAEA,OAAO;MACL,GAAGA,KAAK;MACRE,OAAO,EAAE,CACP,GAAGF,KAAK,CAACE,OAAO,EAChB;QACEX,IAAI,E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,KAAKxB,KAAK,CAACwB,KAAK,EAAE;cAClD,OAAOhC,WAAW,CAAC4B,MAAM,CAAyC;YACpE;YAEA,OAAOA,MAAM;UACf;QAEA,KAAK,SAAS;UACZ,IAAIrB,iBAAiB,CAACC,KAAK,CAAC,EAAE;YAC5B,OAAOO,uBAAuB,CAACP,KAAK,CAAC;UACvC;UAEA,OAAOH,MAAM,CAACwB,iBAAiB,CAACrB,KAAK,EAAEsB,MAAM,EAAEC,OAAO,CAAC;QAEzD;UACE,OAAO1B,MAAM,CAACwB,iBAAiB,CAACrB,KAAK,EAAEsB,MAAM,EAAEC,OAAO,CAAC;MAAC;IAE9D,CAAC;IAEDE,cAAc,EAAErC;EAClB,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/StackRouter.js b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/StackRouter.js new file mode 100644 index 00000000..377c4c34 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/StackRouter.js @@ -0,0 +1,315 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.StackActions = void 0; +exports.default = StackRouter; +var _nonSecure = require("nanoid/non-secure"); +var _BaseRouter = _interopRequireDefault(require("./BaseRouter")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const StackActions = { + replace(name, params) { + return { + type: 'REPLACE', + payload: { + name, + params + } + }; + }, + push(name, params) { + return { + type: 'PUSH', + payload: { + name, + params + } + }; + }, + pop() { + let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + return { + type: 'POP', + payload: { + count + } + }; + }, + popToTop() { + return { + type: 'POP_TO_TOP' + }; + } +}; +exports.StackActions = StackActions; +function StackRouter(options) { + const router = { + ..._BaseRouter.default, + type: 'stack', + getInitialState(_ref) { + let { + routeNames, + routeParamList + } = _ref; + const initialRouteName = options.initialRouteName !== undefined && routeNames.includes(options.initialRouteName) ? options.initialRouteName : routeNames[0]; + return { + stale: false, + type: 'stack', + key: `stack-${(0, _nonSecure.nanoid)()}`, + index: 0, + routeNames, + routes: [{ + key: `${initialRouteName}-${(0, _nonSecure.nanoid)()}`, + name: initialRouteName, + params: routeParamList[initialRouteName] + }] + }; + }, + getRehydratedState(partialState, _ref2) { + let { + routeNames, + routeParamList + } = _ref2; + let state = partialState; + if (state.stale === false) { + return state; + } + const routes = state.routes.filter(route => routeNames.includes(route.name)).map(route => ({ + ...route, + key: route.key || `${route.name}-${(0, _nonSecure.nanoid)()}`, + params: routeParamList[route.name] !== undefined ? { + ...routeParamList[route.name], + ...route.params + } : route.params + })); + if (routes.length === 0) { + const initialRouteName = options.initialRouteName !== undefined ? options.initialRouteName : routeNames[0]; + routes.push({ + key: `${initialRouteName}-${(0, _nonSecure.nanoid)()}`, + name: initialRouteName, + params: routeParamList[initialRouteName] + }); + } + return { + stale: false, + type: 'stack', + key: `stack-${(0, _nonSecure.nanoid)()}`, + index: routes.length - 1, + routeNames, + routes + }; + }, + getStateForRouteNamesChange(state, _ref3) { + let { + routeNames, + routeParamList, + routeKeyChanges + } = _ref3; + const routes = state.routes.filter(route => routeNames.includes(route.name) && !routeKeyChanges.includes(route.name)); + if (routes.length === 0) { + const initialRouteName = options.initialRouteName !== undefined && routeNames.includes(options.initialRouteName) ? options.initialRouteName : routeNames[0]; + routes.push({ + key: `${initialRouteName}-${(0, _nonSecure.nanoid)()}`, + name: initialRouteName, + params: routeParamList[initialRouteName] + }); + } + return { + ...state, + routeNames, + routes, + index: Math.min(state.index, routes.length - 1) + }; + }, + getStateForRouteFocus(state, key) { + const index = state.routes.findIndex(r => r.key === key); + if (index === -1 || index === state.index) { + return state; + } + return { + ...state, + index, + routes: state.routes.slice(0, index + 1) + }; + }, + getStateForAction(state, action, options) { + const { + routeParamList + } = options; + switch (action.type) { + case 'REPLACE': + { + const index = action.target === state.key && action.source ? state.routes.findIndex(r => r.key === action.source) : state.index; + if (index === -1) { + return null; + } + const { + name, + key, + params + } = action.payload; + if (!state.routeNames.includes(name)) { + return null; + } + return { + ...state, + routes: state.routes.map((route, i) => i === index ? { + key: key !== undefined ? key : `${name}-${(0, _nonSecure.nanoid)()}`, + name, + params: routeParamList[name] !== undefined ? { + ...routeParamList[name], + ...params + } : params + } : route) + }; + } + case 'PUSH': + if (state.routeNames.includes(action.payload.name)) { + const getId = options.routeGetIdList[action.payload.name]; + const id = getId === null || getId === void 0 ? void 0 : getId({ + params: action.payload.params + }); + const route = id ? state.routes.find(route => route.name === action.payload.name && id === (getId === null || getId === void 0 ? void 0 : getId({ + params: route.params + }))) : undefined; + let routes; + if (route) { + routes = state.routes.filter(r => r.key !== route.key); + routes.push({ + ...route, + params: routeParamList[action.payload.name] !== undefined ? { + ...routeParamList[action.payload.name], + ...action.payload.params + } : action.payload.params + }); + } else { + routes = [...state.routes, { + key: `${action.payload.name}-${(0, _nonSecure.nanoid)()}`, + name: action.payload.name, + params: routeParamList[action.payload.name] !== undefined ? { + ...routeParamList[action.payload.name], + ...action.payload.params + } : action.payload.params + }]; + } + return { + ...state, + index: routes.length - 1, + routes + }; + } + return null; + case 'POP': + { + const index = action.target === state.key && action.source ? state.routes.findIndex(r => r.key === action.source) : state.index; + if (index > 0) { + const count = Math.max(index - action.payload.count + 1, 1); + const routes = state.routes.slice(0, count).concat(state.routes.slice(index + 1)); + return { + ...state, + index: routes.length - 1, + routes + }; + } + return null; + } + case 'POP_TO_TOP': + return router.getStateForAction(state, { + type: 'POP', + payload: { + count: state.routes.length - 1 + } + }, options); + case 'NAVIGATE': + if (action.payload.name !== undefined && !state.routeNames.includes(action.payload.name)) { + return null; + } + if (action.payload.key || action.payload.name) { + // If the route already exists, navigate to that + let index = -1; + const getId = + // `getId` and `key` can't be used together + action.payload.key === undefined && action.payload.name !== undefined ? options.routeGetIdList[action.payload.name] : undefined; + const id = getId === null || getId === void 0 ? void 0 : getId({ + params: action.payload.params + }); + if (id) { + index = state.routes.findIndex(route => route.name === action.payload.name && id === (getId === null || getId === void 0 ? void 0 : getId({ + params: route.params + }))); + } else if (state.routes[state.index].name === action.payload.name && action.payload.key === undefined || state.routes[state.index].key === action.payload.key) { + index = state.index; + } else { + for (let i = state.routes.length - 1; i >= 0; i--) { + if (state.routes[i].name === action.payload.name && action.payload.key === undefined || state.routes[i].key === action.payload.key) { + index = i; + break; + } + } + } + if (index === -1 && action.payload.key && action.payload.name === undefined) { + return null; + } + if (index === -1 && action.payload.name !== undefined) { + const routes = [...state.routes, { + key: action.payload.key ?? `${action.payload.name}-${(0, _nonSecure.nanoid)()}`, + name: action.payload.name, + path: action.payload.path, + params: routeParamList[action.payload.name] !== undefined ? { + ...routeParamList[action.payload.name], + ...action.payload.params + } : action.payload.params + }]; + return { + ...state, + routes, + index: routes.length - 1 + }; + } + const route = state.routes[index]; + let params; + if (action.payload.merge) { + params = action.payload.params !== undefined || routeParamList[route.name] !== undefined ? { + ...routeParamList[route.name], + ...route.params, + ...action.payload.params + } : route.params; + } else { + params = routeParamList[route.name] !== undefined ? { + ...routeParamList[route.name], + ...action.payload.params + } : action.payload.params; + } + return { + ...state, + index, + routes: [...state.routes.slice(0, index), params !== route.params || action.payload.path && action.payload.path !== route.path ? { + ...route, + path: action.payload.path ?? route.path, + params + } : state.routes[index]] + }; + } + return null; + case 'GO_BACK': + if (state.index > 0) { + return router.getStateForAction(state, { + type: 'POP', + payload: { + count: 1 + }, + target: action.target, + source: action.source + }, options); + } + return null; + default: + return _BaseRouter.default.getStateForAction(state, action); + } + }, + actionCreators: StackActions + }; + return router; +} +//# sourceMappingURL=StackRouter.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/StackRouter.js.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/StackRouter.js.map new file mode 100644 index 00000000..9f683660 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/StackRouter.js.map @@ -0,0 +1 @@ +{"version":3,"names":["StackActions","replace","name","params","type","payload","push","pop","count","popToTop","StackRouter","options","router","BaseRouter","getInitialState","routeNames","routeParamList","initialRouteName","undefined","includes","stale","key","nanoid","index","routes","getRehydratedState","partialState","state","filter","route","map","length","getStateForRouteNamesChange","routeKeyChanges","Math","min","getStateForRouteFocus","findIndex","r","slice","getStateForAction","action","target","source","i","getId","routeGetIdList","id","find","max","concat","path","merge","actionCreators"],"sourceRoot":"../../src","sources":["StackRouter.tsx"],"mappings":";;;;;;;AAAA;AAEA;AAAsC;AAiF/B,MAAMA,YAAY,GAAG;EAC1BC,OAAO,CAACC,IAAY,EAAEC,MAAe,EAAmB;IACtD,OAAO;MAAEC,IAAI,EAAE,SAAS;MAAEC,OAAO,EAAE;QAAEH,IAAI;QAAEC;MAAO;IAAE,CAAC;EACvD,CAAC;EACDG,IAAI,CAACJ,IAAY,EAAEC,MAAe,EAAmB;IACnD,OAAO;MAAEC,IAAI,EAAE,MAAM;MAAEC,OAAO,EAAE;QAAEH,IAAI;QAAEC;MAAO;IAAE,CAAC;EACpD,CAAC;EACDI,GAAG,GAAqC;IAAA,IAApCC,KAAa,uEAAG,CAAC;IACnB,OAAO;MAAEJ,IAAI,EAAE,KAAK;MAAEC,OAAO,EAAE;QAAEG;MAAM;IAAE,CAAC;EAC5C,CAAC;EACDC,QAAQ,GAAoB;IAC1B,OAAO;MAAEL,IAAI,EAAE;IAAa,CAAC;EAC/B;AACF,CAAC;AAAC;AAEa,SAASM,WAAW,CAACC,OAA2B,EAAE;EAC/D,MAAMC,MAGL,GAAG;IACF,GAAGC,mBAAU;IAEbT,IAAI,EAAE,OAAO;IAEbU,eAAe,OAAiC;MAAA,IAAhC;QAAEC,UAAU;QAAEC;MAAe,CAAC;MAC5C,MAAMC,gBAAgB,GACpBN,OAAO,CAACM,gBAAgB,KAAKC,SAAS,IACtCH,UAAU,CAACI,QAAQ,CAACR,OAAO,CAACM,gBAAgB,CAAC,GACzCN,OAAO,CAACM,gBAAgB,GACxBF,UAAU,CAAC,CAAC,CA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igation/routers/lib/commonjs/TabRouter.js b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/TabRouter.js new file mode 100644 index 00000000..55801a4a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/TabRouter.js @@ -0,0 +1,249 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.TabActions = void 0; +exports.default = TabRouter; +var _nonSecure = require("nanoid/non-secure"); +var _BaseRouter = _interopRequireDefault(require("./BaseRouter")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const TYPE_ROUTE = 'route'; +const TabActions = { + jumpTo(name, params) { + return { + type: 'JUMP_TO', + payload: { + name, + params + } + }; + } +}; +exports.TabActions = TabActions; +const getRouteHistory = (routes, index, backBehavior, initialRouteName) => { + const history = [{ + type: TYPE_ROUTE, + key: routes[index].key + }]; + let initialRouteIndex; + switch (backBehavior) { + case 'order': + for (let i = index; i > 0; i--) { + history.unshift({ + type: TYPE_ROUTE, + key: routes[i - 1].key + }); + } + break; + case 'firstRoute': + if (index !== 0) { + history.unshift({ + type: TYPE_ROUTE, + key: routes[0].key + }); + } + break; + case 'initialRoute': + initialRouteIndex = routes.findIndex(route => route.name === initialRouteName); + initialRouteIndex = initialRouteIndex === -1 ? 0 : initialRouteIndex; + if (index !== initialRouteIndex) { + history.unshift({ + type: TYPE_ROUTE, + key: routes[initialRouteIndex].key + }); + } + break; + case 'history': + // The history will fill up on navigation + break; + } + return history; +}; +const changeIndex = (state, index, backBehavior, initialRouteName) => { + let history; + if (backBehavior === 'history') { + const currentKey = state.routes[index].key; + history = state.history.filter(it => it.type === 'route' ? it.key !== currentKey : false).concat({ + type: TYPE_ROUTE, + key: currentKey + }); + } else { + history = getRouteHistory(state.routes, index, backBehavior, initialRouteName); + } + return { + ...state, + index, + history + }; +}; +function TabRouter(_ref) { + let { + initialRouteName, + backBehavior = 'firstRoute' + } = _ref; + const router = { + ..._BaseRouter.default, + type: 'tab', + getInitialState(_ref2) { + let { + routeNames, + routeParamList + } = _ref2; + const index = initialRouteName !== undefined && routeNames.includes(initialRouteName) ? routeNames.indexOf(initialRouteName) : 0; + const routes = routeNames.map(name => ({ + name, + key: `${name}-${(0, _nonSecure.nanoid)()}`, + params: routeParamList[name] + })); + const history = getRouteHistory(routes, index, backBehavior, initialRouteName); + return { + stale: false, + type: 'tab', + key: `tab-${(0, _nonSecure.nanoid)()}`, + index, + routeNames, + history, + routes + }; + }, + getRehydratedState(partialState, _ref3) { + var _state$routes, _state$history; + let { + routeNames, + routeParamList + } = _ref3; + let state = partialState; + if (state.stale === false) { + return state; + } + const routes = routeNames.map(name => { + const route = state.routes.find(r => r.name === name); + return { + ...route, + name, + key: route && route.name === name && route.key ? route.key : `${name}-${(0, _nonSecure.nanoid)()}`, + params: routeParamList[name] !== undefined ? { + ...routeParamList[name], + ...(route ? route.params : undefined) + } : route ? route.params : undefined + }; + }); + const index = Math.min(Math.max(routeNames.indexOf((_state$routes = state.routes[(state === null || state === void 0 ? void 0 : state.index) ?? 0]) === null || _state$routes === void 0 ? void 0 : _state$routes.name), 0), routes.length - 1); + const history = ((_state$history = state.history) === null || _state$history === void 0 ? void 0 : _state$history.filter(it => routes.find(r => r.key === it.key))) ?? []; + return changeIndex({ + stale: false, + type: 'tab', + key: `tab-${(0, _nonSecure.nanoid)()}`, + index, + routeNames, + history, + routes + }, index, backBehavior, initialRouteName); + }, + getStateForRouteNamesChange(state, _ref4) { + let { + routeNames, + routeParamList, + routeKeyChanges + } = _ref4; + const routes = routeNames.map(name => state.routes.find(r => r.name === name && !routeKeyChanges.includes(r.name)) || { + name, + key: `${name}-${(0, _nonSecure.nanoid)()}`, + params: routeParamList[name] + }); + const index = Math.max(0, routeNames.indexOf(state.routes[state.index].name)); + let history = state.history.filter( + // Type will always be 'route' for tabs, but could be different in a router extending this (e.g. drawer) + it => it.type !== 'route' || routes.find(r => r.key === it.key)); + if (!history.length) { + history = getRouteHistory(routes, index, backBehavior, initialRouteName); + } + return { + ...state, + history, + routeNames, + routes, + index + }; + }, + getStateForRouteFocus(state, key) { + const index = state.routes.findIndex(r => r.key === key); + if (index === -1 || index === state.index) { + return state; + } + return changeIndex(state, index, backBehavior, initialRouteName); + }, + getStateForAction(state, action, _ref5) { + let { + routeParamList + } = _ref5; + switch (action.type) { + case 'JUMP_TO': + case 'NAVIGATE': + { + let index = -1; + if (action.type === 'NAVIGATE' && action.payload.key) { + index = state.routes.findIndex(route => route.key === action.payload.key); + } else { + index = state.routes.findIndex(route => route.name === action.payload.name); + } + if (index === -1) { + return null; + } + return changeIndex({ + ...state, + routes: state.routes.map((route, i) => { + if (i !== index) { + return route; + } + let params; + if (action.type === 'NAVIGATE' && action.payload.merge) { + params = action.payload.params !== undefined || routeParamList[route.name] !== undefined ? { + ...routeParamList[route.name], + ...route.params, + ...action.payload.params + } : route.params; + } else { + params = routeParamList[route.name] !== undefined ? { + ...routeParamList[route.name], + ...action.payload.params + } : action.payload.params; + } + const path = action.type === 'NAVIGATE' && action.payload.path != null ? action.payload.path : route.path; + return params !== route.params || path !== route.path ? { + ...route, + path, + params + } : route; + }) + }, index, backBehavior, initialRouteName); + } + case 'GO_BACK': + { + if (state.history.length === 1) { + return null; + } + const previousKey = state.history[state.history.length - 2].key; + const index = state.routes.findIndex(route => route.key === previousKey); + if (index === -1) { + return null; + } + return { + ...state, + history: state.history.slice(0, -1), + index + }; + } + default: + return _BaseRouter.default.getStateForAction(state, action); + } + }, + shouldActionChangeFocus(action) { + return action.type === 'NAVIGATE'; + }, + actionCreators: TabActions + }; + return router; +} +//# sourceMappingURL=TabRouter.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/TabRouter.js.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/TabRouter.js.map new file mode 100644 index 00000000..03e15165 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/TabRouter.js.map @@ -0,0 +1 @@ +{"version":3,"names":["TYPE_ROUTE","TabActions","jumpTo","name","params","type","payload","getRouteHistory","routes","index","backBehavior","initialRouteName","history","key","initialRouteIndex","i","unshift","findIndex","route","changeIndex","state","currentKey","filter","it","concat","TabRouter","router","BaseRouter","getInitialState","routeNames","routeParamList","undefined","includes","indexOf","map","nanoid","stale","getRehydratedState","partialState","find","r","Math","min","max","length","getStateForRouteNamesChange","routeKeyChanges","getStateForRouteFocus","getStateForAction","action","merge","path","previousKey","slice","shouldActionChangeFocus","actionCreators"],"sourceRoot":"../../src","sources":["TabRouter.tsx"],"mappings":";;;;;;;AAAA;AAEA;AAAsC;AAyDtC,MAAMA,UAAU,GAAG,OAAgB;AAE5B,MAAMC,UAAU,GAAG;EACxBC,MAAM,CAACC,IAAY,EAAEC,MAAe,EAAiB;IACnD,OAAO;MAAEC,IAAI,EAAE,SAAS;MAAEC,OAAO,EAAE;QAAEH,IAAI;QAAEC;MAAO;IAAE,CAAC;EACvD;AACF,CAAC;AAAC;AAEF,MAAMG,eAAe,GAAG,CACtBC,MAAuB,EACvBC,KAAa,EACbC,YAA0B,EAC1BC,gBAAoC,KACjC;EACH,MAAMC,OAAO,GAAG,CAAC;IAAEP,IAAI,EAAEL,UAAU;IAAEa,GAAG,EAAEL,MAAM,CAACC,KAAK,CAAC,CAACI;EAAI,CAAC,CAAC;EAC9D,IAAIC,iBAAiB;EAErB,QAAQJ,YAAY;IAClB,KAAK,OAAO;MACV,KAAK,IAAIK,CAAC,GAAGN,KAAK,EAAEM,CAAC,GAAG,CAAC,EAAEA,CAAC,EAAE,EAAE;QAC9BH,OAAO,CAACI,OAAO,CAAC;UAAEX,IAAI,EAAEL,UAAU;UAAEa,GAAG,EAAEL,MAAM,CAACO,CAAC,GAAG,CAAC,CAAC,CAACF;QAAI,CAAC,CAAC;MAC/D;MACA;IACF,KAAK,YAAY;MACf,IAAIJ,KAAK,KAAK,CAAC,EAAE;QACfG,OAAO,CAACI,OAAO,CAAC;UACdX,IAAI,EAAEL,UAAU;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ED,IAAI3C,KAAK,KAAK,CAAC,CAAC,EAAE;cAChB,OAAO,IAAI;YACb;YAEA,OAAO;cACL,GAAGW,KAAK;cACRR,OAAO,EAAEQ,KAAK,CAACR,OAAO,CAACyC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;cACnC5C;YACF,CAAC;UACH;QAEA;UACE,OAAOkB,mBAAU,CAACqB,iBAAiB,CAAC5B,KAAK,EAAE6B,MAAM,CAAC;MAAC;IAEzD,CAAC;IAEDK,uBAAuB,CAACL,MAAM,EAAE;MAC9B,OAAOA,MAAM,CAAC5C,IAAI,KAAK,UAAU;IACnC,CAAC;IAEDkD,cAAc,EAAEtD;EAClB,CAAC;EAED,OAAOyB,MAAM;AACf"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/index.js b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/index.js new file mode 100644 index 00000000..8ec2c7b7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/index.js @@ -0,0 +1,80 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _exportNames = { + CommonActions: true, + BaseRouter: true, + DrawerActions: true, + DrawerRouter: true, + StackActions: true, + StackRouter: true, + TabActions: true, + TabRouter: true +}; +Object.defineProperty(exports, "BaseRouter", { + enumerable: true, + get: function () { + return _BaseRouter.default; + } +}); +exports.CommonActions = void 0; +Object.defineProperty(exports, "DrawerActions", { + enumerable: true, + get: function () { + return _DrawerRouter.DrawerActions; + } +}); +Object.defineProperty(exports, "DrawerRouter", { + enumerable: true, + get: function () { + return _DrawerRouter.default; + } +}); +Object.defineProperty(exports, "StackActions", { + enumerable: true, + get: function () { + return _StackRouter.StackActions; + } +}); +Object.defineProperty(exports, "StackRouter", { + enumerable: true, + get: function () { + return _StackRouter.default; + } +}); +Object.defineProperty(exports, "TabActions", { + enumerable: true, + get: function () { + return _TabRouter.TabActions; + } +}); +Object.defineProperty(exports, "TabRouter", { + enumerable: true, + get: function () { + return _TabRouter.default; + } +}); +var CommonActions = _interopRequireWildcard(require("./CommonActions")); +exports.CommonActions = CommonActions; +var _BaseRouter = _interopRequireDefault(require("./BaseRouter")); +var _DrawerRouter = _interopRequireWildcard(require("./DrawerRouter")); +var _StackRouter = _interopRequireWildcard(require("./StackRouter")); +var _TabRouter = _interopRequireWildcard(require("./TabRouter")); +var _types = require("./types"); +Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _types[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _types[key]; + } + }); +}); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/index.js.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/index.js.map new file mode 100644 index 00000000..c02faa9e --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAiD;AAIjD;AAQA;AAOA;AAOA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAAwB;AAAA;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/types.js b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/types.js new file mode 100644 index 00000000..239667a3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/types.js @@ -0,0 +1,6 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/types.js.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/types.js.map new file mode 100644 index 00000000..e7ae1280 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/commonjs/types.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":""} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/BaseRouter.js b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/BaseRouter.js new file mode 100644 index 00000000..0e28db66 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/BaseRouter.js @@ -0,0 +1,55 @@ +import { nanoid } from 'nanoid/non-secure'; +/** + * Base router object that can be used when writing custom routers. + * This provides few helper methods to handle common actions such as `RESET`. + */ +const BaseRouter = { + getStateForAction(state, action) { + switch (action.type) { + case 'SET_PARAMS': + { + const index = action.source ? state.routes.findIndex(r => r.key === action.source) : state.index; + if (index === -1) { + return null; + } + return { + ...state, + routes: state.routes.map((r, i) => i === index ? { + ...r, + params: { + ...r.params, + ...action.payload.params + } + } : r) + }; + } + case 'RESET': + { + const nextState = action.payload; + if (nextState.routes.length === 0 || nextState.routes.some(route => !state.routeNames.includes(route.name))) { + return null; + } + if (nextState.stale === false) { + if (state.routeNames.length !== nextState.routeNames.length || nextState.routeNames.some(name => !state.routeNames.includes(name))) { + return null; + } + return { + ...nextState, + routes: nextState.routes.map(route => route.key ? route : { + ...route, + key: `${route.name}-${nanoid()}` + }) + }; + } + return nextState; + } + default: + return null; + } + }, + shouldActionChangeFocus(action) { + return action.type === 'NAVIGATE'; + } +}; +export default BaseRouter; +//# sourceMappingURL=BaseRouter.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/BaseRouter.js.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/BaseRouter.js.map new file mode 100644 index 00000000..e42db004 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/BaseRouter.js.map @@ -0,0 +1 @@ +{"version":3,"names":["nanoid","BaseRouter","getStateForAction","state","action","type","index","source","routes","findIndex","r","key","map","i","params","payload","nextState","length","some","route","routeNames","includes","name","stale","shouldActionChangeFocus"],"sourceRoot":"../../src","sources":["BaseRouter.tsx"],"mappings":"AAAA,SAASA,MAAM,QAAQ,mBAAmB;AAQ1C;AACA;AACA;AACA;AACA,MAAMC,UAAU,GAAG;EACjBC,iBAAiB,CACfC,KAAY,EACZC,MAA8B,EACM;IACpC,QAAQA,MAAM,CAACC,IAAI;MACjB,KAAK,YAAY;QAAE;UACjB,MAAMC,KAAK,GAAGF,MAAM,CAACG,MAAM,GACvBJ,KAAK,CAACK,MAAM,CAACC,SAAS,CAAEC,CAAC,IAAKA,CAAC,CAACC,GAAG,KAAKP,MAAM,CAACG,MAAM,CAAC,GACtDJ,KAAK,CAACG,KAAK;UAEf,IAAIA,KAAK,KAAK,CAAC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AEDQ,uBAAuB,CAACpB,MAA8B,EAAE;IACtD,OAAOA,MAAM,CAACC,IAAI,KAAK,UAAU;EACnC;AACF,CAAC;AAED,eAAeJ,UAAU"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/CommonActions.js b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/CommonActions.js new file mode 100644 index 00000000..e1ee48dd --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/CommonActions.js @@ -0,0 +1,41 @@ +export function goBack() { + return { + type: 'GO_BACK' + }; +} +// eslint-disable-next-line no-redeclare +export function navigate() { + if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'string') { + return { + type: 'NAVIGATE', + payload: { + name: arguments.length <= 0 ? undefined : arguments[0], + params: arguments.length <= 1 ? undefined : arguments[1] + } + }; + } else { + const payload = (arguments.length <= 0 ? undefined : arguments[0]) || {}; + if (!payload.hasOwnProperty('key') && !payload.hasOwnProperty('name')) { + throw new Error('You need to specify name or key when calling navigate with an object as the argument. See https://reactnavigation.org/docs/navigation-actions#navigate for usage.'); + } + return { + type: 'NAVIGATE', + payload + }; + } +} +export function reset(state) { + return { + type: 'RESET', + payload: state + }; +} +export function setParams(params) { + return { + type: 'SET_PARAMS', + payload: { + params + } + }; +} +//# sourceMappingURL=CommonActions.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/CommonActions.js.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/CommonActions.js.map new file mode 100644 index 00000000..d2b27ae2 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/CommonActions.js.map @@ -0,0 +1 @@ +{"version":3,"names":["goBack","type","navigate","payload","name","params","hasOwnProperty","Error","reset","state","setParams"],"sourceRoot":"../../src","sources":["CommonActions.tsx"],"mappings":"AAgDA,OAAO,SAASA,MAAM,GAAW;EAC/B,OAAO;IAAEC,IAAI,EAAE;EAAU,CAAC;AAC5B;AAeA;AACA,OAAO,SAASC,QAAQ,GAAuB;EAC7C,IAAI,yDAAc,KAAK,QAAQ,EAAE;IAC/B,OAAO;MAAED,IAAI,EAAE,UAAU;MAAEE,OAAO,EAAE;QAAEC,IAAI,kDAAS;QAAEC,MAAM;MAAU;IAAE,CAAC;EAC1E,CAAC,MAAM;IACL,MAAMF,OAAO,GAAG,sDAAW,CAAC,CAAC;IAE7B,IAAI,CAACA,OAAO,CAACG,cAAc,CAAC,KAAK,CAAC,IAAI,CAACH,OAAO,CAACG,cAAc,CAAC,MAAM,CAAC,EAAE;MACrE,MAAM,IAAIC,KAAK,CACb,mKAAmK,CACpK;IACH;IAEA,OAAO;MAAEN,IAAI,EAAE,UAAU;MAAEE;IAAQ,CAAC;EACtC;AACF;AAEA,OAAO,SAASK,KAAK,CAACC,KAA6B,EAAU;EAC3D,OAAO;IAAER,IAAI,EAAE,OAAO;IAAEE,OAAO,EAAEM;EAAM,CAAC;AAC1C;AAEA,OAAO,SAASC,SAAS,CAACL,MAAc,EAAU;EAChD,OAAO;IAAEJ,IAAI,EAAE,YAAY;IAAEE,OAAO,EAAE;MAAEE;IAAO;EAAE,CAAC;AACpD"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/DrawerRouter.js b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/DrawerRouter.js new file mode 100644 index 00000000..989daa67 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/DrawerRouter.js @@ -0,0 +1,148 @@ +import { nanoid } from 'nanoid/non-secure'; +import TabRouter, { TabActions } from './TabRouter'; +export const DrawerActions = { + ...TabActions, + openDrawer() { + return { + type: 'OPEN_DRAWER' + }; + }, + closeDrawer() { + return { + type: 'CLOSE_DRAWER' + }; + }, + toggleDrawer() { + return { + type: 'TOGGLE_DRAWER' + }; + } +}; +export default function DrawerRouter(_ref) { + let { + defaultStatus = 'closed', + ...rest + } = _ref; + const router = TabRouter(rest); + const isDrawerInHistory = state => { + var _state$history; + return Boolean((_state$history = state.history) === null || _state$history === void 0 ? void 0 : _state$history.some(it => it.type === 'drawer')); + }; + const addDrawerToHistory = state => { + if (isDrawerInHistory(state)) { + return state; + } + return { + ...state, + history: [...state.history, { + type: 'drawer', + status: defaultStatus === 'open' ? 'closed' : 'open' + }] + }; + }; + const removeDrawerFromHistory = state => { + if (!isDrawerInHistory(state)) { + return state; + } + return { + ...state, + history: state.history.filter(it => it.type !== 'drawer') + }; + }; + const openDrawer = state => { + if (defaultStatus === 'open') { + return removeDrawerFromHistory(state); + } + return addDrawerToHistory(state); + }; + const closeDrawer = state => { + if (defaultStatus === 'open') { + return addDrawerToHistory(state); + } + return removeDrawerFromHistory(state); + }; + return { + ...router, + type: 'drawer', + getInitialState(_ref2) { + let { + routeNames, + routeParamList, + routeGetIdList + } = _ref2; + const state = router.getInitialState({ + routeNames, + routeParamList, + routeGetIdList + }); + return { + ...state, + default: defaultStatus, + stale: false, + type: 'drawer', + key: `drawer-${nanoid()}` + }; + }, + getRehydratedState(partialState, _ref3) { + let { + routeNames, + routeParamList, + routeGetIdList + } = _ref3; + if (partialState.stale === false) { + return partialState; + } + let state = router.getRehydratedState(partialState, { + routeNames, + routeParamList, + routeGetIdList + }); + if (isDrawerInHistory(partialState)) { + // Re-sync the drawer entry in history to correct it if it was wrong + state = removeDrawerFromHistory(state); + state = addDrawerToHistory(state); + } + return { + ...state, + default: defaultStatus, + type: 'drawer', + key: `drawer-${nanoid()}` + }; + }, + getStateForRouteFocus(state, key) { + const result = router.getStateForRouteFocus(state, key); + return closeDrawer(result); + }, + getStateForAction(state, action, options) { + switch (action.type) { + case 'OPEN_DRAWER': + return openDrawer(state); + case 'CLOSE_DRAWER': + return closeDrawer(state); + case 'TOGGLE_DRAWER': + if (isDrawerInHistory(state)) { + return removeDrawerFromHistory(state); + } + return addDrawerToHistory(state); + case 'JUMP_TO': + case 'NAVIGATE': + { + const result = router.getStateForAction(state, action, options); + if (result != null && result.index !== state.index) { + return closeDrawer(result); + } + return result; + } + case 'GO_BACK': + if (isDrawerInHistory(state)) { + return removeDrawerFromHistory(state); + } + return router.getStateForAction(state, action, options); + default: + return router.getStateForAction(state, action, options); + } + }, + actionCreators: DrawerActions + }; +} +//# sourceMappingURL=DrawerRouter.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/DrawerRouter.js.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/DrawerRouter.js.map new file mode 100644 index 00000000..806cefea --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/DrawerRouter.js.map @@ -0,0 +1 @@ +{"version":3,"names":["nanoid","TabRouter","TabActions","DrawerActions","openDrawer","type","closeDrawer","toggleDrawer","DrawerRouter","defaultStatus","rest","router","isDrawerInHistory","state","Boolean","history","some","it","addDrawerToHistory","status","removeDrawerFromHistory","filter","getInitialState","routeNames","routeParamList","routeGetIdList","default","stale","key","getRehydratedState","partialState","getStateForRouteFocus","result","getStateForAction","action","options","index","actionCreators"],"sourceRoot":"../../src","sources":["DrawerRouter.tsx"],"mappings":"AAAA,SAASA,MAAM,QAAQ,mBAAmB;AAE1C,OAAOC,SAAS,IAEdC,UAAU,QAIL,aAAa;AA4DpB,OAAO,MAAMC,aAAa,GAAG;EAC3B,GAAGD,UAAU;EACbE,UAAU,GAAqB;IAC7B,OAAO;MAAEC,IAAI,EAAE;IAAc,CAAC;EAChC,CAAC;EACDC,WAAW,GAAqB;IAC9B,OAAO;MAAED,IAAI,EAAE;IAAe,CAAC;EACjC,CAAC;EACDE,YAAY,GAAqB;IAC/B,OAAO;MAAEF,IAAI,EAAE;IAAgB,CAAC;EAClC;AACF,CAAC;AAED,eAAe,SAASG,YAAY,OAMlC;EAAA,IANmC;IACnCC,aAAa,GAAG,QAAQ;IACxB,GAAGC;EACgB,CAAC;EAIpB,MAAMC,MAAM,GAAGV,SAAS,CAACS,IAAI,CAG5B;EAED,MAAME,iBAAiB,GACrBC,KAEsD;IAAA;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AAK,eAAe;UAClB,IAAID,iBAAiB,CAACC,KAAK,CAAC,EAAE;YAC5B,OAAOO,uBAAuB,CAACP,KAAK,CAAC;UACvC;UAEA,OAAOK,kBAAkB,CAACL,KAAK,CAAC;QAElC,KAAK,SAAS;QACd,KAAK,UAAU;UAAE;YACf,MAAMmB,MAAM,GAAGrB,MAAM,CAACsB,iBAAiB,CAACpB,KAAK,EAAEqB,MAAM,EAAEC,OAAO,CAAC;YAE/D,IAAIH,MAAM,IAAI,IAAI,IAAIA,MAAM,CAACI,KAAK,KAAKvB,KAAK,CAACuB,KAAK,EAAE;cAClD,OAAO9B,WAAW,CAAC0B,MAAM,CAAyC;YACpE;YAEA,OAAOA,MAAM;UACf;QAEA,KAAK,SAAS;UACZ,IAAIpB,iBAAiB,CAACC,KAAK,CAAC,EAAE;YAC5B,OAAOO,uBAAuB,CAACP,KAAK,CAAC;UACvC;UAEA,OAAOF,MAAM,CAACsB,iBAAiB,CAACpB,KAAK,EAAEqB,MAAM,EAAEC,OAAO,CAAC;QAEzD;UACE,OAAOxB,MAAM,CAACsB,iBAAiB,CAACpB,KAAK,EAAEqB,MAAM,EAAEC,OAAO,CAAC;MAAC;IAE9D,CAAC;IAEDE,cAAc,EAAElC;EAClB,CAAC;AACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/StackRouter.js b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/StackRouter.js new file mode 100644 index 00000000..748a42e0 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/StackRouter.js @@ -0,0 +1,306 @@ +import { nanoid } from 'nanoid/non-secure'; +import BaseRouter from './BaseRouter'; +export const StackActions = { + replace(name, params) { + return { + type: 'REPLACE', + payload: { + name, + params + } + }; + }, + push(name, params) { + return { + type: 'PUSH', + payload: { + name, + params + } + }; + }, + pop() { + let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + return { + type: 'POP', + payload: { + count + } + }; + }, + popToTop() { + return { + type: 'POP_TO_TOP' + }; + } +}; +export default function StackRouter(options) { + const router = { + ...BaseRouter, + type: 'stack', + getInitialState(_ref) { + let { + routeNames, + routeParamList + } = _ref; + const initialRouteName = options.initialRouteName !== undefined && routeNames.includes(options.initialRouteName) ? options.initialRouteName : routeNames[0]; + return { + stale: false, + type: 'stack', + key: `stack-${nanoid()}`, + index: 0, + routeNames, + routes: [{ + key: `${initialRouteName}-${nanoid()}`, + name: initialRouteName, + params: routeParamList[initialRouteName] + }] + }; + }, + getRehydratedState(partialState, _ref2) { + let { + routeNames, + routeParamList + } = _ref2; + let state = partialState; + if (state.stale === false) { + return state; + } + const routes = state.routes.filter(route => routeNames.includes(route.name)).map(route => ({ + ...route, + key: route.key || `${route.name}-${nanoid()}`, + params: routeParamList[route.name] !== undefined ? { + ...routeParamList[route.name], + ...route.params + } : route.params + })); + if (routes.length === 0) { + const initialRouteName = options.initialRouteName !== undefined ? options.initialRouteName : routeNames[0]; + routes.push({ + key: `${initialRouteName}-${nanoid()}`, + name: initialRouteName, + params: routeParamList[initialRouteName] + }); + } + return { + stale: false, + type: 'stack', + key: `stack-${nanoid()}`, + index: routes.length - 1, + routeNames, + routes + }; + }, + getStateForRouteNamesChange(state, _ref3) { + let { + routeNames, + routeParamList, + routeKeyChanges + } = _ref3; + const routes = state.routes.filter(route => routeNames.includes(route.name) && !routeKeyChanges.includes(route.name)); + if (routes.length === 0) { + const initialRouteName = options.initialRouteName !== undefined && routeNames.includes(options.initialRouteName) ? options.initialRouteName : routeNames[0]; + routes.push({ + key: `${initialRouteName}-${nanoid()}`, + name: initialRouteName, + params: routeParamList[initialRouteName] + }); + } + return { + ...state, + routeNames, + routes, + index: Math.min(state.index, routes.length - 1) + }; + }, + getStateForRouteFocus(state, key) { + const index = state.routes.findIndex(r => r.key === key); + if (index === -1 || index === state.index) { + return state; + } + return { + ...state, + index, + routes: state.routes.slice(0, index + 1) + }; + }, + getStateForAction(state, action, options) { + const { + routeParamList + } = options; + switch (action.type) { + case 'REPLACE': + { + const index = action.target === state.key && action.source ? state.routes.findIndex(r => r.key === action.source) : state.index; + if (index === -1) { + return null; + } + const { + name, + key, + params + } = action.payload; + if (!state.routeNames.includes(name)) { + return null; + } + return { + ...state, + routes: state.routes.map((route, i) => i === index ? { + key: key !== undefined ? key : `${name}-${nanoid()}`, + name, + params: routeParamList[name] !== undefined ? { + ...routeParamList[name], + ...params + } : params + } : route) + }; + } + case 'PUSH': + if (state.routeNames.includes(action.payload.name)) { + const getId = options.routeGetIdList[action.payload.name]; + const id = getId === null || getId === void 0 ? void 0 : getId({ + params: action.payload.params + }); + const route = id ? state.routes.find(route => route.name === action.payload.name && id === (getId === null || getId === void 0 ? void 0 : getId({ + params: route.params + }))) : undefined; + let routes; + if (route) { + routes = state.routes.filter(r => r.key !== route.key); + routes.push({ + ...route, + params: routeParamList[action.payload.name] !== undefined ? { + ...routeParamList[action.payload.name], + ...action.payload.params + } : action.payload.params + }); + } else { + routes = [...state.routes, { + key: `${action.payload.name}-${nanoid()}`, + name: action.payload.name, + params: routeParamList[action.payload.name] !== undefined ? { + ...routeParamList[action.payload.name], + ...action.payload.params + } : action.payload.params + }]; + } + return { + ...state, + index: routes.length - 1, + routes + }; + } + return null; + case 'POP': + { + const index = action.target === state.key && action.source ? state.routes.findIndex(r => r.key === action.source) : state.index; + if (index > 0) { + const count = Math.max(index - action.payload.count + 1, 1); + const routes = state.routes.slice(0, count).concat(state.routes.slice(index + 1)); + return { + ...state, + index: routes.length - 1, + routes + }; + } + return null; + } + case 'POP_TO_TOP': + return router.getStateForAction(state, { + type: 'POP', + payload: { + count: state.routes.length - 1 + } + }, options); + case 'NAVIGATE': + if (action.payload.name !== undefined && !state.routeNames.includes(action.payload.name)) { + return null; + } + if (action.payload.key || action.payload.name) { + // If the route already exists, navigate to that + let index = -1; + const getId = + // `getId` and `key` can't be used together + action.payload.key === undefined && action.payload.name !== undefined ? options.routeGetIdList[action.payload.name] : undefined; + const id = getId === null || getId === void 0 ? void 0 : getId({ + params: action.payload.params + }); + if (id) { + index = state.routes.findIndex(route => route.name === action.payload.name && id === (getId === null || getId === void 0 ? void 0 : getId({ + params: route.params + }))); + } else if (state.routes[state.index].name === action.payload.name && action.payload.key === undefined || state.routes[state.index].key === action.payload.key) { + index = state.index; + } else { + for (let i = state.routes.length - 1; i >= 0; i--) { + if (state.routes[i].name === action.payload.name && action.payload.key === undefined || state.routes[i].key === action.payload.key) { + index = i; + break; + } + } + } + if (index === -1 && action.payload.key && action.payload.name === undefined) { + return null; + } + if (index === -1 && action.payload.name !== undefined) { + const routes = [...state.routes, { + key: action.payload.key ?? `${action.payload.name}-${nanoid()}`, + name: action.payload.name, + path: action.payload.path, + params: routeParamList[action.payload.name] !== undefined ? { + ...routeParamList[action.payload.name], + ...action.payload.params + } : action.payload.params + }]; + return { + ...state, + routes, + index: routes.length - 1 + }; + } + const route = state.routes[index]; + let params; + if (action.payload.merge) { + params = action.payload.params !== undefined || routeParamList[route.name] !== undefined ? { + ...routeParamList[route.name], + ...route.params, + ...action.payload.params + } : route.params; + } else { + params = routeParamList[route.name] !== undefined ? { + ...routeParamList[route.name], + ...action.payload.params + } : action.payload.params; + } + return { + ...state, + index, + routes: [...state.routes.slice(0, index), params !== route.params || action.payload.path && action.payload.path !== route.path ? { + ...route, + path: action.payload.path ?? route.path, + params + } : state.routes[index]] + }; + } + return null; + case 'GO_BACK': + if (state.index > 0) { + return router.getStateForAction(state, { + type: 'POP', + payload: { + count: 1 + }, + target: action.target, + source: action.source + }, options); + } + return null; + default: + return BaseRouter.getStateForAction(state, action); + } + }, + actionCreators: StackActions + }; + return router; +} +//# sourceMappingURL=StackRouter.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/StackRouter.js.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/StackRouter.js.map new file mode 100644 index 00000000..0df4dabc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/StackRouter.js.map @@ -0,0 +1 @@ +{"version":3,"names":["nanoid","BaseRouter","StackActions","replace","name","params","type","payload","push","pop","count","popToTop","StackRouter","options","router","getInitialState","routeNames","routeParamList","initialRouteName","undefined","includes","stale","key","index","routes","getRehydratedState","partialState","state","filter","route","map","length","getStateForRouteNamesChange","routeKeyChanges","Math","min","getStateForRouteFocus","findIndex","r","slice","getStateForAction","action","target","source","i","getId","routeGetIdList","id","find","max","concat","path","merge","actionCreators"],"sourceRoot":"../../src","sources":["StackRouter.tsx"],"mappings":"AAAA,SAASA,MAAM,QAAQ,mBAAmB;AAE1C,OAAOC,UAAU,MAAM,cAAc;AAiFrC,OAAO,MAAMC,YAAY,GAAG;EAC1BC,OAAO,CAACC,IAAY,EAAEC,MAAe,EAAmB;IACtD,OAAO;MAAEC,IAAI,EAAE,SAAS;MAAEC,OAAO,EAAE;QAAEH,IAAI;QAAEC;MAAO;IAAE,CAAC;EACvD,CAAC;EACDG,IAAI,CAACJ,IAAY,EAAEC,MAAe,EAAmB;IACnD,OAAO;MAAEC,IAAI,EAAE,MAAM;MAAEC,OAAO,EAAE;QAAEH,IAAI;QAAEC;MAAO;IAAE,CAAC;EACpD,CAAC;EACDI,GAAG,GAAqC;IAAA,IAApCC,KAAa,uEAAG,CAAC;IACnB,OAAO;MAAEJ,IAAI,EAAE,KAAK;MAAEC,OAAO,EAAE;QAAEG;MAAM;IAAE,CAAC;EAC5C,CAAC;EACDC,QAAQ,GAAoB;IAC1B,OAAO;MAAEL,IAAI,EAAE;IAAa,CAAC;EAC/B;AACF,CAAC;AAED,eAAe,SAASM,WAAW,CAACC,OAA2B,EAAE;EAC/D,MAAMC,MAGL,GAAG;IACF,GAAGb,UAAU;IAEbK,IAAI,EAAE,OAAO;IAEbS,eAAe,OAAiC;MAAA,IAAhC;QAAEC,UAAU;QAAEC;MAAe,CAAC;MAC5C,MAAMC,gBAAgB,GACpBL,OAAO,CAACK,gBAAgB,KAAKC,SAAS,IACtCH,UAAU,CAACI,QAAQ,CAACP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C,KAAKe,SAAS,GACpC;gBACE,GAAGF,cAAc,CAACY,KAAK,CAACzB,IAAI,CAAC;gBAC7B,GAAGqC,MAAM,CAAClC,OAAO,CAACF;cACpB,CAAC,GACDoC,MAAM,CAAClC,OAAO,CAACF,MAAM;YAC7B;YAEA,OAAO;cACL,GAAGsB,KAAK;cACRJ,KAAK;cACLC,MAAM,EAAE,CACN,GAAGG,KAAK,CAACH,MAAM,CAACe,KAAK,CAAC,CAAC,EAAEhB,KAAK,CAAC,EAC/BlB,MAAM,KAAKwB,KAAK,CAACxB,MAAM,IACtBoC,MAAM,CAAClC,OAAO,CAAC4C,IAAI,IAAIV,MAAM,CAAClC,OAAO,CAAC4C,IAAI,KAAKtB,KAAK,CAACsB,IAAK,GACvD;gBACE,GAAGtB,KAAK;gBACRsB,IAAI,EAAEV,MAAM,CAAClC,OAAO,CAAC4C,IAAI,IAAItB,KAAK,CAACsB,IAAI;gBACvC9C;cACF,CAAC,GACDsB,KAAK,CAACH,MAAM,CAACD,KAAK,CAAC;YAE3B,CAAC;UACH;UAEA,OAAO,IAAI;QAEb,KAAK,SAAS;UACZ,IAAII,KAAK,CAACJ,KAAK,GAAG,CAAC,EAAE;YACnB,OAAOT,MAAM,CAAC0B,iBAAiB,CAC7Bb,KAAK,EACL;cACErB,IAAI,EAAE,KAAK;cACXC,OAAO,EAAE;gBAAEG,KAAK,EAAE;cAAE,CAAC;cACrBgC,MAAM,EAAED,MAAM,CAACC,MAAM;cACrBC,MAAM,EAAEF,MAAM,CAACE;YACjB,CAAC,EACD9B,OAAO,CACR;UACH;UAEA,OAAO,IAAI;QAEb;UACE,OAAOZ,UAAU,CAACuC,iBAAiB,CAACb,KAAK,EAAEc,MAAM,CAAC;MAAC;IAEzD,CAAC;IAEDY,cAAc,EAAEnD;EAClB,CAAC;EAED,OAAOY,MAAM;AACf"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/TabRouter.js b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/TabRouter.js new file mode 100644 index 00000000..61882165 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/TabRouter.js @@ -0,0 +1,240 @@ +import { nanoid } from 'nanoid/non-secure'; +import BaseRouter from './BaseRouter'; +const TYPE_ROUTE = 'route'; +export const TabActions = { + jumpTo(name, params) { + return { + type: 'JUMP_TO', + payload: { + name, + params + } + }; + } +}; +const getRouteHistory = (routes, index, backBehavior, initialRouteName) => { + const history = [{ + type: TYPE_ROUTE, + key: routes[index].key + }]; + let initialRouteIndex; + switch (backBehavior) { + case 'order': + for (let i = index; i > 0; i--) { + history.unshift({ + type: TYPE_ROUTE, + key: routes[i - 1].key + }); + } + break; + case 'firstRoute': + if (index !== 0) { + history.unshift({ + type: TYPE_ROUTE, + key: routes[0].key + }); + } + break; + case 'initialRoute': + initialRouteIndex = routes.findIndex(route => route.name === initialRouteName); + initialRouteIndex = initialRouteIndex === -1 ? 0 : initialRouteIndex; + if (index !== initialRouteIndex) { + history.unshift({ + type: TYPE_ROUTE, + key: routes[initialRouteIndex].key + }); + } + break; + case 'history': + // The history will fill up on navigation + break; + } + return history; +}; +const changeIndex = (state, index, backBehavior, initialRouteName) => { + let history; + if (backBehavior === 'history') { + const currentKey = state.routes[index].key; + history = state.history.filter(it => it.type === 'route' ? it.key !== currentKey : false).concat({ + type: TYPE_ROUTE, + key: currentKey + }); + } else { + history = getRouteHistory(state.routes, index, backBehavior, initialRouteName); + } + return { + ...state, + index, + history + }; +}; +export default function TabRouter(_ref) { + let { + initialRouteName, + backBehavior = 'firstRoute' + } = _ref; + const router = { + ...BaseRouter, + type: 'tab', + getInitialState(_ref2) { + let { + routeNames, + routeParamList + } = _ref2; + const index = initialRouteName !== undefined && routeNames.includes(initialRouteName) ? routeNames.indexOf(initialRouteName) : 0; + const routes = routeNames.map(name => ({ + name, + key: `${name}-${nanoid()}`, + params: routeParamList[name] + })); + const history = getRouteHistory(routes, index, backBehavior, initialRouteName); + return { + stale: false, + type: 'tab', + key: `tab-${nanoid()}`, + index, + routeNames, + history, + routes + }; + }, + getRehydratedState(partialState, _ref3) { + var _state$routes, _state$history; + let { + routeNames, + routeParamList + } = _ref3; + let state = partialState; + if (state.stale === false) { + return state; + } + const routes = routeNames.map(name => { + const route = state.routes.find(r => r.name === name); + return { + ...route, + name, + key: route && route.name === name && route.key ? route.key : `${name}-${nanoid()}`, + params: routeParamList[name] !== undefined ? { + ...routeParamList[name], + ...(route ? route.params : undefined) + } : route ? route.params : undefined + }; + }); + const index = Math.min(Math.max(routeNames.indexOf((_state$routes = state.routes[(state === null || state === void 0 ? void 0 : state.index) ?? 0]) === null || _state$routes === void 0 ? void 0 : _state$routes.name), 0), routes.length - 1); + const history = ((_state$history = state.history) === null || _state$history === void 0 ? void 0 : _state$history.filter(it => routes.find(r => r.key === it.key))) ?? []; + return changeIndex({ + stale: false, + type: 'tab', + key: `tab-${nanoid()}`, + index, + routeNames, + history, + routes + }, index, backBehavior, initialRouteName); + }, + getStateForRouteNamesChange(state, _ref4) { + let { + routeNames, + routeParamList, + routeKeyChanges + } = _ref4; + const routes = routeNames.map(name => state.routes.find(r => r.name === name && !routeKeyChanges.includes(r.name)) || { + name, + key: `${name}-${nanoid()}`, + params: routeParamList[name] + }); + const index = Math.max(0, routeNames.indexOf(state.routes[state.index].name)); + let history = state.history.filter( + // Type will always be 'route' for tabs, but could be different in a router extending this (e.g. drawer) + it => it.type !== 'route' || routes.find(r => r.key === it.key)); + if (!history.length) { + history = getRouteHistory(routes, index, backBehavior, initialRouteName); + } + return { + ...state, + history, + routeNames, + routes, + index + }; + }, + getStateForRouteFocus(state, key) { + const index = state.routes.findIndex(r => r.key === key); + if (index === -1 || index === state.index) { + return state; + } + return changeIndex(state, index, backBehavior, initialRouteName); + }, + getStateForAction(state, action, _ref5) { + let { + routeParamList + } = _ref5; + switch (action.type) { + case 'JUMP_TO': + case 'NAVIGATE': + { + let index = -1; + if (action.type === 'NAVIGATE' && action.payload.key) { + index = state.routes.findIndex(route => route.key === action.payload.key); + } else { + index = state.routes.findIndex(route => route.name === action.payload.name); + } + if (index === -1) { + return null; + } + return changeIndex({ + ...state, + routes: state.routes.map((route, i) => { + if (i !== index) { + return route; + } + let params; + if (action.type === 'NAVIGATE' && action.payload.merge) { + params = action.payload.params !== undefined || routeParamList[route.name] !== undefined ? { + ...routeParamList[route.name], + ...route.params, + ...action.payload.params + } : route.params; + } else { + params = routeParamList[route.name] !== undefined ? { + ...routeParamList[route.name], + ...action.payload.params + } : action.payload.params; + } + const path = action.type === 'NAVIGATE' && action.payload.path != null ? action.payload.path : route.path; + return params !== route.params || path !== route.path ? { + ...route, + path, + params + } : route; + }) + }, index, backBehavior, initialRouteName); + } + case 'GO_BACK': + { + if (state.history.length === 1) { + return null; + } + const previousKey = state.history[state.history.length - 2].key; + const index = state.routes.findIndex(route => route.key === previousKey); + if (index === -1) { + return null; + } + return { + ...state, + history: state.history.slice(0, -1), + index + }; + } + default: + return BaseRouter.getStateForAction(state, action); + } + }, + shouldActionChangeFocus(action) { + return action.type === 'NAVIGATE'; + }, + actionCreators: TabActions + }; + return router; +} +//# sourceMappingURL=TabRouter.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/TabRouter.js.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/TabRouter.js.map new file mode 100644 index 00000000..1cc3e6dc --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/TabRouter.js.map @@ -0,0 +1 @@ +{"version":3,"names":["nanoid","BaseRouter","TYPE_ROUTE","TabActions","jumpTo","name","params","type","payload","getRouteHistory","routes","index","backBehavior","initialRouteName","history","key","initialRouteIndex","i","unshift","findIndex","route","changeIndex","state","currentKey","filter","it","concat","TabRouter","router","getInitialState","routeNames","routeParamList","undefined","includes","indexOf","map","stale","getRehydratedState","partialState","find","r","Math","min","max","length","getStateForRouteNamesChange","routeKeyChanges","getStateForRouteFocus","getStateForAction","action","merge","path","previousKey","slice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L,MAAM,EAAE;MAC9B,OAAOA,MAAM,CAAC1C,IAAI,KAAK,UAAU;IACnC,CAAC;IAEDgD,cAAc,EAAEpD;EAClB,CAAC;EAED,OAAOyB,MAAM;AACf"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/index.js b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/index.js new file mode 100644 index 00000000..3d310d89 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/index.js @@ -0,0 +1,8 @@ +import * as CommonActions from './CommonActions'; +export { CommonActions }; +export { default as BaseRouter } from './BaseRouter'; +export { DrawerActions, default as DrawerRouter } from './DrawerRouter'; +export { StackActions, default as StackRouter } from './StackRouter'; +export { TabActions, default as TabRouter } from './TabRouter'; +export * from './types'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/index.js.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/index.js.map new file mode 100644 index 00000000..edfd0ab4 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["CommonActions","default","BaseRouter","DrawerActions","DrawerRouter","StackActions","StackRouter","TabActions","TabRouter"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,OAAO,KAAKA,aAAa,MAAM,iBAAiB;AAEhD,SAASA,aAAa;AAEtB,SAASC,OAAO,IAAIC,UAAU,QAAQ,cAAc;AAQpD,SAASC,aAAa,EAAEF,OAAO,IAAIG,YAAY,QAAQ,gBAAgB;AAOvE,SAASC,YAAY,EAAEJ,OAAO,IAAIK,WAAW,QAAQ,eAAe;AAOpE,SAASC,UAAU,EAAEN,OAAO,IAAIO,SAAS,QAAQ,aAAa;AAC9D,cAAc,SAAS"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/types.js b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/types.js new file mode 100644 index 00000000..718fd38a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/types.js.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/types.js.map new file mode 100644 index 00000000..e7ae1280 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/module/types.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":""} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/BaseRouter.d.ts b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/BaseRouter.d.ts new file mode 100644 index 00000000..1e1a1a1b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/BaseRouter.d.ts @@ -0,0 +1,27 @@ +import type { CommonNavigationAction, PartialState } from './types'; +/** + * Base router object that can be used when writing custom routers. + * This provides few helper methods to handle common actions such as `RESET`. + */ +declare const BaseRouter: { + getStateForAction & Readonly<{ + params?: Readonly; + }> & { + state?: Readonly | PartialState> | undefined; + })[]; + type: string; + stale: false; + }>>(state: State, action: CommonNavigationAction): State | PartialState | null; + shouldActionChangeFocus(action: CommonNavigationAction): boolean; +}; +export default BaseRouter; +//# sourceMappingURL=BaseRouter.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/BaseRouter.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/BaseRouter.d.ts.map new file mode 100644 index 00000000..20d34afd --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/BaseRouter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BaseRouter.d.ts","sourceRoot":"","sources":["../../../src/BaseRouter.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,sBAAsB,EAEtB,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;8BAGJ,sBAAsB;oCA4DA,sBAAsB;CAGvD,CAAC;AAEF,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/CommonActions.d.ts b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/CommonActions.d.ts new file mode 100644 index 00000000..dbbf8aa6 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/CommonActions.d.ts @@ -0,0 +1,56 @@ +import type { NavigationState, PartialState, Route } from './types'; +declare type ResetState = PartialState | NavigationState | (Omit & { + routes: Omit, 'key'>[]; +}); +export declare type Action = { + type: 'GO_BACK'; + source?: string; + target?: string; +} | { + type: 'NAVIGATE'; + payload: { + key: string; + name?: undefined; + params?: object; + path?: string; + merge?: boolean; + } | { + name: string; + key?: string; + params?: object; + path?: string; + merge?: boolean; + }; + source?: string; + target?: string; +} | { + type: 'RESET'; + payload: ResetState | undefined; + source?: string; + target?: string; +} | { + type: 'SET_PARAMS'; + payload: { + params?: object; + }; + source?: string; + target?: string; +}; +export declare function goBack(): Action; +export declare function navigate(options: { + key: string; + params?: object; + path?: string; + merge?: boolean; +} | { + name: string; + key?: string; + params?: object; + path?: string; + merge?: boolean; +}): Action; +export declare function navigate(name: string, params?: object): Action; +export declare function reset(state: ResetState | undefined): Action; +export declare function setParams(params: object): Action; +export {}; +//# sourceMappingURL=CommonActions.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/CommonActions.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/CommonActions.d.ts.map new file mode 100644 index 00000000..8600cde3 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/CommonActions.d.ts.map @@ -0,0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AAM,CAAA;KAAE,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEN,wBAAgB,MAAM,IAAI,MAAM,CAE/B;AAED,wBAAgB,QAAQ,CACtB,OAAO,EACH;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAChE;IACE,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GACJ,MAAM,CAAC;AAEV,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;AAkBhE,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,MAAM,CAE3D;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEhD"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/DrawerRouter.d.ts b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/DrawerRouter.d.ts new file mode 100644 index 00000000..4695b604 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/DrawerRouter.d.ts @@ -0,0 +1,53 @@ +import { TabActionHelpers, TabActionType, TabNavigationState, TabRouterOptions } from './TabRouter'; +import type { CommonNavigationAction, ParamListBase, Router } from './types'; +export declare type DrawerStatus = 'open' | 'closed'; +export declare type DrawerActionType = TabActionType | { + type: 'OPEN_DRAWER' | 'CLOSE_DRAWER' | 'TOGGLE_DRAWER'; + source?: string; + target?: string; +}; +export declare type DrawerRouterOptions = TabRouterOptions & { + defaultStatus?: DrawerStatus; +}; +export declare type DrawerNavigationState = Omit, 'type' | 'history'> & { + /** + * Type of the router, in this case, it's drawer. + */ + type: 'drawer'; + /** + * Default status of the drawer. + */ + default: DrawerStatus; + /** + * List of previously visited route keys and drawer open status. + */ + history: ({ + type: 'route'; + key: string; + } | { + type: 'drawer'; + status: DrawerStatus; + })[]; +}; +export declare type DrawerActionHelpers = TabActionHelpers & { + /** + * Open the drawer sidebar. + */ + openDrawer(): void; + /** + * Close the drawer sidebar. + */ + closeDrawer(): void; + /** + * Open the drawer sidebar if closed, or close if opened. + */ + toggleDrawer(): void; +}; +export declare const DrawerActions: { + openDrawer(): DrawerActionType; + closeDrawer(): DrawerActionType; + toggleDrawer(): DrawerActionType; + jumpTo(name: string, params?: object | undefined): TabActionType; +}; +export default function DrawerRouter({ defaultStatus, ...rest }: DrawerRouterOptions): Router, DrawerActionType | CommonNavigationAction>; +//# sourceMappingURL=DrawerRouter.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/DrawerRouter.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/DrawerRouter.d.ts.map new file mode 100644 index 00000000..b3d90617 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/DrawerRouter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DrawerRouter.d.ts","sourceRoot":"","sources":["../../../src/DrawerRouter.tsx"],"names":[],"mappings":"AAEA,OAAkB,EAChB,gBAAgB,EAEhB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EAEb,MAAM,EACP,MAAM,SAAS,CAAC;AACjB,oBAAY,YAAY,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE7C,oBAAY,gBAAgB,GACxB,aAAa,GACb;IACE,IAAI,EAAE,aAAa,GAAG,cAAc,GAAG,eAAe,CAAC;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEN,oBAAY,mBAAmB,GAAG,gBAAgB,GAAG;IACnD,aAAa,CAAC,EAAE,YAAY,CAAC;CAC9B,CAAC;AAEF,oBAAY,qBAAqB,CAAC,SAAS,SAAS,aAAa,IAAI,IAAI,CACvE,kBAAkB,CAAC,SAAS,CAAC,EAC7B,MAAM,GAAG,SAAS,CACnB,GAAG;IACF;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,OAAO,EAAE,CACL;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAC9B;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,MAAM,EAAE,YAAY,CAAA;KAAE,CAC3C,EAAE,CAAC;CACL,CAAC;AAEF,oBAAY,mBAAmB,CAAC,SAAS,SAAS,aAAa,IAC7D,gBAAgB,CAAC,SAAS,CAAC,GAAG;IAC5B;;OAEG;IACH,UAAU,IAAI,IAAI,CAAC;IAEnB;;OAEG;IACH,WAAW,IAAI,IAAI,CAAC;IAEpB;;OAEG;IACH,YAAY,IAAI,IAAI,CAAC;CACtB,CAAC;AAEJ,eAAO,MAAM,aAAa;kBAEV,gBAAgB;mBAGf,gBAAgB;oBAGf,gBAAgB;;CAGjC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,aAAwB,EACxB,GAAG,IAAI,EACR,EAAE,mBAAmB,GAAG,MAAM,CAC7B,qBAAqB,CAAC,aAAa,CAAC,EACpC,gBAAgB,GAAG,sBAAsB,CAC1C,CA+JA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/StackRouter.d.ts b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/StackRouter.d.ts new file mode 100644 index 00000000..7d17e26b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/StackRouter.d.ts @@ -0,0 +1,69 @@ +import type { DefaultRouterOptions, NavigationState, ParamListBase, Router } from './types'; +export declare type StackActionType = { + type: 'REPLACE'; + payload: { + name: string; + key?: string | undefined; + params?: object; + }; + source?: string; + target?: string; +} | { + type: 'PUSH'; + payload: { + name: string; + params?: object; + }; + source?: string; + target?: string; +} | { + type: 'POP'; + payload: { + count: number; + }; + source?: string; + target?: string; +} | { + type: 'POP_TO_TOP'; + source?: string; + target?: string; +}; +export declare type StackRouterOptions = DefaultRouterOptions; +export declare type StackNavigationState = NavigationState & { + /** + * Type of the router, in this case, it's stack. + */ + type: 'stack'; +}; +export declare type StackActionHelpers = { + /** + * Replace the current route with a new one. + * + * @param name Route name of the new route. + * @param [params] Params object for the new route. + */ + replace(...args: undefined extends ParamList[RouteName] ? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]] : [screen: RouteName, params: ParamList[RouteName]]): void; + /** + * Push a new screen onto the stack. + * + * @param name Name of the route for the tab. + * @param [params] Params object for the route. + */ + push(...args: undefined extends ParamList[RouteName] ? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]] : [screen: RouteName, params: ParamList[RouteName]]): void; + /** + * Pop a screen from the stack. + */ + pop(count?: number): void; + /** + * Pop to the first route in the stack, dismissing all other screens. + */ + popToTop(): void; +}; +export declare const StackActions: { + replace(name: string, params?: object): StackActionType; + push(name: string, params?: object): StackActionType; + pop(count?: number): StackActionType; + popToTop(): StackActionType; +}; +export default function StackRouter(options: StackRouterOptions): Router, import("./CommonActions").Action | StackActionType>; +//# sourceMappingURL=StackRouter.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/StackRouter.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/StackRouter.d.ts.map new file mode 100644 index 00000000..436bb82f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/StackRouter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"StackRouter.d.ts","sourceRoot":"","sources":["../../../src/StackRouter.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,oBAAoB,EACpB,eAAe,EACf,aAAa,EAEb,MAAM,EACP,MAAM,SAAS,CAAC;AAEjB,oBAAY,eAAe,GACvB;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEN,oBAAY,kBAAkB,GAAG,oBAAoB,CAAC;AAEtD,oBAAY,oBAAoB,CAAC,SAAS,SAAS,aAAa,IAC9D,eAAe,CAAC,SAAS,CAAC,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEJ,oBAAY,kBAAkB,CAAC,SAAS,SAAS,aAAa,IAAI;IAChE;;;;;OAKG;IACH,OAAO,CAAC,SAAS,SAAS,MAAM,SAAS,EACvC,GAAG,IAAI,EAAE,SAAS,SAAS,SAAS,CAAC,SAAS,CAAC,GAC3C,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,GACvE,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,GACpD,IAAI,CAAC;IAER;;;;;OAKG;IACH,IAAI,CAAC,SAAS,SAAS,MAAM,SAAS,EACpC,GAAG,IAAI,EAAE,SAAS,SAAS,SAAS,CAAC,SAAS,CAAC,GAC3C,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,GACvE,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,GACpD,IAAI,CAAC;IAER;;OAEG;IACH,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,QAAQ,IAAI,IAAI,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,YAAY;kBACT,MAAM,WAAW,MAAM,GAAG,eAAe;eAG5C,MAAM,WAAW,MAAM,GAAG,eAAe;gBAGzC,MAAM,GAAO,eAAe;gBAG3B,eAAe;CAG5B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,OAAO,EAAE,kBAAkB,mGA4Y9D"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/TabRouter.d.ts b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/TabRouter.d.ts new file mode 100644 index 00000000..ba35cb21 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/TabRouter.d.ts @@ -0,0 +1,41 @@ +import type { DefaultRouterOptions, NavigationState, ParamListBase, Router } from './types'; +export declare type TabActionType = { + type: 'JUMP_TO'; + payload: { + name: string; + params?: object; + }; + source?: string; + target?: string; +}; +export declare type BackBehavior = 'initialRoute' | 'firstRoute' | 'history' | 'order' | 'none'; +export declare type TabRouterOptions = DefaultRouterOptions & { + backBehavior?: BackBehavior; +}; +export declare type TabNavigationState = Omit, 'history'> & { + /** + * Type of the router, in this case, it's tab. + */ + type: 'tab'; + /** + * List of previously visited route keys. + */ + history: { + type: 'route'; + key: string; + }[]; +}; +export declare type TabActionHelpers = { + /** + * Jump to an existing tab. + * + * @param name Name of the route for the tab. + * @param [params] Params object for the route. + */ + jumpTo>(...args: undefined extends ParamList[RouteName] ? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]] : [screen: RouteName, params: ParamList[RouteName]]): void; +}; +export declare const TabActions: { + jumpTo(name: string, params?: object): TabActionType; +}; +export default function TabRouter({ initialRouteName, backBehavior, }: TabRouterOptions): Router, import("./CommonActions").Action | TabActionType>; +//# sourceMappingURL=TabRouter.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/TabRouter.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/TabRouter.d.ts.map new file mode 100644 index 00000000..f23aaa2a --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/TabRouter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TabRouter.d.ts","sourceRoot":"","sources":["../../../src/TabRouter.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,oBAAoB,EACpB,eAAe,EACf,aAAa,EAGb,MAAM,EACP,MAAM,SAAS,CAAC;AAEjB,oBAAY,aAAa,GAAG;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE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-starter/node_modules/@react-navigation/routers/lib/typescript/src/index.d.ts new file mode 100644 index 00000000..141df933 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/index.d.ts @@ -0,0 +1,11 @@ +import * as CommonActions from './CommonActions'; +export { CommonActions }; +export { default as BaseRouter } from './BaseRouter'; +export type { DrawerActionHelpers, DrawerActionType, DrawerNavigationState, DrawerRouterOptions, DrawerStatus, } from './DrawerRouter'; +export { DrawerActions, default as DrawerRouter } from './DrawerRouter'; +export type { StackActionHelpers, StackActionType, StackNavigationState, StackRouterOptions, } from './StackRouter'; +export { StackActions, default as StackRouter } from './StackRouter'; +export type { TabActionHelpers, TabActionType, TabNavigationState, TabRouterOptions, } from './TabRouter'; +export { TabActions, default as TabRouter } from './TabRouter'; +export * from './types'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/index.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/index.d.ts.map new file mode 100644 index 00000000..0cce2571 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,GACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACxE,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACrE,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAC/D,cAAc,SAAS,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/types.d.ts b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/types.d.ts new file mode 100644 index 00000000..4998a0d7 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/types.d.ts @@ -0,0 +1,177 @@ +import type * as CommonActions from './CommonActions'; +export declare type CommonNavigationAction = CommonActions.Action; +declare type NavigationRoute = Route, ParamList[RouteName]> & { + state?: NavigationState | PartialState; +}; +export declare type NavigationState = Readonly<{ + /** + * Unique key for the navigation state. + */ + key: string; + /** + * Index of the currently focused route. + */ + index: number; + /** + * List of valid route names as defined in the screen components. + */ + routeNames: Extract[]; + /** + * Alternative entries for history. + */ + history?: unknown[]; + /** + * List of rendered routes. + */ + routes: NavigationRoute[]; + /** + * Custom type for the state, whether it's for tab, stack, drawer etc. + * During rehydration, the state will be discarded if type doesn't match with router type. + * It can also be used to detect the type of the navigator we're dealing with. + */ + type: string; + /** + * Whether the navigation state has been rehydrated. + */ + stale: false; +}>; +export declare type InitialState = Readonly> & { + routes: (Omit, 'key'> & { + state?: InitialState; + })[]; +}>; +export declare type PartialRoute> = Omit & { + key?: string; + state?: PartialState; +}; +export declare type PartialState = Partial> & Readonly<{ + stale?: true; + routes: PartialRoute>[]; +}>; +export declare type Route = Readonly<{ + /** + * Unique key for the route. + */ + key: string; + /** + * User-provided name for the route. + */ + name: RouteName; + /** + * Path associated with the route. + * Usually present when the screen was opened from a deep link. + */ + path?: string; +}> & (undefined extends Params ? Readonly<{ + /** + * Params for this route + */ + params?: Readonly; +}> : Readonly<{ + /** + * Params for this route + */ + params: Readonly; +}>); +export declare type ParamListBase = Record; +export declare type NavigationAction = Readonly<{ + /** + * Type of the action (e.g. `NAVIGATE`) + */ + type: string; + /** + * Additional data for the action + */ + payload?: object; + /** + * Key of the route which dispatched this action. + */ + source?: string; + /** + * Key of the navigator which should handle this action. + */ + target?: string; +}>; +export declare type ActionCreators = { + [key: string]: (...args: any) => Action; +}; +export declare type DefaultRouterOptions = { + /** + * Name of the route to focus by on initial render. + * If not specified, usually the first route is used. + */ + initialRouteName?: RouteName; +}; +export declare type RouterFactory = (options: RouterOptions) => Router; +export declare type RouterConfigOptions = { + routeNames: string[]; + routeParamList: ParamListBase; + routeGetIdList: Record; + }) => string | undefined) | undefined>; +}; +export declare type Router = { + /** + * Type of the router. Should match the `type` property in state. + * If the type doesn't match, the state will be discarded during rehydration. + */ + type: State['type']; + /** + * Initialize the navigation state. + * + * @param options.routeNames List of valid route names as defined in the screen components. + * @param options.routeParamsList Object containing params for each route. + */ + getInitialState(options: RouterConfigOptions): State; + /** + * Rehydrate the full navigation state from a given partial state. + * + * @param partialState Navigation state to rehydrate from. + * @param options.routeNames List of valid route names as defined in the screen components. + * @param options.routeParamsList Object containing params for each route. + */ + getRehydratedState(partialState: PartialState | State, options: RouterConfigOptions): State; + /** + * Take the current state and updated list of route names, and return a new state. + * + * @param state State object to update. + * @param options.routeNames New list of route names. + * @param options.routeParamsList Object containing params for each route. + */ + getStateForRouteNamesChange(state: State, options: RouterConfigOptions & { + /** + * List of routes whose key has changed even if they still have the same name. + * This allows to remove screens declaratively. + */ + routeKeyChanges: string[]; + }): State; + /** + * Take the current state and key of a route, and return a new state with the route focused + * + * @param state State object to apply the action on. + * @param key Key of the route to focus. + */ + getStateForRouteFocus(state: State, key: string): State; + /** + * Take the current state and action, and return a new state. + * If the action cannot be handled, return `null`. + * + * @param state State object to apply the action on. + * @param action Action object to apply. + * @param options.routeNames List of valid route names as defined in the screen components. + * @param options.routeParamsList Object containing params for each route. + */ + getStateForAction(state: State, action: Action, options: RouterConfigOptions): State | PartialState | null; + /** + * Whether the action should also change focus in parent navigator + * + * @param action Action object to check. + */ + shouldActionChangeFocus(action: NavigationAction): boolean; + /** + * Action creators for the router. + */ + actionCreators?: ActionCreators; +}; +export {}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/types.d.ts.map b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/types.d.ts.map new file mode 100644 index 00000000..37b7be13 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/lib/typescript/src/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,aAAa,MAAM,iBAAiB,CAAC;AAEtD,oBAAY,sBAAsB,GAAG,aAAa,CAAC,MAAM,CAAC;AAE1D,aAAK,eAAe,CAClB,SAAS,SAAS,aAAa,EAC/B,SAAS,SAAS,MAAM,SAAS,IAC/B,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,GAAG;IAC5D,KAAK,CAAC,EAAE,eAAe,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;CACzD,CAAC;AAEF,oBAAY,eAAe,CAAC,SAAS,SAAS,aAAa,GAAG,aAAa,IACzE,QAAQ,CAAC;IACP;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC,MAAM,SAAS,EAAE,MAAM,CAAC,EAAE,CAAC;IAC/C;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,eAAe,CAAC,SAAS,EAAE,MAAM,SAAS,CAAC,EAA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C;AAEF,oBAAY,MAAM,CAChB,KAAK,SAAS,eAAe,EAC7B,MAAM,SAAS,gBAAgB,IAC7B;IACF;;;OAGG;IACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEpB;;;;;OAKG;IACH,eAAe,CAAC,OAAO,EAAE,mBAAmB,GAAG,KAAK,CAAC;IAErD;;;;;;OAMG;IACH,kBAAkB,CAChB,YAAY,EAAE,YAAY,CAAC,KAAK,CAAC,GAAG,KAAK,EACzC,OAAO,EAAE,mBAAmB,GAC3B,KAAK,CAAC;IAET;;;;;;OAMG;IACH,2BAA2B,CACzB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,mBAAmB,GAAG;QAC7B;;;WAGG;QACH,eAAe,EAAE,MAAM,EAAE,CAAC;KAC3B,GACA,KAAK,CAAC;IAET;;;;;OAKG;IACH,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC;IAExD;;;;;;;;OAQG;IACH,iBAAiB,CACf,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,mBAAmB,GAC3B,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAEtC;;;;OAIG;IACH,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC;IAE3D;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;CACzC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/package.json b/iut-expo-starter/node_modules/@react-navigation/routers/package.json new file mode 100644 index 00000000..7417eca9 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/package.json @@ -0,0 +1,61 @@ +{ + "name": "@react-navigation/routers", + "description": "Routers to help build custom navigators", + "version": "6.1.6", + "keywords": [ + "react", + "react-native", + "react-navigation" + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/react-navigation/react-navigation.git", + "directory": "packages/routers" + }, + "bugs": { + "url": "https://github.com/react-navigation/react-navigation/issues" + }, + "homepage": "https://reactnavigation.org/docs/custom-routers/", + "main": "lib/commonjs/index.js", + "react-native": "src/index.tsx", + "source": "src/index.tsx", + "module": "lib/module/index.js", + "types": "lib/typescript/src/index.d.ts", + "files": [ + "src", + "lib", + "!**/__tests__" + ], + "sideEffects": false, + "publishConfig": { + "access": "public" + }, + "scripts": { + "prepack": "bob build", + "clean": "del lib" + }, + "dependencies": { + "nanoid": "^3.1.23" + }, + "devDependencies": { + "del-cli": "^3.0.1", + "react-native-builder-bob": "^0.20.3", + "typescript": "^4.7.4" + }, + "react-native-builder-bob": { + "source": "src", + "output": "lib", + "targets": [ + "commonjs", + "module", + [ + "typescript", + { + "project": "tsconfig.build.json" + } + ] + ] + }, + "gitHead": "2b22d3ea9ca99bc298f4fb48ae9808b65aa25620" +} diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/src/BaseRouter.tsx b/iut-expo-starter/node_modules/@react-navigation/routers/src/BaseRouter.tsx new file mode 100644 index 00000000..6901e821 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/src/BaseRouter.tsx @@ -0,0 +1,81 @@ +import { nanoid } from 'nanoid/non-secure'; + +import type { + CommonNavigationAction, + NavigationState, + PartialState, +} from './types'; + +/** + * Base router object that can be used when writing custom routers. + * This provides few helper methods to handle common actions such as `RESET`. + */ +const BaseRouter = { + getStateForAction( + state: State, + action: CommonNavigationAction + ): State | PartialState | null { + switch (action.type) { + case 'SET_PARAMS': { + const index = action.source + ? state.routes.findIndex((r) => r.key === action.source) + : state.index; + + if (index === -1) { + return null; + } + + return { + ...state, + routes: state.routes.map((r, i) => + i === index + ? { ...r, params: { ...r.params, ...action.payload.params } } + : r + ), + }; + } + + case 'RESET': { + const nextState = action.payload as State | PartialState; + + if ( + nextState.routes.length === 0 || + nextState.routes.some( + (route: { name: string }) => !state.routeNames.includes(route.name) + ) + ) { + return null; + } + + if (nextState.stale === false) { + if ( + state.routeNames.length !== nextState.routeNames.length || + nextState.routeNames.some( + (name) => !state.routeNames.includes(name) + ) + ) { + return null; + } + + return { + ...nextState, + routes: nextState.routes.map((route) => + route.key ? route : { ...route, key: `${route.name}-${nanoid()}` } + ), + }; + } + + return nextState; + } + + default: + return null; + } + }, + + shouldActionChangeFocus(action: CommonNavigationAction) { + return action.type === 'NAVIGATE'; + }, +}; + +export default BaseRouter; diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/src/CommonActions.tsx b/iut-expo-starter/node_modules/@react-navigation/routers/src/CommonActions.tsx new file mode 100644 index 00000000..8c21eb1d --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/src/CommonActions.tsx @@ -0,0 +1,89 @@ +import type { NavigationState, PartialState, Route } from './types'; + +type ResetState = + | PartialState + | NavigationState + | (Omit & { + routes: Omit, 'key'>[]; + }); + +export type Action = + | { + type: 'GO_BACK'; + source?: string; + target?: string; + } + | { + type: 'NAVIGATE'; + payload: + | { + key: string; + name?: undefined; + params?: object; + path?: string; + merge?: boolean; + } + | { + name: string; + key?: string; + params?: object; + path?: string; + merge?: boolean; + }; + source?: string; + target?: string; + } + | { + type: 'RESET'; + payload: ResetState | undefined; + source?: string; + target?: string; + } + | { + type: 'SET_PARAMS'; + payload: { params?: object }; + source?: string; + target?: string; + }; + +export function goBack(): Action { + return { type: 'GO_BACK' }; +} + +export function navigate( + options: + | { key: string; params?: object; path?: string; merge?: boolean } + | { + name: string; + key?: string; + params?: object; + path?: string; + merge?: boolean; + } +): Action; +// eslint-disable-next-line no-redeclare +export function navigate(name: string, params?: object): Action; +// eslint-disable-next-line no-redeclare +export function navigate(...args: any): Action { + if (typeof args[0] === 'string') { + return { type: 'NAVIGATE', payload: { name: args[0], params: args[1] } }; + } else { + const payload = args[0] || {}; + + if (!payload.hasOwnProperty('key') && !payload.hasOwnProperty('name')) { + throw new Error( + 'You need to specify name or key when calling navigate with an object as the argument. See https://reactnavigation.org/docs/navigation-actions#navigate for usage.' + ); + } + + return { type: 'NAVIGATE', payload }; + } +} + +export function reset(state: ResetState | undefined): Action { + return { type: 'RESET', payload: state }; +} + +export function setParams(params: object): Action { + return { type: 'SET_PARAMS', payload: { params } }; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/src/DrawerRouter.tsx b/iut-expo-starter/node_modules/@react-navigation/routers/src/DrawerRouter.tsx new file mode 100644 index 00000000..38568364 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/src/DrawerRouter.tsx @@ -0,0 +1,247 @@ +import { nanoid } from 'nanoid/non-secure'; + +import TabRouter, { + TabActionHelpers, + TabActions, + TabActionType, + TabNavigationState, + TabRouterOptions, +} from './TabRouter'; +import type { + CommonNavigationAction, + ParamListBase, + PartialState, + Router, +} from './types'; +export type DrawerStatus = 'open' | 'closed'; + +export type DrawerActionType = + | TabActionType + | { + type: 'OPEN_DRAWER' | 'CLOSE_DRAWER' | 'TOGGLE_DRAWER'; + source?: string; + target?: string; + }; + +export type DrawerRouterOptions = TabRouterOptions & { + defaultStatus?: DrawerStatus; +}; + +export type DrawerNavigationState = Omit< + TabNavigationState, + 'type' | 'history' +> & { + /** + * Type of the router, in this case, it's drawer. + */ + type: 'drawer'; + /** + * Default status of the drawer. + */ + default: DrawerStatus; + /** + * List of previously visited route keys and drawer open status. + */ + history: ( + | { type: 'route'; key: string } + | { type: 'drawer'; status: DrawerStatus } + )[]; +}; + +export type DrawerActionHelpers = + TabActionHelpers & { + /** + * Open the drawer sidebar. + */ + openDrawer(): void; + + /** + * Close the drawer sidebar. + */ + closeDrawer(): void; + + /** + * Open the drawer sidebar if closed, or close if opened. + */ + toggleDrawer(): void; + }; + +export const DrawerActions = { + ...TabActions, + openDrawer(): DrawerActionType { + return { type: 'OPEN_DRAWER' }; + }, + closeDrawer(): DrawerActionType { + return { type: 'CLOSE_DRAWER' }; + }, + toggleDrawer(): DrawerActionType { + return { type: 'TOGGLE_DRAWER' }; + }, +}; + +export default function DrawerRouter({ + defaultStatus = 'closed', + ...rest +}: DrawerRouterOptions): Router< + DrawerNavigationState, + DrawerActionType | CommonNavigationAction +> { + const router = TabRouter(rest) as unknown as Router< + DrawerNavigationState, + TabActionType | CommonNavigationAction + >; + + const isDrawerInHistory = ( + state: + | DrawerNavigationState + | PartialState> + ) => Boolean(state.history?.some((it) => it.type === 'drawer')); + + const addDrawerToHistory = ( + state: DrawerNavigationState + ): DrawerNavigationState => { + if (isDrawerInHistory(state)) { + return state; + } + + return { + ...state, + history: [ + ...state.history, + { + type: 'drawer', + status: defaultStatus === 'open' ? 'closed' : 'open', + }, + ], + }; + }; + + const removeDrawerFromHistory = ( + state: DrawerNavigationState + ): DrawerNavigationState => { + if (!isDrawerInHistory(state)) { + return state; + } + + return { + ...state, + history: state.history.filter((it) => it.type !== 'drawer'), + }; + }; + + const openDrawer = ( + state: DrawerNavigationState + ): DrawerNavigationState => { + if (defaultStatus === 'open') { + return removeDrawerFromHistory(state); + } + + return addDrawerToHistory(state); + }; + + const closeDrawer = ( + state: DrawerNavigationState + ): DrawerNavigationState => { + if (defaultStatus === 'open') { + return addDrawerToHistory(state); + } + + return removeDrawerFromHistory(state); + }; + + return { + ...router, + + type: 'drawer', + + getInitialState({ routeNames, routeParamList, routeGetIdList }) { + const state = router.getInitialState({ + routeNames, + routeParamList, + routeGetIdList, + }); + + return { + ...state, + default: defaultStatus, + stale: false, + type: 'drawer', + key: `drawer-${nanoid()}`, + }; + }, + + getRehydratedState( + partialState, + { routeNames, routeParamList, routeGetIdList } + ) { + if (partialState.stale === false) { + return partialState; + } + + let state = router.getRehydratedState(partialState, { + routeNames, + routeParamList, + routeGetIdList, + }); + + if (isDrawerInHistory(partialState)) { + // Re-sync the drawer entry in history to correct it if it was wrong + state = removeDrawerFromHistory(state); + state = addDrawerToHistory(state); + } + + return { + ...state, + default: defaultStatus, + type: 'drawer', + key: `drawer-${nanoid()}`, + }; + }, + + getStateForRouteFocus(state, key) { + const result = router.getStateForRouteFocus(state, key); + + return closeDrawer(result); + }, + + getStateForAction(state, action, options) { + switch (action.type) { + case 'OPEN_DRAWER': + return openDrawer(state); + + case 'CLOSE_DRAWER': + return closeDrawer(state); + + case 'TOGGLE_DRAWER': + if (isDrawerInHistory(state)) { + return removeDrawerFromHistory(state); + } + + return addDrawerToHistory(state); + + case 'JUMP_TO': + case 'NAVIGATE': { + const result = router.getStateForAction(state, action, options); + + if (result != null && result.index !== state.index) { + return closeDrawer(result as DrawerNavigationState); + } + + return result; + } + + case 'GO_BACK': + if (isDrawerInHistory(state)) { + return removeDrawerFromHistory(state); + } + + return router.getStateForAction(state, action, options); + + default: + return router.getStateForAction(state, action, options); + } + }, + + actionCreators: DrawerActions, + }; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/src/StackRouter.tsx b/iut-expo-starter/node_modules/@react-navigation/routers/src/StackRouter.tsx new file mode 100644 index 00000000..eaa43a0b --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/src/StackRouter.tsx @@ -0,0 +1,495 @@ +import { nanoid } from 'nanoid/non-secure'; + +import BaseRouter from './BaseRouter'; +import type { + CommonNavigationAction, + DefaultRouterOptions, + NavigationState, + ParamListBase, + Route, + Router, +} from './types'; + +export type StackActionType = + | { + type: 'REPLACE'; + payload: { name: string; key?: string | undefined; params?: object }; + source?: string; + target?: string; + } + | { + type: 'PUSH'; + payload: { name: string; params?: object }; + source?: string; + target?: string; + } + | { + type: 'POP'; + payload: { count: number }; + source?: string; + target?: string; + } + | { + type: 'POP_TO_TOP'; + source?: string; + target?: string; + }; + +export type StackRouterOptions = DefaultRouterOptions; + +export type StackNavigationState = + NavigationState & { + /** + * Type of the router, in this case, it's stack. + */ + type: 'stack'; + }; + +export type StackActionHelpers = { + /** + * Replace the current route with a new one. + * + * @param name Route name of the new route. + * @param [params] Params object for the new route. + */ + replace( + ...args: undefined extends ParamList[RouteName] + ? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]] + : [screen: RouteName, params: ParamList[RouteName]] + ): void; + + /** + * Push a new screen onto the stack. + * + * @param name Name of the route for the tab. + * @param [params] Params object for the route. + */ + push( + ...args: undefined extends ParamList[RouteName] + ? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]] + : [screen: RouteName, params: ParamList[RouteName]] + ): void; + + /** + * Pop a screen from the stack. + */ + pop(count?: number): void; + + /** + * Pop to the first route in the stack, dismissing all other screens. + */ + popToTop(): void; +}; + +export const StackActions = { + replace(name: string, params?: object): StackActionType { + return { type: 'REPLACE', payload: { name, params } }; + }, + push(name: string, params?: object): StackActionType { + return { type: 'PUSH', payload: { name, params } }; + }, + pop(count: number = 1): StackActionType { + return { type: 'POP', payload: { count } }; + }, + popToTop(): StackActionType { + return { type: 'POP_TO_TOP' }; + }, +}; + +export default function StackRouter(options: StackRouterOptions) { + const router: Router< + StackNavigationState, + CommonNavigationAction | StackActionType + > = { + ...BaseRouter, + + type: 'stack', + + getInitialState({ routeNames, routeParamList }) { + const initialRouteName = + options.initialRouteName !== undefined && + routeNames.includes(options.initialRouteName) + ? options.initialRouteName + : routeNames[0]; + + return { + stale: false, + type: 'stack', + key: `stack-${nanoid()}`, + index: 0, + routeNames, + routes: [ + { + key: `${initialRouteName}-${nanoid()}`, + name: initialRouteName, + params: routeParamList[initialRouteName], + }, + ], + }; + }, + + getRehydratedState(partialState, { routeNames, routeParamList }) { + let state = partialState; + + if (state.stale === false) { + return state; + } + + const routes = state.routes + .filter((route) => routeNames.includes(route.name)) + .map( + (route) => + ({ + ...route, + key: route.key || `${route.name}-${nanoid()}`, + params: + routeParamList[route.name] !== undefined + ? { + ...routeParamList[route.name], + ...route.params, + } + : route.params, + } as Route) + ); + + if (routes.length === 0) { + const initialRouteName = + options.initialRouteName !== undefined + ? options.initialRouteName + : routeNames[0]; + + routes.push({ + key: `${initialRouteName}-${nanoid()}`, + name: initialRouteName, + params: routeParamList[initialRouteName], + }); + } + + return { + stale: false, + type: 'stack', + key: `stack-${nanoid()}`, + index: routes.length - 1, + routeNames, + routes, + }; + }, + + getStateForRouteNamesChange( + state, + { routeNames, routeParamList, routeKeyChanges } + ) { + const routes = state.routes.filter( + (route) => + routeNames.includes(route.name) && + !routeKeyChanges.includes(route.name) + ); + + if (routes.length === 0) { + const initialRouteName = + options.initialRouteName !== undefined && + routeNames.includes(options.initialRouteName) + ? options.initialRouteName + : routeNames[0]; + + routes.push({ + key: `${initialRouteName}-${nanoid()}`, + name: initialRouteName, + params: routeParamList[initialRouteName], + }); + } + + return { + ...state, + routeNames, + routes, + index: Math.min(state.index, routes.length - 1), + }; + }, + + getStateForRouteFocus(state, key) { + const index = state.routes.findIndex((r) => r.key === key); + + if (index === -1 || index === state.index) { + return state; + } + + return { + ...state, + index, + routes: state.routes.slice(0, index + 1), + }; + }, + + getStateForAction(state, action, options) { + const { routeParamList } = options; + + switch (action.type) { + case 'REPLACE': { + const index = + action.target === state.key && action.source + ? state.routes.findIndex((r) => r.key === action.source) + : state.index; + + if (index === -1) { + return null; + } + + const { name, key, params } = action.payload; + + if (!state.routeNames.includes(name)) { + return null; + } + + return { + ...state, + routes: state.routes.map((route, i) => + i === index + ? { + key: key !== undefined ? key : `${name}-${nanoid()}`, + name, + params: + routeParamList[name] !== undefined + ? { + ...routeParamList[name], + ...params, + } + : params, + } + : route + ), + }; + } + + case 'PUSH': + if (state.routeNames.includes(action.payload.name)) { + const getId = options.routeGetIdList[action.payload.name]; + const id = getId?.({ params: action.payload.params }); + + const route = id + ? state.routes.find( + (route) => + route.name === action.payload.name && + id === getId?.({ params: route.params }) + ) + : undefined; + + let routes: Route[]; + + if (route) { + routes = state.routes.filter((r) => r.key !== route.key); + routes.push({ + ...route, + params: + routeParamList[action.payload.name] !== undefined + ? { + ...routeParamList[action.payload.name], + ...action.payload.params, + } + : action.payload.params, + }); + } else { + routes = [ + ...state.routes, + { + key: `${action.payload.name}-${nanoid()}`, + name: action.payload.name, + params: + routeParamList[action.payload.name] !== undefined + ? { + ...routeParamList[action.payload.name], + ...action.payload.params, + } + : action.payload.params, + }, + ]; + } + + return { + ...state, + index: routes.length - 1, + routes, + }; + } + + return null; + + case 'POP': { + const index = + action.target === state.key && action.source + ? state.routes.findIndex((r) => r.key === action.source) + : state.index; + + if (index > 0) { + const count = Math.max(index - action.payload.count + 1, 1); + const routes = state.routes + .slice(0, count) + .concat(state.routes.slice(index + 1)); + + return { + ...state, + index: routes.length - 1, + routes, + }; + } + + return null; + } + + case 'POP_TO_TOP': + return router.getStateForAction( + state, + { + type: 'POP', + payload: { count: state.routes.length - 1 }, + }, + options + ); + + case 'NAVIGATE': + if ( + action.payload.name !== undefined && + !state.routeNames.includes(action.payload.name) + ) { + return null; + } + + if (action.payload.key || action.payload.name) { + // If the route already exists, navigate to that + let index = -1; + + const getId = + // `getId` and `key` can't be used together + action.payload.key === undefined && + action.payload.name !== undefined + ? options.routeGetIdList[action.payload.name] + : undefined; + const id = getId?.({ params: action.payload.params }); + + if (id) { + index = state.routes.findIndex( + (route) => + route.name === action.payload.name && + id === getId?.({ params: route.params }) + ); + } else if ( + (state.routes[state.index].name === action.payload.name && + action.payload.key === undefined) || + state.routes[state.index].key === action.payload.key + ) { + index = state.index; + } else { + for (let i = state.routes.length - 1; i >= 0; i--) { + if ( + (state.routes[i].name === action.payload.name && + action.payload.key === undefined) || + state.routes[i].key === action.payload.key + ) { + index = i; + break; + } + } + } + + if ( + index === -1 && + action.payload.key && + action.payload.name === undefined + ) { + return null; + } + + if (index === -1 && action.payload.name !== undefined) { + const routes = [ + ...state.routes, + { + key: + action.payload.key ?? `${action.payload.name}-${nanoid()}`, + name: action.payload.name, + path: action.payload.path, + params: + routeParamList[action.payload.name] !== undefined + ? { + ...routeParamList[action.payload.name], + ...action.payload.params, + } + : action.payload.params, + }, + ]; + + return { + ...state, + routes, + index: routes.length - 1, + }; + } + + const route = state.routes[index]; + + let params; + + if (action.payload.merge) { + params = + action.payload.params !== undefined || + routeParamList[route.name] !== undefined + ? { + ...routeParamList[route.name], + ...route.params, + ...action.payload.params, + } + : route.params; + } else { + params = + routeParamList[route.name] !== undefined + ? { + ...routeParamList[route.name], + ...action.payload.params, + } + : action.payload.params; + } + + return { + ...state, + index, + routes: [ + ...state.routes.slice(0, index), + params !== route.params || + (action.payload.path && action.payload.path !== route.path) + ? { + ...route, + path: action.payload.path ?? route.path, + params, + } + : state.routes[index], + ], + }; + } + + return null; + + case 'GO_BACK': + if (state.index > 0) { + return router.getStateForAction( + state, + { + type: 'POP', + payload: { count: 1 }, + target: action.target, + source: action.source, + }, + options + ); + } + + return null; + + default: + return BaseRouter.getStateForAction(state, action); + } + }, + + actionCreators: StackActions, + }; + + return router; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/src/TabRouter.tsx b/iut-expo-starter/node_modules/@react-navigation/routers/src/TabRouter.tsx new file mode 100644 index 00000000..2bb67aa5 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/src/TabRouter.tsx @@ -0,0 +1,393 @@ +import { nanoid } from 'nanoid/non-secure'; + +import BaseRouter from './BaseRouter'; +import type { + CommonNavigationAction, + DefaultRouterOptions, + NavigationState, + ParamListBase, + PartialState, + Route, + Router, +} from './types'; + +export type TabActionType = { + type: 'JUMP_TO'; + payload: { name: string; params?: object }; + source?: string; + target?: string; +}; + +export type BackBehavior = + | 'initialRoute' + | 'firstRoute' + | 'history' + | 'order' + | 'none'; + +export type TabRouterOptions = DefaultRouterOptions & { + backBehavior?: BackBehavior; +}; + +export type TabNavigationState = Omit< + NavigationState, + 'history' +> & { + /** + * Type of the router, in this case, it's tab. + */ + type: 'tab'; + /** + * List of previously visited route keys. + */ + history: { type: 'route'; key: string }[]; +}; + +export type TabActionHelpers = { + /** + * Jump to an existing tab. + * + * @param name Name of the route for the tab. + * @param [params] Params object for the route. + */ + jumpTo>( + ...args: undefined extends ParamList[RouteName] + ? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]] + : [screen: RouteName, params: ParamList[RouteName]] + ): void; +}; + +const TYPE_ROUTE = 'route' as const; + +export const TabActions = { + jumpTo(name: string, params?: object): TabActionType { + return { type: 'JUMP_TO', payload: { name, params } }; + }, +}; + +const getRouteHistory = ( + routes: Route[], + index: number, + backBehavior: BackBehavior, + initialRouteName: string | undefined +) => { + const history = [{ type: TYPE_ROUTE, key: routes[index].key }]; + let initialRouteIndex; + + switch (backBehavior) { + case 'order': + for (let i = index; i > 0; i--) { + history.unshift({ type: TYPE_ROUTE, key: routes[i - 1].key }); + } + break; + case 'firstRoute': + if (index !== 0) { + history.unshift({ + type: TYPE_ROUTE, + key: routes[0].key, + }); + } + break; + case 'initialRoute': + initialRouteIndex = routes.findIndex( + (route) => route.name === initialRouteName + ); + initialRouteIndex = initialRouteIndex === -1 ? 0 : initialRouteIndex; + + if (index !== initialRouteIndex) { + history.unshift({ + type: TYPE_ROUTE, + key: routes[initialRouteIndex].key, + }); + } + break; + case 'history': + // The history will fill up on navigation + break; + } + + return history; +}; + +const changeIndex = ( + state: TabNavigationState, + index: number, + backBehavior: BackBehavior, + initialRouteName: string | undefined +) => { + let history; + + if (backBehavior === 'history') { + const currentKey = state.routes[index].key; + + history = state.history + .filter((it) => (it.type === 'route' ? it.key !== currentKey : false)) + .concat({ type: TYPE_ROUTE, key: currentKey }); + } else { + history = getRouteHistory( + state.routes, + index, + backBehavior, + initialRouteName + ); + } + + return { + ...state, + index, + history, + }; +}; + +export default function TabRouter({ + initialRouteName, + backBehavior = 'firstRoute', +}: TabRouterOptions) { + const router: Router< + TabNavigationState, + TabActionType | CommonNavigationAction + > = { + ...BaseRouter, + + type: 'tab', + + getInitialState({ routeNames, routeParamList }) { + const index = + initialRouteName !== undefined && routeNames.includes(initialRouteName) + ? routeNames.indexOf(initialRouteName) + : 0; + + const routes = routeNames.map((name) => ({ + name, + key: `${name}-${nanoid()}`, + params: routeParamList[name], + })); + + const history = getRouteHistory( + routes, + index, + backBehavior, + initialRouteName + ); + + return { + stale: false, + type: 'tab', + key: `tab-${nanoid()}`, + index, + routeNames, + history, + routes, + }; + }, + + getRehydratedState(partialState, { routeNames, routeParamList }) { + let state = partialState; + + if (state.stale === false) { + return state; + } + + const routes = routeNames.map((name) => { + const route = ( + state as PartialState> + ).routes.find((r) => r.name === name); + + return { + ...route, + name, + key: + route && route.name === name && route.key + ? route.key + : `${name}-${nanoid()}`, + params: + routeParamList[name] !== undefined + ? { + ...routeParamList[name], + ...(route ? route.params : undefined), + } + : route + ? route.params + : undefined, + } as Route; + }); + + const index = Math.min( + Math.max(routeNames.indexOf(state.routes[state?.index ?? 0]?.name), 0), + routes.length - 1 + ); + + const history = + state.history?.filter((it) => routes.find((r) => r.key === it.key)) ?? + []; + + return changeIndex( + { + stale: false, + type: 'tab', + key: `tab-${nanoid()}`, + index, + routeNames, + history, + routes, + }, + index, + backBehavior, + initialRouteName + ); + }, + + getStateForRouteNamesChange( + state, + { routeNames, routeParamList, routeKeyChanges } + ) { + const routes = routeNames.map( + (name) => + state.routes.find( + (r) => r.name === name && !routeKeyChanges.includes(r.name) + ) || { + name, + key: `${name}-${nanoid()}`, + params: routeParamList[name], + } + ); + + const index = Math.max( + 0, + routeNames.indexOf(state.routes[state.index].name) + ); + + let history = state.history.filter( + // Type will always be 'route' for tabs, but could be different in a router extending this (e.g. drawer) + (it) => it.type !== 'route' || routes.find((r) => r.key === it.key) + ); + + if (!history.length) { + history = getRouteHistory( + routes, + index, + backBehavior, + initialRouteName + ); + } + + return { + ...state, + history, + routeNames, + routes, + index, + }; + }, + + getStateForRouteFocus(state, key) { + const index = state.routes.findIndex((r) => r.key === key); + + if (index === -1 || index === state.index) { + return state; + } + + return changeIndex(state, index, backBehavior, initialRouteName); + }, + + getStateForAction(state, action, { routeParamList }) { + switch (action.type) { + case 'JUMP_TO': + case 'NAVIGATE': { + let index = -1; + + if (action.type === 'NAVIGATE' && action.payload.key) { + index = state.routes.findIndex( + (route) => route.key === action.payload.key + ); + } else { + index = state.routes.findIndex( + (route) => route.name === action.payload.name + ); + } + + if (index === -1) { + return null; + } + + return changeIndex( + { + ...state, + routes: state.routes.map((route, i) => { + if (i !== index) { + return route; + } + + let params; + + if (action.type === 'NAVIGATE' && action.payload.merge) { + params = + action.payload.params !== undefined || + routeParamList[route.name] !== undefined + ? { + ...routeParamList[route.name], + ...route.params, + ...action.payload.params, + } + : route.params; + } else { + params = + routeParamList[route.name] !== undefined + ? { + ...routeParamList[route.name], + ...action.payload.params, + } + : action.payload.params; + } + + const path = + action.type === 'NAVIGATE' && action.payload.path != null + ? action.payload.path + : route.path; + + return params !== route.params || path !== route.path + ? { ...route, path, params } + : route; + }), + }, + index, + backBehavior, + initialRouteName + ); + } + + case 'GO_BACK': { + if (state.history.length === 1) { + return null; + } + + const previousKey = state.history[state.history.length - 2].key; + const index = state.routes.findIndex( + (route) => route.key === previousKey + ); + + if (index === -1) { + return null; + } + + return { + ...state, + history: state.history.slice(0, -1), + index, + }; + } + + default: + return BaseRouter.getStateForAction(state, action); + } + }, + + shouldActionChangeFocus(action) { + return action.type === 'NAVIGATE'; + }, + + actionCreators: TabActions, + }; + + return router; +} diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/src/index.tsx b/iut-expo-starter/node_modules/@react-navigation/routers/src/index.tsx new file mode 100644 index 00000000..f1daac0f --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/src/index.tsx @@ -0,0 +1,28 @@ +import * as CommonActions from './CommonActions'; + +export { CommonActions }; + +export { default as BaseRouter } from './BaseRouter'; +export type { + DrawerActionHelpers, + DrawerActionType, + DrawerNavigationState, + DrawerRouterOptions, + DrawerStatus, +} from './DrawerRouter'; +export { DrawerActions, default as DrawerRouter } from './DrawerRouter'; +export type { + StackActionHelpers, + StackActionType, + StackNavigationState, + StackRouterOptions, +} from './StackRouter'; +export { StackActions, default as StackRouter } from './StackRouter'; +export type { + TabActionHelpers, + TabActionType, + TabNavigationState, + TabRouterOptions, +} from './TabRouter'; +export { TabActions, default as TabRouter } from './TabRouter'; +export * from './types'; diff --git a/iut-expo-starter/node_modules/@react-navigation/routers/src/types.tsx b/iut-expo-starter/node_modules/@react-navigation/routers/src/types.tsx new file mode 100644 index 00000000..5cf4d899 --- /dev/null +++ b/iut-expo-starter/node_modules/@react-navigation/routers/src/types.tsx @@ -0,0 +1,228 @@ +import type * as CommonActions from './CommonActions'; + +export type CommonNavigationAction = CommonActions.Action; + +type NavigationRoute< + ParamList extends ParamListBase, + RouteName extends keyof ParamList +> = Route, ParamList[RouteName]> & { + state?: NavigationState | PartialState; +}; + +export type NavigationState = + Readonly<{ + /** + * Unique key for the navigation state. + */ + key: string; + /** + * Index of the currently focused route. + */ + index: number; + /** + * List of valid route names as defined in the screen components. + */ + routeNames: Extract[]; + /** + * Alternative entries for history. + */ + history?: unknown[]; + /** + * List of rendered routes. + */ + routes: NavigationRoute[]; + /** + * Custom type for the state, whether it's for tab, stack, drawer etc. + * During rehydration, the state will be discarded if type doesn't match with router type. + * It can also be used to detect the type of the navigator we're dealing with. + */ + type: string; + /** + * Whether the navigation state has been rehydrated. + */ + stale: false; + }>; + +export type InitialState = Readonly< + Partial> & { + routes: (Omit, 'key'> & { state?: InitialState })[]; + } +>; + +export type PartialRoute> = Omit & { + key?: string; + state?: PartialState; +}; + +export type PartialState = Partial< + Omit +> & + Readonly<{ + stale?: true; + routes: PartialRoute>[]; + }>; + +export type Route< + RouteName extends string, + Params extends object | undefined = object | undefined +> = Readonly<{ + /** + * Unique key for the route. + */ + key: string; + /** + * User-provided name for the route. + */ + name: RouteName; + /** + * Path associated with the route. + * Usually present when the screen was opened from a deep link. + */ + path?: string; +}> & + (undefined extends Params + ? Readonly<{ + /** + * Params for this route + */ + params?: Readonly; + }> + : Readonly<{ + /** + * Params for this route + */ + params: Readonly; + }>); + +export type ParamListBase = Record; + +export type NavigationAction = Readonly<{ + /** + * Type of the action (e.g. `NAVIGATE`) + */ + type: string; + /** + * Additional data for the action + */ + payload?: object; + /** + * Key of the route which dispatched this action. + */ + source?: string; + /** + * Key of the navigator which should handle this action. + */ + target?: string; +}>; + +export type ActionCreators = { + [key: string]: (...args: any) => Action; +}; + +export type DefaultRouterOptions = { + /** + * Name of the route to focus by on initial render. + * If not specified, usually the first route is used. + */ + initialRouteName?: RouteName; +}; + +export type RouterFactory< + State extends NavigationState, + Action extends NavigationAction, + RouterOptions extends DefaultRouterOptions +> = (options: RouterOptions) => Router; + +export type RouterConfigOptions = { + routeNames: string[]; + routeParamList: ParamListBase; + routeGetIdList: Record< + string, + | ((options: { params?: Record }) => string | undefined) + | undefined + >; +}; + +export type Router< + State extends NavigationState, + Action extends NavigationAction +> = { + /** + * Type of the router. Should match the `type` property in state. + * If the type doesn't match, the state will be discarded during rehydration. + */ + type: State['type']; + + /** + * Initialize the navigation state. + * + * @param options.routeNames List of valid route names as defined in the screen components. + * @param options.routeParamsList Object containing params for each route. + */ + getInitialState(options: RouterConfigOptions): State; + + /** + * Rehydrate the full navigation state from a given partial state. + * + * @param partialState Navigation state to rehydrate from. + * @param options.routeNames List of valid route names as defined in the screen components. + * @param options.routeParamsList Object containing params for each route. + */ + getRehydratedState( + partialState: PartialState | State, + options: RouterConfigOptions + ): State; + + /** + * Take the current state and updated list of route names, and return a new state. + * + * @param state State object to update. + * @param options.routeNames New list of route names. + * @param options.routeParamsList Object containing params for each route. + */ + getStateForRouteNamesChange( + state: State, + options: RouterConfigOptions & { + /** + * List of routes whose key has changed even if they still have the same name. + * This allows to remove screens declaratively. + */ + routeKeyChanges: string[]; + } + ): State; + + /** + * Take the current state and key of a route, and return a new state with the route focused + * + * @param state State object to apply the action on. + * @param key Key of the route to focus. + */ + getStateForRouteFocus(state: State, key: string): State; + + /** + * Take the current state and action, and return a new state. + * If the action cannot be handled, return `null`. + * + * @param state State object to apply the action on. + * @param action Action object to apply. + * @param options.routeNames List of valid route names as defined in the screen components. + * @param options.routeParamsList Object containing params for each route. + */ + getStateForAction( + state: State, + action: Action, + options: RouterConfigOptions + ): State | PartialState | null; + + /** + * Whether the action should also change focus in parent navigator + * + * @param action Action object to check. + */ + shouldActionChangeFocus(action: NavigationAction): boolean; + + /** + * Action creators for the router. + */ + actionCreators?: ActionCreators; +}; diff --git a/iut-expo-starter/node_modules/filter-obj/index.js b/iut-expo-starter/node_modules/filter-obj/index.js new file mode 100644 index 00000000..c462e030 --- /dev/null +++ b/iut-expo-starter/node_modules/filter-obj/index.js @@ -0,0 +1,17 @@ +'use strict'; +module.exports = function (obj, predicate) { + var ret = {}; + var keys = Object.keys(obj); + var isArr = Array.isArray(predicate); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var val = obj[key]; + + if (isArr ? predicate.indexOf(key) !== -1 : predicate(key, val, obj)) { + ret[key] = val; + } + } + + return ret; +}; diff --git a/iut-expo-starter/node_modules/filter-obj/license b/iut-expo-starter/node_modules/filter-obj/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/iut-expo-starter/node_modules/filter-obj/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/iut-expo-starter/node_modules/filter-obj/package.json b/iut-expo-starter/node_modules/filter-obj/package.json new file mode 100644 index 00000000..0705b902 --- /dev/null +++ b/iut-expo-starter/node_modules/filter-obj/package.json @@ -0,0 +1,37 @@ +{ + "name": "filter-obj", + "version": "1.1.0", + "description": "Filter object keys and values into a new object", + "license": "MIT", + "repository": "sindresorhus/filter-obj", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "filter", + "obj", + "object", + "key", + "keys", + "value", + "values", + "val", + "iterate", + "iterator" + ], + "devDependencies": { + "ava": "0.0.4", + "xo": "*" + } +} diff --git a/iut-expo-starter/node_modules/filter-obj/readme.md b/iut-expo-starter/node_modules/filter-obj/readme.md new file mode 100644 index 00000000..6de3c59c --- /dev/null +++ b/iut-expo-starter/node_modules/filter-obj/readme.md @@ -0,0 +1,41 @@ +# filter-obj [![Build Status](https://travis-ci.org/sindresorhus/filter-obj.svg?branch=master)](https://travis-ci.org/sindresorhus/filter-obj) + +> Filter object keys and values into a new object + + +## Install + +``` +$ npm install --save filter-obj +``` + + +## Usage + +```js +var filterObj = require('filter-obj'); + +var obj = { + foo: true, + bar: false +}; + +var newObject = filterObj(obj, function (key, value, object) { + return value === true; +}); +//=> {foo: true} + +var newObject2 = filterObj(obj, ['bar']); +//=> {bar: true} +``` + + +## Related + +- [map-obj](https://github.com/sindresorhus/map-obj) - Map object keys and values into a new object +- [object-assign](https://github.com/sindresorhus/object-assign) - Copy enumerable own properties from one or more source objects to a target object + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/iut-expo-starter/node_modules/nanoid/LICENSE b/iut-expo-starter/node_modules/nanoid/LICENSE new file mode 100644 index 00000000..37f56aa4 --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2017 Andrey Sitnik + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/iut-expo-starter/node_modules/nanoid/README.md b/iut-expo-starter/node_modules/nanoid/README.md new file mode 100644 index 00000000..a4abd920 --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/README.md @@ -0,0 +1,39 @@ +# Nano ID + +Nano ID logo by Anton Lovchikov + +**English** | [Русский](./README.ru.md) | [简体中文](./README.zh-CN.md) | [Bahasa Indonesia](./README.id-ID.md) + +A tiny, secure, URL-friendly, unique string ID generator for JavaScript. + +> “An amazing level of senseless perfectionism, +> which is simply impossible not to respect.” + +* **Small.** 130 bytes (minified and gzipped). No dependencies. + [Size Limit] controls the size. +* **Fast.** It is 2 times faster than UUID. +* **Safe.** It uses hardware random generator. Can be used in clusters. +* **Short IDs.** It uses a larger alphabet than UUID (`A-Za-z0-9_-`). + So ID size was reduced from 36 to 21 symbols. +* **Portable.** Nano ID was ported + to [20 programming languages](#other-programming-languages). + +```js +import { nanoid } from 'nanoid' +model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT" +``` + +Supports modern browsers, IE [with Babel], Node.js and React Native. + +[online tool]: https://gitpod.io/#https://github.com/ai/nanoid/ +[with Babel]: https://developer.epages.com/blog/coding/how-to-transpile-node-modules-with-babel-and-webpack-in-a-monorepo/ +[Size Limit]: https://github.com/ai/size-limit + + + Sponsored by Evil Martians + + +## Docs +Read **[full docs](https://github.com/ai/nanoid#readme)** on GitHub. diff --git a/iut-expo-starter/node_modules/nanoid/async/index.browser.cjs b/iut-expo-starter/node_modules/nanoid/async/index.browser.cjs new file mode 100644 index 00000000..7e5bba83 --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/async/index.browser.cjs @@ -0,0 +1,34 @@ +let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes)) +let customAlphabet = (alphabet, defaultSize = 21) => { + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + return async (size = defaultSize) => { + let id = '' + while (true) { + let bytes = crypto.getRandomValues(new Uint8Array(step)) + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} +let nanoid = async (size = 21) => { + let id = '' + let bytes = crypto.getRandomValues(new Uint8Array(size)) + while (size--) { + let byte = bytes[size] & 63 + if (byte < 36) { + id += byte.toString(36) + } else if (byte < 62) { + id += (byte - 26).toString(36).toUpperCase() + } else if (byte < 63) { + id += '_' + } else { + id += '-' + } + } + return id +} +module.exports = { nanoid, customAlphabet, random } diff --git a/iut-expo-starter/node_modules/nanoid/async/index.browser.js b/iut-expo-starter/node_modules/nanoid/async/index.browser.js new file mode 100644 index 00000000..5ece04d6 --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/async/index.browser.js @@ -0,0 +1,34 @@ +let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes)) +let customAlphabet = (alphabet, defaultSize = 21) => { + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + return async (size = defaultSize) => { + let id = '' + while (true) { + let bytes = crypto.getRandomValues(new Uint8Array(step)) + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} +let nanoid = async (size = 21) => { + let id = '' + let bytes = crypto.getRandomValues(new Uint8Array(size)) + while (size--) { + let byte = bytes[size] & 63 + if (byte < 36) { + id += byte.toString(36) + } else if (byte < 62) { + id += (byte - 26).toString(36).toUpperCase() + } else if (byte < 63) { + id += '_' + } else { + id += '-' + } + } + return id +} +export { nanoid, customAlphabet, random } diff --git a/iut-expo-starter/node_modules/nanoid/async/index.cjs b/iut-expo-starter/node_modules/nanoid/async/index.cjs new file mode 100644 index 00000000..50db1057 --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/async/index.cjs @@ -0,0 +1,35 @@ +let crypto = require('crypto') +let { urlAlphabet } = require('../url-alphabet/index.cjs') +let random = bytes => + new Promise((resolve, reject) => { + crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => { + if (err) { + reject(err) + } else { + resolve(buf) + } + }) + }) +let customAlphabet = (alphabet, defaultSize = 21) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + let tick = (id, size = defaultSize) => + random(step).then(bytes => { + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + return tick(id, size) + }) + return size => tick('', size) +} +let nanoid = (size = 21) => + random(size).then(bytes => { + let id = '' + while (size--) { + id += urlAlphabet[bytes[size] & 63] + } + return id + }) +module.exports = { nanoid, customAlphabet, random } diff --git a/iut-expo-starter/node_modules/nanoid/async/index.d.ts b/iut-expo-starter/node_modules/nanoid/async/index.d.ts new file mode 100644 index 00000000..9e919658 --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/async/index.d.ts @@ -0,0 +1,56 @@ +/** + * Generate secure URL-friendly unique ID. The non-blocking version. + * + * By default, the ID will have 21 symbols to have a collision probability + * similar to UUID v4. + * + * ```js + * import { nanoid } from 'nanoid/async' + * nanoid().then(id => { + * model.id = id + * }) + * ``` + * + * @param size Size of the ID. The default size is 21. + * @returns A promise with a random string. + */ +export function nanoid(size?: number): Promise + +/** + * A low-level function. + * Generate secure unique ID with custom alphabet. The non-blocking version. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * @param alphabet Alphabet used to generate the ID. + * @param defaultSize Size of the ID. The default size is 21. + * @returns A function that returns a promise with a random string. + * + * ```js + * import { customAlphabet } from 'nanoid/async' + * const nanoid = customAlphabet('0123456789абвгдеё', 5) + * nanoid().then(id => { + * model.id = id //=> "8ё56а" + * }) + * ``` + */ +export function customAlphabet( + alphabet: string, + defaultSize?: number +): (size?: number) => Promise + +/** + * Generate an array of random bytes collected from hardware noise. + * + * ```js + * import { random } from 'nanoid/async' + * random(5).then(bytes => { + * bytes //=> [10, 67, 212, 67, 89] + * }) + * ``` + * + * @param bytes Size of the array. + * @returns A promise with a random bytes array. + */ +export function random(bytes: number): Promise diff --git a/iut-expo-starter/node_modules/nanoid/async/index.js b/iut-expo-starter/node_modules/nanoid/async/index.js new file mode 100644 index 00000000..803fad6f --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/async/index.js @@ -0,0 +1,35 @@ +import crypto from 'crypto' +import { urlAlphabet } from '../url-alphabet/index.js' +let random = bytes => + new Promise((resolve, reject) => { + crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => { + if (err) { + reject(err) + } else { + resolve(buf) + } + }) + }) +let customAlphabet = (alphabet, defaultSize = 21) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + let tick = (id, size = defaultSize) => + random(step).then(bytes => { + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + return tick(id, size) + }) + return size => tick('', size) +} +let nanoid = (size = 21) => + random(size).then(bytes => { + let id = '' + while (size--) { + id += urlAlphabet[bytes[size] & 63] + } + return id + }) +export { nanoid, customAlphabet, random } diff --git a/iut-expo-starter/node_modules/nanoid/async/index.native.js b/iut-expo-starter/node_modules/nanoid/async/index.native.js new file mode 100644 index 00000000..5cb3d57a --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/async/index.native.js @@ -0,0 +1,26 @@ +import { getRandomBytesAsync } from 'expo-random' +import { urlAlphabet } from '../url-alphabet/index.js' +let random = getRandomBytesAsync +let customAlphabet = (alphabet, defaultSize = 21) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + let tick = (id, size = defaultSize) => + random(step).then(bytes => { + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + return tick(id, size) + }) + return size => tick('', size) +} +let nanoid = (size = 21) => + random(size).then(bytes => { + let id = '' + while (size--) { + id += urlAlphabet[bytes[size] & 63] + } + return id + }) +export { nanoid, customAlphabet, random } diff --git a/iut-expo-starter/node_modules/nanoid/async/package.json b/iut-expo-starter/node_modules/nanoid/async/package.json new file mode 100644 index 00000000..578cdb4c --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/async/package.json @@ -0,0 +1,12 @@ +{ + "type": "module", + "main": "index.cjs", + "module": "index.js", + "react-native": { + "./index.js": "./index.native.js" + }, + "browser": { + "./index.js": "./index.browser.js", + "./index.cjs": "./index.browser.cjs" + } +} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/nanoid/bin/nanoid.cjs b/iut-expo-starter/node_modules/nanoid/bin/nanoid.cjs new file mode 100755 index 00000000..c76db0fa --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/bin/nanoid.cjs @@ -0,0 +1,55 @@ +#!/usr/bin/env node + +let { nanoid, customAlphabet } = require('..') + +function print(msg) { + process.stdout.write(msg + '\n') +} + +function error(msg) { + process.stderr.write(msg + '\n') + process.exit(1) +} + +if (process.argv.includes('--help') || process.argv.includes('-h')) { + print(` + Usage + $ nanoid [options] + + Options + -s, --size Generated ID size + -a, --alphabet Alphabet to use + -h, --help Show this help + + Examples + $ nanoid --s 15 + S9sBF77U6sDB8Yg + + $ nanoid --size 10 --alphabet abc + bcabababca`) + process.exit() +} + +let alphabet, size +for (let i = 2; i < process.argv.length; i++) { + let arg = process.argv[i] + if (arg === '--size' || arg === '-s') { + size = Number(process.argv[i + 1]) + i += 1 + if (Number.isNaN(size) || size <= 0) { + error('Size must be positive integer') + } + } else if (arg === '--alphabet' || arg === '-a') { + alphabet = process.argv[i + 1] + i += 1 + } else { + error('Unknown argument ' + arg) + } +} + +if (alphabet) { + let customNanoid = customAlphabet(alphabet, size) + print(customNanoid()) +} else { + print(nanoid(size)) +} diff --git a/iut-expo-starter/node_modules/nanoid/index.browser.cjs b/iut-expo-starter/node_modules/nanoid/index.browser.cjs new file mode 100644 index 00000000..f800d6f4 --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/index.browser.cjs @@ -0,0 +1,34 @@ +let { urlAlphabet } = require('./url-alphabet/index.cjs') +let random = bytes => crypto.getRandomValues(new Uint8Array(bytes)) +let customRandom = (alphabet, defaultSize, getRandom) => { + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + let j = step + while (j--) { + id += alphabet[bytes[j] & mask] || '' + if (id.length === size) return id + } + } + } +} +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) +let nanoid = (size = 21) => + crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => { + byte &= 63 + if (byte < 36) { + id += byte.toString(36) + } else if (byte < 62) { + id += (byte - 26).toString(36).toUpperCase() + } else if (byte > 62) { + id += '-' + } else { + id += '_' + } + return id + }, '') +module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/iut-expo-starter/node_modules/nanoid/index.browser.js b/iut-expo-starter/node_modules/nanoid/index.browser.js new file mode 100644 index 00000000..8b3139b0 --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/index.browser.js @@ -0,0 +1,34 @@ +import { urlAlphabet } from './url-alphabet/index.js' +let random = bytes => crypto.getRandomValues(new Uint8Array(bytes)) +let customRandom = (alphabet, defaultSize, getRandom) => { + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + let j = step + while (j--) { + id += alphabet[bytes[j] & mask] || '' + if (id.length === size) return id + } + } + } +} +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) +let nanoid = (size = 21) => + crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => { + byte &= 63 + if (byte < 36) { + id += byte.toString(36) + } else if (byte < 62) { + id += (byte - 26).toString(36).toUpperCase() + } else if (byte > 62) { + id += '-' + } else { + id += '_' + } + return id + }, '') +export { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/iut-expo-starter/node_modules/nanoid/index.cjs b/iut-expo-starter/node_modules/nanoid/index.cjs new file mode 100644 index 00000000..0fa85e9d --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/index.cjs @@ -0,0 +1,45 @@ +let crypto = require('crypto') +let { urlAlphabet } = require('./url-alphabet/index.cjs') +const POOL_SIZE_MULTIPLIER = 128 +let pool, poolOffset +let fillPool = bytes => { + if (!pool || pool.length < bytes) { + pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER) + crypto.randomFillSync(pool) + poolOffset = 0 + } else if (poolOffset + bytes > pool.length) { + crypto.randomFillSync(pool) + poolOffset = 0 + } + poolOffset += bytes +} +let random = bytes => { + fillPool((bytes -= 0)) + return pool.subarray(poolOffset - bytes, poolOffset) +} +let customRandom = (alphabet, defaultSize, getRandom) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) +let nanoid = (size = 21) => { + fillPool((size -= 0)) + let id = '' + for (let i = poolOffset - size; i < poolOffset; i++) { + id += urlAlphabet[pool[i] & 63] + } + return id +} +module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/iut-expo-starter/node_modules/nanoid/index.d.ts b/iut-expo-starter/node_modules/nanoid/index.d.ts new file mode 100644 index 00000000..3e111a39 --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/index.d.ts @@ -0,0 +1,91 @@ +/** + * Generate secure URL-friendly unique ID. + * + * By default, the ID will have 21 symbols to have a collision probability + * similar to UUID v4. + * + * ```js + * import { nanoid } from 'nanoid' + * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL" + * ``` + * + * @param size Size of the ID. The default size is 21. + * @returns A random string. + */ +export function nanoid(size?: number): string + +/** + * Generate secure unique ID with custom alphabet. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * @param alphabet Alphabet used to generate the ID. + * @param defaultSize Size of the ID. The default size is 21. + * @returns A random string generator. + * + * ```js + * const { customAlphabet } = require('nanoid') + * const nanoid = customAlphabet('0123456789абвгдеё', 5) + * nanoid() //=> "8ё56а" + * ``` + */ +export function customAlphabet( + alphabet: string, + defaultSize?: number +): (size?: number) => string + +/** + * Generate unique ID with custom random generator and alphabet. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * ```js + * import { customRandom } from 'nanoid/format' + * + * const nanoid = customRandom('abcdef', 5, size => { + * const random = [] + * for (let i = 0; i < size; i++) { + * random.push(randomByte()) + * } + * return random + * }) + * + * nanoid() //=> "fbaef" + * ``` + * + * @param alphabet Alphabet used to generate a random string. + * @param size Size of the random string. + * @param random A random bytes generator. + * @returns A random string generator. + */ +export function customRandom( + alphabet: string, + size: number, + random: (bytes: number) => Uint8Array +): () => string + +/** + * URL safe symbols. + * + * ```js + * import { urlAlphabet } from 'nanoid' + * const nanoid = customAlphabet(urlAlphabet, 10) + * nanoid() //=> "Uakgb_J5m9" + * ``` + */ +export const urlAlphabet: string + +/** + * Generate an array of random bytes collected from hardware noise. + * + * ```js + * import { customRandom, random } from 'nanoid' + * const nanoid = customRandom("abcdef", 5, random) + * ``` + * + * @param bytes Size of the array. + * @returns An array of random bytes. + */ +export function random(bytes: number): Uint8Array diff --git a/iut-expo-starter/node_modules/nanoid/index.js b/iut-expo-starter/node_modules/nanoid/index.js new file mode 100644 index 00000000..21e155fc --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/index.js @@ -0,0 +1,45 @@ +import crypto from 'crypto' +import { urlAlphabet } from './url-alphabet/index.js' +const POOL_SIZE_MULTIPLIER = 128 +let pool, poolOffset +let fillPool = bytes => { + if (!pool || pool.length < bytes) { + pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER) + crypto.randomFillSync(pool) + poolOffset = 0 + } else if (poolOffset + bytes > pool.length) { + crypto.randomFillSync(pool) + poolOffset = 0 + } + poolOffset += bytes +} +let random = bytes => { + fillPool((bytes -= 0)) + return pool.subarray(poolOffset - bytes, poolOffset) +} +let customRandom = (alphabet, defaultSize, getRandom) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) +let nanoid = (size = 21) => { + fillPool((size -= 0)) + let id = '' + for (let i = poolOffset - size; i < poolOffset; i++) { + id += urlAlphabet[pool[i] & 63] + } + return id +} +export { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/iut-expo-starter/node_modules/nanoid/nanoid.js b/iut-expo-starter/node_modules/nanoid/nanoid.js new file mode 100644 index 00000000..ec242ead --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/nanoid.js @@ -0,0 +1 @@ +export let nanoid=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce(((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e<63?"_":"-"),""); \ No newline at end of file diff --git a/iut-expo-starter/node_modules/nanoid/non-secure/index.cjs b/iut-expo-starter/node_modules/nanoid/non-secure/index.cjs new file mode 100644 index 00000000..09d57cdc --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/non-secure/index.cjs @@ -0,0 +1,21 @@ +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' +let customAlphabet = (alphabet, defaultSize = 21) => { + return (size = defaultSize) => { + let id = '' + let i = size + while (i--) { + id += alphabet[(Math.random() * alphabet.length) | 0] + } + return id + } +} +let nanoid = (size = 21) => { + let id = '' + let i = size + while (i--) { + id += urlAlphabet[(Math.random() * 64) | 0] + } + return id +} +module.exports = { nanoid, customAlphabet } diff --git a/iut-expo-starter/node_modules/nanoid/non-secure/index.d.ts b/iut-expo-starter/node_modules/nanoid/non-secure/index.d.ts new file mode 100644 index 00000000..4965322d --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/non-secure/index.d.ts @@ -0,0 +1,33 @@ +/** + * Generate URL-friendly unique ID. This method uses the non-secure + * predictable random generator with bigger collision probability. + * + * ```js + * import { nanoid } from 'nanoid/non-secure' + * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL" + * ``` + * + * @param size Size of the ID. The default size is 21. + * @returns A random string. + */ +export function nanoid(size?: number): string + +/** + * Generate a unique ID based on a custom alphabet. + * This method uses the non-secure predictable random generator + * with bigger collision probability. + * + * @param alphabet Alphabet used to generate the ID. + * @param defaultSize Size of the ID. The default size is 21. + * @returns A random string generator. + * + * ```js + * import { customAlphabet } from 'nanoid/non-secure' + * const nanoid = customAlphabet('0123456789абвгдеё', 5) + * model.id = //=> "8ё56а" + * ``` + */ +export function customAlphabet( + alphabet: string, + defaultSize?: number +): (size?: number) => string diff --git a/iut-expo-starter/node_modules/nanoid/non-secure/index.js b/iut-expo-starter/node_modules/nanoid/non-secure/index.js new file mode 100644 index 00000000..e7e19adf --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/non-secure/index.js @@ -0,0 +1,21 @@ +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' +let customAlphabet = (alphabet, defaultSize = 21) => { + return (size = defaultSize) => { + let id = '' + let i = size + while (i--) { + id += alphabet[(Math.random() * alphabet.length) | 0] + } + return id + } +} +let nanoid = (size = 21) => { + let id = '' + let i = size + while (i--) { + id += urlAlphabet[(Math.random() * 64) | 0] + } + return id +} +export { nanoid, customAlphabet } diff --git a/iut-expo-starter/node_modules/nanoid/non-secure/package.json b/iut-expo-starter/node_modules/nanoid/non-secure/package.json new file mode 100644 index 00000000..9930d6ad --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/non-secure/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "main": "index.cjs", + "module": "index.js", + "react-native": "index.js" +} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/nanoid/package.json b/iut-expo-starter/node_modules/nanoid/package.json new file mode 100644 index 00000000..0812f80b --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/package.json @@ -0,0 +1,60 @@ +{ + "name": "nanoid", + "version": "3.3.4", + "description": "A tiny (116 bytes), secure URL-friendly unique string ID generator", + "keywords": [ + "uuid", + "random", + "id", + "url" + ], + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + }, + "author": "Andrey Sitnik ", + "license": "MIT", + "repository": "ai/nanoid", + "browser": { + "./index.js": "./index.browser.js", + "./async/index.js": "./async/index.browser.js", + "./async/index.cjs": "./async/index.browser.cjs", + "./index.cjs": "./index.browser.cjs" + }, + "react-native": "index.js", + "bin": "./bin/nanoid.cjs", + "sideEffects": false, + "types": "./index.d.ts", + "type": "module", + "main": "index.cjs", + "module": "index.js", + "exports": { + ".": { + "types": "./index.d.ts", + "browser": "./index.browser.js", + "require": "./index.cjs", + "import": "./index.js", + "default": "./index.js" + }, + "./index.d.ts": "./index.d.ts", + "./package.json": "./package.json", + "./async/package.json": "./async/package.json", + "./async": { + "browser": "./async/index.browser.js", + "require": "./async/index.cjs", + "import": "./async/index.js", + "default": "./async/index.js" + }, + "./non-secure/package.json": "./non-secure/package.json", + "./non-secure": { + "require": "./non-secure/index.cjs", + "import": "./non-secure/index.js", + "default": "./non-secure/index.js" + }, + "./url-alphabet/package.json": "./url-alphabet/package.json", + "./url-alphabet": { + "require": "./url-alphabet/index.cjs", + "import": "./url-alphabet/index.js", + "default": "./url-alphabet/index.js" + } + } +} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/nanoid/url-alphabet/index.cjs b/iut-expo-starter/node_modules/nanoid/url-alphabet/index.cjs new file mode 100644 index 00000000..757b709c --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/url-alphabet/index.cjs @@ -0,0 +1,3 @@ +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' +module.exports = { urlAlphabet } diff --git a/iut-expo-starter/node_modules/nanoid/url-alphabet/index.js b/iut-expo-starter/node_modules/nanoid/url-alphabet/index.js new file mode 100644 index 00000000..c2782e59 --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/url-alphabet/index.js @@ -0,0 +1,3 @@ +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' +export { urlAlphabet } diff --git a/iut-expo-starter/node_modules/nanoid/url-alphabet/package.json b/iut-expo-starter/node_modules/nanoid/url-alphabet/package.json new file mode 100644 index 00000000..9930d6ad --- /dev/null +++ b/iut-expo-starter/node_modules/nanoid/url-alphabet/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "main": "index.cjs", + "module": "index.js", + "react-native": "index.js" +} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/query-string/index.d.ts b/iut-expo-starter/node_modules/query-string/index.d.ts new file mode 100644 index 00000000..59de6031 --- /dev/null +++ b/iut-expo-starter/node_modules/query-string/index.d.ts @@ -0,0 +1,563 @@ +export interface ParseOptions { + /** + Decode the keys and values. URI components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component). + + @default true + */ + readonly decode?: boolean; + + /** + @default 'none' + + - `bracket`: Parse arrays with bracket representation: + + ``` + import queryString = require('query-string'); + + queryString.parse('foo[]=1&foo[]=2&foo[]=3', {arrayFormat: 'bracket'}); + //=> {foo: ['1', '2', '3']} + ``` + + - `index`: Parse arrays with index representation: + + ``` + import queryString = require('query-string'); + + queryString.parse('foo[0]=1&foo[1]=2&foo[3]=3', {arrayFormat: 'index'}); + //=> {foo: ['1', '2', '3']} + ``` + + - `comma`: Parse arrays with elements separated by comma: + + ``` + import queryString = require('query-string'); + + queryString.parse('foo=1,2,3', {arrayFormat: 'comma'}); + //=> {foo: ['1', '2', '3']} + ``` + + - `separator`: Parse arrays with elements separated by a custom character: + + ``` + import queryString = require('query-string'); + + queryString.parse('foo=1|2|3', {arrayFormat: 'separator', arrayFormatSeparator: '|'}); + //=> {foo: ['1', '2', '3']} + ``` + + - `bracket-separator`: Parse arrays (that are explicitly marked with brackets) with elements separated by a custom character: + + ``` + import queryString = require('query-string'); + + queryString.parse('foo[]', {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); + //=> {foo: []} + + queryString.parse('foo[]=', {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); + //=> {foo: ['']} + + queryString.parse('foo[]=1', {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); + //=> {foo: ['1']} + + queryString.parse('foo[]=1|2|3', {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); + //=> {foo: ['1', '2', '3']} + + queryString.parse('foo[]=1||3|||6', {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); + //=> {foo: ['1', '', 3, '', '', '6']} + + queryString.parse('foo[]=1|2|3&bar=fluffy&baz[]=4', {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); + //=> {foo: ['1', '2', '3'], bar: 'fluffy', baz:['4']} + ``` + + - `colon-list-separator`: Parse arrays with parameter names that are explicitly marked with `:list`: + + ``` + import queryString = require('query-string'); + + queryString.parse('foo:list=one&foo:list=two', {arrayFormat: 'colon-list-separator'}); + //=> {foo: ['one', 'two']} + ``` + + - `none`: Parse arrays with elements using duplicate keys: + + ``` + import queryString = require('query-string'); + + queryString.parse('foo=1&foo=2&foo=3'); + //=> {foo: ['1', '2', '3']} + ``` + */ + readonly arrayFormat?: 'bracket' | 'index' | 'comma' | 'separator' | 'bracket-separator' | 'colon-list-separator' | 'none'; + + /** + The character used to separate array elements when using `{arrayFormat: 'separator'}`. + + @default , + */ + readonly arrayFormatSeparator?: string; + + /** + Supports both `Function` as a custom sorting function or `false` to disable sorting. + + If omitted, keys are sorted using `Array#sort`, which means, converting them to strings and comparing strings in Unicode code point order. + + @default true + + @example + ``` + import queryString = require('query-string'); + + const order = ['c', 'a', 'b']; + + queryString.parse('?a=one&b=two&c=three', { + sort: (itemLeft, itemRight) => order.indexOf(itemLeft) - order.indexOf(itemRight) + }); + //=> {c: 'three', a: 'one', b: 'two'} + ``` + + @example + ``` + import queryString = require('query-string'); + + queryString.parse('?a=one&c=three&b=two', {sort: false}); + //=> {a: 'one', c: 'three', b: 'two'} + ``` + */ + readonly sort?: ((itemLeft: string, itemRight: string) => number) | false; + + /** + Parse the value as a number type instead of string type if it's a number. + + @default false + + @example + ``` + import queryString = require('query-string'); + + queryString.parse('foo=1', {parseNumbers: true}); + //=> {foo: 1} + ``` + */ + readonly parseNumbers?: boolean; + + /** + Parse the value as a boolean type instead of string type if it's a boolean. + + @default false + + @example + ``` + import queryString = require('query-string'); + + queryString.parse('foo=true', {parseBooleans: true}); + //=> {foo: true} + ``` + */ + readonly parseBooleans?: boolean; + + /** + Parse the fragment identifier from the URL and add it to result object. + + @default false + + @example + ``` + import queryString = require('query-string'); + + queryString.parseUrl('https://foo.bar?foo=bar#xyz', {parseFragmentIdentifier: true}); + //=> {url: 'https://foo.bar', query: {foo: 'bar'}, fragmentIdentifier: 'xyz'} + ``` + */ + readonly parseFragmentIdentifier?: boolean; +} + +export interface ParsedQuery { + [key: string]: T | null | Array; +} + +/** +Parse a query string into an object. Leading `?` or `#` are ignored, so you can pass `location.search` or `location.hash` directly. + +The returned object is created with [`Object.create(null)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create) and thus does not have a `prototype`. + +@param query - The query string to parse. +*/ +export function parse(query: string, options: {parseBooleans: true, parseNumbers: true} & ParseOptions): ParsedQuery; +export function parse(query: string, options: {parseBooleans: true} & ParseOptions): ParsedQuery; +export function parse(query: string, options: {parseNumbers: true} & ParseOptions): ParsedQuery; +export function parse(query: string, options?: ParseOptions): ParsedQuery; + +export interface ParsedUrl { + readonly url: string; + readonly query: ParsedQuery; + + /** + The fragment identifier of the URL. + + Present when the `parseFragmentIdentifier` option is `true`. + */ + readonly fragmentIdentifier?: string; +} + +/** +Extract the URL and the query string as an object. + +If the `parseFragmentIdentifier` option is `true`, the object will also contain a `fragmentIdentifier` property. + +@param url - The URL to parse. + +@example +``` +import queryString = require('query-string'); + +queryString.parseUrl('https://foo.bar?foo=bar'); +//=> {url: 'https://foo.bar', query: {foo: 'bar'}} + +queryString.parseUrl('https://foo.bar?foo=bar#xyz', {parseFragmentIdentifier: true}); +//=> {url: 'https://foo.bar', query: {foo: 'bar'}, fragmentIdentifier: 'xyz'} +``` +*/ +export function parseUrl(url: string, options?: ParseOptions): ParsedUrl; + +export interface StringifyOptions { + /** + Strictly encode URI components with [`strict-uri-encode`](https://github.com/kevva/strict-uri-encode). It uses [`encodeURIComponent`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) if set to `false`. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option. + + @default true + */ + readonly strict?: boolean; + + /** + [URL encode](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) the keys and values. + + @default true + */ + readonly encode?: boolean; + + /** + @default 'none' + + - `bracket`: Serialize arrays using bracket representation: + + ``` + import queryString = require('query-string'); + + queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'bracket'}); + //=> 'foo[]=1&foo[]=2&foo[]=3' + ``` + + - `index`: Serialize arrays using index representation: + + ``` + import queryString = require('query-string'); + + queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'index'}); + //=> 'foo[0]=1&foo[1]=2&foo[2]=3' + ``` + + - `comma`: Serialize arrays by separating elements with comma: + + ``` + import queryString = require('query-string'); + + queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'}); + //=> 'foo=1,2,3' + + queryString.stringify({foo: [1, null, '']}, {arrayFormat: 'comma'}); + //=> 'foo=1,,' + // Note that typing information for null values is lost + // and `.parse('foo=1,,')` would return `{foo: [1, '', '']}`. + ``` + + - `separator`: Serialize arrays by separating elements with character: + + ``` + import queryString = require('query-string'); + + queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'separator', arrayFormatSeparator: '|'}); + //=> 'foo=1|2|3' + ``` + + - `bracket-separator`: Serialize arrays by explicitly post-fixing array names with brackets and separating elements with a custom character: + + ``` + import queryString = require('query-string'); + + queryString.stringify({foo: []}, {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); + //=> 'foo[]' + + queryString.stringify({foo: ['']}, {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); + //=> 'foo[]=' + + queryString.stringify({foo: [1]}, {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); + //=> 'foo[]=1' + + queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); + //=> 'foo[]=1|2|3' + + queryString.stringify({foo: [1, '', 3, null, null, 6]}, {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); + //=> 'foo[]=1||3|||6' + + queryString.stringify({foo: [1, '', 3, null, null, 6]}, {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|', skipNull: true}); + //=> 'foo[]=1||3|6' + + queryString.stringify({foo: [1, 2, 3], bar: 'fluffy', baz: [4]}, {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); + //=> 'foo[]=1|2|3&bar=fluffy&baz[]=4' + ``` + + - `colon-list-separator`: Serialize arrays with parameter names that are explicitly marked with `:list`: + + ```js + import queryString = require('query-string'); + + queryString.stringify({foo: ['one', 'two']}, {arrayFormat: 'colon-list-separator'}); + //=> 'foo:list=one&foo:list=two' + ``` + + - `none`: Serialize arrays by using duplicate keys: + + ``` + import queryString = require('query-string'); + + queryString.stringify({foo: [1, 2, 3]}); + //=> 'foo=1&foo=2&foo=3' + ``` + */ + readonly arrayFormat?: 'bracket' | 'index' | 'comma' | 'separator' | 'bracket-separator' | 'colon-list-separator' | 'none'; + + /** + The character used to separate array elements when using `{arrayFormat: 'separator'}`. + + @default , + */ + readonly arrayFormatSeparator?: string; + + /** + Supports both `Function` as a custom sorting function or `false` to disable sorting. + + If omitted, keys are sorted using `Array#sort`, which means, converting them to strings and comparing strings in Unicode code point order. + + @default true + + @example + ``` + import queryString = require('query-string'); + + const order = ['c', 'a', 'b']; + + queryString.stringify({a: 1, b: 2, c: 3}, { + sort: (itemLeft, itemRight) => order.indexOf(itemLeft) - order.indexOf(itemRight) + }); + //=> 'c=3&a=1&b=2' + ``` + + @example + ``` + import queryString = require('query-string'); + + queryString.stringify({b: 1, c: 2, a: 3}, {sort: false}); + //=> 'b=1&c=2&a=3' + ``` + */ + readonly sort?: ((itemLeft: string, itemRight: string) => number) | false; + + /** + Skip keys with `null` as the value. + + Note that keys with `undefined` as the value are always skipped. + + @default false + + @example + ``` + import queryString = require('query-string'); + + queryString.stringify({a: 1, b: undefined, c: null, d: 4}, { + skipNull: true + }); + //=> 'a=1&d=4' + + queryString.stringify({a: undefined, b: null}, { + skipNull: true + }); + //=> '' + ``` + */ + readonly skipNull?: boolean; + + /** + Skip keys with an empty string as the value. + + @default false + + @example + ``` + import queryString = require('query-string'); + + queryString.stringify({a: 1, b: '', c: '', d: 4}, { + skipEmptyString: true + }); + //=> 'a=1&d=4' + ``` + + @example + ``` + import queryString = require('query-string'); + + queryString.stringify({a: '', b: ''}, { + skipEmptyString: true + }); + //=> '' + ``` + */ + readonly skipEmptyString?: boolean; +} + +export type Stringifiable = string | boolean | number | null | undefined; + +export type StringifiableRecord = Record< + string, + Stringifiable | readonly Stringifiable[] +>; + +/** +Stringify an object into a query string and sort the keys. +*/ +export function stringify( + // TODO: Use the below instead when the following TS issues are fixed: + // - https://github.com/microsoft/TypeScript/issues/15300 + // - https://github.com/microsoft/TypeScript/issues/42021 + // Context: https://github.com/sindresorhus/query-string/issues/298 + // object: StringifiableRecord, + object: Record, + options?: StringifyOptions +): string; + +/** +Extract a query string from a URL that can be passed into `.parse()`. + +Note: This behaviour can be changed with the `skipNull` option. +*/ +export function extract(url: string): string; + +export interface UrlObject { + readonly url: string; + + /** + Overrides queries in the `url` property. + */ + readonly query?: StringifiableRecord; + + /** + Overrides the fragment identifier in the `url` property. + */ + readonly fragmentIdentifier?: string; +} + +/** +Stringify an object into a URL with a query string and sorting the keys. The inverse of [`.parseUrl()`](https://github.com/sindresorhus/query-string#parseurlstring-options) + +Query items in the `query` property overrides queries in the `url` property. + +The `fragmentIdentifier` property overrides the fragment identifier in the `url` property. + +@example +``` +queryString.stringifyUrl({url: 'https://foo.bar', query: {foo: 'bar'}}); +//=> 'https://foo.bar?foo=bar' + +queryString.stringifyUrl({url: 'https://foo.bar?foo=baz', query: {foo: 'bar'}}); +//=> 'https://foo.bar?foo=bar' + +queryString.stringifyUrl({ + url: 'https://foo.bar', + query: { + top: 'foo' + }, + fragmentIdentifier: 'bar' +}); +//=> 'https://foo.bar?top=foo#bar' +``` +*/ +export function stringifyUrl( + object: UrlObject, + options?: StringifyOptions +): string; + +/** +Pick query parameters from a URL. + +@param url - The URL containing the query parameters to pick. +@param keys - The names of the query parameters to keep. All other query parameters will be removed from the URL. +@param filter - A filter predicate that will be provided the name of each query parameter and its value. The `parseNumbers` and `parseBooleans` options also affect `value`. + +@returns The URL with the picked query parameters. + +@example +``` +queryString.pick('https://foo.bar?foo=1&bar=2#hello', ['foo']); +//=> 'https://foo.bar?foo=1#hello' + +queryString.pick('https://foo.bar?foo=1&bar=2#hello', (name, value) => value === 2, {parseNumbers: true}); +//=> 'https://foo.bar?bar=2#hello' +``` +*/ +export function pick( + url: string, + keys: readonly string[], + options?: ParseOptions & StringifyOptions +): string +export function pick( + url: string, + filter: (key: string, value: string | boolean | number) => boolean, + options?: {parseBooleans: true, parseNumbers: true} & ParseOptions & StringifyOptions +): string +export function pick( + url: string, + filter: (key: string, value: string | boolean) => boolean, + options?: {parseBooleans: true} & ParseOptions & StringifyOptions +): string +export function pick( + url: string, + filter: (key: string, value: string | number) => boolean, + options?: {parseNumbers: true} & ParseOptions & StringifyOptions +): string + +/** +Exclude query parameters from a URL. Like `.pick()` but reversed. + +@param url - The URL containing the query parameters to exclude. +@param keys - The names of the query parameters to remove. All other query parameters will remain in the URL. +@param filter - A filter predicate that will be provided the name of each query parameter and its value. The `parseNumbers` and `parseBooleans` options also affect `value`. + +@returns The URL without the excluded the query parameters. + +@example +``` +queryString.exclude('https://foo.bar?foo=1&bar=2#hello', ['foo']); +//=> 'https://foo.bar?bar=2#hello' + +queryString.exclude('https://foo.bar?foo=1&bar=2#hello', (name, value) => value === 2, {parseNumbers: true}); +//=> 'https://foo.bar?foo=1#hello' +``` +*/ +export function exclude( + url: string, + keys: readonly string[], + options?: ParseOptions & StringifyOptions +): string +export function exclude( + url: string, + filter: (key: string, value: string | boolean | number) => boolean, + options?: {parseBooleans: true, parseNumbers: true} & ParseOptions & StringifyOptions +): string +export function exclude( + url: string, + filter: (key: string, value: string | boolean) => boolean, + options?: {parseBooleans: true} & ParseOptions & StringifyOptions +): string +export function exclude( + url: string, + filter: (key: string, value: string | number) => boolean, + options?: {parseNumbers: true} & ParseOptions & StringifyOptions +): string diff --git a/iut-expo-starter/node_modules/query-string/index.js b/iut-expo-starter/node_modules/query-string/index.js new file mode 100644 index 00000000..d45e67d9 --- /dev/null +++ b/iut-expo-starter/node_modules/query-string/index.js @@ -0,0 +1,482 @@ +'use strict'; +const strictUriEncode = require('strict-uri-encode'); +const decodeComponent = require('decode-uri-component'); +const splitOnFirst = require('split-on-first'); +const filterObject = require('filter-obj'); + +const isNullOrUndefined = value => value === null || value === undefined; + +const encodeFragmentIdentifier = Symbol('encodeFragmentIdentifier'); + +function encoderForArrayFormat(options) { + switch (options.arrayFormat) { + case 'index': + return key => (result, value) => { + const index = result.length; + + if ( + value === undefined || + (options.skipNull && value === null) || + (options.skipEmptyString && value === '') + ) { + return result; + } + + if (value === null) { + return [...result, [encode(key, options), '[', index, ']'].join('')]; + } + + return [ + ...result, + [encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('') + ]; + }; + + case 'bracket': + return key => (result, value) => { + if ( + value === undefined || + (options.skipNull && value === null) || + (options.skipEmptyString && value === '') + ) { + return result; + } + + if (value === null) { + return [...result, [encode(key, options), '[]'].join('')]; + } + + return [...result, [encode(key, options), '[]=', encode(value, options)].join('')]; + }; + + case 'colon-list-separator': + return key => (result, value) => { + if ( + value === undefined || + (options.skipNull && value === null) || + (options.skipEmptyString && value === '') + ) { + return result; + } + + if (value === null) { + return [...result, [encode(key, options), ':list='].join('')]; + } + + return [...result, [encode(key, options), ':list=', encode(value, options)].join('')]; + }; + + case 'comma': + case 'separator': + case 'bracket-separator': { + const keyValueSep = options.arrayFormat === 'bracket-separator' ? + '[]=' : + '='; + + return key => (result, value) => { + if ( + value === undefined || + (options.skipNull && value === null) || + (options.skipEmptyString && value === '') + ) { + return result; + } + + // Translate null to an empty string so that it doesn't serialize as 'null' + value = value === null ? '' : value; + + if (result.length === 0) { + return [[encode(key, options), keyValueSep, encode(value, options)].join('')]; + } + + return [[result, encode(value, options)].join(options.arrayFormatSeparator)]; + }; + } + + default: + return key => (result, value) => { + if ( + value === undefined || + (options.skipNull && value === null) || + (options.skipEmptyString && value === '') + ) { + return result; + } + + if (value === null) { + return [...result, encode(key, options)]; + } + + return [...result, [encode(key, options), '=', encode(value, options)].join('')]; + }; + } +} + +function parserForArrayFormat(options) { + let result; + + switch (options.arrayFormat) { + case 'index': + return (key, value, accumulator) => { + result = /\[(\d*)\]$/.exec(key); + + key = key.replace(/\[\d*\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } + + if (accumulator[key] === undefined) { + accumulator[key] = {}; + } + + accumulator[key][result[1]] = value; + }; + + case 'bracket': + return (key, value, accumulator) => { + result = /(\[\])$/.exec(key); + key = key.replace(/\[\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } + + if (accumulator[key] === undefined) { + accumulator[key] = [value]; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + + case 'colon-list-separator': + return (key, value, accumulator) => { + result = /(:list)$/.exec(key); + key = key.replace(/:list$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } + + if (accumulator[key] === undefined) { + accumulator[key] = [value]; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + + case 'comma': + case 'separator': + return (key, value, accumulator) => { + const isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator); + const isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator)); + value = isEncodedArray ? decode(value, options) : value; + const newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options); + accumulator[key] = newValue; + }; + + case 'bracket-separator': + return (key, value, accumulator) => { + const isArray = /(\[\])$/.test(key); + key = key.replace(/\[\]$/, ''); + + if (!isArray) { + accumulator[key] = value ? decode(value, options) : value; + return; + } + + const arrayValue = value === null ? + [] : + value.split(options.arrayFormatSeparator).map(item => decode(item, options)); + + if (accumulator[key] === undefined) { + accumulator[key] = arrayValue; + return; + } + + accumulator[key] = [].concat(accumulator[key], arrayValue); + }; + + default: + return (key, value, accumulator) => { + if (accumulator[key] === undefined) { + accumulator[key] = value; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + } +} + +function validateArrayFormatSeparator(value) { + if (typeof value !== 'string' || value.length !== 1) { + throw new TypeError('arrayFormatSeparator must be single character string'); + } +} + +function encode(value, options) { + if (options.encode) { + return options.strict ? strictUriEncode(value) : encodeURIComponent(value); + } + + return value; +} + +function decode(value, options) { + if (options.decode) { + return decodeComponent(value); + } + + return value; +} + +function keysSorter(input) { + if (Array.isArray(input)) { + return input.sort(); + } + + if (typeof input === 'object') { + return keysSorter(Object.keys(input)) + .sort((a, b) => Number(a) - Number(b)) + .map(key => input[key]); + } + + return input; +} + +function removeHash(input) { + const hashStart = input.indexOf('#'); + if (hashStart !== -1) { + input = input.slice(0, hashStart); + } + + return input; +} + +function getHash(url) { + let hash = ''; + const hashStart = url.indexOf('#'); + if (hashStart !== -1) { + hash = url.slice(hashStart); + } + + return hash; +} + +function extract(input) { + input = removeHash(input); + const queryStart = input.indexOf('?'); + if (queryStart === -1) { + return ''; + } + + return input.slice(queryStart + 1); +} + +function parseValue(value, options) { + if (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) { + value = Number(value); + } else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) { + value = value.toLowerCase() === 'true'; + } + + return value; +} + +function parse(query, options) { + options = Object.assign({ + decode: true, + sort: true, + arrayFormat: 'none', + arrayFormatSeparator: ',', + parseNumbers: false, + parseBooleans: false + }, options); + + validateArrayFormatSeparator(options.arrayFormatSeparator); + + const formatter = parserForArrayFormat(options); + + // Create an object with no prototype + const ret = Object.create(null); + + if (typeof query !== 'string') { + return ret; + } + + query = query.trim().replace(/^[?#&]/, ''); + + if (!query) { + return ret; + } + + for (const param of query.split('&')) { + if (param === '') { + continue; + } + + let [key, value] = splitOnFirst(options.decode ? param.replace(/\+/g, ' ') : param, '='); + + // Missing `=` should be `null`: + // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters + value = value === undefined ? null : ['comma', 'separator', 'bracket-separator'].includes(options.arrayFormat) ? value : decode(value, options); + formatter(decode(key, options), value, ret); + } + + for (const key of Object.keys(ret)) { + const value = ret[key]; + if (typeof value === 'object' && value !== null) { + for (const k of Object.keys(value)) { + value[k] = parseValue(value[k], options); + } + } else { + ret[key] = parseValue(value, options); + } + } + + if (options.sort === false) { + return ret; + } + + return (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => { + const value = ret[key]; + if (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) { + // Sort object keys, not values + result[key] = keysSorter(value); + } else { + result[key] = value; + } + + return result; + }, Object.create(null)); +} + +exports.extract = extract; +exports.parse = parse; + +exports.stringify = (object, options) => { + if (!object) { + return ''; + } + + options = Object.assign({ + encode: true, + strict: true, + arrayFormat: 'none', + arrayFormatSeparator: ',' + }, options); + + validateArrayFormatSeparator(options.arrayFormatSeparator); + + const shouldFilter = key => ( + (options.skipNull && isNullOrUndefined(object[key])) || + (options.skipEmptyString && object[key] === '') + ); + + const formatter = encoderForArrayFormat(options); + + const objectCopy = {}; + + for (const key of Object.keys(object)) { + if (!shouldFilter(key)) { + objectCopy[key] = object[key]; + } + } + + const keys = Object.keys(objectCopy); + + if (options.sort !== false) { + keys.sort(options.sort); + } + + return keys.map(key => { + const value = object[key]; + + if (value === undefined) { + return ''; + } + + if (value === null) { + return encode(key, options); + } + + if (Array.isArray(value)) { + if (value.length === 0 && options.arrayFormat === 'bracket-separator') { + return encode(key, options) + '[]'; + } + + return value + .reduce(formatter(key), []) + .join('&'); + } + + return encode(key, options) + '=' + encode(value, options); + }).filter(x => x.length > 0).join('&'); +}; + +exports.parseUrl = (url, options) => { + options = Object.assign({ + decode: true + }, options); + + const [url_, hash] = splitOnFirst(url, '#'); + + return Object.assign( + { + url: url_.split('?')[0] || '', + query: parse(extract(url), options) + }, + options && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {} + ); +}; + +exports.stringifyUrl = (object, options) => { + options = Object.assign({ + encode: true, + strict: true, + [encodeFragmentIdentifier]: true + }, options); + + const url = removeHash(object.url).split('?')[0] || ''; + const queryFromUrl = exports.extract(object.url); + const parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false}); + + const query = Object.assign(parsedQueryFromUrl, object.query); + let queryString = exports.stringify(query, options); + if (queryString) { + queryString = `?${queryString}`; + } + + let hash = getHash(object.url); + if (object.fragmentIdentifier) { + hash = `#${options[encodeFragmentIdentifier] ? encode(object.fragmentIdentifier, options) : object.fragmentIdentifier}`; + } + + return `${url}${queryString}${hash}`; +}; + +exports.pick = (input, filter, options) => { + options = Object.assign({ + parseFragmentIdentifier: true, + [encodeFragmentIdentifier]: false + }, options); + + const {url, query, fragmentIdentifier} = exports.parseUrl(input, options); + return exports.stringifyUrl({ + url, + query: filterObject(query, filter), + fragmentIdentifier + }, options); +}; + +exports.exclude = (input, filter, options) => { + const exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value); + + return exports.pick(input, exclusionFilter, options); +}; diff --git a/iut-expo-starter/node_modules/query-string/license b/iut-expo-starter/node_modules/query-string/license new file mode 100644 index 00000000..e464bf78 --- /dev/null +++ b/iut-expo-starter/node_modules/query-string/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (http://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/iut-expo-starter/node_modules/query-string/package.json b/iut-expo-starter/node_modules/query-string/package.json new file mode 100644 index 00000000..d87d6df2 --- /dev/null +++ b/iut-expo-starter/node_modules/query-string/package.json @@ -0,0 +1,54 @@ +{ + "name": "query-string", + "version": "7.1.3", + "description": "Parse and stringify URL query strings", + "license": "MIT", + "repository": "sindresorhus/query-string", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "benchmark": "node benchmark.js", + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "browser", + "querystring", + "query", + "string", + "qs", + "param", + "parameter", + "url", + "parse", + "stringify", + "encode", + "decode", + "searchparams", + "filter" + ], + "dependencies": { + "decode-uri-component": "^0.2.2", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + }, + "devDependencies": { + "ava": "^1.4.1", + "benchmark": "^2.1.4", + "deep-equal": "^1.0.1", + "fast-check": "^1.5.0", + "tsd": "^0.7.3", + "xo": "^0.24.0" + } +} diff --git a/iut-expo-starter/node_modules/query-string/readme.md b/iut-expo-starter/node_modules/query-string/readme.md new file mode 100644 index 00000000..5721ca09 --- /dev/null +++ b/iut-expo-starter/node_modules/query-string/readme.md @@ -0,0 +1,639 @@ +# query-string + +> Parse and stringify URL [query strings](https://en.wikipedia.org/wiki/Query_string) + +
+ +--- + + + +--- + +
+ +## Install + +``` +$ npm install query-string +``` + +**Not `npm install querystring`!!!!!** + +This module targets Node.js 6 or later and the latest version of Chrome, Firefox, and Safari. + +## Usage + +```js +const queryString = require('query-string'); + +console.log(location.search); +//=> '?foo=bar' + +const parsed = queryString.parse(location.search); +console.log(parsed); +//=> {foo: 'bar'} + +console.log(location.hash); +//=> '#token=bada55cafe' + +const parsedHash = queryString.parse(location.hash); +console.log(parsedHash); +//=> {token: 'bada55cafe'} + +parsed.foo = 'unicorn'; +parsed.ilike = 'pizza'; + +const stringified = queryString.stringify(parsed); +//=> 'foo=unicorn&ilike=pizza' + +location.search = stringified; +// note that `location.search` automatically prepends a question mark +console.log(location.search); +//=> '?foo=unicorn&ilike=pizza' +``` + +## API + +### .parse(string, options?) + +Parse a query string into an object. Leading `?` or `#` are ignored, so you can pass `location.search` or `location.hash` directly. + +The returned object is created with [`Object.create(null)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create) and thus does not have a `prototype`. + +#### options + +Type: `object` + +##### decode + +Type: `boolean`\ +Default: `true` + +Decode the keys and values. URL components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component). + +##### arrayFormat + +Type: `string`\ +Default: `'none'` + +- `'bracket'`: Parse arrays with bracket representation: + +```js +const queryString = require('query-string'); + +queryString.parse('foo[]=1&foo[]=2&foo[]=3', {arrayFormat: 'bracket'}); +//=> {foo: ['1', '2', '3']} +``` + +- `'index'`: Parse arrays with index representation: + +```js +const queryString = require('query-string'); + +queryString.parse('foo[0]=1&foo[1]=2&foo[3]=3', {arrayFormat: 'index'}); +//=> {foo: ['1', '2', '3']} +``` + +- `'comma'`: Parse arrays with elements separated by comma: + +```js +const queryString = require('query-string'); + +queryString.parse('foo=1,2,3', {arrayFormat: 'comma'}); +//=> {foo: ['1', '2', '3']} +``` + +- `'separator'`: Parse arrays with elements separated by a custom character: + +```js +const queryString = require('query-string'); + +queryString.parse('foo=1|2|3', {arrayFormat: 'separator', arrayFormatSeparator: '|'}); +//=> {foo: ['1', '2', '3']} +``` + +- `'bracket-separator'`: Parse arrays (that are explicitly marked with brackets) with elements separated by a custom character: + +```js +const queryString = require('query-string'); + +queryString.parse('foo[]', {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); +//=> {foo: []} + +queryString.parse('foo[]=', {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); +//=> {foo: ['']} + +queryString.parse('foo[]=1', {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); +//=> {foo: ['1']} + +queryString.parse('foo[]=1|2|3', {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); +//=> {foo: ['1', '2', '3']} + +queryString.parse('foo[]=1||3|||6', {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); +//=> {foo: ['1', '', 3, '', '', '6']} + +queryString.parse('foo[]=1|2|3&bar=fluffy&baz[]=4', {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); +//=> {foo: ['1', '2', '3'], bar: 'fluffy', baz:['4']} +``` + +- `'colon-list-separator'`: Parse arrays with parameter names that are explicitly marked with `:list`: + +```js +const queryString = require('query-string'); + +queryString.parse('foo:list=one&foo:list=two', {arrayFormat: 'colon-list-separator'}); +//=> {foo: ['one', 'two']} +``` + +- `'none'`: Parse arrays with elements using duplicate keys: + +```js +const queryString = require('query-string'); + +queryString.parse('foo=1&foo=2&foo=3'); +//=> {foo: ['1', '2', '3']} +``` + +##### arrayFormatSeparator + +Type: `string`\ +Default: `','` + +The character used to separate array elements when using `{arrayFormat: 'separator'}`. + +##### sort + +Type: `Function | boolean`\ +Default: `true` + +Supports both `Function` as a custom sorting function or `false` to disable sorting. + +##### parseNumbers + +Type: `boolean`\ +Default: `false` + +```js +const queryString = require('query-string'); + +queryString.parse('foo=1', {parseNumbers: true}); +//=> {foo: 1} +``` + +Parse the value as a number type instead of string type if it's a number. + +##### parseBooleans + +Type: `boolean`\ +Default: `false` + +```js +const queryString = require('query-string'); + +queryString.parse('foo=true', {parseBooleans: true}); +//=> {foo: true} +``` + +Parse the value as a boolean type instead of string type if it's a boolean. + +### .stringify(object, options?) + +Stringify an object into a query string and sorting the keys. + +#### options + +Type: `object` + +##### strict + +Type: `boolean`\ +Default: `true` + +Strictly encode URI components with [strict-uri-encode](https://github.com/kevva/strict-uri-encode). It uses [encodeURIComponent](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) if set to false. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option. + +##### encode + +Type: `boolean`\ +Default: `true` + +[URL encode](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) the keys and values. + +##### arrayFormat + +Type: `string`\ +Default: `'none'` + +- `'bracket'`: Serialize arrays using bracket representation: + +```js +const queryString = require('query-string'); + +queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'bracket'}); +//=> 'foo[]=1&foo[]=2&foo[]=3' +``` + +- `'index'`: Serialize arrays using index representation: + +```js +const queryString = require('query-string'); + +queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'index'}); +//=> 'foo[0]=1&foo[1]=2&foo[2]=3' +``` + +- `'comma'`: Serialize arrays by separating elements with comma: + +```js +const queryString = require('query-string'); + +queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'}); +//=> 'foo=1,2,3' + +queryString.stringify({foo: [1, null, '']}, {arrayFormat: 'comma'}); +//=> 'foo=1,,' +// Note that typing information for null values is lost +// and `.parse('foo=1,,')` would return `{foo: [1, '', '']}`. +``` + +- `'separator'`: Serialize arrays by separating elements with a custom character: + +```js +const queryString = require('query-string'); + +queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'separator', arrayFormatSeparator: '|'}); +//=> 'foo=1|2|3' +``` + +- `'bracket-separator'`: Serialize arrays by explicitly post-fixing array names with brackets and separating elements with a custom character: + +```js +const queryString = require('query-string'); + +queryString.stringify({foo: []}, {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); +//=> 'foo[]' + +queryString.stringify({foo: ['']}, {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); +//=> 'foo[]=' + +queryString.stringify({foo: [1]}, {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); +//=> 'foo[]=1' + +queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); +//=> 'foo[]=1|2|3' + +queryString.stringify({foo: [1, '', 3, null, null, 6]}, {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); +//=> 'foo[]=1||3|||6' + +queryString.stringify({foo: [1, '', 3, null, null, 6]}, {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|', skipNull: true}); +//=> 'foo[]=1||3|6' + +queryString.stringify({foo: [1, 2, 3], bar: 'fluffy', baz: [4]}, {arrayFormat: 'bracket-separator', arrayFormatSeparator: '|'}); +//=> 'foo[]=1|2|3&bar=fluffy&baz[]=4' +``` + +- `'colon-list-separator'`: Serialize arrays with parameter names that are explicitly marked with `:list`: + +```js +const queryString = require('query-string'); + +queryString.stringify({foo: ['one', 'two']}, {arrayFormat: 'colon-list-separator'}); +//=> 'foo:list=one&foo:list=two' +``` + +- `'none'`: Serialize arrays by using duplicate keys: + +```js +const queryString = require('query-string'); + +queryString.stringify({foo: [1, 2, 3]}); +//=> 'foo=1&foo=2&foo=3' +``` + +##### arrayFormatSeparator + +Type: `string`\ +Default: `','` + +The character used to separate array elements when using `{arrayFormat: 'separator'}`. + +##### sort + +Type: `Function | boolean` + +Supports both `Function` as a custom sorting function or `false` to disable sorting. + +```js +const queryString = require('query-string'); + +const order = ['c', 'a', 'b']; + +queryString.stringify({a: 1, b: 2, c: 3}, { + sort: (a, b) => order.indexOf(a) - order.indexOf(b) +}); +//=> 'c=3&a=1&b=2' +``` + +```js +const queryString = require('query-string'); + +queryString.stringify({b: 1, c: 2, a: 3}, {sort: false}); +//=> 'b=1&c=2&a=3' +``` + +If omitted, keys are sorted using `Array#sort()`, which means, converting them to strings and comparing strings in Unicode code point order. + +##### skipNull + +Skip keys with `null` as the value. + +Note that keys with `undefined` as the value are always skipped. + +Type: `boolean`\ +Default: `false` + +```js +const queryString = require('query-string'); + +queryString.stringify({a: 1, b: undefined, c: null, d: 4}, { + skipNull: true +}); +//=> 'a=1&d=4' +``` + +```js +const queryString = require('query-string'); + +queryString.stringify({a: undefined, b: null}, { + skipNull: true +}); +//=> '' +``` + +##### skipEmptyString + +Skip keys with an empty string as the value. + +Type: `boolean`\ +Default: `false` + +```js +const queryString = require('query-string'); + +queryString.stringify({a: 1, b: '', c: '', d: 4}, { + skipEmptyString: true +}); +//=> 'a=1&d=4' +``` + +```js +const queryString = require('query-string'); + +queryString.stringify({a: '', b: ''}, { + skipEmptyString: true +}); +//=> '' +``` + +### .extract(string) + +Extract a query string from a URL that can be passed into `.parse()`. + +Note: This behaviour can be changed with the `skipNull` option. + +### .parseUrl(string, options?) + +Extract the URL and the query string as an object. + +Returns an object with a `url` and `query` property. + +If the `parseFragmentIdentifier` option is `true`, the object will also contain a `fragmentIdentifier` property. + +```js +const queryString = require('query-string'); + +queryString.parseUrl('https://foo.bar?foo=bar'); +//=> {url: 'https://foo.bar', query: {foo: 'bar'}} + +queryString.parseUrl('https://foo.bar?foo=bar#xyz', {parseFragmentIdentifier: true}); +//=> {url: 'https://foo.bar', query: {foo: 'bar'}, fragmentIdentifier: 'xyz'} +``` + +#### options + +Type: `object` + +The options are the same as for `.parse()`. + +Extra options are as below. + +##### parseFragmentIdentifier + +Parse the fragment identifier from the URL. + +Type: `boolean`\ +Default: `false` + +```js +const queryString = require('query-string'); + +queryString.parseUrl('https://foo.bar?foo=bar#xyz', {parseFragmentIdentifier: true}); +//=> {url: 'https://foo.bar', query: {foo: 'bar'}, fragmentIdentifier: 'xyz'} +``` + +### .stringifyUrl(object, options?) + +Stringify an object into a URL with a query string and sorting the keys. The inverse of [`.parseUrl()`](https://github.com/sindresorhus/query-string#parseurlstring-options) + +The `options` are the same as for `.stringify()`. + +Returns a string with the URL and a query string. + +Query items in the `query` property overrides queries in the `url` property. + +The `fragmentIdentifier` property overrides the fragment identifier in the `url` property. + +```js +queryString.stringifyUrl({url: 'https://foo.bar', query: {foo: 'bar'}}); +//=> 'https://foo.bar?foo=bar' + +queryString.stringifyUrl({url: 'https://foo.bar?foo=baz', query: {foo: 'bar'}}); +//=> 'https://foo.bar?foo=bar' + +queryString.stringifyUrl({ + url: 'https://foo.bar', + query: { + top: 'foo' + }, + fragmentIdentifier: 'bar' +}); +//=> 'https://foo.bar?top=foo#bar' +``` + +#### object + +Type: `object` + +##### url + +Type: `string` + +The URL to stringify. + +##### query + +Type: `object` + +Query items to add to the URL. + +### .pick(url, keys, options?) +### .pick(url, filter, options?) + +Pick query parameters from a URL. + +Returns a string with the new URL. + +```js +const queryString = require('query-string'); + +queryString.pick('https://foo.bar?foo=1&bar=2#hello', ['foo']); +//=> 'https://foo.bar?foo=1#hello' + +queryString.pick('https://foo.bar?foo=1&bar=2#hello', (name, value) => value === 2, {parseNumbers: true}); +//=> 'https://foo.bar?bar=2#hello' +``` + +### .exclude(url, keys, options?) +### .exclude(url, filter, options?) + +Exclude query parameters from a URL. + +Returns a string with the new URL. + +```js +const queryString = require('query-string'); + +queryString.exclude('https://foo.bar?foo=1&bar=2#hello', ['foo']); +//=> 'https://foo.bar?bar=2#hello' + +queryString.exclude('https://foo.bar?foo=1&bar=2#hello', (name, value) => value === 2, {parseNumbers: true}); +//=> 'https://foo.bar?foo=1#hello' +``` + +#### url + +Type: `string` + +The URL containing the query parameters to filter. + +#### keys + +Type: `string[]` + +The names of the query parameters to filter based on the function used. + +#### filter + +Type: `(key, value) => boolean` + +A filter predicate that will be provided the name of each query parameter and its value. The `parseNumbers` and `parseBooleans` options also affect `value`. + +#### options + +Type: `object` + +[Parse options](#options) and [stringify options](#options-1). + +## Nesting + +This module intentionally doesn't support nesting as it's not spec'd and varies between implementations, which causes a lot of [edge cases](https://github.com/visionmedia/node-querystring/issues). + +You're much better off just converting the object to a JSON string: + +```js +const queryString = require('query-string'); + +queryString.stringify({ + foo: 'bar', + nested: JSON.stringify({ + unicorn: 'cake' + }) +}); +//=> 'foo=bar&nested=%7B%22unicorn%22%3A%22cake%22%7D' +``` + +However, there is support for multiple instances of the same key: + +```js +const queryString = require('query-string'); + +queryString.parse('likes=cake&name=bob&likes=icecream'); +//=> {likes: ['cake', 'icecream'], name: 'bob'} + +queryString.stringify({color: ['taupe', 'chartreuse'], id: '515'}); +//=> 'color=taupe&color=chartreuse&id=515' +``` + +## Falsy values + +Sometimes you want to unset a key, or maybe just make it present without assigning a value to it. Here is how falsy values are stringified: + +```js +const queryString = require('query-string'); + +queryString.stringify({foo: false}); +//=> 'foo=false' + +queryString.stringify({foo: null}); +//=> 'foo' + +queryString.stringify({foo: undefined}); +//=> '' +``` + +## FAQ + +### Why is it parsing `+` as a space? + +See [this answer](https://github.com/sindresorhus/query-string/issues/305). + +## query-string for enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of query-string and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-query-string?utm_source=npm-query-string&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/iut-expo-starter/node_modules/react-freeze/LICENSE b/iut-expo-starter/node_modules/react-freeze/LICENSE new file mode 100644 index 00000000..7e5a4030 --- /dev/null +++ b/iut-expo-starter/node_modules/react-freeze/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Software Mansion + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/iut-expo-starter/node_modules/react-freeze/README.md b/iut-expo-starter/node_modules/react-freeze/README.md new file mode 100644 index 00000000..9bd47003 --- /dev/null +++ b/iut-expo-starter/node_modules/react-freeze/README.md @@ -0,0 +1,133 @@ +

+
+ React Freeze +

+

+Prevent React component subtrees from rendering. +

+ +# What is this? 🤔 + +This library lets you freeze the renders of parts of the React component tree using `Suspense` mechanism introduced in React 17. +The main use case of this library is to avoid unnecessary re-renders of parts of the app that are not visible to the user at a given moment. +The frozen components **are not unmounted** when they are replaced with a placeholder view, so their React state and corresponding native view instances are retained during the freeze (DOM elements for `react-dom` or platform-native views for React Native apps) keeping things like scroll position, input state, or loaded images (for `` components) unchanged. + +The most prominent use case is the navigation in React Native apps, which typically is based on a stack. +When opening a new screen, we push the screen onto the stack but also keep the previous screens on the stack in case the user goes back to them later. +Since we want to keep the state of those previous screens, the components rendering it are retained on the stack, which results in them receiving updates (e.g. redux store changes) and getting re-rendered, even though they are completely covered by other screens. +With `react-freeze`, we are able to suspend renders for the hidden screens and, as a result, save React from doing unnecessary computation (such as reconciliation, sending view change updates, etc.). + +# Quick start with react-navigation (React Native) 🧭 + +> You have to be using React Native 0.64 or higher and react-navigation 5.x or 6.x. + +Thanks to the fact [react-navigation](https://reactnavigation.org/) relies on [react-native-screens](https://github.com/software-mansion/react-native-screens) we published an updated version of the screens library that takes advantage of the information about which screens should be active. +In order to try react-freeze in your React Native app that uses React Navigation you need to upgrade react-native-screens to version 3.9.0: + +```bash +yarn upgrade react-native-screens@3.9.0 +``` + +If you're building for ios you also need to run + +```bash +pod install --project-directory=ios +``` + +Then enable experimental freeze support using new method we added to screens library. +In order to do that, add the following snippet (along with the import) to the main file of your application: + +```js +import { enableFreeze } from "react-native-screens"; + +enableFreeze(true); +``` + +The new react-native-screens library is compatible with React Navigation v5 and v6, however, when using React Navigation v5 you also need to enable "screens" support. This can be done by adding call to `enableScreens(true)` in your main application file and passing `detachInactiveScreens` option to your navigators (stack / tabs / etc.). + +**IMPORTANT:** The current version of screens/freeze integration, freezes updates only on views that are more than one level deep the stack hierarchy (the top and second to top screens are not freezing). This is necessary for slide-to-go-back functionality to work as by sliding back we may reveal the content that is displayed below. This is something we plan on improving in the future such that only the top screen is not frozen. + +# Quick start - using Freeze directly (React and React Native) ⚡ + +> In order to use this package you'll have to be using React 17 or higher, or React Native 0.64 or higher. + +Install `react-freeze` package from npm: + +```bash +yarn add react-freeze +``` + +Import `Freeze` component in your app: + +```js +import { Freeze } from "react-freeze"; +``` + +Wrap some components you want to freeze and pass `freeze` option to control whether renders in that components should be suspended: + +```js +function SomeComponent({ shouldSuspendRendering }) { + return ( + + + + ); +} +``` + +# Component docs 📚 + +The `react-freeze` library exports a single component called ``. +It can be used as a boundary for components for which we want to suspend rendering. +This takes the following options: + +### `freeze: boolean` + +This options can be used to control whether components rendered under `Freeze` should or should not re-render. +If set to `true`, all renders for components from `Freeze` subtree will be suspended until the prop changes to `false`. +Additionally, during the time components are "frozen", `Freeze` component instead of rendering children will render component provided as `placeholder` parameter removing frozen components from screen while retaining their native view instances and state. + +### `placeholder?: React.ReactNode` + +This parameter can be used to customize what `Freeze` component should render when it is in the frozen state (`freeze={true}`). +This is an optional parameter and by default it renders `null`. +Note, that it is best to "freeze" only components that are not visible to the user at given moment, so in general customizing this should not be necessary. +However, if replacing frozen views with just `null` can break layout of you app, you can use this parameter to show a placeholder that will keep all non-frozen parts of your application in the same place. + +# Known issues 😭 + +## React Native Debugger does not allow profiling + +When profiling React-Native apps with [React Native Debugger](https://github.com/jhen0409/react-native-debugger) starting React profiler for the app with frozen components throws an error ("Error: Could not find ID for Fiber ..."). + +> Have other problems with react-freeze? Start a [New issue](//github.com/software-mansion-labs/react-freeze/issues). + +# FAQ ❓ + +## When component subtree is frozen what happens to state changes that are executed on that subtree + +All state changes are executed as usual, they just won't trigger a render of the updated component until the component comes back from the frozen state. + +## What happens to the non-react state of the component after defrost? Like for example scroll position? + +Since all the "native views" (DOM elements or platform-specific views in react native) are kept when the component is frozen their state (such as scroll position, text typed into text input fields, etc.) is restored when they come back from the frozen state. +In fact, they are just the same component (same DOM nodes for react-dom / same views for react-native). + +## What happens when there is an update in a redux store that frozen component is subscribed to? + +Redux and other state-management solutions rely on manually triggering re-renders for components that they want to update when the store state changes. +When component is frozen it won't render even when redux requests it, however methods such as `mapStateToProps` or selectors provided to `useSelector` will still run on store updates. +After the component comes back from frozen state, it will render and pick up the most up-to-date data from the store. + +## Can freezing some of my app components break my app? And how? + +There are few ways that we are aware of when `` can alter the app behavior: + +1. When attempting to freeze parts of the app that is visible to the user at a given moment -- in this case the frozen part is going to be replaced by the placeholder (or just by nothing if no placeholder is provided). So unless you really want this behavior make sure to only set `freeze` to `true` when the given subtree should not be visible and you expect user to not interact with it. A good example are screens on the navigation stack that are down the stack hierarchy when you push more content. +2. When you rely on the frozen parts layout to properly position the unfrozen parts. Note that when component is in frozen state it gets replaced by a placeholder (or by nothing if you don't provide one). This may impact the layout of the rest of your application. This can be workaround by making placeholder take the same amount of space as the view it replaces, or by only freezing parts that are positioned absolutely (e.g. the component that takes up the whole screen). +3. When component render method has side-effects that relay on running for all prop/state updates. Typically, performing side-effects in render is undesirable when writing react code but can happen in your codebase nonetheless. Note that when subtree is frozen your component may not be rendered for all the state updates and render method won't execute for some of the changes that happen during that phase. However, when the component gets back from the frozen state it will render with the most up-to-date version of the state, and if that suffice for the side-effect logic to be correct you should be ok. + +
+
+ +Made by [Software Mansion](https://github.com/software-mansion) and licenced under [The MIT License](LICENSE). diff --git a/iut-expo-starter/node_modules/react-freeze/dist/index.d.ts b/iut-expo-starter/node_modules/react-freeze/dist/index.d.ts new file mode 100644 index 00000000..7586a4b9 --- /dev/null +++ b/iut-expo-starter/node_modules/react-freeze/dist/index.d.ts @@ -0,0 +1,8 @@ +import React from "react"; +interface Props { + freeze: boolean; + children: React.ReactNode; + placeholder?: React.ReactNode; +} +export declare function Freeze({ freeze, children, placeholder }: Props): JSX.Element; +export {}; diff --git a/iut-expo-starter/node_modules/react-freeze/dist/index.js b/iut-expo-starter/node_modules/react-freeze/dist/index.js new file mode 100644 index 00000000..d5ca53aa --- /dev/null +++ b/iut-expo-starter/node_modules/react-freeze/dist/index.js @@ -0,0 +1,39 @@ +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var React = require('react'); +var React__default = _interopDefault(React); + +function Suspender(_ref) { + var freeze = _ref.freeze, + children = _ref.children; + var promiseCache = React.useRef({}).current; + + if (freeze && !promiseCache.promise) { + promiseCache.promise = new Promise(function (resolve) { + promiseCache.resolve = resolve; + }); + throw promiseCache.promise; + } else if (freeze) { + throw promiseCache.promise; + } else if (promiseCache.promise) { + promiseCache.resolve(); + promiseCache.promise = undefined; + } + + return React__default.createElement(React.Fragment, null, children); +} + +function Freeze(_ref2) { + var freeze = _ref2.freeze, + children = _ref2.children, + _ref2$placeholder = _ref2.placeholder, + placeholder = _ref2$placeholder === void 0 ? null : _ref2$placeholder; + return React__default.createElement(React.Suspense, { + fallback: placeholder + }, React__default.createElement(Suspender, { + freeze: freeze + }, children)); +} + +exports.Freeze = Freeze; +//# sourceMappingURL=index.js.map diff --git a/iut-expo-starter/node_modules/react-freeze/dist/index.js.map b/iut-expo-starter/node_modules/react-freeze/dist/index.js.map new file mode 100644 index 00000000..d0420262 --- /dev/null +++ b/iut-expo-starter/node_modules/react-freeze/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../src/index.tsx"],"sourcesContent":["import React, { useRef, Suspense, Fragment } from \"react\";\n\ninterface StorageRef {\n promise?: Promise;\n resolve?: (value: void | PromiseLike) => void;\n}\n\nfunction Suspender({\n freeze,\n children,\n}: {\n freeze: boolean;\n children: React.ReactNode;\n}) {\n const promiseCache = useRef({}).current;\n if (freeze && !promiseCache.promise) {\n promiseCache.promise = new Promise((resolve) => {\n promiseCache.resolve = resolve;\n });\n throw promiseCache.promise;\n } else if (freeze) {\n throw promiseCache.promise;\n } else if (promiseCache.promise) {\n promiseCache.resolve!();\n promiseCache.promise = undefined;\n }\n\n return {children};\n}\n\ninterface Props {\n freeze: boolean;\n children: React.ReactNode;\n placeholder?: React.ReactNode;\n}\n\nexport function Freeze({ freeze, children, placeholder = null }: Props) {\n return (\n \n {children}\n \n );\n}\n"],"names":["Suspender","freeze","children","promiseCache","useRef","current","promise","Promise","resolve","undefined","React","Fragment","Freeze","placeholder","Suspense","fallback"],"mappings":";;;;;AAOA,SAASA,SAAT;MACEC,cAAAA;MACAC,gBAAAA;AAKA,MAAMC,YAAY,GAAGC,YAAM,CAAa,EAAb,CAAN,CAAuBC,OAA5C;;AACA,MAAIJ,MAAM,IAAI,CAACE,YAAY,CAACG,OAA5B,EAAqC;AACnCH,IAAAA,YAAY,CAACG,OAAb,GAAuB,IAAIC,OAAJ,CAAY,UAACC,OAAD;AACjCL,MAAAA,YAAY,CAACK,OAAb,GAAuBA,OAAvB;AACD,KAFsB,CAAvB;AAGA,UAAML,YAAY,CAACG,OAAnB;AACD,GALD,MAKO,IAAIL,MAAJ,EAAY;AACjB,UAAME,YAAY,CAACG,OAAnB;AACD,GAFM,MAEA,IAAIH,YAAY,CAACG,OAAjB,EAA0B;AAC/BH,IAAAA,YAAY,CAACK,OAAb;AACAL,IAAAA,YAAY,CAACG,OAAb,GAAuBG,SAAvB;AACD;;AAED,SAAOC,4BAAA,CAACC,cAAD,MAAA,EAAWT,QAAX,CAAP;AACD;;SAQeU;MAASX,eAAAA;MAAQC,iBAAAA;gCAAUW;MAAAA,6CAAc;AACvD,SACEH,4BAAA,CAACI,cAAD;AAAUC,IAAAA,QAAQ,EAAEF;GAApB,EACEH,4BAAA,CAACV,SAAD;AAAWC,IAAAA,MAAM,EAAEA;GAAnB,EAA4BC,QAA5B,CADF,CADF;AAKD;;;;"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-freeze/dist/index.modern.js b/iut-expo-starter/node_modules/react-freeze/dist/index.modern.js new file mode 100644 index 00000000..8635e01c --- /dev/null +++ b/iut-expo-starter/node_modules/react-freeze/dist/index.modern.js @@ -0,0 +1,36 @@ +import React, { Suspense, useRef, Fragment } from 'react'; + +function Suspender(_ref) { + var freeze = _ref.freeze, + children = _ref.children; + var promiseCache = useRef({}).current; + + if (freeze && !promiseCache.promise) { + promiseCache.promise = new Promise(function (resolve) { + promiseCache.resolve = resolve; + }); + throw promiseCache.promise; + } else if (freeze) { + throw promiseCache.promise; + } else if (promiseCache.promise) { + promiseCache.resolve(); + promiseCache.promise = undefined; + } + + return React.createElement(Fragment, null, children); +} + +function Freeze(_ref2) { + var freeze = _ref2.freeze, + children = _ref2.children, + _ref2$placeholder = _ref2.placeholder, + placeholder = _ref2$placeholder === void 0 ? null : _ref2$placeholder; + return React.createElement(Suspense, { + fallback: placeholder + }, React.createElement(Suspender, { + freeze: freeze + }, children)); +} + +export { Freeze }; +//# sourceMappingURL=index.modern.js.map diff --git a/iut-expo-starter/node_modules/react-freeze/dist/index.modern.js.map b/iut-expo-starter/node_modules/react-freeze/dist/index.modern.js.map new file mode 100644 index 00000000..c42c397d --- /dev/null +++ b/iut-expo-starter/node_modules/react-freeze/dist/index.modern.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.modern.js","sources":["../src/index.tsx"],"sourcesContent":["import React, { useRef, Suspense, Fragment } from \"react\";\n\ninterface StorageRef {\n promise?: Promise;\n resolve?: (value: void | PromiseLike) => void;\n}\n\nfunction Suspender({\n freeze,\n children,\n}: {\n freeze: boolean;\n children: React.ReactNode;\n}) {\n const promiseCache = useRef({}).current;\n if (freeze && !promiseCache.promise) {\n promiseCache.promise = new Promise((resolve) => {\n promiseCache.resolve = resolve;\n });\n throw promiseCache.promise;\n } else if (freeze) {\n throw promiseCache.promise;\n } else if (promiseCache.promise) {\n promiseCache.resolve!();\n promiseCache.promise = undefined;\n }\n\n return {children};\n}\n\ninterface Props {\n freeze: boolean;\n children: React.ReactNode;\n placeholder?: React.ReactNode;\n}\n\nexport function Freeze({ freeze, children, placeholder = null }: Props) {\n return (\n \n {children}\n \n );\n}\n"],"names":["Suspender","freeze","children","promiseCache","useRef","current","promise","Promise","resolve","undefined","React","Fragment","Freeze","placeholder","Suspense","fallback"],"mappings":";;AAOA,SAASA,SAAT;MACEC,cAAAA;MACAC,gBAAAA;AAKA,MAAMC,YAAY,GAAGC,MAAM,CAAa,EAAb,CAAN,CAAuBC,OAA5C;;AACA,MAAIJ,MAAM,IAAI,CAACE,YAAY,CAACG,OAA5B,EAAqC;AACnCH,IAAAA,YAAY,CAACG,OAAb,GAAuB,IAAIC,OAAJ,CAAY,UAACC,OAAD;AACjCL,MAAAA,YAAY,CAACK,OAAb,GAAuBA,OAAvB;AACD,KAFsB,CAAvB;AAGA,UAAML,YAAY,CAACG,OAAnB;AACD,GALD,MAKO,IAAIL,MAAJ,EAAY;AACjB,UAAME,YAAY,CAACG,OAAnB;AACD,GAFM,MAEA,IAAIH,YAAY,CAACG,OAAjB,EAA0B;AAC/BH,IAAAA,YAAY,CAACK,OAAb;AACAL,IAAAA,YAAY,CAACG,OAAb,GAAuBG,SAAvB;AACD;;AAED,SAAOC,mBAAA,CAACC,QAAD,MAAA,EAAWT,QAAX,CAAP;AACD;;SAQeU;MAASX,eAAAA;MAAQC,iBAAAA;gCAAUW;MAAAA,6CAAc;AACvD,SACEH,mBAAA,CAACI,QAAD;AAAUC,IAAAA,QAAQ,EAAEF;GAApB,EACEH,mBAAA,CAACV,SAAD;AAAWC,IAAAA,MAAM,EAAEA;GAAnB,EAA4BC,QAA5B,CADF,CADF;AAKD;;;;"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-freeze/package.json b/iut-expo-starter/node_modules/react-freeze/package.json new file mode 100644 index 00000000..9ddecde2 --- /dev/null +++ b/iut-expo-starter/node_modules/react-freeze/package.json @@ -0,0 +1,64 @@ +{ + "name": "react-freeze", + "version": "1.0.3", + "description": "React Freeze", + "license": "MIT", + "repository": "software-mansion/react-freeze", + "main": "dist/index.js", + "module": "dist/index.modern.js", + "source": "src/index.tsx", + "react-native": "src/index.tsx", + "engines": { + "node": ">=10" + }, + "scripts": { + "build": "microbundle-crl --no-compress --format modern,cjs", + "start": "microbundle-crl watch --no-compress --format modern,cjs", + "prepare": "run-s build", + "test": "run-s test:unit test:lint test:types test:build", + "test:build": "run-s build", + "test:lint": "eslint --ext '.js,.ts,.tsx' --fix src", + "test:unit": "cross-env CI=1 react-scripts test --env=jsdom", + "test:types": "tsc --noEmit", + "test:watch": "react-scripts test --env=jsdom" + }, + "keywords": [ + "react", + "freeze" + ], + "peerDependencies": { + "react": ">=17.0.0" + }, + "devDependencies": { + "@types/jest": "^25.1.4", + "@types/node": "^12.12.38", + "@types/react": "^18.0.15", + "@types/react-test-renderer": "^18.0.0", + "@typescript-eslint/eslint-plugin": "^5.3.0", + "@typescript-eslint/parser": "^5.3.0", + "babel-eslint": "^10.0.3", + "cross-env": "^7.0.2", + "eslint": "^6.8.0", + "eslint-config-prettier": "^6.7.0", + "eslint-config-standard": "^14.1.0", + "eslint-config-standard-react": "^9.2.0", + "eslint-plugin-import": "^2.18.2", + "eslint-plugin-node": "^11.0.0", + "eslint-plugin-prettier": "^3.1.1", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-react": "^7.17.0", + "eslint-plugin-standard": "^4.0.1", + "microbundle-crl": "^0.13.10", + "npm-run-all": "^4.1.5", + "prettier": "^2.0.4", + "react": "^18.2.0", + "react-scripts": "^3.4.1", + "react-test-renderer": "^18.2.0", + "typescript": "^3.7.5" + }, + "files": [ + "dist", + "!dist/*.test.d.ts", + "src/index.tsx" + ] +} diff --git a/iut-expo-starter/node_modules/react-freeze/src/index.tsx b/iut-expo-starter/node_modules/react-freeze/src/index.tsx new file mode 100644 index 00000000..1193a274 --- /dev/null +++ b/iut-expo-starter/node_modules/react-freeze/src/index.tsx @@ -0,0 +1,43 @@ +import React, { useRef, Suspense, Fragment } from "react"; + +interface StorageRef { + promise?: Promise; + resolve?: (value: void | PromiseLike) => void; +} + +function Suspender({ + freeze, + children, +}: { + freeze: boolean; + children: React.ReactNode; +}) { + const promiseCache = useRef({}).current; + if (freeze && !promiseCache.promise) { + promiseCache.promise = new Promise((resolve) => { + promiseCache.resolve = resolve; + }); + throw promiseCache.promise; + } else if (freeze) { + throw promiseCache.promise; + } else if (promiseCache.promise) { + promiseCache.resolve!(); + promiseCache.promise = undefined; + } + + return {children}; +} + +interface Props { + freeze: boolean; + children: React.ReactNode; + placeholder?: React.ReactNode; +} + +export function Freeze({ freeze, children, placeholder = null }: Props) { + return ( + + {children} + + ); +} diff --git a/iut-expo-starter/node_modules/react-native-screens/LICENSE b/iut-expo-starter/node_modules/react-native-screens/LICENSE new file mode 100644 index 00000000..1a193089 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Software Mansion + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/iut-expo-starter/node_modules/react-native-screens/README.md b/iut-expo-starter/node_modules/react-native-screens/README.md new file mode 100644 index 00000000..68c473c3 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/README.md @@ -0,0 +1,210 @@ +React Native Screens by Software Mansion + +This project aims to expose native navigation container components to React Native. It is not designed to be used as a standalone library but rather as a dependency of a [full-featured navigation library](https://github.com/react-navigation/react-navigation). + +## Fabric + +To learn about how to use `react-native-screens` with Fabric architecture, head over to [Fabric README](README-Fabric.md). Instructions on how to run Fabric Example within this repo can be found in the [FabricExample README](FabricExample/README.md). + +## Supported platforms + +- [x] iOS +- [x] Android +- [x] tvOS +- [x] Windows +- [x] Web + +## Installation + +### iOS + +Installation on iOS is completely handled with auto-linking, if you have ensured pods are installed after adding this module, no other actions are necessary. + +### Android + +On Android the View state is not persisted consistently across Activity restarts, which can lead to crashes in those cases. It is recommended to override the native Android method called on Activity restarts in your main Activity, to avoid these crashes. + +For most people using an app built from the react-native template, that means editing `MainActivity.java`, likely located in `android/app/src/main/java//MainActivity.java` + +You should add this code, which specifically discards any Activity state persisted during the Activity restart process, to avoid inconsistencies that lead to crashes. +Please note that the override code should not be placed inside `MainActivityDelegate`, but rather directly in `MainActivity`. + +```java +import android.os.Bundle; + +public class MainActivity extends ReactActivity { + + //...code + + //react-native-screens override + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(null); + } + + public static class MainActivityDelegate extends ReactActivityDelegate { + //...code + } +} +``` + +For people that must handle cases like this, there is [a more detailed discussion of the difficulties in a series of related comments](https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-424704633). + +
+Need to use a custom Kotlin version? +
+ +Since `v3.6.0` `react-native-screens` has been rewritten with Kotlin. Kotlin version used in this library defaults to `1.4.10`. + +If you need to use a different Kotlin version, set `kotlinVersion` ext property in your project's `android/build.gradle` and the library will use this version accordingly: + +``` +buildscript { + ext { + ... + kotlinVersion = "1.4.10" + } +} +``` + +**Disclaimer**: `react-native-screens` requires Kotlin `1.3.50` or higher. + +
+ +### Windows + +Installation on Windows should be completely handled with auto-linking when using React Native Windows 0.63+. For earlier versions, you must [manually link](https://microsoft.github.io/react-native-windows/docs/native-modules-using) the native module. + +## How can I take advantage of that? + +Screens are already integrated with the React Native's most popular navigation library [react-navigation](https://github.com/react-navigation/react-navigation) and [Expo](https://expo.io). + +## Supported react-native version + +| version | react-native version | +| ------- | -------------------- | +| 3.14.0+ | 0.64.0+ | +| 3.0.0+ | 0.62.0+ | +| 2.0.0+ | 0.60.0+ | + +### Support for Fabric + +[Fabric](https://reactnative.dev/architecture/fabric-renderer) is React Native's new rendering system. + +- As of [version `3.18.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.18.0) of this project, Fabric is supported only for react-native 0.70+. Support for lower versions has been dropped. +- As of [version `3.14.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.14.0) of this project, Fabric is supported only for react-native 0.69+. Support for lower versions has been dropped. + +| version | react-native version | +| ------- | -------------------- | +| 3.18.0+ | 0.70.0+ | +| 3.14.0+ | 0.69.0+ | + +## Usage with [react-navigation](https://github.com/react-navigation/react-navigation) + +Screens support is built into [react-navigation](https://github.com/react-navigation/react-navigation) starting from version [2.14.0](https://github.com/react-navigation/react-navigation/releases/tag/2.14.0) for all the different navigator types (stack, tab, drawer, etc). + +To configure react-navigation to use screens instead of plain RN Views for rendering screen views, simply add this library as a dependency to your project: + +```bash +# bare React Native project +yarn add react-native-screens + +# if you use Expo managed workflow +expo install react-native-screens +``` + +Just make sure that the version of [react-navigation](https://github.com/react-navigation/react-navigation) you are using is 2.14.0 or higher. + +You are all set 🎉 – when screens are enabled in your application code react-navigation will automatically use them instead of relying on plain React Native Views. + +### Experimental support for `react-freeze` + +> You have to use React Native 0.64 or higher, react-navigation 5.x or 6.x and react-native-screens >= v3.9.0 + +Since `v3.9.0`, `react-native-screens` comes with experimental support for [`react-freeze`](https://github.com/software-mansion-labs/react-freeze). It uses the React `Suspense` mechanism to prevent parts of the React component tree from rendering, while keeping its state untouched. + +To benefit from this feature, enable it in your entry file (e.g. `App.js`) with this snippet: + +```js +import { enableFreeze } from 'react-native-screens'; + +enableFreeze(true); +``` + +Want to know more? Check out [react-freeze README](https://github.com/software-mansion-labs/react-freeze#readme) + +Found a bug? File an issue [here](https://github.com/software-mansion/react-native-screens/issues) or directly in [react-freeze repository](https://github.com/software-mansion-labs/react-freeze/issues). + +### Disabling `react-native-screens` + +If, for whatever reason, you'd like to disable native screens support and use plain React Native Views add the following code in your entry file (e.g. `App.js`): + +```js +import { enableScreens } from 'react-native-screens'; + +enableScreens(false); +``` + +You can also disable the usage of native screens per navigator with [`detachInactiveScreens`](https://reactnavigation.org/docs/stack-navigator#detachinactivescreens). + +### Using `createNativeStackNavigator` with React Navigation + +To take advantage of the native stack navigator primitive for React Navigation that leverages `UINavigationController` on iOS and `Fragment` on Android, please refer: + +- for React Navigation >= v6 to the [Native Stack Navigator part of React Navigation documentation](https://reactnavigation.org/docs/native-stack-navigator) +- for React Navigation v5 to the [README in react-native-screens/native-stack](https://github.com/software-mansion/react-native-screens/tree/main/native-stack) +- for older versions to the [README in react-native-screens/createNativeStackNavigator](https://github.com/software-mansion/react-native-screens/tree/main/createNativeStackNavigator) + +## `FullWindowOverlay` + +Native `iOS` component for rendering views straight under the `Window`. Based on `RCTPerfMonitor`. You should treat it as a wrapper, providing full-screen, transparent view which receives no props and should ideally render one child `View`, being the root of its view hierarchy. For the example usage, see https://github.com/software-mansion/react-native-screens/blob/main/TestsExample/src/Test1096.tsx + +## Interop with [react-native-navigation](https://github.com/wix/react-native-navigation) + +React-native-navigation library already uses native containers for rendering navigation scenes so wrapping these scenes with `` or `` component does not provide any benefits. Yet if you would like to build a component that uses screens primitives under the hood (for example a view pager component) it is safe to use `` and `` components for that as these work out of the box when rendered on react-native-navigation scenes. + +## Interop with other libraries + +This library should work out of the box with all existing react-native libraries. If you experience problems with interoperability please [report an issue](https://github.com/software-mansion/react-native-screens/issues). + +## Guide for navigation library authors + +If you are building a navigation library you may want to use `react-native-screens` to have control over which parts of the React component tree are attached to the native view hierarchy. +To do that, `react-native-screens` provides you with the components documented [here](https://github.com/software-mansion/react-native-screens/tree/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md). + +## Common problems + +### Problems with header on iOS + +- [Focused search bar causes new screens to have incorrect header](https://github.com/software-mansion/react-native-screens/issues/996) +- [Scrollable content gets cut off by the header with a search bar](https://github.com/software-mansion/react-native-screens/issues/1120) +- [RefreshControl does not work properly with NativeStackNavigator and largeTitle](https://github.com/software-mansion/react-native-screens/issues/395) + +#### Solution + +Use `ScrollView` with prop `contentInsetAdjustmentBehavior=“automatic”` as a main container of the screen and set `headerTranslucent: true` in screen options. + +### Other problems + +| Problem | Solution | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| [SVG component becomes transparent when goBack](https://github.com/software-mansion/react-native-screens/issues/773) | [related PRs](https://github.com/software-mansion/react-native-screens/issues/773#issuecomment-783469792) | +| [Memory leak while moving from one screen to another in the same stack](https://github.com/software-mansion/react-native-screens/issues/843) | [explanation](https://github.com/software-mansion/react-native-screens/issues/843#issuecomment-832034119) | +| [LargeHeader stays small after pop/goBack/swipe gesture on iOS 14+](https://github.com/software-mansion/react-native-screens/issues/649) | [potential fix](https://github.com/software-mansion/react-native-screens/issues/649#issuecomment-712199895) | +| [`onScroll` and `onMomentumScrollEnd` of previous screen triggered in bottom tabs](https://github.com/software-mansion/react-native-screens/issues/1183) | [explanation](https://github.com/software-mansion/react-native-screens/issues/1183#issuecomment-949313111) | + +## Contributing + +There are many ways to contribute to this project. See [CONTRIBUTING](https://github.com/software-mansion/react-native-screens/tree/main/guides/CONTRIBUTING.md) guide for more information. Thank you for your interest in contributing! + +## License + +React native screens library is licensed under [The MIT License](LICENSE). + +## Credits + +This project has been build and is maintained thanks to the support from [Shopify](https://shopify.com), [Expo.io](https://expo.io), and [Software Mansion](https://swmansion.com). + +[![shopify](https://avatars1.githubusercontent.com/u/8085?v=3&s=100 'Shopify.com')](https://shopify.com) +[![expo](https://avatars2.githubusercontent.com/u/12504344?v=3&s=100 'Expo.io')](https://expo.io) +[![swm](https://logo.swmansion.com/logo?color=white&variant=desktop&width=150&tag=react-native-reanimated-github 'Software Mansion')](https://swmansion.com) diff --git a/iut-expo-starter/node_modules/react-native-screens/RNScreens.podspec b/iut-expo-starter/node_modules/react-native-screens/RNScreens.podspec new file mode 100644 index 00000000..40101a25 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/RNScreens.podspec @@ -0,0 +1,53 @@ +require "json" + +package = JSON.parse(File.read(File.join(__dir__, "package.json"))) + +fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1' + +folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' + +Pod::Spec.new do |s| + s.name = "RNScreens" + s.version = package["version"] + s.summary = package["description"] + s.description = <<-DESC + RNScreens - first incomplete navigation solution for your React Native app + DESC + s.homepage = "https://github.com/software-mansion/react-native-screens" + s.license = "MIT" + # s.license = { :type => "MIT", :file => "FILE_LICENSE" } + s.author = { "author" => "author@domain.cn" } + s.platforms = { :ios => "9.0", :tvos => "11.0" } + s.source = { :git => "https://github.com/software-mansion/react-native-screens.git", :tag => "#{s.version}" } + + if fabric_enabled + s.pod_target_xcconfig = { + 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/boost" "$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/RCT-Folly"', + "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", + } + s.platforms = { ios: '11.0', tvos: '11.0' } + s.compiler_flags = folly_compiler_flags + ' ' + '-DRN_FABRIC_ENABLED' + s.source_files = 'ios/**/*.{h,m,mm,cpp}' + s.requires_arc = true + + s.dependency "React" + s.dependency "React-RCTFabric" + s.dependency "React-Codegen" + s.dependency "RCT-Folly" + s.dependency "RCTRequired" + s.dependency "RCTTypeSafety" + s.dependency "ReactCommon/turbomodule/core" + + s.subspec "common" do |ss| + ss.source_files = "common/cpp/**/*.{cpp,h}" + ss.header_dir = "rnscreens" + ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/common/cpp\"" } + end + else + s.source_files = "ios/**/*.{h,m,mm}" + s.requires_arc = true + + s.dependency "React-Core" + s.dependency "React-RCTImage" + end +end diff --git a/iut-expo-starter/node_modules/react-native-screens/android/build.gradle b/iut-expo-starter/node_modules/react-native-screens/android/build.gradle new file mode 100644 index 00000000..482478b9 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/build.gradle @@ -0,0 +1,113 @@ +buildscript { + ext.safeExtGet = {prop, fallback -> + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback + } + repositories { + google() + mavenCentral() + } + dependencies { + classpath('com.android.tools.build:gradle:4.2.2') + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.6.21')}" + classpath "com.diffplug.spotless:spotless-plugin-gradle:5.15.0" + } +} + +def isNewArchitectureEnabled() { + // To opt-in for the New Architecture, you can either: + // - Set `newArchEnabled` to true inside the `gradle.properties` file + // - Invoke gradle with `-newArchEnabled=true` + // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true` + return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" +} + +// spotless is only accessible within react-native-screens repo +if (project == rootProject) { + apply from: 'spotless.gradle' +} + +if (isNewArchitectureEnabled()) { + apply plugin: "com.facebook.react" +} +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +def reactNativeArchitectures() { + def value = project.getProperties().get("reactNativeArchitectures") + return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] +} + +android { + compileSdkVersion safeExtGet('compileSdkVersion', 28) + + // Used to override the NDK path/version on internal CI or by allowing + // users to customize the NDK path/version from their root project (e.g. for M1 support) + if (rootProject.hasProperty("ndkPath")) { + ndkPath rootProject.ext.ndkPath + } + if (rootProject.hasProperty("ndkVersion")) { + ndkVersion rootProject.ext.ndkVersion + } + + defaultConfig { + minSdkVersion safeExtGet('minSdkVersion', 21) + targetSdkVersion safeExtGet('targetSdkVersion', 22) + versionCode 1 + versionName "1.0" + buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() + ndk { + abiFilters (*reactNativeArchitectures()) + } + } + lintOptions { + abortOnError false + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + packagingOptions { + // For some reason gradle only complains about the duplicated version of libreact_render libraries + // while there are more libraries copied in intermediates folder of the lib build directory, we exlude + // only the ones that make the build fail (ideally we should only include librnscreens_modules but we + // are only allowed to specify exlude patterns) + exclude "**/libreact_render*.so" + } + sourceSets.main { + java { + if (isNewArchitectureEnabled()) { + srcDirs += [ + "src/fabric/java", + ] + } else { + srcDirs += [ + "src/paper/java", + "build/generated/source/codegen/java" + ] + } + + } + } +} + +repositories { + maven { + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + // Matches the RN Hello World template + // https://github.com/facebook/react-native/blob/1e8f3b11027fe0a7514b4fc97d0798d3c64bc895/local-cli/templates/HelloWorld/android/build.gradle#L21 + url "$projectDir/../node_modules/react-native/android" + } + mavenCentral() + mavenLocal() + google() +} + +dependencies { + implementation 'com.facebook.react:react-native:+' + implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'androidx.fragment:fragment:1.2.1' + implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0' + implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' + implementation 'com.google.android.material:material:1.1.0' + implementation "androidx.core:core-ktx:1.5.0" +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt new file mode 100644 index 00000000..d9e0e58d --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt @@ -0,0 +1,49 @@ +package com.swmansion.rnscreens + +import android.view.ViewGroup +import androidx.annotation.UiThread +import com.facebook.react.bridge.ReactContext +import com.facebook.react.bridge.ReadableMap +import com.facebook.react.bridge.WritableMap +import com.facebook.react.bridge.WritableNativeMap +import com.facebook.react.uimanager.FabricViewStateManager +import com.facebook.react.uimanager.PixelUtil +import kotlin.math.abs + +abstract class FabricEnabledViewGroup constructor(context: ReactContext?) : ViewGroup(context), FabricViewStateManager.HasFabricViewStateManager { + private val mFabricViewStateManager: FabricViewStateManager = FabricViewStateManager() + + override fun getFabricViewStateManager(): FabricViewStateManager { + return mFabricViewStateManager + } + + protected fun updateScreenSizeFabric(width: Int, height: Int) { + updateState(width, height) + } + + @UiThread + fun updateState(width: Int, height: Int) { + val realWidth: Float = PixelUtil.toDIPFromPixel(width.toFloat()) + val realHeight: Float = PixelUtil.toDIPFromPixel(height.toFloat()) + + // Check incoming state values. If they're already the correct value, return early to prevent + // infinite UpdateState/SetState loop. + val currentState: ReadableMap? = mFabricViewStateManager.getStateData() + if (currentState != null) { + val delta = 0.9f + val stateFrameHeight: Float = if (currentState.hasKey("frameHeight")) currentState.getDouble("frameHeight").toFloat() else 0f + val stateFrameWidth: Float = if (currentState.hasKey("frameWidth")) currentState.getDouble("frameWidth").toFloat() else 0f + if (abs(stateFrameWidth - realWidth) < delta && + abs(stateFrameHeight - realHeight) < delta + ) { + return + } + } + mFabricViewStateManager.setState { + val map: WritableMap = WritableNativeMap() + map.putDouble("frameWidth", realWidth.toDouble()) + map.putDouble("frameHeight", realHeight.toDouble()) + map + } + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/AndroidManifest.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/AndroidManifest.xml new file mode 100644 index 00000000..2de74e80 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/AndroidManifest.xml @@ -0,0 +1,5 @@ + + + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/CustomSearchView.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/CustomSearchView.kt new file mode 100644 index 00000000..b6961844 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/CustomSearchView.kt @@ -0,0 +1,73 @@ +package com.swmansion.rnscreens + +import android.content.Context +import androidx.activity.OnBackPressedCallback +import androidx.appcompat.widget.SearchView +import androidx.fragment.app.Fragment + +class CustomSearchView(context: Context, fragment: Fragment) : SearchView(context) { + /* + CustomSearchView uses some variables from SearchView. They are listed below with links to documentation + isIconified - https://developer.android.com/reference/android/widget/SearchView#setIconified(boolean) + maxWidth - https://developer.android.com/reference/android/widget/SearchView#setMaxWidth(int) + setOnSearchClickListener - https://developer.android.com/reference/android/widget/SearchView#setOnSearchClickListener(android.view.View.OnClickListener) + setOnCloseListener - https://developer.android.com/reference/android/widget/SearchView#setOnCloseListener(android.widget.SearchView.OnCloseListener) + */ + private var mCustomOnCloseListener: OnCloseListener? = null + private var mCustomOnSearchClickedListener: OnClickListener? = null + + private var mOnBackPressedCallback: OnBackPressedCallback = + object : OnBackPressedCallback(true) { + override fun handleOnBackPressed() { + isIconified = true + } + } + + private val backPressOverrider = FragmentBackPressOverrider(fragment, mOnBackPressedCallback) + + var overrideBackAction: Boolean + set(value) { + backPressOverrider.overrideBackAction = value + } + get() = backPressOverrider.overrideBackAction + + fun focus() { + isIconified = false + requestFocusFromTouch() + } + + override fun setOnCloseListener(listener: OnCloseListener?) { + mCustomOnCloseListener = listener + } + + override fun setOnSearchClickListener(listener: OnClickListener?) { + mCustomOnSearchClickedListener = listener + } + + override fun onAttachedToWindow() { + super.onAttachedToWindow() + if (!isIconified) { + backPressOverrider.maybeAddBackCallback() + } + } + + override fun onDetachedFromWindow() { + super.onDetachedFromWindow() + backPressOverrider.removeBackCallbackIfAdded() + } + + init { + super.setOnSearchClickListener { v -> + mCustomOnSearchClickedListener?.onClick(v) + backPressOverrider.maybeAddBackCallback() + } + + super.setOnCloseListener { + val result = mCustomOnCloseListener?.onClose() ?: false + backPressOverrider.removeBackCallbackIfAdded() + result + } + + maxWidth = Integer.MAX_VALUE + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/CustomToolbar.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/CustomToolbar.kt new file mode 100644 index 00000000..3bc36355 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/CustomToolbar.kt @@ -0,0 +1,7 @@ +package com.swmansion.rnscreens + +import android.content.Context +import androidx.appcompat.widget.Toolbar + +// This class is used to store config closer to search bar +open class CustomToolbar(context: Context, val config: ScreenStackHeaderConfig) : Toolbar(context) diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/FragmentBackPressOverrider.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/FragmentBackPressOverrider.kt new file mode 100644 index 00000000..0cf1706a --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/FragmentBackPressOverrider.kt @@ -0,0 +1,29 @@ +package com.swmansion.rnscreens + +import androidx.activity.OnBackPressedCallback +import androidx.fragment.app.Fragment + +class FragmentBackPressOverrider( + private val fragment: Fragment, + private val mOnBackPressedCallback: OnBackPressedCallback +) { + private var mIsBackCallbackAdded: Boolean = false + var overrideBackAction: Boolean = true + + fun maybeAddBackCallback() { + if (!mIsBackCallbackAdded && overrideBackAction) { + fragment.activity?.onBackPressedDispatcher?.addCallback( + fragment, + mOnBackPressedCallback + ) + mIsBackCallbackAdded = true + } + } + + fun removeBackCallbackIfAdded() { + if (mIsBackCallbackAdded) { + mOnBackPressedCallback.remove() + mIsBackCallbackAdded = false + } + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/LifecycleHelper.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/LifecycleHelper.kt new file mode 100644 index 00000000..41bfc802 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/LifecycleHelper.kt @@ -0,0 +1,60 @@ +package com.swmansion.rnscreens + +import android.view.View +import androidx.fragment.app.Fragment +import androidx.lifecycle.Lifecycle +import androidx.lifecycle.LifecycleObserver + +class LifecycleHelper { + private val mViewToLifecycleMap: MutableMap = HashMap() + private val mRegisterOnLayoutChange: View.OnLayoutChangeListener = object : View.OnLayoutChangeListener { + override fun onLayoutChange( + view: View, + i: Int, + i1: Int, + i2: Int, + i3: Int, + i4: Int, + i5: Int, + i6: Int, + i7: Int + ) { + registerViewWithLifecycleOwner(view) + view.removeOnLayoutChangeListener(this) + } + } + + private fun registerViewWithLifecycleOwner(view: View) { + val parent = findNearestScreenFragmentAncestor(view) + if (parent != null && view is LifecycleObserver) { + val lifecycle = parent.lifecycle + lifecycle.addObserver((view as LifecycleObserver)) + mViewToLifecycleMap[view] = lifecycle + } + } + + fun register(view: T) where T : View, T : LifecycleObserver? { + // we need to wait until view is mounted in the hierarchy as this method is called only at the + // moment of the view creation. In order to register lifecycle observer we need to find ancestor + // of type Screen and this can only happen when the view is properly attached. We rely on + // Android's onLayout callback being triggered when the view gets added to the hierarchy and + // only then we attempt to locate lifecycle owner ancestor. + view.addOnLayoutChangeListener(mRegisterOnLayoutChange) + } + + fun unregister(view: T) where T : View, T : LifecycleObserver? { + mViewToLifecycleMap[view]?.removeObserver(view) + } + + companion object { + fun findNearestScreenFragmentAncestor(view: View): Fragment? { + var parent = view.parent + while (parent != null && parent !is Screen) { + parent = parent.parent + } + return if (parent != null) { + (parent as Screen).fragment + } else null + } + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt new file mode 100644 index 00000000..371ed8cf --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt @@ -0,0 +1,21 @@ +package com.swmansion.rnscreens + +import com.facebook.react.ReactPackage +import com.facebook.react.bridge.NativeModule +import com.facebook.react.bridge.ReactApplicationContext +import com.facebook.react.uimanager.ViewManager + +class RNScreensPackage : ReactPackage { + override fun createNativeModules(reactContext: ReactApplicationContext): List = + emptyList() + + override fun createViewManagers(reactContext: ReactApplicationContext) = + listOf>( + ScreenContainerViewManager(), + ScreenViewManager(), + ScreenStackViewManager(), + ScreenStackHeaderConfigViewManager(), + ScreenStackHeaderSubviewManager(), + SearchBarManager() + ) +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/Screen.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/Screen.kt new file mode 100644 index 00000000..dac3ac90 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/Screen.kt @@ -0,0 +1,258 @@ +package com.swmansion.rnscreens + +import android.annotation.SuppressLint +import android.content.pm.ActivityInfo +import android.graphics.Paint +import android.os.Parcelable +import android.util.SparseArray +import android.view.ViewGroup +import android.view.WindowManager +import android.webkit.WebView +import com.facebook.react.bridge.GuardedRunnable +import com.facebook.react.bridge.ReactContext +import com.facebook.react.uimanager.UIManagerModule + +@SuppressLint("ViewConstructor") +class Screen constructor(context: ReactContext?) : FabricEnabledViewGroup(context) { + + var fragment: ScreenFragment? = null + var container: ScreenContainer<*>? = null + var activityState: ActivityState? = null + private set + private var mTransitioning = false + var stackPresentation = StackPresentation.PUSH + var replaceAnimation = ReplaceAnimation.POP + var stackAnimation = StackAnimation.DEFAULT + var isGestureEnabled = true + var screenOrientation: Int? = null + private set + private var mStatusBarStyle: String? = null + private var mStatusBarHidden: Boolean? = null + private var mStatusBarTranslucent: Boolean? = null + private var mStatusBarColor: Int? = null + private var mNavigationBarColor: Int? = null + private var mNavigationBarHidden: Boolean? = null + var isStatusBarAnimated: Boolean? = null + private var mNativeBackButtonDismissalEnabled = true + + init { + // we set layout params as WindowManager.LayoutParams to workaround the issue with TextInputs + // not displaying modal menus (e.g., copy/paste or selection). The missing menus are due to the + // fact that TextView implementation is expected to be attached to window when layout happens. + // Then, at the moment of layout it checks whether window type is in a reasonable range to tell + // whether it should enable selection controls (see Editor.java#prepareCursorControllers). + // With screens, however, the text input component can be laid out before it is attached, in + // that case TextView tries to get window type property from the oldest existing parent, which + // in this case is a Screen class, as it is the root of the screen that is about to be attached. + // Setting params this way is not the most elegant way to solve this problem but workarounds it + // for the time being + layoutParams = WindowManager.LayoutParams(WindowManager.LayoutParams.TYPE_APPLICATION) + } + + override fun dispatchSaveInstanceState(container: SparseArray) { + // do nothing, react native will keep the view hierarchy so no need to serialize/deserialize + // view's states. The side effect of restoring is that TextInput components would trigger + // set-text events which may confuse text input handling. + } + + override fun dispatchRestoreInstanceState(container: SparseArray) { + // ignore restoring instance state too as we are not saving anything anyways. + } + + override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) { + if (changed) { + val width = r - l + val height = b - t + if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { + updateScreenSizeFabric(width, height) + } else { + updateScreenSizePaper(width, height) + } + } + } + + private fun updateScreenSizePaper(width: Int, height: Int) { + val reactContext = context as ReactContext + reactContext.runOnNativeModulesQueueThread( + object : GuardedRunnable(reactContext) { + override fun runGuarded() { + reactContext + .getNativeModule(UIManagerModule::class.java) + ?.updateNodeSize(id, width, height) + } + }) + } + + val headerConfig: ScreenStackHeaderConfig? + get() = getChildAt(0) as? ScreenStackHeaderConfig + + /** + * While transitioning this property allows to optimize rendering behavior on Android and provide + * a correct blending options for the animated screen. It is turned on automatically by the + * container when transitioning is detected and turned off immediately after + */ + fun setTransitioning(transitioning: Boolean) { + if (mTransitioning == transitioning) { + return + } + mTransitioning = transitioning + val isWebViewInScreen = hasWebView(this) + if (isWebViewInScreen && layerType != LAYER_TYPE_HARDWARE) { + return + } + super.setLayerType( + if (transitioning && !isWebViewInScreen) LAYER_TYPE_HARDWARE else LAYER_TYPE_NONE, + null + ) + } + + private fun hasWebView(viewGroup: ViewGroup): Boolean { + for (i in 0 until viewGroup.childCount) { + val child = viewGroup.getChildAt(i) + if (child is WebView) { + return true + } else if (child is ViewGroup) { + if (hasWebView(child)) { + return true + } + } + } + return false + } + + override fun setLayerType(layerType: Int, paint: Paint?) { + // ignore - layer type is controlled by `transitioning` prop + } + + fun setActivityState(activityState: ActivityState) { + if (activityState == this.activityState) { + return + } + this.activityState = activityState + container?.notifyChildUpdate() + } + + fun setScreenOrientation(screenOrientation: String?) { + if (screenOrientation == null) { + this.screenOrientation = null + return + } + ScreenWindowTraits.applyDidSetOrientation() + this.screenOrientation = when (screenOrientation) { + "all" -> ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR + "portrait" -> ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT + "portrait_up" -> ActivityInfo.SCREEN_ORIENTATION_PORTRAIT + "portrait_down" -> ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT + "landscape" -> ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE + "landscape_left" -> ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE + "landscape_right" -> ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE + else -> ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED + } + + fragment?.let { ScreenWindowTraits.setOrientation(this, it.tryGetActivity()) } + } + + // Accepts one of 4 accessibility flags + // developer.android.com/reference/android/view/View#attr_android:importantForAccessibility + fun changeAccessibilityMode(mode: Int) { + this.importantForAccessibility = mode + this.headerConfig?.toolbar?.importantForAccessibility = mode + } + + var statusBarStyle: String? + get() = mStatusBarStyle + set(statusBarStyle) { + if (statusBarStyle != null) { + ScreenWindowTraits.applyDidSetStatusBarAppearance() + } + mStatusBarStyle = statusBarStyle + fragment?.let { ScreenWindowTraits.setStyle(this, it.tryGetActivity(), it.tryGetContext()) } + } + + var isStatusBarHidden: Boolean? + get() = mStatusBarHidden + set(statusBarHidden) { + if (statusBarHidden != null) { + ScreenWindowTraits.applyDidSetStatusBarAppearance() + } + mStatusBarHidden = statusBarHidden + fragment?.let { ScreenWindowTraits.setHidden(this, it.tryGetActivity()) } + } + + var isStatusBarTranslucent: Boolean? + get() = mStatusBarTranslucent + set(statusBarTranslucent) { + if (statusBarTranslucent != null) { + ScreenWindowTraits.applyDidSetStatusBarAppearance() + } + mStatusBarTranslucent = statusBarTranslucent + fragment?.let { + ScreenWindowTraits.setTranslucent( + this, + it.tryGetActivity(), + it.tryGetContext() + ) + } + } + + var statusBarColor: Int? + get() = mStatusBarColor + set(statusBarColor) { + if (statusBarColor != null) { + ScreenWindowTraits.applyDidSetStatusBarAppearance() + } + mStatusBarColor = statusBarColor + fragment?.let { ScreenWindowTraits.setColor(this, it.tryGetActivity(), it.tryGetContext()) } + } + + var navigationBarColor: Int? + get() = mNavigationBarColor + set(navigationBarColor) { + if (navigationBarColor != null) { + ScreenWindowTraits.applyDidSetNavigationBarAppearance() + } + mNavigationBarColor = navigationBarColor + fragment?.let { ScreenWindowTraits.setNavigationBarColor(this, it.tryGetActivity()) } + } + + var isNavigationBarHidden: Boolean? + get() = mNavigationBarHidden + set(navigationBarHidden) { + if (navigationBarHidden != null) { + ScreenWindowTraits.applyDidSetNavigationBarAppearance() + } + mNavigationBarHidden = navigationBarHidden + fragment?.let { + ScreenWindowTraits.setNavigationBarHidden( + this, + it.tryGetActivity(), + ) + } + } + + var nativeBackButtonDismissalEnabled: Boolean + get() = mNativeBackButtonDismissalEnabled + set(enableNativeBackButtonDismissal) { + mNativeBackButtonDismissalEnabled = enableNativeBackButtonDismissal + } + + enum class StackPresentation { + PUSH, MODAL, TRANSPARENT_MODAL + } + + enum class StackAnimation { + DEFAULT, NONE, FADE, SLIDE_FROM_BOTTOM, SLIDE_FROM_RIGHT, SLIDE_FROM_LEFT, FADE_FROM_BOTTOM + } + + enum class ReplaceAnimation { + PUSH, POP + } + + enum class ActivityState { + INACTIVE, TRANSITIONING_OR_BELOW_TOP, ON_TOP + } + + enum class WindowTraits { + ORIENTATION, COLOR, STYLE, TRANSLUCENT, HIDDEN, ANIMATED, NAVIGATION_BAR_COLOR, NAVIGATION_BAR_HIDDEN + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt new file mode 100644 index 00000000..39a51135 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt @@ -0,0 +1,373 @@ +package com.swmansion.rnscreens + +import android.content.Context +import android.content.ContextWrapper +import android.view.View +import android.view.ViewGroup +import android.view.ViewParent +import android.view.inputmethod.InputMethodManager +import androidx.fragment.app.Fragment +import androidx.fragment.app.FragmentActivity +import androidx.fragment.app.FragmentManager +import androidx.fragment.app.FragmentTransaction +import com.facebook.react.ReactRootView +import com.facebook.react.bridge.ReactContext +import com.facebook.react.modules.core.ChoreographerCompat +import com.facebook.react.modules.core.ReactChoreographer +import com.swmansion.rnscreens.Screen.ActivityState + +open class ScreenContainer(context: Context?) : ViewGroup(context) { + @JvmField + protected val mScreenFragments = ArrayList() + @JvmField + protected var mFragmentManager: FragmentManager? = null + private var mIsAttached = false + private var mNeedUpdate = false + private var mLayoutEnqueued = false + private val mLayoutCallback: ChoreographerCompat.FrameCallback = object : ChoreographerCompat.FrameCallback() { + override fun doFrame(frameTimeNanos: Long) { + mLayoutEnqueued = false + measure( + MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY), + MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY) + ) + layout(left, top, right, bottom) + } + } + private var mParentScreenFragment: ScreenFragment? = null + + override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) { + var i = 0 + val size = childCount + while (i < size) { + getChildAt(i).layout(0, 0, width, height) + i++ + } + } + + override fun removeView(view: View) { + // The below block is a workaround for an issue with keyboard handling within fragments. Despite + // Android handles input focus on the fragments that leave the screen, the keyboard stays open + // in a number of cases. The issue can be best reproduced on Android 5 devices, before some + // changes in Android's InputMethodManager have been introduced (specifically around dismissing + // the keyboard in onDetachedFromWindow). However, we also noticed the keyboard issue happen + // intermittently on recent versions of Android as well. The issue hasn't been previously + // noticed as in React Native <= 0.61 there was a logic that'd trigger keyboard dismiss upon a + // blur event (the blur even gets dispatched properly, the keyboard just stays open despite + // that) – note the change in RN core here: + // https://github.com/facebook/react-native/commit/e9b4928311513d3cbbd9d875827694eab6cfa932 + // The workaround is to force-hide keyboard when the screen that has focus is dismissed (we + // detect that in removeView as super.removeView causes the input view to un focus while keeping + // the keyboard open). + if (view === focusedChild) { + (context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager) + .hideSoftInputFromWindow(windowToken, InputMethodManager.HIDE_NOT_ALWAYS) + } + super.removeView(view) + } + + override fun requestLayout() { + super.requestLayout() + @Suppress("SENSELESS_COMPARISON") // mLayoutCallback can be null here since this method can be called in init + if (!mLayoutEnqueued && mLayoutCallback != null) { + mLayoutEnqueued = true + // we use NATIVE_ANIMATED_MODULE choreographer queue because it allows us to catch the current + // looper loop instead of enqueueing the update in the next loop causing a one frame delay. + ReactChoreographer.getInstance() + .postFrameCallback( + ReactChoreographer.CallbackType.NATIVE_ANIMATED_MODULE, mLayoutCallback + ) + } + } + + val isNested: Boolean + get() = mParentScreenFragment != null + + fun notifyChildUpdate() { + performUpdatesNow() + } + + protected open fun adapt(screen: Screen): T { + @Suppress("UNCHECKED_CAST") + return ScreenFragment(screen) as T + } + + fun addScreen(screen: Screen, index: Int) { + val fragment = adapt(screen) + screen.fragment = fragment + mScreenFragments.add(index, fragment) + screen.container = this + onScreenChanged() + } + + open fun removeScreenAt(index: Int) { + mScreenFragments[index].screen.container = null + mScreenFragments.removeAt(index) + onScreenChanged() + } + + open fun removeAllScreens() { + for (screenFragment in mScreenFragments) { + screenFragment.screen.container = null + } + mScreenFragments.clear() + onScreenChanged() + } + + val screenCount: Int + get() = mScreenFragments.size + + fun getScreenAt(index: Int): Screen = mScreenFragments[index].screen + + open val topScreen: Screen? + get() = mScreenFragments.firstOrNull { getActivityState(it) === ActivityState.ON_TOP }?.screen + + private fun setFragmentManager(fm: FragmentManager) { + mFragmentManager = fm + performUpdatesNow() + } + + private fun findFragmentManagerForReactRootView(rootView: ReactRootView): FragmentManager { + var context = rootView.context + + // ReactRootView is expected to be initialized with the main React Activity as a context but + // in case of Expo the activity is wrapped in ContextWrapper and we need to unwrap it + while (context !is FragmentActivity && context is ContextWrapper) { + context = context.baseContext + } + + check(context is FragmentActivity) { + "In order to use RNScreens components your app's activity need to extend ReactActivity" + } + + // In case React Native is loaded on a Fragment (not directly in activity) we need to find + // fragment manager whose fragment's view is ReactRootView. As of now, we detect such case by + // checking whether any fragments are attached to activity which hosts ReactRootView. + // See: https://github.com/software-mansion/react-native-screens/issues/1506 on why the cases + // must be treated separately. + return if (context.supportFragmentManager.fragments.isEmpty()) { + // We are in standard React Native application w/o custom native navigation based on fragments. + context.supportFragmentManager + } else { + // We are in some custom setup & we want to use the closest fragment manager in hierarchy. + // `findFragment` method throws IllegalStateException when it fails to resolve appropriate + // fragment. It might happen when e.g. React Native is loaded directly in Activity + // but some custom fragments are still used. Such use case seems highly unlikely + // so, as for now we fallback to activity's FragmentManager in hope for the best. + try { + FragmentManager.findFragment(rootView).childFragmentManager + } catch (ex: IllegalStateException) { + context.supportFragmentManager + } + } + } + + private fun setupFragmentManager() { + var parent: ViewParent = this + // We traverse view hierarchy up until we find screen parent or a root view + while (!(parent is ReactRootView || parent is Screen) && + parent.parent != null + ) { + parent = parent.parent + } + // If parent is of type Screen it means we are inside a nested fragment structure. + // Otherwise we expect to connect directly with root view and get root fragment manager + if (parent is Screen) { + checkNotNull( + parent.fragment?.let { screenFragment -> + mParentScreenFragment = screenFragment + screenFragment.registerChildScreenContainer(this) + setFragmentManager(screenFragment.childFragmentManager) + } + ) { "Parent Screen does not have its Fragment attached" } + } else { + // we expect top level view to be of type ReactRootView, this isn't really necessary but in + // order to find root view we test if parent is null. This could potentially happen also when + // the view is detached from the hierarchy and that test would not correctly indicate the root + // view. So in order to make sure we indeed reached the root we test if it is of a correct type. + // This allows us to provide a more descriptive error message for the aforementioned case. + check(parent is ReactRootView) { "ScreenContainer is not attached under ReactRootView" } + setFragmentManager(findFragmentManagerForReactRootView(parent)) + } + } + + protected fun createTransaction(): FragmentTransaction { + return requireNotNull(mFragmentManager) { "mFragmentManager is null when creating transaction" } + .beginTransaction() + .setReorderingAllowed(true) + } + + private fun attachScreen(transaction: FragmentTransaction, screenFragment: ScreenFragment) { + transaction.add(id, screenFragment) + } + + private fun detachScreen(transaction: FragmentTransaction, screenFragment: ScreenFragment) { + transaction.remove(screenFragment) + } + + private fun getActivityState(screenFragment: ScreenFragment): ActivityState? = + screenFragment.screen.activityState + + open fun hasScreen(screenFragment: ScreenFragment?): Boolean = + mScreenFragments.contains(screenFragment) + + override fun onAttachedToWindow() { + super.onAttachedToWindow() + mIsAttached = true + setupFragmentManager() + } + + /** Removes fragments from fragment manager that are attached to this container */ + private fun removeMyFragments(fragmentManager: FragmentManager) { + val transaction = fragmentManager.beginTransaction() + var hasFragments = false + for (fragment in fragmentManager.fragments) { + if (fragment is ScreenFragment && fragment.screen.container === this) { + transaction.remove(fragment) + hasFragments = true + } + } + + if (hasFragments) { + transaction.commitNowAllowingStateLoss() + } + } + + override fun onDetachedFromWindow() { + // if there are pending transactions and this view is about to get detached we need to perform + // them here as otherwise fragment manager will crash because it won't be able to find container + // view. We also need to make sure all the fragments attached to the given container are removed + // from fragment manager as in some cases fragment manager may be reused and in such case it'd + // attempt to reattach previously registered fragments that are not removed + mFragmentManager?.let { + if (!it.isDestroyed) { + removeMyFragments(it) + it.executePendingTransactions() + } + } + + mParentScreenFragment?.unregisterChildScreenContainer(this) + mParentScreenFragment = null + + super.onDetachedFromWindow() + mIsAttached = false + // When fragment container view is detached we force all its children to be removed. + // It is because children screens are controlled by their fragments, which can often have a + // delayed lifecycle (due to transitions). As a result due to ongoing transitions the fragment + // may choose not to remove the view despite the parent container being completely detached + // from the view hierarchy until the transition is over. In such a case when the container gets + // re-attached while the transition is ongoing, the child view would still be there and we'd + // attempt to re-attach it to with a misconfigured fragment. This would result in a crash. To + // avoid it we clear all the children here as we attach all the child fragments when the + // container is reattached anyways. We don't use `removeAllViews` since it does not check if the + // children are not already detached, which may lead to calling `onDetachedFromWindow` on them + // twice. + // We also get the size earlier, because we will be removing child views in `for` loop. + for (i in childCount - 1 downTo 0) { + removeViewAt(i) + } + } + + override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { + super.onMeasure(widthMeasureSpec, heightMeasureSpec) + for (i in 0 until childCount) { + getChildAt(i).measure(widthMeasureSpec, heightMeasureSpec) + } + } + + private fun onScreenChanged() { + // we perform update in `onBeforeLayout` of `ScreensShadowNode` by adding an UIBlock + // which is called after updating children of the ScreenContainer. + // We do it there because `onUpdate` logic requires all changes of children to be already + // made in order to provide proper animation for fragment transition for ScreenStack + // and this in turn makes nested ScreenContainers detach too early and disappear + // before transition if also not dispatched after children updates. + // The exception to this rule is `updateImmediately` which is triggered by actions + // not connected to React view hierarchy changes, but rather internal events + mNeedUpdate = true + (context as? ReactContext)?.runOnUiQueueThread { + // We schedule the update here because LayoutAnimations of `react-native-reanimated` + // sometimes attach/detach screens after the layout block of `ScreensShadowNode` has + // already run, and we want to update the container then too. In the other cases, + // this code will do nothing since it will run after the UIBlock when `mNeedUpdate` + // will already be false. + performUpdates() + } + } + + protected fun performUpdatesNow() { + // we want to update immediately when the fragment manager is set or native back button + // dismiss is dispatched or Screen's activityState changes since it is not connected to React + // view hierarchy changes and will not trigger `onBeforeLayout` method of `ScreensShadowNode` + mNeedUpdate = true + performUpdates() + } + + fun performUpdates() { + if (!mNeedUpdate || !mIsAttached || mFragmentManager == null || mFragmentManager?.isDestroyed == true) { + return + } + mNeedUpdate = false + onUpdate() + notifyContainerUpdate() + } + + open fun onUpdate() { + createTransaction().let { + // detach screens that are no longer active + val orphaned: MutableSet = HashSet( + requireNotNull(mFragmentManager) { + "mFragmentManager is null when performing update in ScreenContainer" + }.fragments + ) + for (screenFragment in mScreenFragments) { + if (getActivityState(screenFragment) === ActivityState.INACTIVE && + screenFragment.isAdded + ) { + detachScreen(it, screenFragment) + } + orphaned.remove(screenFragment) + } + if (orphaned.isNotEmpty()) { + val orphanedAry = orphaned.toTypedArray() + for (fragment in orphanedAry) { + if (fragment is ScreenFragment) { + if (fragment.screen.container == null) { + detachScreen(it, fragment) + } + } + } + } + + // if there is an "onTop" screen it means the transition has ended + val transitioning = topScreen == null + + // attach newly activated screens + var addedBefore = false + val pendingFront: ArrayList = ArrayList() + + for (screenFragment in mScreenFragments) { + val activityState = getActivityState(screenFragment) + if (activityState !== ActivityState.INACTIVE && !screenFragment.isAdded) { + addedBefore = true + attachScreen(it, screenFragment) + } else if (activityState !== ActivityState.INACTIVE && addedBefore) { + // we detach the screen and then reattach it later to make it appear on front + detachScreen(it, screenFragment) + pendingFront.add(screenFragment) + } + screenFragment.screen.setTransitioning(transitioning) + } + + for (screenFragment in pendingFront) { + attachScreen(it, screenFragment) + } + + it.commitNowAllowingStateLoss() + } + } + + protected open fun notifyContainerUpdate() { + topScreen?.fragment?.onContainerUpdate() + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenContainerViewManager.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenContainerViewManager.kt new file mode 100644 index 00000000..4cf0a144 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenContainerViewManager.kt @@ -0,0 +1,40 @@ +package com.swmansion.rnscreens + +import android.view.View +import com.facebook.react.bridge.ReactApplicationContext +import com.facebook.react.module.annotations.ReactModule +import com.facebook.react.uimanager.LayoutShadowNode +import com.facebook.react.uimanager.ThemedReactContext +import com.facebook.react.uimanager.ViewGroupManager + +@ReactModule(name = ScreenContainerViewManager.REACT_CLASS) +class ScreenContainerViewManager : ViewGroupManager>() { + override fun getName(): String = REACT_CLASS + + override fun createViewInstance(reactContext: ThemedReactContext): ScreenContainer = ScreenContainer(reactContext) + + override fun addView(parent: ScreenContainer<*>, child: View, index: Int) { + require(child is Screen) { "Attempt attach child that is not of type RNScreens" } + parent.addScreen(child, index) + } + + override fun removeViewAt(parent: ScreenContainer<*>, index: Int) { + parent.removeScreenAt(index) + } + + override fun removeAllViews(parent: ScreenContainer<*>) { + parent.removeAllScreens() + } + + override fun getChildCount(parent: ScreenContainer<*>): Int = parent.screenCount + + override fun getChildAt(parent: ScreenContainer<*>, index: Int): View = parent.getScreenAt(index) + + override fun createShadowNodeInstance(context: ReactApplicationContext): LayoutShadowNode = ScreensShadowNode(context) + + override fun needsCustomLayoutForChildren(): Boolean = true + + companion object { + const val REACT_CLASS = "RNSScreenContainer" + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenFragment.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenFragment.kt new file mode 100644 index 00000000..f9b1a71b --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenFragment.kt @@ -0,0 +1,323 @@ +package com.swmansion.rnscreens + +import android.annotation.SuppressLint +import android.app.Activity +import android.content.Context +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.view.ViewParent +import android.widget.FrameLayout +import androidx.fragment.app.Fragment +import com.facebook.react.bridge.ReactContext +import com.facebook.react.bridge.UiThreadUtil +import com.facebook.react.uimanager.UIManagerHelper +import com.facebook.react.uimanager.events.Event +import com.facebook.react.uimanager.events.EventDispatcher +import com.swmansion.rnscreens.events.HeaderBackButtonClickedEvent +import com.swmansion.rnscreens.events.ScreenAppearEvent +import com.swmansion.rnscreens.events.ScreenDisappearEvent +import com.swmansion.rnscreens.events.ScreenDismissedEvent +import com.swmansion.rnscreens.events.ScreenTransitionProgressEvent +import com.swmansion.rnscreens.events.ScreenWillAppearEvent +import com.swmansion.rnscreens.events.ScreenWillDisappearEvent +import kotlin.math.max +import kotlin.math.min + +open class ScreenFragment : Fragment { + enum class ScreenLifecycleEvent { + Appear, WillAppear, Disappear, WillDisappear + } + + // if we call empty constructor, there is no screen to be assigned so not sure why it is suggested + @Suppress("JoinDeclarationAndAssignment") + lateinit var screen: Screen + private val mChildScreenContainers: MutableList> = ArrayList() + private var shouldUpdateOnResume = false + // if we don't set it, it will be 0.0f at the beginning so the progress will not be sent + // due to progress value being already 0.0f + private var mProgress = -1f + + // those 2 vars are needed since sometimes the events would be dispatched twice in child containers + // (should only happen if parent has `NONE` animation) and we don't need too complicated logic. + // We just check if, after the event was dispatched, its "counter-event" has been also dispatched before sending the same event again. + // We do it for 'willAppear' -> 'willDisappear' and 'appear' -> 'disappear' + private var canDispatchWillAppear = true + private var canDispatchAppear = true + + // we want to know if we are currently transitioning in order not to fire lifecycle events + // in nested fragments. See more explanation in dispatchViewAnimationEvent + private var isTransitioning = false + + constructor() { + throw IllegalStateException( + "Screen fragments should never be restored. Follow instructions from https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-424704067 to properly configure your main activity." + ) + } + + @SuppressLint("ValidFragment") + constructor(screenView: Screen) : super() { + screen = screenView + } + + override fun onResume() { + super.onResume() + if (shouldUpdateOnResume) { + shouldUpdateOnResume = false + ScreenWindowTraits.trySetWindowTraits(screen, tryGetActivity(), tryGetContext()) + } + } + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + screen.layoutParams = FrameLayout.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT + ) + val wrapper = context?.let { ScreensFrameLayout(it) }?.apply { + addView(recycleView(screen)) + } + return wrapper + } + + private class ScreensFrameLayout( + context: Context, + ) : FrameLayout(context) { + /** + * This method implements a workaround for RN's autoFocus functionality. Because of the way + * autoFocus is implemented it dismisses soft keyboard in fragment transition + * due to change of visibility of the view at the start of the transition. Here we override the + * call to `clearFocus` when the visibility of view is `INVISIBLE` since `clearFocus` triggers the + * hiding of the keyboard in `ReactEditText.java`. + */ + override fun clearFocus() { + if (visibility != INVISIBLE) { + super.clearFocus() + } + } + } + + open fun onContainerUpdate() { + updateWindowTraits() + } + + private fun updateWindowTraits() { + val activity: Activity? = activity + if (activity == null) { + shouldUpdateOnResume = true + return + } + ScreenWindowTraits.trySetWindowTraits(screen, activity, tryGetContext()) + } + + fun tryGetActivity(): Activity? { + activity?.let { return it } + val context = screen.context + if (context is ReactContext && context.currentActivity != null) { + return context.currentActivity + } + var parent: ViewParent? = screen.container + while (parent != null) { + if (parent is Screen) { + val fragment = parent.fragment + fragment?.activity?.let { return it } + } + parent = parent.parent + } + return null + } + + fun tryGetContext(): ReactContext? { + if (context is ReactContext) { + return context as ReactContext + } + if (screen.context is ReactContext) { + return screen.context as ReactContext + } + var parent: ViewParent? = screen.container + while (parent != null) { + if (parent is Screen) { + if (parent.context is ReactContext) { + return parent.context as ReactContext + } + } + parent = parent.parent + } + return null + } + + val childScreenContainers: List> + get() = mChildScreenContainers + + private fun canDispatchEvent(event: ScreenLifecycleEvent): Boolean = when (event) { + ScreenLifecycleEvent.WillAppear -> canDispatchWillAppear + ScreenLifecycleEvent.Appear -> canDispatchAppear + ScreenLifecycleEvent.WillDisappear -> !canDispatchWillAppear + ScreenLifecycleEvent.Disappear -> !canDispatchAppear + } + + private fun setLastEventDispatched(event: ScreenLifecycleEvent) { + when (event) { + ScreenLifecycleEvent.WillAppear -> canDispatchWillAppear = false + ScreenLifecycleEvent.Appear -> canDispatchAppear = false + ScreenLifecycleEvent.WillDisappear -> canDispatchWillAppear = true + ScreenLifecycleEvent.Disappear -> canDispatchAppear = true + } + } + + private fun dispatchOnWillAppear() { + dispatchEvent(ScreenLifecycleEvent.WillAppear, this) + dispatchTransitionProgress(0.0f, false) + } + + private fun dispatchOnAppear() { + dispatchEvent(ScreenLifecycleEvent.Appear, this) + dispatchTransitionProgress(1.0f, false) + } + + private fun dispatchOnWillDisappear() { + dispatchEvent(ScreenLifecycleEvent.WillDisappear, this) + dispatchTransitionProgress(0.0f, true) + } + + private fun dispatchOnDisappear() { + dispatchEvent(ScreenLifecycleEvent.Disappear, this) + dispatchTransitionProgress(1.0f, true) + } + + private fun dispatchEvent(event: ScreenLifecycleEvent, fragment: ScreenFragment) { + if (fragment is ScreenStackFragment && fragment.canDispatchEvent(event)) { + fragment.screen.let { + fragment.setLastEventDispatched(event) + val lifecycleEvent: Event<*> = when (event) { + ScreenLifecycleEvent.WillAppear -> ScreenWillAppearEvent(it.id) + ScreenLifecycleEvent.Appear -> ScreenAppearEvent(it.id) + ScreenLifecycleEvent.WillDisappear -> ScreenWillDisappearEvent(it.id) + ScreenLifecycleEvent.Disappear -> ScreenDisappearEvent(it.id) + } + val screenContext = screen.context as ReactContext + val eventDispatcher: EventDispatcher? = + UIManagerHelper.getEventDispatcherForReactTag(screenContext, screen.id) + eventDispatcher?.dispatchEvent(lifecycleEvent) + fragment.dispatchEventInChildContainers(event) + } + } + } + + private fun dispatchEventInChildContainers(event: ScreenLifecycleEvent) { + mChildScreenContainers.filter { it.screenCount > 0 }.forEach { + it.topScreen?.fragment?.let { fragment -> dispatchEvent(event, fragment) } + } + } + + fun dispatchHeaderBackButtonClickedEvent() { + val screenContext = screen.context as ReactContext + UIManagerHelper + .getEventDispatcherForReactTag(screenContext, screen.id) + ?.dispatchEvent(HeaderBackButtonClickedEvent(screen.id)) + } + + fun dispatchTransitionProgress(alpha: Float, closing: Boolean) { + if (this is ScreenStackFragment) { + if (mProgress != alpha) { + mProgress = max(0.0f, min(1.0f, alpha)) + /* We want value of 0 and 1 to be always dispatched so we base coalescing key on the progress: + - progress is 0 -> key 1 + - progress is 1 -> key 2 + - progress is between 0 and 1 -> key 3 + */ + val coalescingKey = (if (mProgress == 0.0f) 1 else if (mProgress == 1.0f) 2 else 3).toShort() + val container: ScreenContainer<*>? = screen.container + val goingForward = if (container is ScreenStack) container.goingForward else false + val screenContext = screen.context as ReactContext + UIManagerHelper + .getEventDispatcherForReactTag(screenContext, screen.id) + ?.dispatchEvent( + ScreenTransitionProgressEvent( + screen.id, mProgress, closing, goingForward, coalescingKey + ) + ) + } + } + } + + fun registerChildScreenContainer(screenContainer: ScreenContainer<*>) { + mChildScreenContainers.add(screenContainer) + } + + fun unregisterChildScreenContainer(screenContainer: ScreenContainer<*>) { + mChildScreenContainers.remove(screenContainer) + } + + fun onViewAnimationStart() { + dispatchViewAnimationEvent(false) + } + + open fun onViewAnimationEnd() { + dispatchViewAnimationEvent(true) + } + + private fun dispatchViewAnimationEvent(animationEnd: Boolean) { + isTransitioning = !animationEnd + // if parent fragment is transitioning, we do not want the events dispatched from the child, + // since we subscribe to parent's animation start/end and dispatch events in child from there + // check for `isTransitioning` should be enough since the child's animation should take only + // 20ms due to always being `StackAnimation.NONE` when nested stack being pushed + val parent = parentFragment + if (parent == null || (parent is ScreenFragment && !parent.isTransitioning)) { + // onViewAnimationStart/End is triggered from View#onAnimationStart/End method of the fragment's root + // view. We override an appropriate method of the StackFragment's + // root view in order to achieve this. + if (isResumed) { + // Android dispatches the animation start event for the fragment that is being added first + // however we want the one being dismissed first to match iOS. It also makes more sense from + // a navigation point of view to have the disappear event first. + // Since there are no explicit relationships between the fragment being added / removed the + // practical way to fix this is delaying dispatching the appear events at the end of the + // frame. + UiThreadUtil.runOnUiThread { + if (animationEnd) dispatchOnAppear() else dispatchOnWillAppear() + } + } else { + if (animationEnd) dispatchOnDisappear() else dispatchOnWillDisappear() + } + } + } + + override fun onDestroy() { + super.onDestroy() + val container = screen.container + if (container == null || !container.hasScreen(this)) { + // we only send dismissed even when the screen has been removed from its container + val screenContext = screen.context + if (screenContext is ReactContext) { + UIManagerHelper + .getEventDispatcherForReactTag(screenContext, screen.id) + ?.dispatchEvent(ScreenDismissedEvent(screen.id)) + } + } + mChildScreenContainers.clear() + } + + companion object { + @JvmStatic + protected fun recycleView(view: View): View { + // screen fragments reuse view instances instead of creating new ones. In order to reuse a given + // view it needs to be detached from the view hierarchy to allow the fragment to attach it back. + val parent = view.parent + if (parent != null) { + (parent as ViewGroup).endViewTransition(view) + parent.removeView(view) + } + + // view detached from fragment manager get their visibility changed to GONE after their state is + // dumped. Since we don't restore the state but want to reuse the view we need to change + // visibility back to VISIBLE in order for the fragment manager to animate in the view. + view.visibility = View.VISIBLE + return view + } + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt new file mode 100644 index 00000000..34aed795 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt @@ -0,0 +1,334 @@ +package com.swmansion.rnscreens + +import android.content.Context +import android.graphics.Canvas +import android.view.View +import com.facebook.react.bridge.ReactContext +import com.facebook.react.uimanager.UIManagerHelper +import com.swmansion.rnscreens.Screen.StackAnimation +import com.swmansion.rnscreens.events.StackFinishTransitioningEvent +import java.util.Collections +import kotlin.collections.ArrayList +import kotlin.collections.HashSet + +class ScreenStack(context: Context?) : ScreenContainer(context) { + private val mStack = ArrayList() + private val mDismissed: MutableSet = HashSet() + private val drawingOpPool: MutableList = ArrayList() + private var drawingOps: MutableList = ArrayList() + private var mTopScreen: ScreenStackFragment? = null + private var mRemovalTransitionStarted = false + private var isDetachingCurrentScreen = false + private var reverseLastTwoChildren = false + private var previousChildrenCount = 0 + var goingForward = false + + fun dismiss(screenFragment: ScreenStackFragment) { + mDismissed.add(screenFragment) + performUpdatesNow() + } + + override val topScreen: Screen? + get() = mTopScreen?.screen + + val rootScreen: Screen + get() { + for (i in 0 until screenCount) { + val screen = getScreenAt(i) + if (!mDismissed.contains(screen.fragment)) { + return screen + } + } + throw IllegalStateException("Stack has no root screen set") + } + + override fun adapt(screen: Screen) = ScreenStackFragment(screen) + + override fun startViewTransition(view: View) { + super.startViewTransition(view) + mRemovalTransitionStarted = true + } + + override fun endViewTransition(view: View) { + super.endViewTransition(view) + if (mRemovalTransitionStarted) { + mRemovalTransitionStarted = false + dispatchOnFinishTransitioning() + } + } + + fun onViewAppearTransitionEnd() { + if (!mRemovalTransitionStarted) { + dispatchOnFinishTransitioning() + } + } + + private fun dispatchOnFinishTransitioning() { + UIManagerHelper + .getEventDispatcherForReactTag((context as ReactContext), id) + ?.dispatchEvent(StackFinishTransitioningEvent(id)) + } + + override fun removeScreenAt(index: Int) { + mDismissed.remove(getScreenAt(index).fragment) + super.removeScreenAt(index) + } + + override fun removeAllScreens() { + mDismissed.clear() + super.removeAllScreens() + } + + override fun hasScreen(screenFragment: ScreenFragment?): Boolean = + super.hasScreen(screenFragment) && !mDismissed.contains(screenFragment) + + override fun onUpdate() { + // When going back from a nested stack with a single screen on it, we may hit an edge case + // when all screens are dismissed and no screen is to be displayed on top. We need to gracefully + // handle the case of newTop being NULL, which happens in several places below + var newTop: ScreenStackFragment? = null // newTop is nullable, see the above comment ^ + var visibleBottom: ScreenStackFragment? = null // this is only set if newTop has TRANSPARENT_MODAL presentation mode + isDetachingCurrentScreen = false // we reset it so the previous value is not used by mistake + for (i in mScreenFragments.indices.reversed()) { + val screen = mScreenFragments[i] + if (!mDismissed.contains(screen)) { + if (newTop == null) { + newTop = screen + } else { + visibleBottom = screen + } + if (!isTransparent(screen)) { + break + } + } + } + var shouldUseOpenAnimation = true + var stackAnimation: StackAnimation? = null + if (!mStack.contains(newTop)) { + // if new top screen wasn't on stack we do "open animation" so long it is not the very first + // screen on stack + if (mTopScreen != null && newTop != null) { + // there was some other screen attached before + // if the previous top screen does not exist anymore and the new top was not on the stack + // before, probably replace or reset was called, so we play the "close animation". + // Otherwise it's open animation + val containsTopScreen = mTopScreen?.let { mScreenFragments.contains(it) } == true + val isPushReplace = newTop.screen.replaceAnimation === Screen.ReplaceAnimation.PUSH + shouldUseOpenAnimation = containsTopScreen || isPushReplace + // if the replace animation is `push`, the new top screen provides the animation, otherwise the previous one + stackAnimation = if (shouldUseOpenAnimation) newTop.screen.stackAnimation else mTopScreen?.screen?.stackAnimation + } else if (mTopScreen == null && newTop != null) { + // mTopScreen was not present before so newTop is the first screen added to a stack + // and we don't want the animation when it is entering + stackAnimation = StackAnimation.NONE + goingForward = true + } + } else if (mTopScreen != null && mTopScreen != newTop) { + // otherwise if we are performing top screen change we do "close animation" + shouldUseOpenAnimation = false + stackAnimation = mTopScreen?.screen?.stackAnimation + } + + createTransaction().let { + // animation logic start + if (stackAnimation != null) { + if (shouldUseOpenAnimation) { + when (stackAnimation) { + StackAnimation.DEFAULT -> it.setCustomAnimations(R.anim.rns_default_enter_in, R.anim.rns_default_enter_out) + StackAnimation.NONE -> it.setCustomAnimations(R.anim.rns_no_animation_20, R.anim.rns_no_animation_20) + StackAnimation.FADE -> it.setCustomAnimations(R.anim.rns_fade_in, R.anim.rns_fade_out) + StackAnimation.SLIDE_FROM_RIGHT -> it.setCustomAnimations(R.anim.rns_slide_in_from_right, R.anim.rns_slide_out_to_left) + StackAnimation.SLIDE_FROM_LEFT -> it.setCustomAnimations(R.anim.rns_slide_in_from_left, R.anim.rns_slide_out_to_right) + StackAnimation.SLIDE_FROM_BOTTOM -> it.setCustomAnimations( + R.anim.rns_slide_in_from_bottom, R.anim.rns_no_animation_medium + ) + StackAnimation.FADE_FROM_BOTTOM -> it.setCustomAnimations(R.anim.rns_fade_from_bottom, R.anim.rns_no_animation_350) + } + } else { + when (stackAnimation) { + StackAnimation.DEFAULT -> it.setCustomAnimations(R.anim.rns_default_exit_in, R.anim.rns_default_exit_out) + StackAnimation.NONE -> it.setCustomAnimations(R.anim.rns_no_animation_20, R.anim.rns_no_animation_20) + StackAnimation.FADE -> it.setCustomAnimations(R.anim.rns_fade_in, R.anim.rns_fade_out) + StackAnimation.SLIDE_FROM_RIGHT -> it.setCustomAnimations(R.anim.rns_slide_in_from_left, R.anim.rns_slide_out_to_right) + StackAnimation.SLIDE_FROM_LEFT -> it.setCustomAnimations(R.anim.rns_slide_in_from_right, R.anim.rns_slide_out_to_left) + StackAnimation.SLIDE_FROM_BOTTOM -> it.setCustomAnimations( + R.anim.rns_no_animation_medium, R.anim.rns_slide_out_to_bottom + ) + StackAnimation.FADE_FROM_BOTTOM -> it.setCustomAnimations(R.anim.rns_no_animation_250, R.anim.rns_fade_to_bottom) + } + } + } + + // animation logic end + goingForward = shouldUseOpenAnimation + + if (shouldUseOpenAnimation && + newTop != null && needsDrawReordering(newTop) && + visibleBottom == null + ) { + // When using an open animation in which two screens overlap (eg. fade_from_bottom or + // slide_from_bottom), we want to draw the previous screen under the new one, + // which is apparently not the default option. Android always draws the disappearing view + // on top of the appearing one. We then reverse the order of the views so the new screen + // appears on top of the previous one. You can read more about in the comment + // for the code we use to change that behavior: + // https://github.com/airbnb/native-navigation/blob/9cf50bf9b751b40778f473f3b19fcfe2c4d40599/lib/android/src/main/java/com/airbnb/android/react/navigation/ScreenCoordinatorLayout.java#L18 + isDetachingCurrentScreen = true + } + + // remove all screens previously on stack + for (screen in mStack) { + if (!mScreenFragments.contains(screen) || mDismissed.contains(screen)) { + it.remove(screen) + } + } + for (screen in mScreenFragments) { + // Stop detaching screens when reaching visible bottom. All screens above bottom should be + // visible. + if (screen === visibleBottom) { + break + } + // detach all screens that should not be visible + if (screen !== newTop && !mDismissed.contains(screen)) { + it.remove(screen) + } + } + + // attach screens that just became visible + if (visibleBottom != null && !visibleBottom.isAdded) { + val top = newTop + var beneathVisibleBottom = true + for (screen in mScreenFragments) { + // ignore all screens beneath the visible bottom + if (beneathVisibleBottom) { + beneathVisibleBottom = if (screen === visibleBottom) { + false + } else continue + } + // when first visible screen found, make all screens after that visible + it.add(id, screen).runOnCommit { top?.screen?.bringToFront() } + } + } else if (newTop != null && !newTop.isAdded) { + it.add(id, newTop) + } + mTopScreen = newTop + mStack.clear() + mStack.addAll(mScreenFragments) + + turnOffA11yUnderTransparentScreen(visibleBottom) + + it.commitNowAllowingStateLoss() + } + } + + // only top visible screen should be accessible + private fun turnOffA11yUnderTransparentScreen(visibleBottom: ScreenStackFragment?) { + if (mScreenFragments.size > 1 && visibleBottom != null) { + mTopScreen?.let { + if (isTransparent(it)) { + val screenFragmentsBeneathTop = mScreenFragments.slice(0 until mScreenFragments.size - 1).asReversed() + // go from the top of the stack excluding the top screen + for (screenFragment in screenFragmentsBeneathTop) { + screenFragment.screen.changeAccessibilityMode(IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS) + + // don't change a11y below non-transparent screens + if (screenFragment == visibleBottom) { + break + } + } + } + } + } + + topScreen?.changeAccessibilityMode(IMPORTANT_FOR_ACCESSIBILITY_AUTO) + } + + override fun notifyContainerUpdate() { + mStack.forEach { it.onContainerUpdate() } + } + + // below methods are taken from + // https://github.com/airbnb/native-navigation/blob/9cf50bf9b751b40778f473f3b19fcfe2c4d40599/lib/android/src/main/java/com/airbnb/android/react/navigation/ScreenCoordinatorLayout.java#L43 + // and are used to swap the order of drawing views when navigating forward with the transitions + // that are making transitioning fragments appear one on another. See more info in the comment to + // the linked class. + override fun removeView(view: View) { + // we set this property to reverse the order of drawing views + // when we want to push new fragment on top of the previous one and their animations collide. + // More information in: + // https://github.com/airbnb/native-navigation/blob/9cf50bf9b751b40778f473f3b19fcfe2c4d40599/lib/android/src/main/java/com/airbnb/android/react/navigation/ScreenCoordinatorLayout.java#L17 + if (isDetachingCurrentScreen) { + isDetachingCurrentScreen = false + reverseLastTwoChildren = true + } + super.removeView(view) + } + + private fun drawAndRelease() { + // We make a copy of the drawingOps and use it to dispatch draws in order to be sure + // that we do not modify the original list. There are cases when `op.draw` can call + // `drawChild` which would modify the list through which we are iterating. See more: + // https://github.com/software-mansion/react-native-screens/pull/1406 + val drawingOpsCopy = drawingOps + drawingOps = ArrayList() + for (op in drawingOpsCopy) { + op.draw() + drawingOpPool.add(op) + } + } + + override fun dispatchDraw(canvas: Canvas) { + super.dispatchDraw(canvas) + + // check the view removal is completed (by comparing the previous children count) + if (drawingOps.size < previousChildrenCount) { + reverseLastTwoChildren = false + } + previousChildrenCount = drawingOps.size + if (reverseLastTwoChildren && drawingOps.size >= 2) { + Collections.swap(drawingOps, drawingOps.size - 1, drawingOps.size - 2) + } + drawAndRelease() + } + + override fun drawChild(canvas: Canvas, child: View, drawingTime: Long): Boolean { + drawingOps.add(obtainDrawingOp().set(canvas, child, drawingTime)) + return true + } + + private fun performDraw(op: DrawingOp) { + super.drawChild(op.canvas, op.child, op.drawingTime) + } + + private fun obtainDrawingOp(): DrawingOp = + if (drawingOpPool.isEmpty()) DrawingOp() else drawingOpPool.removeAt(drawingOpPool.size - 1) + + private inner class DrawingOp { + var canvas: Canvas? = null + var child: View? = null + var drawingTime: Long = 0 + + operator fun set(canvas: Canvas?, child: View?, drawingTime: Long): DrawingOp { + this.canvas = canvas + this.child = child + this.drawingTime = drawingTime + return this + } + + fun draw() { + performDraw(this) + canvas = null + child = null + drawingTime = 0 + } + } + + companion object { + private fun isTransparent(fragment: ScreenStackFragment): Boolean = + fragment.screen.stackPresentation === Screen.StackPresentation.TRANSPARENT_MODAL + + private fun needsDrawReordering(fragment: ScreenStackFragment): Boolean = + fragment.screen.stackAnimation === StackAnimation.SLIDE_FROM_BOTTOM || + fragment.screen.stackAnimation === StackAnimation.FADE_FROM_BOTTOM + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt new file mode 100644 index 00000000..86a76548 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt @@ -0,0 +1,257 @@ +package com.swmansion.rnscreens + +import android.annotation.SuppressLint +import android.content.Context +import android.graphics.Color +import android.os.Bundle +import android.view.LayoutInflater +import android.view.Menu +import android.view.MenuInflater +import android.view.MenuItem +import android.view.View +import android.view.ViewGroup +import android.view.animation.Animation +import android.view.animation.AnimationSet +import android.view.animation.Transformation +import android.widget.LinearLayout +import androidx.appcompat.widget.Toolbar +import androidx.coordinatorlayout.widget.CoordinatorLayout +import com.facebook.react.uimanager.PixelUtil +import com.google.android.material.appbar.AppBarLayout +import com.google.android.material.appbar.AppBarLayout.ScrollingViewBehavior + +class ScreenStackFragment : ScreenFragment { + private var mAppBarLayout: AppBarLayout? = null + private var mToolbar: Toolbar? = null + private var mShadowHidden = false + private var mIsTranslucent = false + + var searchView: CustomSearchView? = null + var onSearchViewCreate: ((searchView: CustomSearchView) -> Unit)? = null + + @SuppressLint("ValidFragment") + constructor(screenView: Screen) : super(screenView) + + constructor() { + throw IllegalStateException( + "ScreenStack fragments should never be restored. Follow instructions from https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-424704067 to properly configure your main activity." + ) + } + + fun removeToolbar() { + mAppBarLayout?.let { + mToolbar?.let { toolbar -> + if (toolbar.parent === it) { + it.removeView(toolbar) + } + } + } + mToolbar = null + } + + fun setToolbar(toolbar: Toolbar) { + mAppBarLayout?.addView(toolbar) + toolbar.layoutParams = AppBarLayout.LayoutParams( + AppBarLayout.LayoutParams.MATCH_PARENT, AppBarLayout.LayoutParams.WRAP_CONTENT + ).apply { scrollFlags = 0 } + mToolbar = toolbar + } + + fun setToolbarShadowHidden(hidden: Boolean) { + if (mShadowHidden != hidden) { + mAppBarLayout?.targetElevation = if (hidden) 0f else PixelUtil.toPixelFromDIP(4f) + mShadowHidden = hidden + } + } + + fun setToolbarTranslucent(translucent: Boolean) { + if (mIsTranslucent != translucent) { + val params = screen.layoutParams + (params as CoordinatorLayout.LayoutParams).behavior = + if (translucent) null else ScrollingViewBehavior() + mIsTranslucent = translucent + } + } + + override fun onContainerUpdate() { + screen.headerConfig?.onUpdate() + } + + override fun onViewAnimationEnd() { + super.onViewAnimationEnd() + notifyViewAppearTransitionEnd() + } + + private fun notifyViewAppearTransitionEnd() { + val screenStack = view?.parent + if (screenStack is ScreenStack) { + screenStack.onViewAppearTransitionEnd() + } + } + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + val view: ScreensCoordinatorLayout? = + context?.let { ScreensCoordinatorLayout(it, this) } + + screen.layoutParams = CoordinatorLayout.LayoutParams( + LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT + ).apply { behavior = if (mIsTranslucent) null else ScrollingViewBehavior() } + + view?.addView(recycleView(screen)) + + mAppBarLayout = context?.let { AppBarLayout(it) }?.apply { + // By default AppBarLayout will have a background color set but since we cover the whole layout + // with toolbar (that can be semi-transparent) the bar layout background color does not pay a + // role. On top of that it breaks screens animations when alfa offscreen compositing is off + // (which is the default) + setBackgroundColor(Color.TRANSPARENT) + layoutParams = AppBarLayout.LayoutParams( + AppBarLayout.LayoutParams.MATCH_PARENT, AppBarLayout.LayoutParams.WRAP_CONTENT + ) + } + + view?.addView(mAppBarLayout) + if (mShadowHidden) { + mAppBarLayout?.targetElevation = 0f + } + mToolbar?.let { mAppBarLayout?.addView(recycleView(it)) } + setHasOptionsMenu(true) + return view + } + + override fun onPrepareOptionsMenu(menu: Menu) { + updateToolbarMenu(menu) + return super.onPrepareOptionsMenu(menu) + } + + override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { + updateToolbarMenu(menu) + return super.onCreateOptionsMenu(menu, inflater) + } + + private fun shouldShowSearchBar(): Boolean { + val config = screen.headerConfig + val numberOfSubViews = config?.configSubviewsCount ?: 0 + if (config != null && numberOfSubViews > 0) { + for (i in 0 until numberOfSubViews) { + val subView = config.getConfigSubview(i) + if (subView.type == ScreenStackHeaderSubview.Type.SEARCH_BAR) { + return true + } + } + } + return false + } + + private fun updateToolbarMenu(menu: Menu) { + menu.clear() + if (shouldShowSearchBar()) { + val currentContext = context + if (searchView == null && currentContext != null) { + val newSearchView = CustomSearchView(currentContext, this) + searchView = newSearchView + onSearchViewCreate?.invoke(newSearchView) + } + menu.add("").apply { + setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS) + actionView = searchView + } + } + } + + fun canNavigateBack(): Boolean { + val container: ScreenContainer<*>? = screen.container + check(container is ScreenStack) { "ScreenStackFragment added into a non-stack container" } + return if (container.rootScreen == screen) { + // this screen is the root of the container, if it is nested we can check parent container + // if it is also a root or not + val parentFragment = parentFragment + if (parentFragment is ScreenStackFragment) { + parentFragment.canNavigateBack() + } else { + false + } + } else { + true + } + } + + fun dismiss() { + val container: ScreenContainer<*>? = screen.container + check(container is ScreenStack) { "ScreenStackFragment added into a non-stack container" } + container.dismiss(this) + } + + private class ScreensCoordinatorLayout( + context: Context, + private val mFragment: ScreenFragment + ) : CoordinatorLayout(context) { + private val mAnimationListener: Animation.AnimationListener = + object : Animation.AnimationListener { + override fun onAnimationStart(animation: Animation) { + mFragment.onViewAnimationStart() + } + + override fun onAnimationEnd(animation: Animation) { + mFragment.onViewAnimationEnd() + } + + override fun onAnimationRepeat(animation: Animation) {} + } + + override fun startAnimation(animation: Animation) { + // For some reason View##onAnimationEnd doesn't get called for + // exit transitions so we explicitly attach animation listener. + // We also have some animations that are an AnimationSet, so we don't wrap them + // in another set since it causes some visual glitches when going forward. + // We also set the listener only when going forward, since when going back, + // there is already a listener for dismiss action added, which would be overridden + // and also this is not necessary when going back since the lifecycle methods + // are correctly dispatched then. + // We also add fakeAnimation to the set of animations, which sends the progress of animation + val fakeAnimation = ScreensAnimation(mFragment).apply { duration = animation.duration } + + if (animation is AnimationSet && !mFragment.isRemoving) { + animation.apply { + addAnimation(fakeAnimation) + setAnimationListener(mAnimationListener) + }.also { + super.startAnimation(it) + } + } else { + AnimationSet(true).apply { + addAnimation(animation) + addAnimation(fakeAnimation) + setAnimationListener(mAnimationListener) + }.also { + super.startAnimation(it) + } + } + } + + /** + * This method implements a workaround for RN's autoFocus functionality. Because of the way + * autoFocus is implemented it dismisses soft keyboard in fragment transition + * due to change of visibility of the view at the start of the transition. Here we override the + * call to `clearFocus` when the visibility of view is `INVISIBLE` since `clearFocus` triggers the + * hiding of the keyboard in `ReactEditText.java`. + */ + override fun clearFocus() { + if (visibility != INVISIBLE) { + super.clearFocus() + } + } + } + + private class ScreensAnimation(private val mFragment: ScreenFragment) : Animation() { + override fun applyTransformation(interpolatedTime: Float, t: Transformation) { + super.applyTransformation(interpolatedTime, t) + // interpolated time should be the progress of the current transition + mFragment.dispatchTransitionProgress(interpolatedTime, !mFragment.isResumed) + } + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt new file mode 100644 index 00000000..aa4c27c0 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt @@ -0,0 +1,398 @@ +package com.swmansion.rnscreens + +import android.content.Context +import android.graphics.PorterDuff +import android.os.Build +import android.text.TextUtils +import android.util.TypedValue +import android.view.Gravity +import android.view.View.OnClickListener +import android.view.ViewGroup +import android.widget.ImageView +import android.widget.TextView +import androidx.appcompat.app.AppCompatActivity +import androidx.appcompat.widget.Toolbar +import androidx.fragment.app.Fragment +import com.facebook.react.ReactApplication +import com.facebook.react.bridge.JSApplicationIllegalArgumentException +import com.facebook.react.bridge.ReactContext +import com.facebook.react.bridge.WritableMap +import com.facebook.react.uimanager.events.RCTEventEmitter +import com.facebook.react.views.text.ReactTypefaceUtils + +class ScreenStackHeaderConfig(context: Context) : ViewGroup(context) { + private val mConfigSubviews = ArrayList(3) + val toolbar: CustomToolbar + private var headerTopInset: Int? = null + private var mTitle: String? = null + private var mTitleColor = 0 + private var mTitleFontFamily: String? = null + private var mDirection: String? = null + private var mTitleFontSize = 0f + private var mTitleFontWeight = 0 + private var mBackgroundColor: Int? = null + private var mIsHidden = false + private var mIsBackButtonHidden = false + private var mIsShadowHidden = false + private var mDestroyed = false + private var mBackButtonInCustomView = false + private var mIsTopInsetEnabled = true + private var mIsTranslucent = false + private var mTintColor = 0 + private var mIsAttachedToWindow = false + private val mDefaultStartInset: Int + private val mDefaultStartInsetWithNavigation: Int + private val mBackClickListener = OnClickListener { + screenFragment?.let { + val stack = screenStack + if (stack != null && stack.rootScreen == it.screen) { + val parentFragment = it.parentFragment + if (parentFragment is ScreenStackFragment) { + if (parentFragment.screen.nativeBackButtonDismissalEnabled) { + parentFragment.dismiss() + } else { + parentFragment.dispatchHeaderBackButtonClickedEvent() + } + } + } else { + if (it.screen.nativeBackButtonDismissalEnabled) { + it.dismiss() + } else { + it.dispatchHeaderBackButtonClickedEvent() + } + } + } + } + + private fun sendEvent(eventName: String, eventContent: WritableMap?) { + (context as ReactContext).getJSModule(RCTEventEmitter::class.java) + ?.receiveEvent(id, eventName, eventContent) + } + + override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) { + // no-op + } + + fun destroy() { + mDestroyed = true + } + + override fun onAttachedToWindow() { + super.onAttachedToWindow() + mIsAttachedToWindow = true + sendEvent("onAttached", null) + // we want to save the top inset before the status bar can be hidden, which would resolve in + // inset being 0 + if (headerTopInset == null) { + headerTopInset = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) + rootWindowInsets.systemWindowInsetTop + else + // Hacky fallback for old android. Before Marshmallow, the status bar height was always 25 + (25 * resources.displayMetrics.density).toInt() + } + onUpdate() + } + + override fun onDetachedFromWindow() { + super.onDetachedFromWindow() + mIsAttachedToWindow = false + sendEvent("onDetached", null) + } + + private val screen: Screen? + get() = parent as? Screen + private val screenStack: ScreenStack? + get() = screen?.container as? ScreenStack + val screenFragment: ScreenStackFragment? + get() { + val screen = parent + if (screen is Screen) { + val fragment: Fragment? = screen.fragment + if (fragment is ScreenStackFragment) { + return fragment + } + } + return null + } + + fun onUpdate() { + val stack = screenStack + val isTop = stack == null || stack.topScreen == parent + + if (!mIsAttachedToWindow || !isTop || mDestroyed) { + return + } + + val activity = screenFragment?.activity as AppCompatActivity? ?: return + if (mDirection != null) { + if (mDirection == "rtl") { + toolbar.layoutDirection = LAYOUT_DIRECTION_RTL + } else if (mDirection == "ltr") { + toolbar.layoutDirection = LAYOUT_DIRECTION_LTR + } + } + + // orientation and status bar management + screen?.let { + // we set the traits here too, not only when the prop for Screen is passed + // because sometimes we don't have the Fragment and Activity available then yet, e.g. on the + // first setting of props. Similar thing is done for Screens of ScreenContainers, but in + // `onContainerUpdate` of their Fragment + val reactContext = if (context is ReactContext) { + context as ReactContext + } else { + it.fragment?.tryGetContext() + } + ScreenWindowTraits.trySetWindowTraits(it, activity, reactContext) + } + + if (mIsHidden) { + if (toolbar.parent != null) { + screenFragment?.removeToolbar() + } + return + } + + if (toolbar.parent == null) { + screenFragment?.setToolbar(toolbar) + } + + if (mIsTopInsetEnabled) { + headerTopInset.let { + toolbar.setPadding(0, it ?: 0, 0, 0) + } + } else { + if (toolbar.paddingTop > 0) { + toolbar.setPadding(0, 0, 0, 0) + } + } + + activity.setSupportActionBar(toolbar) + // non-null toolbar is set in the line above and it is used here + val actionBar = requireNotNull(activity.supportActionBar) + + // Reset toolbar insets. By default we set symmetric inset for start and end to match iOS + // implementation where both right and left icons are offset from the edge by default. We also + // reset startWithNavigation inset which corresponds to the distance between navigation icon and + // title. If title isn't set we clear that value few lines below to give more space to custom + // center-mounted views. + toolbar.contentInsetStartWithNavigation = mDefaultStartInsetWithNavigation + toolbar.setContentInsetsRelative(mDefaultStartInset, mDefaultStartInset) + + // hide back button + actionBar.setDisplayHomeAsUpEnabled( + screenFragment?.canNavigateBack() == true && !mIsBackButtonHidden + ) + + // when setSupportActionBar is called a toolbar wrapper gets initialized that overwrites + // navigation click listener. The default behavior set in the wrapper is to call into + // menu options handlers, but we prefer the back handling logic to stay here instead. + toolbar.setNavigationOnClickListener(mBackClickListener) + + // shadow + screenFragment?.setToolbarShadowHidden(mIsShadowHidden) + + // translucent + screenFragment?.setToolbarTranslucent(mIsTranslucent) + + // title + actionBar.title = mTitle + if (TextUtils.isEmpty(mTitle)) { + // if title is empty we set start navigation inset to 0 to give more space to custom rendered + // views. When it is set to default it'd take up additional distance from the back button + // which would impact the position of custom header views rendered at the center. + toolbar.contentInsetStartWithNavigation = 0 + } + + val titleTextView = titleTextView + if (mTitleColor != 0) { + toolbar.setTitleTextColor(mTitleColor) + } + + if (titleTextView != null) { + if (mTitleFontFamily != null || mTitleFontWeight > 0) { + val titleTypeface = ReactTypefaceUtils.applyStyles( + null, 0, mTitleFontWeight, mTitleFontFamily, context.assets + ) + titleTextView.typeface = titleTypeface + } + if (mTitleFontSize > 0) { + titleTextView.textSize = mTitleFontSize + } + } + + // background + mBackgroundColor?.let { toolbar.setBackgroundColor(it) } + + // color + if (mTintColor != 0) { + toolbar.navigationIcon?.setColorFilter(mTintColor, PorterDuff.Mode.SRC_ATOP) + } + + // subviews + for (i in toolbar.childCount - 1 downTo 0) { + if (toolbar.getChildAt(i) is ScreenStackHeaderSubview) { + toolbar.removeViewAt(i) + } + } + + var i = 0 + val size = mConfigSubviews.size + while (i < size) { + val view = mConfigSubviews[i] + val type = view.type + if (type === ScreenStackHeaderSubview.Type.BACK) { + // we special case BACK button header config type as we don't add it as a view into toolbar + // but instead just copy the drawable from imageview that's added as a first child to it. + val firstChild = view.getChildAt(0) as? ImageView + ?: throw JSApplicationIllegalArgumentException( + "Back button header config view should have Image as first child" + ) + actionBar.setHomeAsUpIndicator(firstChild.drawable) + i++ + continue + } + val params = Toolbar.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT) + when (type) { + ScreenStackHeaderSubview.Type.LEFT -> { + // when there is a left item we need to disable navigation icon by default + // we also hide title as there is no other way to display left side items + if (!mBackButtonInCustomView) { + toolbar.navigationIcon = null + } + toolbar.title = null + params.gravity = Gravity.START + } + ScreenStackHeaderSubview.Type.RIGHT -> params.gravity = Gravity.END + ScreenStackHeaderSubview.Type.CENTER -> { + params.width = LayoutParams.MATCH_PARENT + params.gravity = Gravity.CENTER_HORIZONTAL + toolbar.title = null + } + else -> {} + } + view.layoutParams = params + toolbar.addView(view) + i++ + } + } + + private fun maybeUpdate() { + if (parent != null && !mDestroyed) { + onUpdate() + } + } + + fun getConfigSubview(index: Int): ScreenStackHeaderSubview = mConfigSubviews[index] + + val configSubviewsCount: Int + get() = mConfigSubviews.size + + fun removeConfigSubview(index: Int) { + mConfigSubviews.removeAt(index) + maybeUpdate() + } + + fun removeAllConfigSubviews() { + mConfigSubviews.clear() + maybeUpdate() + } + + fun addConfigSubview(child: ScreenStackHeaderSubview, index: Int) { + mConfigSubviews.add(index, child) + maybeUpdate() + } + + private val titleTextView: TextView? + get() { + for (i in 0 until toolbar.childCount) { + val view = toolbar.getChildAt(i) + if (view is TextView) { + if (view.text == toolbar.title) { + return view + } + } + } + return null + } + + fun setTitle(title: String?) { + mTitle = title + } + + fun setTitleFontFamily(titleFontFamily: String?) { + mTitleFontFamily = titleFontFamily + } + + fun setTitleFontWeight(fontWeightString: String?) { + mTitleFontWeight = ReactTypefaceUtils.parseFontWeight(fontWeightString) + } + + fun setTitleFontSize(titleFontSize: Float) { + mTitleFontSize = titleFontSize + } + + fun setTitleColor(color: Int) { + mTitleColor = color + } + + fun setTintColor(color: Int) { + mTintColor = color + } + + fun setTopInsetEnabled(topInsetEnabled: Boolean) { + mIsTopInsetEnabled = topInsetEnabled + } + + fun setBackgroundColor(color: Int?) { + mBackgroundColor = color + } + + fun setHideShadow(hideShadow: Boolean) { + mIsShadowHidden = hideShadow + } + + fun setHideBackButton(hideBackButton: Boolean) { + mIsBackButtonHidden = hideBackButton + } + + fun setHidden(hidden: Boolean) { + mIsHidden = hidden + } + + fun setTranslucent(translucent: Boolean) { + mIsTranslucent = translucent + } + + fun setBackButtonInCustomView(backButtonInCustomView: Boolean) { + mBackButtonInCustomView = backButtonInCustomView + } + + fun setDirection(direction: String?) { + mDirection = direction + } + + private class DebugMenuToolbar(context: Context, config: ScreenStackHeaderConfig) : CustomToolbar(context, config) { + override fun showOverflowMenu(): Boolean { + (context.applicationContext as ReactApplication) + .reactNativeHost + .reactInstanceManager + .showDevOptionsDialog() + return true + } + } + + init { + visibility = GONE + toolbar = if (BuildConfig.DEBUG) DebugMenuToolbar(context, this) else CustomToolbar(context, this) + mDefaultStartInset = toolbar.contentInsetStart + mDefaultStartInsetWithNavigation = toolbar.contentInsetStartWithNavigation + + // set primary color as background by default + val tv = TypedValue() + if (context.theme.resolveAttribute(R.attr.colorPrimary, tv, true)) { + toolbar.setBackgroundColor(tv.data) + } + toolbar.clipChildren = false + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt new file mode 100644 index 00000000..f1763031 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt @@ -0,0 +1,196 @@ +package com.swmansion.rnscreens + +import android.util.Log +import android.view.View +import com.facebook.react.bridge.JSApplicationCausedNativeException +import com.facebook.react.common.MapBuilder +import com.facebook.react.module.annotations.ReactModule +import com.facebook.react.uimanager.ThemedReactContext +import com.facebook.react.uimanager.ViewGroupManager +import com.facebook.react.uimanager.ViewManagerDelegate +import com.facebook.react.uimanager.annotations.ReactProp +import com.facebook.react.viewmanagers.RNSScreenStackHeaderConfigManagerDelegate +import com.facebook.react.viewmanagers.RNSScreenStackHeaderConfigManagerInterface +import javax.annotation.Nonnull + +@ReactModule(name = ScreenStackHeaderConfigViewManager.REACT_CLASS) +class ScreenStackHeaderConfigViewManager : ViewGroupManager(), RNSScreenStackHeaderConfigManagerInterface { + private val mDelegate: ViewManagerDelegate + + init { + mDelegate = RNSScreenStackHeaderConfigManagerDelegate(this) + } + + override fun getName(): String = REACT_CLASS + + override fun createViewInstance(reactContext: ThemedReactContext) = ScreenStackHeaderConfig(reactContext) + + override fun addView(parent: ScreenStackHeaderConfig, child: View, index: Int) { + if (child !is ScreenStackHeaderSubview) { + throw JSApplicationCausedNativeException( + "Config children should be of type " + ScreenStackHeaderSubviewManager.REACT_CLASS + ) + } + parent.addConfigSubview(child, index) + } + + override fun onDropViewInstance(@Nonnull view: ScreenStackHeaderConfig) { + view.destroy() + } + + override fun removeAllViews(parent: ScreenStackHeaderConfig) { + parent.removeAllConfigSubviews() + } + + override fun removeViewAt(parent: ScreenStackHeaderConfig, index: Int) { + parent.removeConfigSubview(index) + } + + override fun getChildCount(parent: ScreenStackHeaderConfig): Int = parent.configSubviewsCount + + override fun getChildAt(parent: ScreenStackHeaderConfig, index: Int): View = parent.getConfigSubview(index) + + override fun needsCustomLayoutForChildren() = true + + override fun onAfterUpdateTransaction(parent: ScreenStackHeaderConfig) { + super.onAfterUpdateTransaction(parent) + parent.onUpdate() + } + + @ReactProp(name = "title") + override fun setTitle(config: ScreenStackHeaderConfig, title: String?) { + config.setTitle(title) + } + + @ReactProp(name = "titleFontFamily") + override fun setTitleFontFamily(config: ScreenStackHeaderConfig, titleFontFamily: String?) { + config.setTitleFontFamily(titleFontFamily) + } + + @ReactProp(name = "titleFontSize") + override fun setTitleFontSize(config: ScreenStackHeaderConfig, titleFontSize: Int) { + config.setTitleFontSize(titleFontSize.toFloat()) + } + + @ReactProp(name = "titleFontWeight") + override fun setTitleFontWeight(config: ScreenStackHeaderConfig, titleFontWeight: String?) { + config.setTitleFontWeight(titleFontWeight) + } + + @ReactProp(name = "titleColor", customType = "Color") + override fun setTitleColor(config: ScreenStackHeaderConfig, titleColor: Int?) { + if (titleColor != null) { + config.setTitleColor(titleColor) + } + } + + @ReactProp(name = "backgroundColor", customType = "Color") + override fun setBackgroundColor(config: ScreenStackHeaderConfig, backgroundColor: Int?) { + config.setBackgroundColor(backgroundColor) + } + + @ReactProp(name = "hideShadow") + override fun setHideShadow(config: ScreenStackHeaderConfig, hideShadow: Boolean) { + config.setHideShadow(hideShadow) + } + + @ReactProp(name = "hideBackButton") + override fun setHideBackButton(config: ScreenStackHeaderConfig, hideBackButton: Boolean) { + config.setHideBackButton(hideBackButton) + } + + @ReactProp(name = "topInsetEnabled") + override fun setTopInsetEnabled(config: ScreenStackHeaderConfig, topInsetEnabled: Boolean) { + config.setTopInsetEnabled(topInsetEnabled) + } + + @ReactProp(name = "color", customType = "Color") + override fun setColor(config: ScreenStackHeaderConfig, color: Int?) { + config.setTintColor(color ?: 0) + } + + @ReactProp(name = "hidden") + override fun setHidden(config: ScreenStackHeaderConfig, hidden: Boolean) { + config.setHidden(hidden) + } + + @ReactProp(name = "translucent") + override fun setTranslucent(config: ScreenStackHeaderConfig, translucent: Boolean) { + config.setTranslucent(translucent) + } + + @ReactProp(name = "backButtonInCustomView") + override fun setBackButtonInCustomView( + config: ScreenStackHeaderConfig, + backButtonInCustomView: Boolean + ) { + config.setBackButtonInCustomView(backButtonInCustomView) + } + + @ReactProp(name = "direction") + override fun setDirection(config: ScreenStackHeaderConfig, direction: String?) { + config.setDirection(direction) + } + + override fun getExportedCustomDirectEventTypeConstants(): Map? { + return MapBuilder.builder() + .put("onAttached", MapBuilder.of("registrationName", "onAttached")) + .put("onDetached", MapBuilder.of("registrationName", "onDetached")) + .build() + } + + protected override fun getDelegate(): ViewManagerDelegate = mDelegate + + companion object { + const val REACT_CLASS = "RNSScreenStackHeaderConfig" + } + + // TODO: Find better way to handle platform specific props + private fun logNotAvailable(propName: String) { + Log.w("RN SCREENS", "$propName prop is not available on Android") + } + + override fun setBackTitle(view: ScreenStackHeaderConfig?, value: String?) { + logNotAvailable("backTitle") + } + + override fun setBackTitleFontFamily(view: ScreenStackHeaderConfig?, value: String?) { + logNotAvailable("backTitleFontFamily") + } + + override fun setBackTitleFontSize(view: ScreenStackHeaderConfig?, value: Int) { + logNotAvailable("backTitleFontSize") + } + + override fun setLargeTitle(view: ScreenStackHeaderConfig?, value: Boolean) { + logNotAvailable("largeTitle") + } + + override fun setLargeTitleFontFamily(view: ScreenStackHeaderConfig?, value: String?) { + logNotAvailable("largeTitleFontFamily") + } + + override fun setLargeTitleFontSize(view: ScreenStackHeaderConfig?, value: Int) { + logNotAvailable("largeTitleFontSize") + } + + override fun setLargeTitleFontWeight(view: ScreenStackHeaderConfig?, value: String?) { + logNotAvailable("largeTitleFontWeight") + } + + override fun setLargeTitleBackgroundColor(view: ScreenStackHeaderConfig?, value: Int?) { + logNotAvailable("largeTitleBackgroundColor") + } + + override fun setLargeTitleHideShadow(view: ScreenStackHeaderConfig?, value: Boolean) { + logNotAvailable("largeTitleHideShadow") + } + + override fun setLargeTitleColor(view: ScreenStackHeaderConfig?, value: Int?) { + logNotAvailable("largeTitleColor") + } + + override fun setDisableBackButtonMenu(view: ScreenStackHeaderConfig?, value: Boolean) { + logNotAvailable("disableBackButtonMenu") + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubview.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubview.kt new file mode 100644 index 00000000..74a2c8b1 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubview.kt @@ -0,0 +1,38 @@ +package com.swmansion.rnscreens + +import android.annotation.SuppressLint +import android.view.View +import com.facebook.react.bridge.ReactContext +import com.facebook.react.views.view.ReactViewGroup + +@SuppressLint("ViewConstructor") +class ScreenStackHeaderSubview(context: ReactContext?) : ReactViewGroup(context) { + private var mReactWidth = 0 + private var mReactHeight = 0 + var type = Type.RIGHT + + val config: ScreenStackHeaderConfig? + get() = (parent as? CustomToolbar)?.config + + override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { + if (MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.EXACTLY && + MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.EXACTLY + ) { + // dimensions provided by react + mReactWidth = MeasureSpec.getSize(widthMeasureSpec) + mReactHeight = MeasureSpec.getSize(heightMeasureSpec) + val parent = parent + if (parent != null) { + forceLayout() + (parent as View).requestLayout() + } + } + setMeasuredDimension(mReactWidth, mReactHeight) + } + + override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) = Unit + + enum class Type { + LEFT, CENTER, RIGHT, BACK, SEARCH_BAR + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubviewManager.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubviewManager.kt new file mode 100644 index 00000000..b2d2505f --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubviewManager.kt @@ -0,0 +1,41 @@ +package com.swmansion.rnscreens + +import com.facebook.react.bridge.JSApplicationIllegalArgumentException +import com.facebook.react.module.annotations.ReactModule +import com.facebook.react.uimanager.ThemedReactContext +import com.facebook.react.uimanager.ViewGroupManager +import com.facebook.react.uimanager.ViewManagerDelegate +import com.facebook.react.uimanager.annotations.ReactProp +import com.facebook.react.viewmanagers.RNSScreenStackHeaderSubviewManagerDelegate +import com.facebook.react.viewmanagers.RNSScreenStackHeaderSubviewManagerInterface + +@ReactModule(name = ScreenStackHeaderSubviewManager.REACT_CLASS) +class ScreenStackHeaderSubviewManager : ViewGroupManager(), RNSScreenStackHeaderSubviewManagerInterface { + private val mDelegate: ViewManagerDelegate + + init { + mDelegate = RNSScreenStackHeaderSubviewManagerDelegate(this) + } + + override fun getName() = REACT_CLASS + + override fun createViewInstance(context: ThemedReactContext) = ScreenStackHeaderSubview(context) + + @ReactProp(name = "type") + override fun setType(view: ScreenStackHeaderSubview, type: String?) { + view.type = when (type) { + "left" -> ScreenStackHeaderSubview.Type.LEFT + "center" -> ScreenStackHeaderSubview.Type.CENTER + "right" -> ScreenStackHeaderSubview.Type.RIGHT + "back" -> ScreenStackHeaderSubview.Type.BACK + "searchBar" -> ScreenStackHeaderSubview.Type.SEARCH_BAR + else -> throw JSApplicationIllegalArgumentException("Unknown type $type") + } + } + + protected override fun getDelegate(): ViewManagerDelegate = mDelegate + + companion object { + const val REACT_CLASS = "RNSScreenStackHeaderSubview" + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackViewManager.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackViewManager.kt new file mode 100644 index 00000000..d1176a4d --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackViewManager.kt @@ -0,0 +1,75 @@ +package com.swmansion.rnscreens + +import android.view.View +import android.view.ViewGroup +import com.facebook.react.bridge.ReactApplicationContext +import com.facebook.react.module.annotations.ReactModule +import com.facebook.react.uimanager.LayoutShadowNode +import com.facebook.react.uimanager.ThemedReactContext +import com.facebook.react.uimanager.ViewGroupManager +import com.facebook.react.uimanager.ViewManagerDelegate +import com.facebook.react.viewmanagers.RNSScreenStackManagerDelegate +import com.facebook.react.viewmanagers.RNSScreenStackManagerInterface +import com.swmansion.rnscreens.events.StackFinishTransitioningEvent + +@ReactModule(name = ScreenStackViewManager.REACT_CLASS) +class ScreenStackViewManager : ViewGroupManager(), RNSScreenStackManagerInterface { + private val mDelegate: ViewManagerDelegate + + init { + mDelegate = RNSScreenStackManagerDelegate(this) + } + + override fun getName() = REACT_CLASS + + override fun createViewInstance(reactContext: ThemedReactContext) = ScreenStack(reactContext) + + override fun addView(parent: ScreenStack, child: View, index: Int) { + require(child is Screen) { "Attempt attach child that is not of type RNScreen" } + parent.addScreen(child, index) + } + + override fun removeViewAt(parent: ScreenStack, index: Int) { + prepareOutTransition(parent.getScreenAt(index)) + parent.removeScreenAt(index) + } + + private fun prepareOutTransition(screen: Screen?) { + startTransitionRecursive(screen) + } + + private fun startTransitionRecursive(parent: ViewGroup?) { + parent?.let { + for (i in 0 until it.childCount) { + val child = it.getChildAt(i) + child?.let { view -> it.startViewTransition(view) } + if (child is ScreenStackHeaderConfig) { + // we want to start transition on children of the toolbar too, + // which is not a child of ScreenStackHeaderConfig + startTransitionRecursive(child.toolbar) + } + if (child is ViewGroup) { + startTransitionRecursive(child) + } + } + } + } + + override fun getChildCount(parent: ScreenStack) = parent.screenCount + + override fun getChildAt(parent: ScreenStack, index: Int): View = parent.getScreenAt(index) + + override fun createShadowNodeInstance(context: ReactApplicationContext): LayoutShadowNode = ScreensShadowNode(context) + + override fun needsCustomLayoutForChildren() = true + + protected override fun getDelegate(): ViewManagerDelegate = mDelegate + + override fun getExportedCustomDirectEventTypeConstants(): MutableMap = mutableMapOf( + StackFinishTransitioningEvent.EVENT_NAME to mutableMapOf("registrationName" to "onFinishTransitioning") + ) + + companion object { + const val REACT_CLASS = "RNSScreenStack" + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt new file mode 100644 index 00000000..7e173717 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt @@ -0,0 +1,193 @@ +package com.swmansion.rnscreens + +import com.facebook.react.bridge.JSApplicationIllegalArgumentException +import com.facebook.react.bridge.ReadableMap +import com.facebook.react.common.MapBuilder +import com.facebook.react.module.annotations.ReactModule +import com.facebook.react.uimanager.ThemedReactContext +import com.facebook.react.uimanager.ViewGroupManager +import com.facebook.react.uimanager.ViewManagerDelegate +import com.facebook.react.uimanager.annotations.ReactProp +import com.facebook.react.viewmanagers.RNSScreenManagerDelegate +import com.facebook.react.viewmanagers.RNSScreenManagerInterface +import com.swmansion.rnscreens.events.HeaderBackButtonClickedEvent +import com.swmansion.rnscreens.events.ScreenAppearEvent +import com.swmansion.rnscreens.events.ScreenDisappearEvent +import com.swmansion.rnscreens.events.ScreenDismissedEvent +import com.swmansion.rnscreens.events.ScreenTransitionProgressEvent +import com.swmansion.rnscreens.events.ScreenWillAppearEvent +import com.swmansion.rnscreens.events.ScreenWillDisappearEvent + +@ReactModule(name = ScreenViewManager.REACT_CLASS) +class ScreenViewManager : ViewGroupManager(), RNSScreenManagerInterface { + private val mDelegate: ViewManagerDelegate + + init { + mDelegate = RNSScreenManagerDelegate(this) + } + + override fun getName() = REACT_CLASS + + override fun createViewInstance(reactContext: ThemedReactContext) = Screen(reactContext) + + override fun setActivityState(view: Screen, activityState: Float) { + setActivityState(view, activityState.toInt()) + } + + @ReactProp(name = "activityState") + fun setActivityState(view: Screen, activityState: Int) { + if (activityState == -1) { + // Null will be provided when activityState is set as an animated value and we change + // it from JS to be a plain value (non animated). + // In case when null is received, we want to ignore such value and not make + // any updates as the actual non-null value will follow immediately. + return + } + when (activityState) { + 0 -> view.setActivityState(Screen.ActivityState.INACTIVE) + 1 -> view.setActivityState(Screen.ActivityState.TRANSITIONING_OR_BELOW_TOP) + 2 -> view.setActivityState(Screen.ActivityState.ON_TOP) + } + } + + @ReactProp(name = "stackPresentation") + override fun setStackPresentation(view: Screen, presentation: String?) { + view.stackPresentation = when (presentation) { + "push" -> Screen.StackPresentation.PUSH + "modal", "containedModal", "fullScreenModal", "formSheet" -> + Screen.StackPresentation.MODAL + "transparentModal", "containedTransparentModal" -> + Screen.StackPresentation.TRANSPARENT_MODAL + else -> throw JSApplicationIllegalArgumentException("Unknown presentation type $presentation") + } + } + + @ReactProp(name = "stackAnimation") + override fun setStackAnimation(view: Screen, animation: String?) { + view.stackAnimation = when (animation) { + null, "default", "flip", "simple_push" -> Screen.StackAnimation.DEFAULT + "none" -> Screen.StackAnimation.NONE + "fade" -> Screen.StackAnimation.FADE + "slide_from_right" -> Screen.StackAnimation.SLIDE_FROM_RIGHT + "slide_from_left" -> Screen.StackAnimation.SLIDE_FROM_LEFT + "slide_from_bottom" -> Screen.StackAnimation.SLIDE_FROM_BOTTOM + "fade_from_bottom" -> Screen.StackAnimation.FADE_FROM_BOTTOM + else -> throw JSApplicationIllegalArgumentException("Unknown animation type $animation") + } + } + + @ReactProp(name = "gestureEnabled", defaultBoolean = true) + override fun setGestureEnabled(view: Screen, gestureEnabled: Boolean) { + view.isGestureEnabled = gestureEnabled + } + + @ReactProp(name = "replaceAnimation") + override fun setReplaceAnimation(view: Screen, animation: String?) { + view.replaceAnimation = when (animation) { + null, "pop" -> Screen.ReplaceAnimation.POP + "push" -> Screen.ReplaceAnimation.PUSH + else -> throw JSApplicationIllegalArgumentException("Unknown replace animation type $animation") + } + } + + @ReactProp(name = "screenOrientation") + override fun setScreenOrientation(view: Screen, screenOrientation: String?) { + view.setScreenOrientation(screenOrientation) + } + + @ReactProp(name = "statusBarAnimation") + override fun setStatusBarAnimation(view: Screen, statusBarAnimation: String?) { + val animated = statusBarAnimation != null && "none" != statusBarAnimation + view.isStatusBarAnimated = animated + } + + @ReactProp(name = "statusBarColor", customType = "Color") + override fun setStatusBarColor(view: Screen, statusBarColor: Int?) { + view.statusBarColor = statusBarColor + } + + @ReactProp(name = "statusBarStyle") + override fun setStatusBarStyle(view: Screen, statusBarStyle: String?) { + view.statusBarStyle = statusBarStyle + } + + @ReactProp(name = "statusBarTranslucent") + override fun setStatusBarTranslucent(view: Screen, statusBarTranslucent: Boolean) { + view.isStatusBarTranslucent = statusBarTranslucent + } + + @ReactProp(name = "statusBarHidden") + override fun setStatusBarHidden(view: Screen, statusBarHidden: Boolean) { + view.isStatusBarHidden = statusBarHidden + } + + @ReactProp(name = "navigationBarColor", customType = "Color") + override fun setNavigationBarColor(view: Screen, navigationBarColor: Int?) { + view.navigationBarColor = navigationBarColor + } + + @ReactProp(name = "navigationBarHidden") + override fun setNavigationBarHidden(view: Screen, navigationBarHidden: Boolean) { + view.isNavigationBarHidden = navigationBarHidden + } + + @ReactProp(name = "nativeBackButtonDismissalEnabled") + override fun setNativeBackButtonDismissalEnabled( + view: Screen, + nativeBackButtonDismissalEnabled: Boolean + ) { + view.nativeBackButtonDismissalEnabled = nativeBackButtonDismissalEnabled + } + + // these props are not available on Android, however we must override their setters + override fun setFullScreenSwipeEnabled(view: Screen?, value: Boolean) = Unit + + override fun setTransitionDuration(view: Screen?, value: Int) = Unit + + override fun setHideKeyboardOnSwipe(view: Screen?, value: Boolean) = Unit + + override fun setCustomAnimationOnSwipe(view: Screen?, value: Boolean) = Unit + + override fun setGestureResponseDistance(view: Screen?, value: ReadableMap?) = Unit + + override fun setHomeIndicatorHidden(view: Screen?, value: Boolean) = Unit + + override fun setPreventNativeDismiss(view: Screen?, value: Boolean) = Unit + + override fun setSwipeDirection(view: Screen?, value: String?) = Unit + + override fun setSheetAllowedDetents(view: Screen, value: String?) = Unit + + override fun setSheetLargestUndimmedDetent(view: Screen, value: String?) = Unit + + override fun setSheetGrabberVisible(view: Screen?, value: Boolean) = Unit + + override fun setSheetCornerRadius(view: Screen?, value: Float) = Unit + + override fun setSheetExpandsWhenScrolledToEdge(view: Screen?, value: Boolean) = Unit + + override fun getExportedCustomDirectEventTypeConstants(): MutableMap { + return MapBuilder.of( + ScreenDismissedEvent.EVENT_NAME, + MapBuilder.of("registrationName", "onDismissed"), + ScreenWillAppearEvent.EVENT_NAME, + MapBuilder.of("registrationName", "onWillAppear"), + ScreenAppearEvent.EVENT_NAME, + MapBuilder.of("registrationName", "onAppear"), + ScreenWillDisappearEvent.EVENT_NAME, + MapBuilder.of("registrationName", "onWillDisappear"), + ScreenDisappearEvent.EVENT_NAME, + MapBuilder.of("registrationName", "onDisappear"), + HeaderBackButtonClickedEvent.EVENT_NAME, + MapBuilder.of("registrationName", "onHeaderBackButtonClicked"), + ScreenTransitionProgressEvent.EVENT_NAME, + MapBuilder.of("registrationName", "onTransitionProgress") + ) + } + + protected override fun getDelegate(): ViewManagerDelegate = mDelegate + + companion object { + const val REACT_CLASS = "RNSScreen" + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt new file mode 100644 index 00000000..56278236 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt @@ -0,0 +1,276 @@ +package com.swmansion.rnscreens + +import android.animation.ArgbEvaluator +import android.animation.ValueAnimator +import android.annotation.SuppressLint +import android.annotation.TargetApi +import android.app.Activity +import android.content.pm.ActivityInfo +import android.graphics.Color +import android.os.Build +import android.view.ViewParent +import androidx.core.view.ViewCompat +import androidx.core.view.WindowCompat +import androidx.core.view.WindowInsetsCompat +import androidx.core.view.WindowInsetsControllerCompat +import com.facebook.react.bridge.GuardedRunnable +import com.facebook.react.bridge.ReactContext +import com.facebook.react.bridge.UiThreadUtil +import com.swmansion.rnscreens.Screen.WindowTraits + +object ScreenWindowTraits { + // Methods concerning statusBar management were taken from `react-native`'s status bar module: + // https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java + private var mDidSetOrientation = false + private var mDidSetStatusBarAppearance = false + private var mDidSetNavigationBarAppearance = false + private var mDefaultStatusBarColor: Int? = null + + internal fun applyDidSetOrientation() { + mDidSetOrientation = true + } + + internal fun applyDidSetStatusBarAppearance() { + mDidSetStatusBarAppearance = true + } + + internal fun applyDidSetNavigationBarAppearance() { + mDidSetNavigationBarAppearance = true + } + + internal fun setOrientation(screen: Screen, activity: Activity?) { + if (activity == null) { + return + } + val screenForOrientation = findScreenForTrait(screen, WindowTraits.ORIENTATION) + val orientation = screenForOrientation?.screenOrientation ?: ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED + activity.requestedOrientation = orientation + } + + @SuppressLint("ObsoleteSdkInt") // to be removed when support for < 0.64 is dropped + internal fun setColor(screen: Screen, activity: Activity?, context: ReactContext?) { + if (activity == null || context == null) { + return + } + if (mDefaultStatusBarColor == null) { + mDefaultStatusBarColor = activity.window.statusBarColor + } + val screenForColor = findScreenForTrait(screen, WindowTraits.COLOR) + val screenForAnimated = findScreenForTrait(screen, WindowTraits.ANIMATED) + val color = screenForColor?.statusBarColor ?: mDefaultStatusBarColor + val animated = screenForAnimated?.isStatusBarAnimated ?: false + + UiThreadUtil.runOnUiThread( + object : GuardedRunnable(context) { + override fun runGuarded() { + val window = activity.window + val curColor: Int = window.statusBarColor + val colorAnimation = ValueAnimator.ofObject(ArgbEvaluator(), curColor, color) + colorAnimation.addUpdateListener { animator -> + window.statusBarColor = animator.animatedValue as Int + } + if (animated) { + colorAnimation.setDuration(300).startDelay = 0 + } else { + colorAnimation.setDuration(0).startDelay = 300 + } + colorAnimation.start() + } + }) + } + + internal fun setStyle(screen: Screen, activity: Activity?, context: ReactContext?) { + if (activity == null || context == null || Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { + return + } + val screenForStyle = findScreenForTrait(screen, WindowTraits.STYLE) + val style = screenForStyle?.statusBarStyle ?: "light" + + UiThreadUtil.runOnUiThread { + val decorView = activity.window.decorView + val window = activity.window + val controller = WindowInsetsControllerCompat(window, decorView) + + controller.isAppearanceLightStatusBars = style == "dark" + } + } + + internal fun setTranslucent( + screen: Screen, + activity: Activity?, + context: ReactContext? + ) { + if (activity == null || context == null) { + return + } + val screenForTranslucent = findScreenForTrait(screen, WindowTraits.TRANSLUCENT) + val translucent = screenForTranslucent?.isStatusBarTranslucent ?: false + UiThreadUtil.runOnUiThread( + object : GuardedRunnable(context) { + @TargetApi(Build.VERSION_CODES.LOLLIPOP) + override fun runGuarded() { + // If the status bar is translucent hook into the window insets calculations + // and consume all the top insets so no padding will be added under the status bar. + val decorView = activity.window.decorView + if (translucent) { + ViewCompat.setOnApplyWindowInsetsListener(decorView) { v, insets -> + val defaultInsets = ViewCompat.onApplyWindowInsets(v, insets) + defaultInsets.replaceSystemWindowInsets( + defaultInsets.systemWindowInsetLeft, + 0, + defaultInsets.systemWindowInsetRight, + defaultInsets.systemWindowInsetBottom + ) + } + } else { + ViewCompat.setOnApplyWindowInsetsListener(decorView, null) + } + ViewCompat.requestApplyInsets(decorView) + } + }) + } + + internal fun setHidden(screen: Screen, activity: Activity?) { + if (activity == null) { + return + } + val screenForHidden = findScreenForTrait(screen, WindowTraits.HIDDEN) + val hidden = screenForHidden?.isStatusBarHidden ?: false + val window = activity.window + val controller = WindowInsetsControllerCompat(window, window.decorView) + + UiThreadUtil.runOnUiThread { + if (hidden) { + controller.hide(WindowInsetsCompat.Type.statusBars()) + } else { + controller.show(WindowInsetsCompat.Type.statusBars()) + } + } + } + + // Methods concerning navigationBar management were taken from `react-native-navigation`'s repo: + // https://github.com/wix/react-native-navigation/blob/9bb70d81700692141a2c505c081c2d86c7f9c66e/lib/android/app/src/main/java/com/reactnativenavigation/utils/SystemUiUtils.kt + internal fun setNavigationBarColor(screen: Screen, activity: Activity?) { + if (activity == null) { + return + } + + val window = activity.window + + val screenForNavBarColor = findScreenForTrait(screen, WindowTraits.NAVIGATION_BAR_COLOR) + val color = screenForNavBarColor?.navigationBarColor ?: window.navigationBarColor + + UiThreadUtil.runOnUiThread { + WindowInsetsControllerCompat(window, window.decorView).isAppearanceLightNavigationBars = + isColorLight(color) + } + window.navigationBarColor = color + } + + internal fun setNavigationBarHidden(screen: Screen, activity: Activity?) { + if (activity == null) { + return + } + + val window = activity.window + + val screenForNavBarHidden = findScreenForTrait(screen, WindowTraits.NAVIGATION_BAR_HIDDEN) + val hidden = screenForNavBarHidden?.isNavigationBarHidden ?: false + + WindowCompat.setDecorFitsSystemWindows(window, hidden) + if (hidden) { + WindowInsetsControllerCompat(window, window.decorView).let { controller -> + controller.hide(WindowInsetsCompat.Type.navigationBars()) + controller.systemBarsBehavior = + WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE + } + } else { + WindowInsetsControllerCompat( + window, + window.decorView + ).show(WindowInsetsCompat.Type.navigationBars()) + } + } + + internal fun trySetWindowTraits(screen: Screen, activity: Activity?, context: ReactContext?) { + if (mDidSetOrientation) { + setOrientation(screen, activity) + } + if (mDidSetStatusBarAppearance) { + setColor(screen, activity, context) + setStyle(screen, activity, context) + setTranslucent(screen, activity, context) + setHidden(screen, activity) + } + if (mDidSetNavigationBarAppearance) { + setNavigationBarColor(screen, activity) + setNavigationBarHidden(screen, activity) + } + } + + private fun findScreenForTrait(screen: Screen, trait: WindowTraits): Screen? { + val childWithTrait = childScreenWithTraitSet(screen, trait) + if (childWithTrait != null) { + return childWithTrait + } + return if (checkTraitForScreen(screen, trait)) { + screen + } else { + // if there is no child with trait set and this screen has no trait set, we look for a parent + // that has the trait set + findParentWithTraitSet(screen, trait) + } + } + + private fun findParentWithTraitSet(screen: Screen, trait: WindowTraits): Screen? { + var parent: ViewParent? = screen.container + while (parent != null) { + if (parent is Screen) { + if (checkTraitForScreen(parent, trait)) { + return parent + } + } + parent = parent.parent + } + return null + } + + private fun childScreenWithTraitSet( + screen: Screen?, + trait: WindowTraits + ): Screen? { + screen?.fragment?.let { + for (sc in it.childScreenContainers) { + // we check only the top screen for the trait + val topScreen = sc.topScreen + val child = childScreenWithTraitSet(topScreen, trait) + if (child != null) { + return child + } + if (topScreen != null && checkTraitForScreen(topScreen, trait)) { + return topScreen + } + } + } + return null + } + + private fun checkTraitForScreen(screen: Screen, trait: WindowTraits): Boolean { + return when (trait) { + WindowTraits.ORIENTATION -> screen.screenOrientation != null + WindowTraits.COLOR -> screen.statusBarColor != null + WindowTraits.STYLE -> screen.statusBarStyle != null + WindowTraits.TRANSLUCENT -> screen.isStatusBarTranslucent != null + WindowTraits.HIDDEN -> screen.isStatusBarHidden != null + WindowTraits.ANIMATED -> screen.isStatusBarAnimated != null + WindowTraits.NAVIGATION_BAR_COLOR -> screen.navigationBarColor != null + WindowTraits.NAVIGATION_BAR_HIDDEN -> screen.isNavigationBarHidden != null + } + } + + private fun isColorLight(color: Int): Boolean { + val darkness: Double = + 1 - (0.299 * Color.red(color) + 0.587 * Color.green(color) + 0.114 * Color.blue(color)) / 255 + return darkness < 0.5 + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreensShadowNode.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreensShadowNode.kt new file mode 100644 index 00000000..6893aa1a --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreensShadowNode.kt @@ -0,0 +1,19 @@ +package com.swmansion.rnscreens + +import com.facebook.react.bridge.ReactContext +import com.facebook.react.uimanager.LayoutShadowNode +import com.facebook.react.uimanager.NativeViewHierarchyManager +import com.facebook.react.uimanager.NativeViewHierarchyOptimizer +import com.facebook.react.uimanager.UIManagerModule + +internal class ScreensShadowNode(private var mContext: ReactContext) : LayoutShadowNode() { + override fun onBeforeLayout(nativeViewHierarchyOptimizer: NativeViewHierarchyOptimizer) { + super.onBeforeLayout(nativeViewHierarchyOptimizer) + (mContext.getNativeModule(UIManagerModule::class.java))?.addUIBlock { nativeViewHierarchyManager: NativeViewHierarchyManager -> + val view = nativeViewHierarchyManager.resolveView(reactTag) + if (view is ScreenContainer<*>) { + view.performUpdates() + } + } + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchBarManager.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchBarManager.kt new file mode 100644 index 00000000..79ef4991 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchBarManager.kt @@ -0,0 +1,107 @@ +package com.swmansion.rnscreens + +import com.facebook.react.bridge.JSApplicationIllegalArgumentException +import com.facebook.react.common.MapBuilder +import com.facebook.react.module.annotations.ReactModule +import com.facebook.react.uimanager.ThemedReactContext +import com.facebook.react.uimanager.ViewGroupManager +import com.facebook.react.uimanager.annotations.ReactProp + +@ReactModule(name = SearchBarManager.REACT_CLASS) +class SearchBarManager : ViewGroupManager() { + override fun getName(): String { + return REACT_CLASS + } + + override fun createViewInstance(context: ThemedReactContext): SearchBarView { + return SearchBarView(context) + } + + override fun onAfterUpdateTransaction(view: SearchBarView) { + super.onAfterUpdateTransaction(view) + view.onUpdate() + } + + @ReactProp(name = "autoCapitalize") + fun setAutoCapitalize(view: SearchBarView, autoCapitalize: String?) { + view.autoCapitalize = when (autoCapitalize) { + null, "none" -> SearchBarView.SearchBarAutoCapitalize.NONE + "words" -> SearchBarView.SearchBarAutoCapitalize.WORDS + "sentences" -> SearchBarView.SearchBarAutoCapitalize.SENTENCES + "characters" -> SearchBarView.SearchBarAutoCapitalize.CHARACTERS + else -> throw JSApplicationIllegalArgumentException( + "Forbidden auto capitalize value passed" + ) + } + } + + @ReactProp(name = "autoFocus") + fun setAutoFocus(view: SearchBarView, autoFocus: Boolean?) { + view.autoFocus = autoFocus ?: false + } + + @ReactProp(name = "barTintColor", customType = "Color") + fun setTintColor(view: SearchBarView, color: Int?) { + view.tintColor = color + } + + @ReactProp(name = "disableBackButtonOverride") + fun setDisableBackButtonOverride(view: SearchBarView, disableBackButtonOverride: Boolean?) { + view.shouldOverrideBackButton = disableBackButtonOverride != true + } + + @ReactProp(name = "inputType") + fun setInputType(view: SearchBarView, inputType: String?) { + view.inputType = when (inputType) { + null, "text" -> SearchBarView.SearchBarInputTypes.TEXT + "phone" -> SearchBarView.SearchBarInputTypes.PHONE + "number" -> SearchBarView.SearchBarInputTypes.NUMBER + "email" -> SearchBarView.SearchBarInputTypes.EMAIL + else -> throw JSApplicationIllegalArgumentException( + "Forbidden input type value" + ) + } + } + + @ReactProp(name = "placeholder") + fun setPlaceholder(view: SearchBarView, placeholder: String?) { + if (placeholder != null) { + view.placeholder = placeholder + } + } + + @ReactProp(name = "textColor", customType = "Color") + fun setTextColor(view: SearchBarView, color: Int?) { + view.textColor = color + } + + @ReactProp(name = "headerIconColor", customType = "Color") + fun setHeaderIconColor(view: SearchBarView, color: Int?) { + view.headerIconColor = color + } + + @ReactProp(name = "hintTextColor", customType = "Color") + fun setHintTextColor(view: SearchBarView, color: Int?) { + view.hintTextColor = color + } + + @ReactProp(name = "shouldShowHintSearchIcon") + fun setShouldShowHintSearchIcon(view: SearchBarView, shouldShowHintSearchIcon: Boolean?) { + view.shouldShowHintSearchIcon = shouldShowHintSearchIcon ?: true + } + + override fun getExportedCustomDirectEventTypeConstants(): Map? { + return MapBuilder.builder() + .put("onChangeText", MapBuilder.of("registrationName", "onChangeText")) + .put("onSearchButtonPress", MapBuilder.of("registrationName", "onSearchButtonPress")) + .put("onFocus", MapBuilder.of("registrationName", "onFocus")) + .put("onBlur", MapBuilder.of("registrationName", "onBlur")) + .put("onClose", MapBuilder.of("registrationName", "onClose")) + .put("onOpen", MapBuilder.of("registrationName", "onOpen")) + .build() + } + + companion object { + const val REACT_CLASS = "RNSSearchBar" + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt new file mode 100644 index 00000000..46b8fd45 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt @@ -0,0 +1,155 @@ +package com.swmansion.rnscreens + +import android.annotation.SuppressLint +import android.text.InputType +import androidx.appcompat.widget.SearchView +import com.facebook.react.bridge.Arguments +import com.facebook.react.bridge.ReactContext +import com.facebook.react.bridge.WritableMap +import com.facebook.react.uimanager.events.RCTEventEmitter +import com.facebook.react.views.view.ReactViewGroup + +@SuppressLint("ViewConstructor") +class SearchBarView(reactContext: ReactContext?) : ReactViewGroup(reactContext) { + var inputType: SearchBarInputTypes = SearchBarInputTypes.TEXT + var autoCapitalize: SearchBarAutoCapitalize = SearchBarAutoCapitalize.NONE + var textColor: Int? = null + var tintColor: Int? = null + var headerIconColor: Int? = null + var hintTextColor: Int? = null + var placeholder: String = "" + var shouldOverrideBackButton: Boolean = true + var autoFocus: Boolean = false + var shouldShowHintSearchIcon: Boolean = true + + private var mSearchViewFormatter: SearchViewFormatter? = null + + private var mAreListenersSet: Boolean = false + + private val screenStackFragment: ScreenStackFragment? + get() { + val currentParent = parent + if (currentParent is ScreenStackHeaderSubview) { + return currentParent.config?.screenFragment + } + return null + } + + fun onUpdate() { + setSearchViewProps() + } + + private fun setSearchViewProps() { + val searchView = screenStackFragment?.searchView + if (searchView != null) { + if (!mAreListenersSet) { + setSearchViewListeners(searchView) + mAreListenersSet = true + } + + searchView.inputType = inputType.toAndroidInputType(autoCapitalize) + mSearchViewFormatter?.setTextColor(textColor) + mSearchViewFormatter?.setTintColor(tintColor) + mSearchViewFormatter?.setHeaderIconColor(headerIconColor) + mSearchViewFormatter?.setHintTextColor(hintTextColor) + mSearchViewFormatter?.setPlaceholder(placeholder, shouldShowHintSearchIcon) + searchView.overrideBackAction = shouldOverrideBackButton + } + } + + override fun onAttachedToWindow() { + super.onAttachedToWindow() + + screenStackFragment?.onSearchViewCreate = { newSearchView -> + if (mSearchViewFormatter == null) mSearchViewFormatter = + SearchViewFormatter(newSearchView) + setSearchViewProps() + if (autoFocus) { + screenStackFragment?.searchView?.focus() + } + } + } + + private fun setSearchViewListeners(searchView: SearchView) { + searchView.setOnQueryTextListener(object : SearchView.OnQueryTextListener { + override fun onQueryTextChange(newText: String?): Boolean { + handleTextChange(newText) + return true + } + + override fun onQueryTextSubmit(query: String?): Boolean { + handleTextSubmit(query) + return true + } + }) + searchView.setOnQueryTextFocusChangeListener { _, hasFocus -> + handleFocusChange(hasFocus) + } + searchView.setOnCloseListener { + handleClose() + false + } + searchView.setOnSearchClickListener { + handleOpen() + } + } + + private fun handleTextChange(newText: String?) { + val event = Arguments.createMap() + event.putString("text", newText) + sendEvent("onChangeText", event) + } + + private fun handleFocusChange(hasFocus: Boolean) { + sendEvent(if (hasFocus) "onFocus" else "onBlur", null) + } + + private fun handleClose() { + sendEvent("onClose", null) + } + + private fun handleOpen() { + sendEvent("onOpen", null) + } + + private fun handleTextSubmit(newText: String?) { + val event = Arguments.createMap() + event.putString("text", newText) + sendEvent("onSearchButtonPress", event) + } + + private fun sendEvent(eventName: String, eventContent: WritableMap?) { + (context as ReactContext).getJSModule(RCTEventEmitter::class.java) + ?.receiveEvent(id, eventName, eventContent) + } + + enum class SearchBarAutoCapitalize { + NONE, WORDS, SENTENCES, CHARACTERS + } + + enum class SearchBarInputTypes { + TEXT { + override fun toAndroidInputType(capitalize: SearchBarAutoCapitalize) = + when (capitalize) { + SearchBarAutoCapitalize.NONE -> InputType.TYPE_CLASS_TEXT + SearchBarAutoCapitalize.WORDS -> InputType.TYPE_TEXT_FLAG_CAP_WORDS + SearchBarAutoCapitalize.SENTENCES -> InputType.TYPE_TEXT_FLAG_CAP_SENTENCES + SearchBarAutoCapitalize.CHARACTERS -> InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS + } + }, + PHONE { + override fun toAndroidInputType(capitalize: SearchBarAutoCapitalize) = + InputType.TYPE_CLASS_PHONE + }, + NUMBER { + override fun toAndroidInputType(capitalize: SearchBarAutoCapitalize) = + InputType.TYPE_CLASS_NUMBER + }, + EMAIL { + override fun toAndroidInputType(capitalize: SearchBarAutoCapitalize) = + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS + }; + + abstract fun toAndroidInputType(capitalize: SearchBarAutoCapitalize): Int + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchViewFormatter.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchViewFormatter.kt new file mode 100644 index 00000000..8289555a --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchViewFormatter.kt @@ -0,0 +1,67 @@ +package com.swmansion.rnscreens + +import android.graphics.drawable.Drawable +import android.view.View +import android.widget.EditText +import android.widget.ImageView +import androidx.appcompat.R +import androidx.appcompat.widget.SearchView + +class SearchViewFormatter(var searchView: SearchView) { + private var mDefaultTextColor: Int? = null + private var mDefaultTintBackground: Drawable? = null + + private val searchEditText + get() = searchView.findViewById(R.id.search_src_text) as? EditText + private val searchTextPlate + get() = searchView.findViewById(R.id.search_plate) + private val searchIcon + get() = searchView.findViewById(R.id.search_button) + private val searchCloseIcon + get() = searchView.findViewById(R.id.search_close_btn) + + fun setTextColor(textColor: Int?) { + val currentDefaultTextColor = mDefaultTextColor + if (textColor != null) { + if (mDefaultTextColor == null) { + mDefaultTextColor = searchEditText?.textColors?.defaultColor + } + searchEditText?.setTextColor(textColor) + } else if (currentDefaultTextColor != null) { + searchEditText?.setTextColor(currentDefaultTextColor) + } + } + + fun setTintColor(tintColor: Int?) { + val currentDefaultTintColor = mDefaultTintBackground + if (tintColor != null) { + if (mDefaultTintBackground == null) { + mDefaultTintBackground = searchTextPlate.background + } + searchTextPlate.setBackgroundColor(tintColor) + } else if (currentDefaultTintColor != null) { + searchTextPlate.background = currentDefaultTintColor + } + } + + fun setHeaderIconColor(headerIconColor: Int?) { + headerIconColor?.let { + searchIcon.setColorFilter(it) + searchCloseIcon.setColorFilter(it) + } + } + + fun setHintTextColor(hintTextColor: Int?) { + hintTextColor?.let { + searchEditText?.setHintTextColor(it) + } + } + + fun setPlaceholder(placeholder: String, shouldShowHintSearchIcon: Boolean) { + if (shouldShowHintSearchIcon) { + searchView.queryHint = placeholder + } else { + searchEditText?.hint = placeholder + } + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/HeaderBackButtonClickedEvent.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/HeaderBackButtonClickedEvent.kt new file mode 100644 index 00000000..1d1ffbaf --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/HeaderBackButtonClickedEvent.kt @@ -0,0 +1,24 @@ +package com.swmansion.rnscreens.events + +import com.facebook.react.bridge.Arguments +import com.facebook.react.uimanager.events.Event +import com.facebook.react.uimanager.events.RCTEventEmitter + +class HeaderBackButtonClickedEvent(viewId: Int) : Event(viewId) { + override fun getEventName(): String { + return EVENT_NAME + } + + override fun getCoalescingKey(): Short { + // All events for a given view can be coalesced. + return 0 + } + + override fun dispatch(rctEventEmitter: RCTEventEmitter) { + rctEventEmitter.receiveEvent(viewTag, eventName, Arguments.createMap()) + } + + companion object { + const val EVENT_NAME = "topHeaderBackButtonClickedEvent" + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenAppearEvent.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenAppearEvent.kt new file mode 100644 index 00000000..2c7ef2f7 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenAppearEvent.kt @@ -0,0 +1,20 @@ +package com.swmansion.rnscreens.events + +import com.facebook.react.bridge.Arguments +import com.facebook.react.uimanager.events.Event +import com.facebook.react.uimanager.events.RCTEventEmitter + +class ScreenAppearEvent(viewId: Int) : Event(viewId) { + override fun getEventName() = EVENT_NAME + + // All events for a given view can be coalesced. + override fun getCoalescingKey(): Short = 0 + + override fun dispatch(rctEventEmitter: RCTEventEmitter) { + rctEventEmitter.receiveEvent(viewTag, eventName, Arguments.createMap()) + } + + companion object { + const val EVENT_NAME = "topAppear" + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDisappearEvent.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDisappearEvent.kt new file mode 100644 index 00000000..a53b3096 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDisappearEvent.kt @@ -0,0 +1,20 @@ +package com.swmansion.rnscreens.events + +import com.facebook.react.bridge.Arguments +import com.facebook.react.uimanager.events.Event +import com.facebook.react.uimanager.events.RCTEventEmitter + +class ScreenDisappearEvent(viewId: Int) : Event(viewId) { + override fun getEventName() = EVENT_NAME + + // All events for a given view can be coalesced. + override fun getCoalescingKey(): Short = 0 + + override fun dispatch(rctEventEmitter: RCTEventEmitter) { + rctEventEmitter.receiveEvent(viewTag, eventName, Arguments.createMap()) + } + + companion object { + const val EVENT_NAME = "topDisappear" + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDismissedEvent.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDismissedEvent.kt new file mode 100644 index 00000000..533c3e47 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDismissedEvent.kt @@ -0,0 +1,23 @@ +package com.swmansion.rnscreens.events + +import com.facebook.react.bridge.Arguments +import com.facebook.react.uimanager.events.Event +import com.facebook.react.uimanager.events.RCTEventEmitter + +class ScreenDismissedEvent(viewId: Int) : Event(viewId) { + override fun getEventName() = EVENT_NAME + + // All events for a given view can be coalesced. + override fun getCoalescingKey(): Short = 0 + + override fun dispatch(rctEventEmitter: RCTEventEmitter) { + val args = Arguments.createMap() + // on Android we always dismiss one screen at a time + args.putInt("dismissCount", 1) + rctEventEmitter.receiveEvent(viewTag, eventName, args) + } + + companion object { + const val EVENT_NAME = "topDismissed" + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenTransitionProgressEvent.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenTransitionProgressEvent.kt new file mode 100644 index 00000000..b047fccb --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenTransitionProgressEvent.kt @@ -0,0 +1,33 @@ +package com.swmansion.rnscreens.events + +import com.facebook.react.bridge.Arguments +import com.facebook.react.uimanager.events.Event +import com.facebook.react.uimanager.events.RCTEventEmitter + +class ScreenTransitionProgressEvent( + viewId: Int, + private val mProgress: Float, + private val mClosing: Boolean, + private val mGoingForward: Boolean, + private val mCoalescingKey: Short +) : Event(viewId) { + override fun getEventName(): String { + return EVENT_NAME + } + + override fun getCoalescingKey(): Short { + return mCoalescingKey + } + + override fun dispatch(rctEventEmitter: RCTEventEmitter) { + val map = Arguments.createMap() + map.putDouble("progress", mProgress.toDouble()) + map.putInt("closing", if (mClosing) 1 else 0) + map.putInt("goingForward", if (mGoingForward) 1 else 0) + rctEventEmitter.receiveEvent(viewTag, eventName, map) + } + + companion object { + const val EVENT_NAME = "topTransitionProgress" + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillAppearEvent.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillAppearEvent.kt new file mode 100644 index 00000000..c29abc24 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillAppearEvent.kt @@ -0,0 +1,20 @@ +package com.swmansion.rnscreens.events + +import com.facebook.react.bridge.Arguments +import com.facebook.react.uimanager.events.Event +import com.facebook.react.uimanager.events.RCTEventEmitter + +class ScreenWillAppearEvent(viewId: Int) : Event(viewId) { + override fun getEventName() = EVENT_NAME + + // All events for a given view can be coalesced. + override fun getCoalescingKey(): Short = 0 + + override fun dispatch(rctEventEmitter: RCTEventEmitter) { + rctEventEmitter.receiveEvent(viewTag, eventName, Arguments.createMap()) + } + + companion object { + const val EVENT_NAME = "topWillAppear" + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillDisappearEvent.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillDisappearEvent.kt new file mode 100644 index 00000000..4304a9da --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillDisappearEvent.kt @@ -0,0 +1,20 @@ +package com.swmansion.rnscreens.events + +import com.facebook.react.bridge.Arguments +import com.facebook.react.uimanager.events.Event +import com.facebook.react.uimanager.events.RCTEventEmitter + +class ScreenWillDisappearEvent(viewId: Int) : Event(viewId) { + override fun getEventName() = EVENT_NAME + + // All events for a given view can be coalesced. + override fun getCoalescingKey(): Short = 0 + + override fun dispatch(rctEventEmitter: RCTEventEmitter) { + rctEventEmitter.receiveEvent(viewTag, eventName, Arguments.createMap()) + } + + companion object { + const val EVENT_NAME = "topWillDisappear" + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/StackFinishTransitioningEvent.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/StackFinishTransitioningEvent.kt new file mode 100644 index 00000000..af1d6de0 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/StackFinishTransitioningEvent.kt @@ -0,0 +1,20 @@ +package com.swmansion.rnscreens.events + +import com.facebook.react.bridge.Arguments +import com.facebook.react.uimanager.events.Event +import com.facebook.react.uimanager.events.RCTEventEmitter + +class StackFinishTransitioningEvent(viewId: Int) : Event(viewId) { + override fun getEventName() = EVENT_NAME + + // All events for a given view can be coalesced. + override fun getCoalescingKey(): Short = 0 + + override fun dispatch(rctEventEmitter: RCTEventEmitter) { + rctEventEmitter.receiveEvent(viewTag, eventName, Arguments.createMap()) + } + + companion object { + const val EVENT_NAME = "topFinishTransitioning" + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/jni/CMakeLists.txt b/iut-expo-starter/node_modules/react-native-screens/android/src/main/jni/CMakeLists.txt new file mode 100644 index 00000000..3b388b4d --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/jni/CMakeLists.txt @@ -0,0 +1,72 @@ +cmake_minimum_required(VERSION 3.13) +set(CMAKE_VERBOSE_MAKEFILE ON) + +set(LIB_LITERAL rnscreens) +set(LIB_TARGET_NAME react_codegen_${LIB_LITERAL}) + +set(LIB_ANDROID_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..) +set(LIB_COMMON_DIR ${LIB_ANDROID_DIR}/../common/cpp) +set(LIB_ANDROID_GENERATED_JNI_DIR ${LIB_ANDROID_DIR}/build/generated/source/codegen/jni) +set(LIB_ANDROID_GENERATED_COMPONENTS_DIR ${LIB_ANDROID_GENERATED_JNI_DIR}/react/renderer/components/${LIB_LITERAL}) + +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments +) + +file(GLOB LIB_CUSTOM_SRCS CONFIGURE_DEPENDS *.cpp ${LIB_COMMON_DIR}/react/renderer/components/${LIB_LITERAL}/*.cpp) +file(GLOB LIB_CODEGEN_SRCS CONFIGURE_DEPENDS ${LIB_ANDROID_GENERATED_COMPONENTS_DIR}/*.cpp) + +add_library( + ${LIB_TARGET_NAME} + SHARED + ${LIB_CUSTOM_SRCS} + ${LIB_CODEGEN_SRCS} +) + +target_include_directories( + ${LIB_TARGET_NAME} + PUBLIC + . + ${LIB_COMMON_DIR} + ${LIB_ANDROID_GENERATED_JNI_DIR} + ${LIB_ANDROID_GENERATED_COMPONENTS_DIR} +) + +target_link_libraries( + ${LIB_TARGET_NAME} + fbjni + folly_runtime + glog + jsi + react_codegen_rncore + react_debug + react_nativemodule_core + react_render_core + react_render_debug + react_render_graphics + react_render_mapbuffer + rrc_view + turbomodulejsijni + yoga +) + +target_compile_options( + ${LIB_TARGET_NAME} + PRIVATE + -DLOG_TAG=\"ReactNative\" + -fexceptions + -frtti + -std=c++17 + -Wall +) + +target_include_directories( + ${CMAKE_PROJECT_NAME} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/jni/rnscreens.cpp b/iut-expo-starter/node_modules/react-native-screens/android/src/main/jni/rnscreens.cpp new file mode 100644 index 00000000..ce5c1508 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/jni/rnscreens.cpp @@ -0,0 +1,16 @@ +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * @generated by codegen project: GenerateModuleJniCpp.js + */ +#include "rnscreens.h" + +namespace facebook { +namespace react { + + +std::shared_ptr rnscreens_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) { + return nullptr; +} + +} // namespace react +} // namespace facebook diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/jni/rnscreens.h b/iut-expo-starter/node_modules/react-native-screens/android/src/main/jni/rnscreens.h new file mode 100644 index 00000000..2d755a00 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/jni/rnscreens.h @@ -0,0 +1,28 @@ +#pragma once + +#include +#include +#include + +/** + * Note this import and that it is not present in autogenerated header file + * under android/build/generated/source/codegen/jni/rnscreens.h + * + * It is added here to make our custom symbols visible in autogenerated file with + * code responsible for registering component descriptor providers. See that rncli.cpp, + * located under /android/app/build/generated/rncli/src/main/jni/rncli.cpp, + * includes autogenerated rnscreens.h header by default. We change this behaviour + * by appropriate include path configuration so that this header file gets included. + * + * See: https://github.com/software-mansion/react-native-screens/pull/1585 + */ +#include + +namespace facebook { +namespace react { + +JSI_EXPORT +std::shared_ptr rnscreens_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); + +} // namespace react +} // namespace facebook diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_enter_in.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_enter_in.xml new file mode 100644 index 00000000..4398c7ef --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_enter_in.xml @@ -0,0 +1,18 @@ + + + + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_enter_out.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_enter_out.xml new file mode 100644 index 00000000..84c91759 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_enter_out.xml @@ -0,0 +1,19 @@ + + + + + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_exit_in.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_exit_in.xml new file mode 100644 index 00000000..6d6fa02a --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_exit_in.xml @@ -0,0 +1,17 @@ + + + + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_exit_out.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_exit_out.xml new file mode 100644 index 00000000..b20a184f --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_default_exit_out.xml @@ -0,0 +1,18 @@ + + + + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_from_bottom.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_from_bottom.xml new file mode 100644 index 00000000..c7a8abc0 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_from_bottom.xml @@ -0,0 +1,14 @@ + + + + + + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_in.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_in.xml new file mode 100644 index 00000000..c78ea619 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_in.xml @@ -0,0 +1,7 @@ + + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_out.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_out.xml new file mode 100644 index 00000000..334e63f3 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_out.xml @@ -0,0 +1,7 @@ + + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_to_bottom.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_to_bottom.xml new file mode 100644 index 00000000..23345211 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_fade_to_bottom.xml @@ -0,0 +1,15 @@ + + + + + + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_20.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_20.xml new file mode 100644 index 00000000..5cc0d238 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_20.xml @@ -0,0 +1,6 @@ + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_250.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_250.xml new file mode 100644 index 00000000..bd082a3e --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_250.xml @@ -0,0 +1,7 @@ + + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_350.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_350.xml new file mode 100644 index 00000000..003dcd1f --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_350.xml @@ -0,0 +1,6 @@ + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_medium.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_medium.xml new file mode 100644 index 00000000..560eda67 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_no_animation_medium.xml @@ -0,0 +1,7 @@ + + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_in_from_bottom.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_in_from_bottom.xml new file mode 100644 index 00000000..052fe150 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_in_from_bottom.xml @@ -0,0 +1,7 @@ + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_in_from_left.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_in_from_left.xml new file mode 100644 index 00000000..939110f5 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_in_from_left.xml @@ -0,0 +1,5 @@ + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_in_from_right.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_in_from_right.xml new file mode 100644 index 00000000..428eb9b7 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_in_from_right.xml @@ -0,0 +1,5 @@ + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_out_to_bottom.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_out_to_bottom.xml new file mode 100644 index 00000000..6b75d256 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_out_to_bottom.xml @@ -0,0 +1,7 @@ + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_out_to_left.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_out_to_left.xml new file mode 100644 index 00000000..400a202c --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_out_to_left.xml @@ -0,0 +1,5 @@ + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_out_to_right.xml b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_out_to_right.xml new file mode 100644 index 00000000..a00332bc --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/main/res/anim/rns_slide_out_to_right.xml @@ -0,0 +1,5 @@ + + diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerDelegate.java b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerDelegate.java new file mode 100644 index 00000000..b2bda826 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerDelegate.java @@ -0,0 +1,111 @@ +/** +* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). +* +* Do not edit this file as changes may cause incorrect behavior and will be lost +* once the code is regenerated. +* +* @generated by codegen project: GeneratePropsJavaDelegate.js +*/ + +package com.facebook.react.viewmanagers; + +import android.view.View; +import androidx.annotation.Nullable; +import com.facebook.react.bridge.ColorPropConverter; +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.uimanager.BaseViewManagerDelegate; +import com.facebook.react.uimanager.BaseViewManagerInterface; + +public class RNSScreenManagerDelegate & RNSScreenManagerInterface> extends BaseViewManagerDelegate { + public RNSScreenManagerDelegate(U viewManager) { + super(viewManager); + } + @Override + public void setProperty(T view, String propName, @Nullable Object value) { + switch (propName) { + case "sheetAllowedDetents": + mViewManager.setSheetAllowedDetents(view, (String) value); + break; + case "sheetLargestUndimmedDetent": + mViewManager.setSheetLargestUndimmedDetent(view, (String) value); + break; + case "sheetGrabberVisible": + mViewManager.setSheetGrabberVisible(view, value == null ? false : (boolean) value); + break; + case "sheetCornerRadius": + mViewManager.setSheetCornerRadius(view, value == null ? -1f : ((Double) value).floatValue()); + break; + case "sheetExpandsWhenScrolledToEdge": + mViewManager.setSheetExpandsWhenScrolledToEdge(view, value == null ? false : (boolean) value); + break; + case "customAnimationOnSwipe": + mViewManager.setCustomAnimationOnSwipe(view, value == null ? false : (boolean) value); + break; + case "fullScreenSwipeEnabled": + mViewManager.setFullScreenSwipeEnabled(view, value == null ? false : (boolean) value); + break; + case "homeIndicatorHidden": + mViewManager.setHomeIndicatorHidden(view, value == null ? false : (boolean) value); + break; + case "preventNativeDismiss": + mViewManager.setPreventNativeDismiss(view, value == null ? false : (boolean) value); + break; + case "gestureEnabled": + mViewManager.setGestureEnabled(view, value == null ? true : (boolean) value); + break; + case "statusBarColor": + mViewManager.setStatusBarColor(view, ColorPropConverter.getColor(value, view.getContext())); + break; + case "statusBarHidden": + mViewManager.setStatusBarHidden(view, value == null ? false : (boolean) value); + break; + case "screenOrientation": + mViewManager.setScreenOrientation(view, value == null ? null : (String) value); + break; + case "statusBarAnimation": + mViewManager.setStatusBarAnimation(view, value == null ? null : (String) value); + break; + case "statusBarStyle": + mViewManager.setStatusBarStyle(view, value == null ? null : (String) value); + break; + case "statusBarTranslucent": + mViewManager.setStatusBarTranslucent(view, value == null ? false : (boolean) value); + break; + case "gestureResponseDistance": + mViewManager.setGestureResponseDistance(view, (ReadableMap) value); + break; + case "stackPresentation": + mViewManager.setStackPresentation(view, (String) value); + break; + case "stackAnimation": + mViewManager.setStackAnimation(view, (String) value); + break; + case "transitionDuration": + mViewManager.setTransitionDuration(view, value == null ? 350 : ((Double) value).intValue()); + break; + case "replaceAnimation": + mViewManager.setReplaceAnimation(view, (String) value); + break; + case "swipeDirection": + mViewManager.setSwipeDirection(view, (String) value); + break; + case "hideKeyboardOnSwipe": + mViewManager.setHideKeyboardOnSwipe(view, value == null ? false : (boolean) value); + break; + case "activityState": + mViewManager.setActivityState(view, value == null ? -1f : ((Double) value).floatValue()); + break; + case "navigationBarColor": + mViewManager.setNavigationBarColor(view, ColorPropConverter.getColor(value, view.getContext())); + break; + case "navigationBarHidden": + mViewManager.setNavigationBarHidden(view, value == null ? false : (boolean) value); + break; + case "nativeBackButtonDismissalEnabled": + mViewManager.setNativeBackButtonDismissalEnabled(view, value == null ? false : (boolean) value); + break; + default: + super.setProperty(view, propName, value); + } + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerInterface.java b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerInterface.java new file mode 100644 index 00000000..49630c83 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerInterface.java @@ -0,0 +1,44 @@ +/** +* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). +* +* Do not edit this file as changes may cause incorrect behavior and will be lost +* once the code is regenerated. +* +* @generated by codegen project: GeneratePropsJavaInterface.js +*/ + +package com.facebook.react.viewmanagers; + +import android.view.View; +import androidx.annotation.Nullable; +import com.facebook.react.bridge.ReadableMap; + +public interface RNSScreenManagerInterface { + void setSheetAllowedDetents(T view, @Nullable String value); + void setSheetLargestUndimmedDetent(T view, @Nullable String value); + void setSheetGrabberVisible(T view, boolean value); + void setSheetCornerRadius(T view, float value); + void setSheetExpandsWhenScrolledToEdge(T view, boolean value); + void setCustomAnimationOnSwipe(T view, boolean value); + void setFullScreenSwipeEnabled(T view, boolean value); + void setHomeIndicatorHidden(T view, boolean value); + void setPreventNativeDismiss(T view, boolean value); + void setGestureEnabled(T view, boolean value); + void setStatusBarColor(T view, @Nullable Integer value); + void setStatusBarHidden(T view, boolean value); + void setScreenOrientation(T view, @Nullable String value); + void setStatusBarAnimation(T view, @Nullable String value); + void setStatusBarStyle(T view, @Nullable String value); + void setStatusBarTranslucent(T view, boolean value); + void setGestureResponseDistance(T view, @Nullable ReadableMap value); + void setStackPresentation(T view, @Nullable String value); + void setStackAnimation(T view, @Nullable String value); + void setTransitionDuration(T view, int value); + void setReplaceAnimation(T view, @Nullable String value); + void setSwipeDirection(T view, @Nullable String value); + void setHideKeyboardOnSwipe(T view, boolean value); + void setActivityState(T view, float value); + void setNavigationBarColor(T view, @Nullable Integer value); + void setNavigationBarHidden(T view, boolean value); + void setNativeBackButtonDismissalEnabled(T view, boolean value); +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerDelegate.java b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerDelegate.java new file mode 100644 index 00000000..e02d6882 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerDelegate.java @@ -0,0 +1,104 @@ +/** +* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). +* +* Do not edit this file as changes may cause incorrect behavior and will be lost +* once the code is regenerated. +* +* @generated by codegen project: GeneratePropsJavaDelegate.js +*/ + +package com.facebook.react.viewmanagers; + +import android.view.View; +import androidx.annotation.Nullable; +import com.facebook.react.bridge.ColorPropConverter; +import com.facebook.react.uimanager.BaseViewManagerDelegate; +import com.facebook.react.uimanager.BaseViewManagerInterface; + +public class RNSScreenStackHeaderConfigManagerDelegate & RNSScreenStackHeaderConfigManagerInterface> extends BaseViewManagerDelegate { + public RNSScreenStackHeaderConfigManagerDelegate(U viewManager) { + super(viewManager); + } + @Override + public void setProperty(T view, String propName, @Nullable Object value) { + switch (propName) { + case "backgroundColor": + mViewManager.setBackgroundColor(view, ColorPropConverter.getColor(value, view.getContext())); + break; + case "backTitle": + mViewManager.setBackTitle(view, value == null ? null : (String) value); + break; + case "backTitleFontFamily": + mViewManager.setBackTitleFontFamily(view, value == null ? null : (String) value); + break; + case "backTitleFontSize": + mViewManager.setBackTitleFontSize(view, value == null ? 0 : ((Double) value).intValue()); + break; + case "color": + mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); + break; + case "direction": + mViewManager.setDirection(view, (String) value); + break; + case "hidden": + mViewManager.setHidden(view, value == null ? false : (boolean) value); + break; + case "hideShadow": + mViewManager.setHideShadow(view, value == null ? false : (boolean) value); + break; + case "largeTitle": + mViewManager.setLargeTitle(view, value == null ? false : (boolean) value); + break; + case "largeTitleFontFamily": + mViewManager.setLargeTitleFontFamily(view, value == null ? null : (String) value); + break; + case "largeTitleFontSize": + mViewManager.setLargeTitleFontSize(view, value == null ? 0 : ((Double) value).intValue()); + break; + case "largeTitleFontWeight": + mViewManager.setLargeTitleFontWeight(view, value == null ? null : (String) value); + break; + case "largeTitleBackgroundColor": + mViewManager.setLargeTitleBackgroundColor(view, ColorPropConverter.getColor(value, view.getContext())); + break; + case "largeTitleHideShadow": + mViewManager.setLargeTitleHideShadow(view, value == null ? false : (boolean) value); + break; + case "largeTitleColor": + mViewManager.setLargeTitleColor(view, ColorPropConverter.getColor(value, view.getContext())); + break; + case "translucent": + mViewManager.setTranslucent(view, value == null ? false : (boolean) value); + break; + case "title": + mViewManager.setTitle(view, value == null ? null : (String) value); + break; + case "titleFontFamily": + mViewManager.setTitleFontFamily(view, value == null ? null : (String) value); + break; + case "titleFontSize": + mViewManager.setTitleFontSize(view, value == null ? 0 : ((Double) value).intValue()); + break; + case "titleFontWeight": + mViewManager.setTitleFontWeight(view, value == null ? null : (String) value); + break; + case "titleColor": + mViewManager.setTitleColor(view, ColorPropConverter.getColor(value, view.getContext())); + break; + case "disableBackButtonMenu": + mViewManager.setDisableBackButtonMenu(view, value == null ? false : (boolean) value); + break; + case "hideBackButton": + mViewManager.setHideBackButton(view, value == null ? false : (boolean) value); + break; + case "backButtonInCustomView": + mViewManager.setBackButtonInCustomView(view, value == null ? false : (boolean) value); + break; + case "topInsetEnabled": + mViewManager.setTopInsetEnabled(view, value == null ? false : (boolean) value); + break; + default: + super.setProperty(view, propName, value); + } + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerInterface.java b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerInterface.java new file mode 100644 index 00000000..2d31a401 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerInterface.java @@ -0,0 +1,41 @@ +/** +* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). +* +* Do not edit this file as changes may cause incorrect behavior and will be lost +* once the code is regenerated. +* +* @generated by codegen project: GeneratePropsJavaInterface.js +*/ + +package com.facebook.react.viewmanagers; + +import android.view.View; +import androidx.annotation.Nullable; + +public interface RNSScreenStackHeaderConfigManagerInterface { + void setBackgroundColor(T view, @Nullable Integer value); + void setBackTitle(T view, @Nullable String value); + void setBackTitleFontFamily(T view, @Nullable String value); + void setBackTitleFontSize(T view, int value); + void setColor(T view, @Nullable Integer value); + void setDirection(T view, @Nullable String value); + void setHidden(T view, boolean value); + void setHideShadow(T view, boolean value); + void setLargeTitle(T view, boolean value); + void setLargeTitleFontFamily(T view, @Nullable String value); + void setLargeTitleFontSize(T view, int value); + void setLargeTitleFontWeight(T view, @Nullable String value); + void setLargeTitleBackgroundColor(T view, @Nullable Integer value); + void setLargeTitleHideShadow(T view, boolean value); + void setLargeTitleColor(T view, @Nullable Integer value); + void setTranslucent(T view, boolean value); + void setTitle(T view, @Nullable String value); + void setTitleFontFamily(T view, @Nullable String value); + void setTitleFontSize(T view, int value); + void setTitleFontWeight(T view, @Nullable String value); + void setTitleColor(T view, @Nullable Integer value); + void setDisableBackButtonMenu(T view, boolean value); + void setHideBackButton(T view, boolean value); + void setBackButtonInCustomView(T view, boolean value); + void setTopInsetEnabled(T view, boolean value); +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderSubviewManagerDelegate.java b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderSubviewManagerDelegate.java new file mode 100644 index 00000000..ccf0bea5 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderSubviewManagerDelegate.java @@ -0,0 +1,31 @@ +/** +* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). +* +* Do not edit this file as changes may cause incorrect behavior and will be lost +* once the code is regenerated. +* +* @generated by codegen project: GeneratePropsJavaDelegate.js +*/ + +package com.facebook.react.viewmanagers; + +import android.view.View; +import androidx.annotation.Nullable; +import com.facebook.react.uimanager.BaseViewManagerDelegate; +import com.facebook.react.uimanager.BaseViewManagerInterface; + +public class RNSScreenStackHeaderSubviewManagerDelegate & RNSScreenStackHeaderSubviewManagerInterface> extends BaseViewManagerDelegate { + public RNSScreenStackHeaderSubviewManagerDelegate(U viewManager) { + super(viewManager); + } + @Override + public void setProperty(T view, String propName, @Nullable Object value) { + switch (propName) { + case "type": + mViewManager.setType(view, (String) value); + break; + default: + super.setProperty(view, propName, value); + } + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderSubviewManagerInterface.java b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderSubviewManagerInterface.java new file mode 100644 index 00000000..14342c74 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderSubviewManagerInterface.java @@ -0,0 +1,17 @@ +/** +* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). +* +* Do not edit this file as changes may cause incorrect behavior and will be lost +* once the code is regenerated. +* +* @generated by codegen project: GeneratePropsJavaInterface.js +*/ + +package com.facebook.react.viewmanagers; + +import android.view.View; +import androidx.annotation.Nullable; + +public interface RNSScreenStackHeaderSubviewManagerInterface { + void setType(T view, @Nullable String value); +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackManagerDelegate.java b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackManagerDelegate.java new file mode 100644 index 00000000..c4109c3c --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackManagerDelegate.java @@ -0,0 +1,25 @@ +/** +* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). +* +* Do not edit this file as changes may cause incorrect behavior and will be lost +* once the code is regenerated. +* +* @generated by codegen project: GeneratePropsJavaDelegate.js +*/ + +package com.facebook.react.viewmanagers; + +import android.view.View; +import androidx.annotation.Nullable; +import com.facebook.react.uimanager.BaseViewManagerDelegate; +import com.facebook.react.uimanager.BaseViewManagerInterface; + +public class RNSScreenStackManagerDelegate & RNSScreenStackManagerInterface> extends BaseViewManagerDelegate { + public RNSScreenStackManagerDelegate(U viewManager) { + super(viewManager); + } + @Override + public void setProperty(T view, String propName, @Nullable Object value) { + super.setProperty(view, propName, value); + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackManagerInterface.java b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackManagerInterface.java new file mode 100644 index 00000000..f0dcecca --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackManagerInterface.java @@ -0,0 +1,16 @@ +/** +* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). +* +* Do not edit this file as changes may cause incorrect behavior and will be lost +* once the code is regenerated. +* +* @generated by codegen project: GeneratePropsJavaInterface.js +*/ + +package com.facebook.react.viewmanagers; + +import android.view.View; + +public interface RNSScreenStackManagerInterface { + // No props +} diff --git a/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt new file mode 100644 index 00000000..10663885 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt @@ -0,0 +1,10 @@ +package com.swmansion.rnscreens + +import android.view.ViewGroup +import com.facebook.react.bridge.ReactContext + +abstract class FabricEnabledViewGroup constructor(context: ReactContext?) : ViewGroup(context) { + protected fun updateScreenSizeFabric(width: Int, height: Int) { + // do nothing + } +} diff --git a/iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenComponentDescriptor.h b/iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenComponentDescriptor.h new file mode 100644 index 00000000..40a3c0ad --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenComponentDescriptor.h @@ -0,0 +1,41 @@ +#pragma once + +#include +#include "RNSScreenShadowNode.h" +#include + +namespace facebook { +namespace react { + +class RNSScreenComponentDescriptor final + : public ConcreteComponentDescriptor { + public: + using ConcreteComponentDescriptor::ConcreteComponentDescriptor; + + void adopt(ShadowNode::Unshared const &shadowNode) const override { + react_native_assert( + std::dynamic_pointer_cast(shadowNode)); + auto screenShadowNode = + std::static_pointer_cast(shadowNode); + + react_native_assert( + std::dynamic_pointer_cast(screenShadowNode)); + auto layoutableShadowNode = + std::static_pointer_cast(screenShadowNode); + + auto state = + std::static_pointer_cast( + shadowNode->getState()); + auto stateData = state->getData(); + + if (stateData.frameSize.width != 0 && stateData.frameSize.height != 0) { + layoutableShadowNode->setSize( + Size{stateData.frameSize.width, stateData.frameSize.height}); + } + + ConcreteComponentDescriptor::adopt(shadowNode); + } +}; + +} // namespace react +} // namespace facebook diff --git a/iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp b/iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp new file mode 100644 index 00000000..ba61ed80 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp @@ -0,0 +1,9 @@ +#include "RNSScreenShadowNode.h" + +namespace facebook { +namespace react { + +extern const char RNSScreenComponentName[] = "RNSScreen"; + +} // namespace react +} // namespace facebook diff --git a/iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.h b/iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.h new file mode 100644 index 00000000..ef25dd16 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.h @@ -0,0 +1,30 @@ +#pragma once + +#include "RNSScreenState.h" +#include +#include +#include +#include + +namespace facebook { +namespace react { + +JSI_EXPORT extern const char RNSScreenComponentName[]; + +class JSI_EXPORT RNSScreenShadowNode final : public ConcreteViewShadowNode< + RNSScreenComponentName, + RNSScreenProps, + RNSScreenEventEmitter, + RNSScreenState> { + public: + using ConcreteViewShadowNode::ConcreteViewShadowNode; + + static ShadowNodeTraits BaseTraits() { + auto traits = ConcreteViewShadowNode::BaseTraits(); + traits.set(ShadowNodeTraits::Trait::RootNodeKind); + return traits; + } +}; + +} // namespace react +} // namespace facebook diff --git a/iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenState.cpp b/iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenState.cpp new file mode 100644 index 00000000..69c77a6b --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenState.cpp @@ -0,0 +1,14 @@ +#include "RNSScreenState.h" + +namespace facebook { +namespace react { + +#ifdef ANDROID +folly::dynamic RNSScreenState::getDynamic() const { + return folly::dynamic::object("frameWidth", frameSize.width)( + "frameHeight", frameSize.height); +} +#endif + +} // namespace react +} // namespace facebook diff --git a/iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h b/iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h new file mode 100644 index 00000000..8d1641c2 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h @@ -0,0 +1,46 @@ +#pragma once + +#include +#include +#include + +#ifdef ANDROID +#include +#include +#include +#endif + +namespace facebook { +namespace react { + +class JSI_EXPORT RNSScreenState final { + public: + using Shared = std::shared_ptr; + + RNSScreenState(){}; + RNSScreenState(Size frameSize_) : frameSize(frameSize_){}; + +#ifdef ANDROID + RNSScreenState( + RNSScreenState const &previousState, + folly::dynamic data) + : frameSize(Size{ + (Float)data["frameWidth"].getDouble(), + (Float)data["frameHeight"].getDouble()}){}; +#endif + + const Size frameSize{}; + +#ifdef ANDROID + folly::dynamic getDynamic() const; + MapBuffer getMapBuffer() const { + return MapBufferBuilder::EMPTY(); + }; + +#endif + +#pragma mark - Getters +}; + +} // namespace react +} // namespace facebook diff --git a/iut-expo-starter/node_modules/react-native-screens/createNativeStackNavigator/README.md b/iut-expo-starter/node_modules/react-native-screens/createNativeStackNavigator/README.md new file mode 100644 index 00000000..69ea9c25 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/createNativeStackNavigator/README.md @@ -0,0 +1,522 @@ +# Native Stack Navigator + +Provides a way for your app to transition between screens where each new screen is placed on top of a stack. + +By default the stack navigator is configured to have the familiar iOS and Android look & feel: new screens slide in from the right on iOS, fade in from the bottom on Android. On iOS, the stack navigator can also be configured to a modal style where screens slide in from the bottom. + +This navigator uses native navigation primitives (`UINavigationController` on iOS and `Fragment` on Android) for navigation under the hood. The main difference from React Navigation's JS-based [stack navigator](https://reactnavigation.org/docs/stack-navigator.html) is that the JS-based navigator re-implements animations and gestures while the native stack navigator relies on the platform primitives for animations and gestures. You should use this navigator if you want native feeling and performance for navigation and don't need much customization, as the customization options of this navigator are limited. + +```sh +npm install react-native-screens @react-navigation/native +``` + +## Disabling `react-native-screens` + +If, for whatever reason, you'd like to disable native screens support and use plain React Native Views add the following code in your entry file (e.g. `App.js`): + +```js +import { enableScreens } from 'react-native-screens'; + +enableScreens(false); +``` + +## API Definition + +To use this navigator, import it from `react-native-screens/createNativeStackNavigator`: + +```js +import createNativeStackNavigator from 'react-native-screens/createNativeStackNavigator'; + +const RootStack = createNativeStackNavigator( + { + Home: HomeScreen, + Details: DetailsScreen, + }, + { + initialRouteName: 'Home', + } +); +``` + +### StackNavigatorConfig + +Visual options: + +- `mode` - it is an option from `stackNavigator` and controls the stack presentation along with `cardTransparent` prop. Use `stackPresentation` instead to be consistent with v5 `native-stack`. Available options are: `'modal'`, `'containedModal'`. +- `headerMode` - it is an option from `stackNavigator` and it hides the header when set to `none`. Use `headerShown` instead to be consistent with v5 `native-stack`. Available option is: `'none'`. +- `transparentCard` - This is a boolean from `stackNavigator` that controls the stack presentation along with `mode` prop. Use `stackPresentation` instead to be consistent with v5 `native-stack`. + +### `navigationOptions` for screens inside of the navigator + +Options from `stack` navigator: + +- `header` - makes the header hide when set to `null`. Use `headerShown` instead to be consistent with v5 `native-stack`. +- `cardTransparent` - boolean that controls the stack presentation along with `mode` prop. Use `stackPresentation` instead to be consistent with v5 `native-stack`. +- `animationEnabled`- boolean that sets stack animation to none when `false` passed. Use `stackAnimation: 'none'` instead to be consistent with v5 `native-stack`. +- `cardStyle` - style prop for `Screen` component. + +Options for back button taken from `react-navigation-stack`: + +- `headerBackImage` - maps to [`headerBackImage`](https://reactnavigation.org/docs/4.x/stack-navigator#headerbackimage) +- `headerPressColorAndroid` - maps to [`headerPressColorAndroid`](https://reactnavigation.org/docs/4.x/stack-navigator#headerpresscolorandroid) +- `headerTintColor` - maps to [`headerTintColor`](https://reactnavigation.org/docs/4.x/stack-navigator#headertintcolor) +- `backButtonTitle` - maps to [`headerBackTitle`](https://reactnavigation.org/docs/4.x/stack-navigator#headerbacktitle) +- `truncatedBackButtonTitle` - maps to [`headerTruncatedBackTitle`](https://reactnavigation.org/docs/4.x/stack-navigator#headertruncatedbacktitle) +- `backTitleVisible` - maps to [`headerBackTitleVisible`](https://reactnavigation.org/docs/4.x/stack-navigator#headerbacktitlevisible) +- `headerBackTitleStyle` - maps to [`headerBackTitleStyle`](https://reactnavigation.org/docs/4.x/stack-navigator#headerbacktitlestyle) +- `layoutPreset` - Layout of the title element in the header. + +Legacy options (these props differ from the ones used in v5 `native-stack`, and we would like to keep the API consistent between versions): + +- `hideShadow` - see `headerHideShadow`. +- `largeTitle` - see `headerLargeTitle`. +- `largeTitleHideShadow` - see `headerLargeTitleHideShadow`. +- `translucent` - see `headerTranslucent`. + +#### `backButtonInCustomView` + +Boolean indicating whether to hide the back button while using `headerLeft` function. + +#### `customAnimationOnSwipe` (iOS only) + +Boolean indicating that swipe dismissal should trigger animation provided by `stackAnimation`. Defaults to `false`. + +#### `direction` + +String that applies `rtl` or `ltr` form to the stack. On Android, you have to add `android:supportsRtl="true"` in the manifest of your app to enable `rtl`. On Android, if you set the above flag in the manifest, the orientation changes without the need to do it programmatically if the phone has `rtl` direction enabled. On iOS, the direction defaults to `ltr`, and only way to change it is via this prop. + +#### `disableBackButtonMenu` (iOS only) + +Boolean indicating whether to show the menu on longPress of iOS >= 14 back button. + +#### `fullScreenSwipeEnabled` (iOS only) + +Boolean indicating whether the swipe gesture should work on whole screen. Swiping with this option results in the same transition animation as `simple_push` by default. It can be changed to other custom animations with `customAnimationOnSwipe` prop, but default iOS swipe animation is not achievable due to usage of custom recognizer. Defaults to `false`. + +#### `gestureEnabled` (iOS only) + +Whether you can use gestures to dismiss this screen. Defaults to `true`. + +#### `headerBackTitle` + +Title string used by the back button on iOS. Defaults to the previous scene's `headerTitle`. + +#### `headerBackTitleStyle` + +Style object for header back title. Supported properties: + +- `fontFamily` +- `fontSize` + +#### `headerBackTitleVisible` (iOS only) + +Whether the back button title should be visible or not. Defaults to `true`. + +#### `headerHideBackButton` + +Boolean indicating whether to hide the back button in the header. + +#### `headerHideShadow` + +Boolean indicating whether to hide the elevation shadow on the header. + +#### `headerLargeStyle` (iOS only) + +Style object for the large header. Supported properties: + +- `backgroundColor` + +#### `headerLargeTitle` (iOS only) + +Boolean used to set a native property to prefer a large title header (like in iOS setting). + +For the large title to collapse on scroll, the content of the screen should be wrapped in a scrollable view such as `ScrollView` or `FlatList`. If the scrollable area doesn't fill the screen, the large title won't collapse on scroll. + +#### `headerLargeTitleHideShadow` (iOS only) + +Boolean that allows for disabling drop shadow under navigation header when the edge of any scrollable content reaches the matching edge of the navigation bar. + +#### `headerLargeTitleStyle` (iOS only) + +Style object for header large title. Supported properties: + +- `color` +- `fontFamily` +- `fontSize` +- `fontWeight` + +#### `headerLeft` + +Function which returns a React Element to display on the left side of the header. For now, on Android, using it will cause the title to also disappear. + +#### `headerRight` + +Function which returns a React Element to display on the right side of the header. + +#### `headerShown` + +Whether to show or hide the header for the screen. The header is shown by default. Setting this to `false` hides the header. + +#### `headerStyle` + +Style object for the header. Supported properties: + +- `backgroundColor` +- `blurEffect` (iOS only). + +#### `headerTintColor` + +Tint color for the header. Changes the color of the back button and title. + +#### `headerTitle` + +String to be used by the header as title string. Defaults to scene `title`. + +#### `headerTitleStyle` + +Style object for header title. Supported properties: + +- `fontFamily` +- `fontSize` +- `fontWeight` +- `color` + +#### `headerTopInsetEnabled` (Android only) + +A Boolean to that lets you opt out of insetting the header. You may want to * set this to `false` if you use an opaque status bar. Defaults to `true`. Insets are always applied on iOS because the header cannot be opaque. + +#### `headerTranslucent` + +Boolean indicating whether the navigation bar is translucent. + +#### `nativeBackButtonDismissalEnabled` (Android only) + +Boolean indicating whether, when the Android default back button is clicked, the `pop` action should be performed on the native side or on the JS side to be able to prevent it. +Unfortunately the same behavior is not available on iOS since the behavior of native back button cannot be changed there. + +Defaults to `false`. + +#### `replaceAnimation` + +How should the screen replacing another screen animate. +The following values are currently supported: + - `push` – the new screen will perform push animation. + - `pop` – the new screen will perform pop animation. + +Defaults to `pop`. + +#### `stackAnimation` + +How the given screen should appear/disappear when pushed or popped at the top of the stack. Possible values: + +- `default` - Uses a platform default animation. +- `fade` - Fades screen in or out. +- `fade_from_bottom` – performs a fade from bottom animation +- `flip` – Flips the screen, requires stackPresentation: `modal` (iOS only). +- `simple_push` – performs a default animation, but without shadow and native header transition (iOS only) +- `slide_from_bottom` – performs a slide from bottom animation +- `slide_from_right` - slide in the new screen from right to left (Android only, resolves to default transition on iOS) +- `slide_from_left` - slide in the new screen from left to right (Android only, resolves to default transition on iOS) +- `none` - The screen appears/disappears without an animation. + +Defaults to `default`. + +#### `stackPresentation` + +How the screen should be presented. Possible values: + +- `push` - The new screen will be pushed onto a stack. The default animation on iOS is to slide from the side. The animation on Android may vary depending on the OS version and theme. +- `modal` - The new screen will be presented modally. In addition, this allows for a nested stack to be rendered inside such screens. +- `transparentModal` - The new screen will be presented modally. In addition, the second to last screen will remain attached to the stack container such that if the top screen is translucent, the content below can still be seen. If `"modal"` is used instead, the below screen gets removed as soon as the transition ends. +- `containedModal` – will use "UIModalPresentationCurrentContext" modal style on iOS and will fallback to `"modal"` on Android. +- `containedTransparentModal` – will use "UIModalPresentationOverCurrentContext" modal style on iOS and will fallback to `"transparentModal"` on Android. +- `fullScreenModal` – will use "UIModalPresentationFullScreen" modal style on iOS and will fallback to `"modal"` on Android. +- `formSheet` – will use "UIModalPresentationFormSheet" modal style on iOS and will fallback to `"modal"` on Android. + +Defaults to `push`. + +Using `containedModal` and `containedTransparentModal` with other types of modals in one native stack navigator is not recommended and can result in a freeze or a crash of the application. + +#### `title` + +A string that can be used as a fallback for `headerTitle`. + +#### `useTransitionProgress` + +Hook providing context value of transition progress of the current screen to be used with `react-native` `Animated`. It consists of 2 values: +- `progress` - `Animated.Value` between `0.0` and `1.0` with the progress of the current transition. +- `closing` - `Animated.Value` of `1` or `0` indicating if the current screen is being navigated into or from. +- `goingForward` - `Animated.Value` of `1` or `0` indicating if the current transition is pushing or removing screens. + +```jsx +import {Animated} from 'react-native'; +import {useTransitionProgress} from 'react-native-screens'; + +function Home() { + const {progress} = useTransitionProgress(); + + const opacity = progress.interpolate({ + inputRange: [0, 0.5, 1], + outputRange: [1.0, 0.0 ,1.0], + extrapolate: 'clamp', + }); + + return ( + + ); +} +``` + +#### `useReanimatedTransitionProgress` + +A callback called every frame during the transition of screens to be used with `react-native-reanimated` version `2.x`. It consists of 2 shared values: +- `progress` - between `0.0` and `1.0` with the progress of the current transition. +- `closing` - `1` or `0` indicating if the current screen is being navigated into or from. +- `goingForward` - `1` or `0` indicating if the current transition is pushing or removing screens. + +In order to use it, you need to have `react-native-reanimated` version `2.x` installed in your project and wrap your code with `ReanimatedScreenProvider`, like this: + +```jsx +import {ReanimatedScreenProvider} from 'react-native-screens/reanimated'; + +export default function App() { + return ( + + + + ); +} +``` + +Then you can use `useReanimatedTransitionProgress` to get the shared values: + +```jsx +import {useReanimatedTransitionProgress} from 'react-native-screens/reanimated'; +import Animated, {useAnimatedStyle, useDerivedValue} from 'react-native-reanimated'; + +function Home() { + const reaProgress = useReanimatedTransitionProgress(); + const sv = useDerivedValue(() => (reaProgress.progress.value < 0.5 ? (reaProgress.progress.value * 50) : ((1 - reaProgress.progress.value) * 50)) + 50); + const reaStyle = useAnimatedStyle(() => { + return { + width: sv.value, + height: sv.value, + backgroundColor: 'blue', + }; + }); + + return ( + + ); +} +``` + +### Status bar and orientation managment + +With `native-stack`, the status bar and screen orientation can be managed by `UIViewController` on iOS. On Android, the status bar and screen orientation can be managed by `FragmentActivity`. On iOS, it requires: + +1. For status bar managment: enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file (it disables the option to use React Native's `StatusBar` component). +2. For both status bar and orientation managment: adding `#import ` in your project's `AppDelegate.m` (you can see this change applied in the `AppDelegate.m` of `Example` project). + +On Android, no additional setup is required, although, you should keep in mind that once you set the orientation or status bar props, `react-native-screens` will manage them on every screen, so you shouldn't use other methods of manipulating them then. +#### `screenOrientation` + +Sets the current screen's available orientations and forces rotation if current orientation is not included. On iOS, if you have supported orientations set in `info.plist`, they will take precedence over this prop. Possible values: + +- `default` - on iOS, it resolves to [UIInterfaceOrientationMaskAllButUpsideDown](https://developer.apple.com/documentation/uikit/uiinterfaceorientationmask/uiinterfaceorientationmaskallbutupsidedown?language=objc). On Android, this lets the system decide the best orientation. +- `all` +- `portrait` +- `portrait_up` +- `portrait_down` +- `landscape` +- `landscape_left` +- `landscape_right` + +Defaults to `default`. + +#### `statusBarAnimation` + +Sets the status bar animation (similar to the `StatusBar` component). Possible values: `fade`, `none`, `slide`. On Android, this prop considers the transition of changing status bar color (see https://reactnative.dev/docs/statusbar#animated). There will be no animation if `none` provided. + +Defaults to `fade` on iOS and `none` on Android. + +#### `statusBarColor` (Android only) + +Sets the status bar color (similar to the `StatusBar` component). Defaults to initial status bar color. + +#### `statusBarHidden` + +Boolean saying if the status bar for this screen is hidden. + +Defaults to `false`. + +#### `statusBarStyle` + +Sets the status bar color (similar to the `StatusBar` component). On iOS, the possible values are: `auto` (based on [user interface style](https://developer.apple.com/documentation/uikit/uiuserinterfacestyle?language=objc), `inverted` (colors opposite to `auto`), `light`, `dark`. On Android, the status bar will be dark if set to `dark` and `light` otherwise. + +Defaults to `auto`. + +#### `statusBarTranslucent` (Android only) + +Sets the translucency of the status bar (similar to the `StatusBar` component). Defaults to `false`. + +### Search bar (iOS only) + +The search bar is just a `searchBar` property that can be specified in the navigator's `defaultNavigationOptions` prop or an individual screen's `navigationOptions`. Search bars are rarely static so normally it is controlled by passing an object to `searchBar` navigation option in the component's body. + +Search bar is only supported on iOS. + +Example: + +```js +static navigationOptions = ({navigation}) => { + return { + searchBar: { + // search bar options + }, + }; +}; +``` + +Supported properties are described below. + +#### `autoCapitalize` + +Controls whether the text is automatically auto-capitalized as it is entered by the user. +Possible values: + +- `none` +- `words` +- `sentences` +- `characters` + +Defaults to `sentences`. + +#### `barTintColor` + +The search field background color. + +By default bar tint color is translucent. + +#### `tintColor` + +The color for the cursor caret and cancel button text. + +#### `cancelButtonText` + +The text to be used instead of default `Cancel` button text. + +#### `hideNavigationBar` + +Boolean indicating whether to hide the navigation bar during searching. + +Defaults to `true`. + +#### `hideWhenScrolling` + +Boolean indicating whether to hide the search bar when scrolling. + +Defaults to `true`. + +#### `obscureBackground` + +Boolean indicating whether to obscure the underlying content with semi-transparent overlay. + +Defaults to `true`. + +#### `onBlur` + +A callback that gets called when search bar has lost focus. + +#### `onCancelButtonPress` + +A callback that gets called when the cancel button is pressed. + +#### `onChangeText` + +A callback that gets called when the text changes. It receives the current text value of the search bar. + +Example: + +```js +static navigationOptions = ({navigation}) => { + return { + searchBar: { + onChangeText: (event) => { + navigation.setParams({search: event.nativeEvent.text}); + }, + }, + }; +}; +``` + +#### `onFocus` + +A callback that gets called when search bar has received focus. + +#### `onSearchButtonPress` + +A callback that gets called when the search button is pressed. It receives the current text value of the search bar. + +#### `placeholder` + +Text displayed when search field is empty. + +Defaults to an empty string. + +#### `textColor` + +The search field text color. + +#### `hintTextColor` + +The search hint text color. (Android only) + +#### `headerIconColor` + +The search and close icon color shown in the header. (Android only) + +#### `shouldShowHintSearchIcon` + +Show the search hint icon when search bar is focused. (Android only) + +### Helpers + +The stack navigator adds the following methods to the navigation prop: + +#### `push` + +Pushes a new screen to the top of the stack and navigate to it. The method accepts the following arguments: + +- `name` - _string_ - Name of the route to push onto the stack. +- `params` - _object_ - Screen params to merge into the destination route (found in the pushed screen through `route.params`). + +```js +navigation.push('Profile', { name: 'Wojtek' }); +``` + +#### `pop` + +Pops the current screen from the stack and navigates back to the previous screen. It takes one optional argument (`count`), which allows you to specify how many screens to pop back by. + +```js +navigation.pop(); +``` + +#### `popToTop` + +Pops all of the screens in the stack except the first one and navigates to it. + +```js +navigation.popToTop(); +``` + +## Additional options + +### Measuring header's height + +To measure header's height, you can use `useHeaderHeight` hook. + +```tsx +import {useHeaderHeight} from 'react-native-screens/native-stack'; +``` diff --git a/iut-expo-starter/node_modules/react-native-screens/createNativeStackNavigator/package.json b/iut-expo-starter/node_modules/react-native-screens/createNativeStackNavigator/package.json new file mode 100644 index 00000000..71a9673d --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/createNativeStackNavigator/package.json @@ -0,0 +1,6 @@ +{ + "main": "../lib/commonjs/createNativeStackNavigator", + "module": "../lib/module/createNativeStackNavigator", + "react-native": "../src/createNativeStackNavigator", + "types": "../lib/typescript/createNativeStackNavigator.d.ts" +} diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSConvert.h b/iut-expo-starter/node_modules/react-native-screens/ios/RNSConvert.h new file mode 100644 index 00000000..8114df52 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSConvert.h @@ -0,0 +1,36 @@ +#ifdef RN_FABRIC_ENABLED +#import +#import "RNSEnums.h" + +@interface RNSConvert : NSObject + ++ (RNSScreenStackPresentation)RNSScreenStackPresentationFromCppEquivalent: + (facebook::react::RNSScreenStackPresentation)stackPresentation; + ++ (RNSScreenStackAnimation)RNSScreenStackAnimationFromCppEquivalent: + (facebook::react::RNSScreenStackAnimation)stackAnimation; + ++ (RNSScreenStackHeaderSubviewType)RNSScreenStackHeaderSubviewTypeFromCppEquivalent: + (facebook::react::RNSScreenStackHeaderSubviewType)subviewType; + ++ (RNSScreenReplaceAnimation)RNSScreenReplaceAnimationFromCppEquivalent: + (facebook::react::RNSScreenReplaceAnimation)replaceAnimation; + ++ (RNSScreenSwipeDirection)RNSScreenSwipeDirectionFromCppEquivalent: + (facebook::react::RNSScreenSwipeDirection)swipeDirection; + ++ (RNSScreenDetentType)RNSScreenDetentTypeFromAllowedDetents: + (facebook::react::RNSScreenSheetAllowedDetents)allowedDetents; + ++ (RNSScreenDetentType)RNSScreenDetentTypeFromLargestUndimmedDetent: + (facebook::react::RNSScreenSheetLargestUndimmedDetent)detent; + ++ (NSDictionary *)gestureResponseDistanceDictFromCppStruct: + (const facebook::react::RNSScreenGestureResponseDistanceStruct &)gestureResponseDistance; + ++ (UITextAutocapitalizationType)UITextAutocapitalizationTypeFromCppEquivalent: + (facebook::react::RNSSearchBarAutoCapitalize)autoCapitalize; + +@end + +#endif // RN_FABRIC_ENABLED diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSConvert.mm b/iut-expo-starter/node_modules/react-native-screens/ios/RNSConvert.mm new file mode 100644 index 00000000..600719c0 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSConvert.mm @@ -0,0 +1,146 @@ +#import "RNSConvert.h" + +#ifdef RN_FABRIC_ENABLED +@implementation RNSConvert + ++ (RNSScreenStackPresentation)RNSScreenStackPresentationFromCppEquivalent: + (facebook::react::RNSScreenStackPresentation)stackPresentation +{ + switch (stackPresentation) { + case facebook::react::RNSScreenStackPresentation::Push: + return RNSScreenStackPresentationPush; + case facebook::react::RNSScreenStackPresentation::Modal: + return RNSScreenStackPresentationModal; + case facebook::react::RNSScreenStackPresentation::FullScreenModal: + return RNSScreenStackPresentationFullScreenModal; + case facebook::react::RNSScreenStackPresentation::FormSheet: + return RNSScreenStackPresentationFormSheet; + case facebook::react::RNSScreenStackPresentation::ContainedModal: + return RNSScreenStackPresentationContainedModal; + case facebook::react::RNSScreenStackPresentation::TransparentModal: + return RNSScreenStackPresentationTransparentModal; + case facebook::react::RNSScreenStackPresentation::ContainedTransparentModal: + return RNSScreenStackPresentationContainedTransparentModal; + } +} + ++ (RNSScreenStackAnimation)RNSScreenStackAnimationFromCppEquivalent: + (facebook::react::RNSScreenStackAnimation)stackAnimation +{ + switch (stackAnimation) { + // these three are intentionally grouped + case facebook::react::RNSScreenStackAnimation::Slide_from_right: + case facebook::react::RNSScreenStackAnimation::Slide_from_left: + case facebook::react::RNSScreenStackAnimation::Default: + return RNSScreenStackAnimationDefault; + case facebook::react::RNSScreenStackAnimation::Flip: + return RNSScreenStackAnimationFlip; + case facebook::react::RNSScreenStackAnimation::Simple_push: + return RNSScreenStackAnimationSimplePush; + case facebook::react::RNSScreenStackAnimation::None: + return RNSScreenStackAnimationNone; + case facebook::react::RNSScreenStackAnimation::Fade: + return RNSScreenStackAnimationFade; + case facebook::react::RNSScreenStackAnimation::Slide_from_bottom: + return RNSScreenStackAnimationSlideFromBottom; + case facebook::react::RNSScreenStackAnimation::Fade_from_bottom: + return RNSScreenStackAnimationFadeFromBottom; + } +} + ++ (RNSScreenStackHeaderSubviewType)RNSScreenStackHeaderSubviewTypeFromCppEquivalent: + (facebook::react::RNSScreenStackHeaderSubviewType)subviewType +{ + switch (subviewType) { + case facebook::react::RNSScreenStackHeaderSubviewType::Left: + return RNSScreenStackHeaderSubviewTypeLeft; + case facebook::react::RNSScreenStackHeaderSubviewType::Right: + return RNSScreenStackHeaderSubviewTypeRight; + case facebook::react::RNSScreenStackHeaderSubviewType::Title: + return RNSScreenStackHeaderSubviewTypeTitle; + case facebook::react::RNSScreenStackHeaderSubviewType::Center: + return RNSScreenStackHeaderSubviewTypeCenter; + case facebook::react::RNSScreenStackHeaderSubviewType::SearchBar: + return RNSScreenStackHeaderSubviewTypeSearchBar; + case facebook::react::RNSScreenStackHeaderSubviewType::Back: + return RNSScreenStackHeaderSubviewTypeBackButton; + } +} + ++ (RNSScreenReplaceAnimation)RNSScreenReplaceAnimationFromCppEquivalent: + (facebook::react::RNSScreenReplaceAnimation)replaceAnimation +{ + switch (replaceAnimation) { + case facebook::react::RNSScreenReplaceAnimation::Pop: + return RNSScreenReplaceAnimationPop; + case facebook::react::RNSScreenReplaceAnimation::Push: + return RNSScreenReplaceAnimationPush; + } +} + ++ (RNSScreenSwipeDirection)RNSScreenSwipeDirectionFromCppEquivalent: + (facebook::react::RNSScreenSwipeDirection)swipeDirection +{ + switch (swipeDirection) { + case facebook::react::RNSScreenSwipeDirection::Horizontal: + return RNSScreenSwipeDirectionHorizontal; + case facebook::react::RNSScreenSwipeDirection::Vertical: + return RNSScreenSwipeDirectionVertical; + } +} + ++ (RNSScreenDetentType)RNSScreenDetentTypeFromAllowedDetents: + (facebook::react::RNSScreenSheetAllowedDetents)allowedDetents +{ + switch (allowedDetents) { + case facebook::react::RNSScreenSheetAllowedDetents::All: + return RNSScreenDetentTypeAll; + case facebook::react::RNSScreenSheetAllowedDetents::Large: + return RNSScreenDetentTypeLarge; + case facebook::react::RNSScreenSheetAllowedDetents::Medium: + return RNSScreenDetentTypeMedium; + } +} + ++ (RNSScreenDetentType)RNSScreenDetentTypeFromLargestUndimmedDetent: + (facebook::react::RNSScreenSheetLargestUndimmedDetent)detent +{ + switch (detent) { + case facebook::react::RNSScreenSheetLargestUndimmedDetent::All: + return RNSScreenDetentTypeAll; + case facebook::react::RNSScreenSheetLargestUndimmedDetent::Large: + return RNSScreenDetentTypeLarge; + case facebook::react::RNSScreenSheetLargestUndimmedDetent::Medium: + return RNSScreenDetentTypeMedium; + } +} + ++ (NSDictionary *)gestureResponseDistanceDictFromCppStruct: + (const facebook::react::RNSScreenGestureResponseDistanceStruct &)gestureResponseDistance +{ + return @{ + @"start" : @(gestureResponseDistance.start), + @"end" : @(gestureResponseDistance.end), + @"top" : @(gestureResponseDistance.top), + @"bottom" : @(gestureResponseDistance.bottom), + }; +} + ++ (UITextAutocapitalizationType)UITextAutocapitalizationTypeFromCppEquivalent: + (facebook::react::RNSSearchBarAutoCapitalize)autoCapitalize +{ + switch (autoCapitalize) { + case facebook::react::RNSSearchBarAutoCapitalize::Words: + return UITextAutocapitalizationTypeWords; + case facebook::react::RNSSearchBarAutoCapitalize::Sentences: + return UITextAutocapitalizationTypeSentences; + case facebook::react::RNSSearchBarAutoCapitalize::Characters: + return UITextAutocapitalizationTypeAllCharacters; + case facebook::react::RNSSearchBarAutoCapitalize::None: + return UITextAutocapitalizationTypeNone; + } +} + +@end + +#endif // RN_FABRIC_ENABLED diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSEnums.h b/iut-expo-starter/node_modules/react-native-screens/ios/RNSEnums.h new file mode 100644 index 00000000..de886edf --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSEnums.h @@ -0,0 +1,65 @@ +typedef NS_ENUM(NSInteger, RNSScreenStackPresentation) { + RNSScreenStackPresentationPush, + RNSScreenStackPresentationModal, + RNSScreenStackPresentationTransparentModal, + RNSScreenStackPresentationContainedModal, + RNSScreenStackPresentationContainedTransparentModal, + RNSScreenStackPresentationFullScreenModal, + RNSScreenStackPresentationFormSheet +}; + +typedef NS_ENUM(NSInteger, RNSScreenStackAnimation) { + RNSScreenStackAnimationDefault, + RNSScreenStackAnimationNone, + RNSScreenStackAnimationFade, + RNSScreenStackAnimationFadeFromBottom, + RNSScreenStackAnimationFlip, + RNSScreenStackAnimationSlideFromBottom, + RNSScreenStackAnimationSimplePush, +}; + +typedef NS_ENUM(NSInteger, RNSScreenReplaceAnimation) { + RNSScreenReplaceAnimationPop, + RNSScreenReplaceAnimationPush, +}; + +typedef NS_ENUM(NSInteger, RNSScreenSwipeDirection) { + RNSScreenSwipeDirectionHorizontal, + RNSScreenSwipeDirectionVertical, +}; + +typedef NS_ENUM(NSInteger, RNSActivityState) { + RNSActivityStateInactive = 0, + RNSActivityStateTransitioningOrBelowTop = 1, + RNSActivityStateOnTop = 2 +}; + +typedef NS_ENUM(NSInteger, RNSStatusBarStyle) { + RNSStatusBarStyleAuto, + RNSStatusBarStyleInverted, + RNSStatusBarStyleLight, + RNSStatusBarStyleDark, +}; + +typedef NS_ENUM(NSInteger, RNSWindowTrait) { + RNSWindowTraitStyle, + RNSWindowTraitAnimation, + RNSWindowTraitHidden, + RNSWindowTraitOrientation, + RNSWindowTraitHomeIndicatorHidden, +}; + +typedef NS_ENUM(NSInteger, RNSScreenStackHeaderSubviewType) { + RNSScreenStackHeaderSubviewTypeBackButton, + RNSScreenStackHeaderSubviewTypeLeft, + RNSScreenStackHeaderSubviewTypeRight, + RNSScreenStackHeaderSubviewTypeTitle, + RNSScreenStackHeaderSubviewTypeCenter, + RNSScreenStackHeaderSubviewTypeSearchBar, +}; + +typedef NS_ENUM(NSInteger, RNSScreenDetentType) { + RNSScreenDetentTypeMedium, + RNSScreenDetentTypeLarge, + RNSScreenDetentTypeAll, +}; diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSFullWindowOverlay.h b/iut-expo-starter/node_modules/react-native-screens/ios/RNSFullWindowOverlay.h new file mode 100644 index 00000000..ce77c9eb --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSFullWindowOverlay.h @@ -0,0 +1,30 @@ +#import + +#ifdef RN_FABRIC_ENABLED +#import +#else +#import +#import +#endif + +@interface RNSFullWindowOverlayManager : RCTViewManager + +@end + +@interface RNSFullWindowOverlayContainer : UIView + +@end + +@interface RNSFullWindowOverlay : +#ifdef RN_FABRIC_ENABLED + RCTViewComponentView +#else + RCTView +#endif // RN_FABRIC_ENABLED + +#ifdef RN_FABRIC_ENABLED +@property (nonatomic) facebook::react::LayoutMetrics oldLayoutMetrics; +@property (nonatomic) facebook::react::LayoutMetrics newLayoutMetrics; +#endif // RN_FABRIC_ENABLED + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSFullWindowOverlay.mm b/iut-expo-starter/node_modules/react-native-screens/ios/RNSFullWindowOverlay.mm new file mode 100644 index 00000000..17a8be48 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSFullWindowOverlay.mm @@ -0,0 +1,231 @@ +#import + +#import "RNSFullWindowOverlay.h" + +#ifdef RN_FABRIC_ENABLED +#import +#import +#import +#import +#import +#import +#else +#import +#endif // RN_FABRIC_ENABLED + +@implementation RNSFullWindowOverlayContainer + +- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event +{ + for (UIView *view in [self subviews]) { + if (view.userInteractionEnabled && [view pointInside:[self convertPoint:point toView:view] withEvent:event]) { + return YES; + } + } + return NO; +} + +- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event +{ + BOOL canReceiveTouchEvents = ([self isUserInteractionEnabled] && ![self isHidden]); + if (!canReceiveTouchEvents) { + return nil; + } + + // `hitSubview` is the topmost subview which was hit. The hit point can + // be outside the bounds of `view` (e.g., if -clipsToBounds is NO). + UIView *hitSubview = nil; + BOOL isPointInside = [self pointInside:point withEvent:event]; + if (![self clipsToBounds] || isPointInside) { + // Take z-index into account when calculating the touch target. + NSArray *sortedSubviews = [self reactZIndexSortedSubviews]; + + // The default behaviour of UIKit is that if a view does not contain a point, + // then no subviews will be returned from hit testing, even if they contain + // the hit point. By doing hit testing directly on the subviews, we bypass + // the strict containment policy (i.e., UIKit guarantees that every ancestor + // of the hit view will return YES from -pointInside:withEvent:). See: + // - https://developer.apple.com/library/ios/qa/qa2013/qa1812.html + for (UIView *subview in [sortedSubviews reverseObjectEnumerator]) { + CGPoint convertedPoint = [subview convertPoint:point fromView:self]; + hitSubview = [subview hitTest:convertedPoint withEvent:event]; + if (hitSubview != nil) { + break; + } + } + } + return hitSubview; +} + +@end + +@implementation RNSFullWindowOverlay { + __weak RCTBridge *_bridge; + RNSFullWindowOverlayContainer *_container; + CGRect _reactFrame; +#ifdef RN_FABRIC_ENABLED + RCTSurfaceTouchHandler *_touchHandler; +#else + RCTTouchHandler *_touchHandler; +#endif // RN_FABRIC_ENABLED +} + +#ifdef RN_FABRIC_ENABLED +- (instancetype)init +{ + if (self = [super init]) { + static const auto defaultProps = std::make_shared(); + _props = defaultProps; + [self _initCommon]; + } + return self; +} +#endif // RN_FABRIC_ENABLED + +- (instancetype)initWithBridge:(RCTBridge *)bridge +{ + if (self = [super init]) { + _bridge = bridge; + [self _initCommon]; + } + + return self; +} + +- (void)_initCommon +{ + _reactFrame = CGRectNull; + _container = self.container; + [self show]; +} + +- (void)addSubview:(UIView *)view +{ + [_container addSubview:view]; +} + +- (RNSFullWindowOverlayContainer *)container +{ + if (_container == nil) { + _container = [[RNSFullWindowOverlayContainer alloc] initWithFrame:_reactFrame]; + } + + return _container; +} + +- (void)show +{ + UIWindow *window = RCTSharedApplication().delegate.window; + [window addSubview:_container]; +} + +- (void)didMoveToWindow +{ + if (self.window == nil) { + if (_container != nil) { + [_container removeFromSuperview]; + [_touchHandler detachFromView:_container]; + } + } else { + if (_touchHandler == nil) { +#ifdef RN_FABRIC_ENABLED + _touchHandler = [RCTSurfaceTouchHandler new]; +#else + _touchHandler = [[RCTTouchHandler alloc] initWithBridge:_bridge]; +#endif + } + [_touchHandler attachToView:_container]; + } +} + +#ifdef RN_FABRIC_ENABLED +#pragma mark - Fabric Specific + +// When the component unmounts we remove it from window's children, +// so when the component gets recycled we need to add it back. +- (void)maybeShow +{ + UIWindow *window = RCTSharedApplication().delegate.window; + if (![[window subviews] containsObject:self]) { + [window addSubview:_container]; + } +} + ++ (facebook::react::ComponentDescriptorProvider)componentDescriptorProvider +{ + return facebook::react::concreteComponentDescriptorProvider< + facebook::react::RNSFullWindowOverlayComponentDescriptor>(); +} + +- (void)prepareForRecycle +{ + [_container removeFromSuperview]; + // Due to view recycling we don't really want to set _container = nil + // as it won't be instantiated when the component appears for the second time. + // We could consider nulling in here & using container (lazy getter) everywhere else. + // _container = nil; + [super prepareForRecycle]; +} + +- (void)mountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +{ + // When the component unmounts we remove it from window's children, + // so when the component gets recycled we need to add it back. + // As for now it is called here as we lack of method that is called + // just before component gets restored (from recycle pool). + [self maybeShow]; + [self addSubview:childComponentView]; +} + +- (void)unmountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +{ + [childComponentView removeFromSuperview]; +} + +- (void)updateLayoutMetrics:(facebook::react::LayoutMetrics const &)layoutMetrics + oldLayoutMetrics:(facebook::react::LayoutMetrics const &)oldLayoutMetrics +{ + CGRect frame = RCTCGRectFromRect(layoutMetrics.frame); + _reactFrame = frame; + [_container setFrame:frame]; +} + +#else +#pragma mark - Paper specific + +- (void)reactSetFrame:(CGRect)frame +{ + _reactFrame = frame; + [_container setFrame:frame]; +} + +- (void)invalidate +{ + [_container removeFromSuperview]; + _container = nil; +} + +#endif // RN_FABRIC_ENABLED + +@end + +#ifdef RN_FABRIC_ENABLED +Class RNSFullWindowOverlayCls(void) +{ + return RNSFullWindowOverlay.class; +} +#endif // RN_FABRIC_ENABLED + +@implementation RNSFullWindowOverlayManager + +RCT_EXPORT_MODULE() + +#ifdef RN_FABRIC_ENABLED +#else +- (UIView *)view +{ + return [[RNSFullWindowOverlay alloc] initWithBridge:self.bridge]; +} +#endif // RN_FABRIC_ENABLED + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreen.h b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreen.h new file mode 100644 index 00000000..e7f1a52e --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreen.h @@ -0,0 +1,126 @@ +#import +#import + +#import "RNSEnums.h" +#import "RNSScreenContainer.h" + +#if RN_FABRIC_ENABLED +#import +#else +#import +#endif + +NS_ASSUME_NONNULL_BEGIN + +@interface RCTConvert (RNSScreen) + ++ (RNSScreenStackPresentation)RNSScreenStackPresentation:(id)json; ++ (RNSScreenStackAnimation)RNSScreenStackAnimation:(id)json; + +#if !TARGET_OS_TV ++ (RNSStatusBarStyle)RNSStatusBarStyle:(id)json; ++ (UIStatusBarAnimation)UIStatusBarAnimation:(id)json; ++ (UIInterfaceOrientationMask)UIInterfaceOrientationMask:(id)json; +#endif + +@end + +@class RNSScreenView; + +@interface RNSScreen : UIViewController + +- (instancetype)initWithView:(UIView *)view; +- (UIViewController *)findChildVCForConfigAndTrait:(RNSWindowTrait)trait includingModals:(BOOL)includingModals; +- (void)notifyFinishTransitioning; +- (RNSScreenView *)screenView; +#ifdef RN_FABRIC_ENABLED +- (void)setViewToSnapshot:(UIView *)snapshot; +- (void)resetViewToScreen; +#endif + +@end + +@interface RNSScreenView : +#ifdef RN_FABRIC_ENABLED + RCTViewComponentView +#else + RCTView +#endif + +@property (nonatomic) BOOL fullScreenSwipeEnabled; +@property (nonatomic) BOOL gestureEnabled; +@property (nonatomic) BOOL hasStatusBarHiddenSet; +@property (nonatomic) BOOL hasStatusBarStyleSet; +@property (nonatomic) BOOL hasStatusBarAnimationSet; +@property (nonatomic) BOOL hasHomeIndicatorHiddenSet; +@property (nonatomic) BOOL hasOrientationSet; +@property (nonatomic) RNSScreenStackAnimation stackAnimation; +@property (nonatomic) RNSScreenStackPresentation stackPresentation; +@property (nonatomic) RNSScreenSwipeDirection swipeDirection; +@property (nonatomic) RNSScreenReplaceAnimation replaceAnimation; + +@property (nonatomic, retain) NSNumber *transitionDuration; +@property (nonatomic, readonly) BOOL dismissed; +@property (nonatomic) BOOL hideKeyboardOnSwipe; +@property (nonatomic) BOOL customAnimationOnSwipe; +@property (nonatomic) BOOL preventNativeDismiss; +@property (nonatomic, retain) RNSScreen *controller; +@property (nonatomic, copy) NSDictionary *gestureResponseDistance; +@property (nonatomic) int activityState; +@property (weak, nonatomic) UIView *reactSuperview; + +#if !TARGET_OS_TV +@property (nonatomic) RNSStatusBarStyle statusBarStyle; +@property (nonatomic) UIStatusBarAnimation statusBarAnimation; +@property (nonatomic) UIInterfaceOrientationMask screenOrientation; +@property (nonatomic) BOOL statusBarHidden; +@property (nonatomic) BOOL homeIndicatorHidden; + +// Props controlling UISheetPresentationController +@property (nonatomic) RNSScreenDetentType sheetAllowedDetents; +@property (nonatomic) RNSScreenDetentType sheetLargestUndimmedDetent; +@property (nonatomic) BOOL sheetGrabberVisible; +@property (nonatomic) CGFloat sheetCornerRadius; +@property (nonatomic) BOOL sheetExpandsWhenScrolledToEdge; +#endif // !TARGET_OS_TV + +#ifdef RN_FABRIC_ENABLED +// we recreate the behavior of `reactSetFrame` on new architecture +@property (nonatomic) facebook::react::LayoutMetrics oldLayoutMetrics; +@property (nonatomic) facebook::react::LayoutMetrics newLayoutMetrics; +@property (weak, nonatomic) UIView *config; +#else +@property (nonatomic, copy) RCTDirectEventBlock onAppear; +@property (nonatomic, copy) RCTDirectEventBlock onDisappear; +@property (nonatomic, copy) RCTDirectEventBlock onDismissed; +@property (nonatomic, copy) RCTDirectEventBlock onWillAppear; +@property (nonatomic, copy) RCTDirectEventBlock onWillDisappear; +@property (nonatomic, copy) RCTDirectEventBlock onNativeDismissCancelled; +@property (nonatomic, copy) RCTDirectEventBlock onTransitionProgress; +#endif // RN_FABRIC_ENABLED + +- (void)notifyFinishTransitioning; + +#ifdef RN_FABRIC_ENABLED +- (void)notifyWillAppear; +- (void)notifyWillDisappear; +- (void)notifyAppear; +- (void)notifyDisappear; +- (void)updateBounds; +- (void)notifyDismissedWithCount:(int)dismissCount; +#endif + +- (void)notifyTransitionProgress:(double)progress closing:(BOOL)closing goingForward:(BOOL)goingForward; +- (BOOL)isModal; + +@end + +@interface UIView (RNSScreen) +- (UIViewController *)parentViewController; +@end + +@interface RNSScreenManager : RCTViewManager + +@end + +NS_ASSUME_NONNULL_END diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreen.mm b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreen.mm new file mode 100644 index 00000000..dbd99397 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreen.mm @@ -0,0 +1,1435 @@ +#import + +#import "RNSScreen.h" +#import "RNSScreenContainer.h" +#import "RNSScreenWindowTraits.h" + +#ifdef RN_FABRIC_ENABLED +#import +#import +#import +#import +#import +#import +#import +#import +#import "RNSConvert.h" +#import "RNSScreenViewEvent.h" +#else +#import +#endif + +#import +#import +#import "RNSScreenStack.h" +#import "RNSScreenStackHeaderConfig.h" + +@interface RNSScreenView () +#ifdef RN_FABRIC_ENABLED + +#else + +#endif +@end + +@implementation RNSScreenView { + __weak RCTBridge *_bridge; +#ifdef RN_FABRIC_ENABLED + RCTSurfaceTouchHandler *_touchHandler; + facebook::react::RNSScreenShadowNode::ConcreteState::Shared _state; + // on fabric, they are not available by default so we need them exposed here too + NSMutableArray *_reactSubviews; +#else + RCTTouchHandler *_touchHandler; + CGRect _reactFrame; +#endif +} + +#ifdef RN_FABRIC_ENABLED +- (instancetype)initWithFrame:(CGRect)frame +{ + if (self = [super initWithFrame:frame]) { + static const auto defaultProps = std::make_shared(); + _props = defaultProps; + _reactSubviews = [NSMutableArray new]; + [self initCommonProps]; + } + + return self; +} +#endif // RN_FABRIC_ENABLED + +- (instancetype)initWithBridge:(RCTBridge *)bridge +{ + if (self = [super init]) { + _bridge = bridge; + [self initCommonProps]; + } + + return self; +} + +- (void)initCommonProps +{ + _controller = [[RNSScreen alloc] initWithView:self]; + _stackPresentation = RNSScreenStackPresentationPush; + _stackAnimation = RNSScreenStackAnimationDefault; + _gestureEnabled = YES; + _replaceAnimation = RNSScreenReplaceAnimationPop; + _dismissed = NO; + _hasStatusBarStyleSet = NO; + _hasStatusBarAnimationSet = NO; + _hasStatusBarHiddenSet = NO; + _hasOrientationSet = NO; + _hasHomeIndicatorHiddenSet = NO; +#if !TARGET_OS_TV + _sheetExpandsWhenScrolledToEdge = YES; +#endif // !TARGET_OS_TV +} + +- (UIViewController *)reactViewController +{ + return _controller; +} + +#ifdef RN_FABRIC_ENABLED +- (NSArray *)reactSubviews +{ + return _reactSubviews; +} +#endif + +- (void)updateBounds +{ +#ifdef RN_FABRIC_ENABLED + if (_state != nullptr) { + auto newState = facebook::react::RNSScreenState{RCTSizeFromCGSize(self.bounds.size)}; + _state->updateState(std::move(newState)); + UINavigationController *navctr = _controller.navigationController; + [navctr.view setNeedsLayout]; + } +#else + [_bridge.uiManager setSize:self.bounds.size forView:self]; +#endif +} + +- (void)setStackPresentation:(RNSScreenStackPresentation)stackPresentation +{ + switch (stackPresentation) { + case RNSScreenStackPresentationModal: +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 + if (@available(iOS 13.0, tvOS 13.0, *)) { + _controller.modalPresentationStyle = UIModalPresentationAutomatic; + } else { + _controller.modalPresentationStyle = UIModalPresentationFullScreen; + } +#else + _controller.modalPresentationStyle = UIModalPresentationFullScreen; +#endif + break; + case RNSScreenStackPresentationFullScreenModal: + _controller.modalPresentationStyle = UIModalPresentationFullScreen; + break; +#if !TARGET_OS_TV + case RNSScreenStackPresentationFormSheet: + _controller.modalPresentationStyle = UIModalPresentationFormSheet; + break; +#endif + case RNSScreenStackPresentationTransparentModal: + _controller.modalPresentationStyle = UIModalPresentationOverFullScreen; + break; + case RNSScreenStackPresentationContainedModal: + _controller.modalPresentationStyle = UIModalPresentationCurrentContext; + break; + case RNSScreenStackPresentationContainedTransparentModal: + _controller.modalPresentationStyle = UIModalPresentationOverCurrentContext; + break; + case RNSScreenStackPresentationPush: + // ignored, we only need to keep in mind not to set presentation delegate + break; + } + + // There is a bug in UIKit which causes retain loop when presentationController is accessed for a + // controller that is not going to be presented modally. We therefore need to avoid setting the + // delegate for screens presented using push. This also means that when controller is updated from + // modal to push type, this may cause memory leak, we warn about that as well. + if (stackPresentation != RNSScreenStackPresentationPush) { + // `modalPresentationStyle` must be set before accessing `presentationController` + // otherwise a default controller will be created and cannot be changed after. + // Documented here: + // https://developer.apple.com/documentation/uikit/uiviewcontroller/1621426-presentationcontroller?language=objc + _controller.presentationController.delegate = self; + } else if (_stackPresentation != RNSScreenStackPresentationPush) { +#ifdef RN_FABRIC_ENABLED + // TODO: on Fabric, same controllers can be used as modals and then recycled and used a push which would result in + // this error. It would be good to check if it doesn't leak in such case. +#else + RCTLogError( + @"Screen presentation updated from modal to push, this may likely result in a screen object leakage. If you need to change presentation style create a new screen object instead"); +#endif + } + _stackPresentation = stackPresentation; +} + +- (void)setStackAnimation:(RNSScreenStackAnimation)stackAnimation +{ + _stackAnimation = stackAnimation; + + switch (stackAnimation) { + case RNSScreenStackAnimationFade: + _controller.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; + break; +#if !TARGET_OS_TV + case RNSScreenStackAnimationFlip: + _controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; + break; +#endif + case RNSScreenStackAnimationNone: + case RNSScreenStackAnimationDefault: + case RNSScreenStackAnimationSimplePush: + case RNSScreenStackAnimationSlideFromBottom: + case RNSScreenStackAnimationFadeFromBottom: + // Default + break; + } +} + +- (void)setGestureEnabled:(BOOL)gestureEnabled +{ +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 + if (@available(iOS 13.0, tvOS 13.0, *)) { + _controller.modalInPresentation = !gestureEnabled; + } +#endif + + _gestureEnabled = gestureEnabled; +} + +- (void)setReplaceAnimation:(RNSScreenReplaceAnimation)replaceAnimation +{ + _replaceAnimation = replaceAnimation; +} + +// Nil will be provided when activityState is set as an animated value and we change +// it from JS to be a plain value (non animated). +// In case when nil is received, we want to ignore such value and not make +// any updates as the actual non-nil value will follow immediately. +- (void)setActivityStateOrNil:(NSNumber *)activityStateOrNil +{ + int activityState = [activityStateOrNil intValue]; + if (activityStateOrNil != nil && activityState != -1 && activityState != _activityState) { + _activityState = activityState; + [_reactSuperview markChildUpdated]; + } +} + +#if !TARGET_OS_TV +- (void)setStatusBarStyle:(RNSStatusBarStyle)statusBarStyle +{ + _hasStatusBarStyleSet = YES; + _statusBarStyle = statusBarStyle; + [RNSScreenWindowTraits assertViewControllerBasedStatusBarAppearenceSet]; + [RNSScreenWindowTraits updateStatusBarAppearance]; +} + +- (void)setStatusBarAnimation:(UIStatusBarAnimation)statusBarAnimation +{ + _hasStatusBarAnimationSet = YES; + _statusBarAnimation = statusBarAnimation; + [RNSScreenWindowTraits assertViewControllerBasedStatusBarAppearenceSet]; +} + +- (void)setStatusBarHidden:(BOOL)statusBarHidden +{ + _hasStatusBarHiddenSet = YES; + _statusBarHidden = statusBarHidden; + [RNSScreenWindowTraits assertViewControllerBasedStatusBarAppearenceSet]; + [RNSScreenWindowTraits updateStatusBarAppearance]; +} + +- (void)setScreenOrientation:(UIInterfaceOrientationMask)screenOrientation +{ + _hasOrientationSet = YES; + _screenOrientation = screenOrientation; + [RNSScreenWindowTraits enforceDesiredDeviceOrientation]; +} + +- (void)setHomeIndicatorHidden:(BOOL)homeIndicatorHidden +{ + _hasHomeIndicatorHiddenSet = YES; + _homeIndicatorHidden = homeIndicatorHidden; + [RNSScreenWindowTraits updateHomeIndicatorAutoHidden]; +} +#endif + +- (UIView *)reactSuperview +{ + return _reactSuperview; +} + +- (void)addSubview:(UIView *)view +{ + if (![view isKindOfClass:[RNSScreenStackHeaderConfig class]]) { + [super addSubview:view]; + } else { + ((RNSScreenStackHeaderConfig *)view).screenView = self; + } +} + +- (void)notifyDismissedWithCount:(int)dismissCount +{ +#ifdef RN_FABRIC_ENABLED + // If screen is already unmounted then there will be no event emitter + // it will be cleaned in prepareForRecycle + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onDismissed(facebook::react::RNSScreenEventEmitter::OnDismissed{.dismissCount = dismissCount}); + } +#else + // TODO: hopefully problems connected to dismissed prop are only the case on paper + _dismissed = YES; + if (self.onDismissed) { + dispatch_async(dispatch_get_main_queue(), ^{ + if (self.onDismissed) { + self.onDismissed(@{@"dismissCount" : @(dismissCount)}); + } + }); + } +#endif +} + +- (void)notifyDismissCancelledWithDismissCount:(int)dismissCount +{ +#ifdef RN_FABRIC_ENABLED + // If screen is already unmounted then there will be no event emitter + // it will be cleaned in prepareForRecycle + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onNativeDismissCancelled( + facebook::react::RNSScreenEventEmitter::OnNativeDismissCancelled{.dismissCount = dismissCount}); + } +#else + if (self.onNativeDismissCancelled) { + self.onNativeDismissCancelled(@{@"dismissCount" : @(dismissCount)}); + } +#endif +} + +- (void)notifyWillAppear +{ +#ifdef RN_FABRIC_ENABLED + // If screen is already unmounted then there will be no event emitter + // it will be cleaned in prepareForRecycle + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onWillAppear(facebook::react::RNSScreenEventEmitter::OnWillAppear{}); + } + [self updateLayoutMetrics:_newLayoutMetrics oldLayoutMetrics:_oldLayoutMetrics]; +#else + if (self.onWillAppear) { + self.onWillAppear(nil); + } + // we do it here too because at this moment the `parentViewController` is already not nil, + // so if the parent is not UINavCtr, the frame will be updated to the correct one. + [self reactSetFrame:_reactFrame]; +#endif +} + +- (void)notifyWillDisappear +{ + if (_hideKeyboardOnSwipe) { + [self endEditing:YES]; + } +#ifdef RN_FABRIC_ENABLED + // If screen is already unmounted then there will be no event emitter + // it will be cleaned in prepareForRecycle + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onWillDisappear(facebook::react::RNSScreenEventEmitter::OnWillDisappear{}); + } +#else + if (self.onWillDisappear) { + self.onWillDisappear(nil); + } +#endif +} + +- (void)notifyAppear +{ +#ifdef RN_FABRIC_ENABLED + // If screen is already unmounted then there will be no event emitter + // it will be cleaned in prepareForRecycle + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onAppear(facebook::react::RNSScreenEventEmitter::OnAppear{}); + } +#else + if (self.onAppear) { + dispatch_async(dispatch_get_main_queue(), ^{ + if (self.onAppear) { + self.onAppear(nil); + } + }); + } +#endif +} + +- (void)notifyDisappear +{ +#ifdef RN_FABRIC_ENABLED + // If screen is already unmounted then there will be no event emitter + // it will be cleaned in prepareForRecycle + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onDisappear(facebook::react::RNSScreenEventEmitter::OnDisappear{}); + } +#else + if (self.onDisappear) { + self.onDisappear(nil); + } +#endif +} + +- (BOOL)isMountedUnderScreenOrReactRoot +{ +#ifdef RN_FABRIC_ENABLED +#define RNS_EXPECTED_VIEW RCTRootComponentView +#else +#define RNS_EXPECTED_VIEW RCTRootView +#endif + for (UIView *parent = self.superview; parent != nil; parent = parent.superview) { + if ([parent isKindOfClass:[RNS_EXPECTED_VIEW class]] || [parent isKindOfClass:[RNSScreenView class]]) { + return YES; + } + } + return NO; +#undef RNS_EXPECTED_VIEW +} + +- (void)didMoveToWindow +{ + // For RN touches to work we need to instantiate and connect RCTTouchHandler. This only applies + // for screens that aren't mounted under RCTRootView e.g., modals that are mounted directly to + // root application window. + if (self.window != nil && ![self isMountedUnderScreenOrReactRoot]) { + if (_touchHandler == nil) { +#ifdef RN_FABRIC_ENABLED + _touchHandler = [RCTSurfaceTouchHandler new]; +#else + _touchHandler = [[RCTTouchHandler alloc] initWithBridge:_bridge]; +#endif + } + [_touchHandler attachToView:self]; + } else { + [_touchHandler detachFromView:self]; + } +} + +#ifdef RN_FABRIC_ENABLED +- (RCTSurfaceTouchHandler *)touchHandler +#else +- (RCTTouchHandler *)touchHandler +#endif +{ + if (_touchHandler != nil) { + return _touchHandler; + } + UIView *parent = [self superview]; + while (parent != nil && ![parent respondsToSelector:@selector(touchHandler)]) + parent = parent.superview; + if (parent != nil) { + return [parent performSelector:@selector(touchHandler)]; + } + return nil; +} + +- (void)notifyFinishTransitioning +{ + [_controller notifyFinishTransitioning]; +} + +- (void)notifyTransitionProgress:(double)progress closing:(BOOL)closing goingForward:(BOOL)goingForward +{ +#ifdef RN_FABRIC_ENABLED + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onTransitionProgress(facebook::react::RNSScreenEventEmitter::OnTransitionProgress{ + .progress = progress, .closing = closing ? 1 : 0, .goingForward = goingForward ? 1 : 0}); + } + RNSScreenViewEvent *event = [[RNSScreenViewEvent alloc] initWithEventName:@"onTransitionProgress" + reactTag:[NSNumber numberWithInt:self.tag] + progress:progress + closing:closing + goingForward:goingForward]; + [[RCTBridge currentBridge].eventDispatcher sendEvent:event]; +#else + if (self.onTransitionProgress) { + self.onTransitionProgress(@{ + @"progress" : @(progress), + @"closing" : @(closing ? 1 : 0), + @"goingForward" : @(goingForward ? 1 : 0), + }); + } +#endif +} + +- (void)presentationControllerWillDismiss:(UIPresentationController *)presentationController +{ + // We need to call both "cancel" and "reset" here because RN's gesture recognizer + // does not handle the scenario when it gets cancelled by other top + // level gesture recognizer. In this case by the modal dismiss gesture. + // Because of that, at the moment when this method gets called the React's + // gesture recognizer is already in FAILED state but cancel events never gets + // send to JS. Calling "reset" forces RCTTouchHanler to dispatch cancel event. + // To test this behavior one need to open a dismissable modal and start + // pulling down starting at some touchable item. Without "reset" the touchable + // will never go back from highlighted state even when the modal start sliding + // down. +#ifdef RN_FABRIC_ENABLED + [_touchHandler setEnabled:NO]; + [_touchHandler setEnabled:YES]; +#else + [_touchHandler cancel]; +#endif + [_touchHandler reset]; +} + +- (BOOL)presentationControllerShouldDismiss:(UIPresentationController *)presentationController +{ + if (_preventNativeDismiss) { + [self notifyDismissCancelledWithDismissCount:1]; + return NO; + } + return _gestureEnabled; +} + +- (void)presentationControllerDidDismiss:(UIPresentationController *)presentationController +{ + if ([_reactSuperview respondsToSelector:@selector(presentationControllerDidDismiss:)]) { + [_reactSuperview performSelector:@selector(presentationControllerDidDismiss:) withObject:presentationController]; + } +} + +- (BOOL)isModal +{ + return self.stackPresentation != RNSScreenStackPresentationPush; +} + +#if !TARGET_OS_TV +/** + * Updates settings for sheet presentation controller. + * Note that this method should not be called inside `stackPresentation` setter, because on Paper we don't have + * guarantee that values of all related props had been updated earlier. + */ +- (void)updatePresentationStyle +{ +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_15_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_15_0 + if (@available(iOS 15.0, *)) { + UISheetPresentationController *sheet = _controller.sheetPresentationController; + if (_stackPresentation == RNSScreenStackPresentationFormSheet && sheet != nil) { + sheet.prefersScrollingExpandsWhenScrolledToEdge = _sheetExpandsWhenScrolledToEdge; + sheet.prefersGrabberVisible = _sheetGrabberVisible; + sheet.preferredCornerRadius = + _sheetCornerRadius < 0 ? UISheetPresentationControllerAutomaticDimension : _sheetCornerRadius; + + if (_sheetLargestUndimmedDetent == RNSScreenDetentTypeMedium) { + sheet.largestUndimmedDetentIdentifier = UISheetPresentationControllerDetentIdentifierMedium; + } else if (_sheetLargestUndimmedDetent == RNSScreenDetentTypeLarge) { + sheet.largestUndimmedDetentIdentifier = UISheetPresentationControllerDetentIdentifierLarge; + } else if (_sheetLargestUndimmedDetent == RNSScreenDetentTypeAll) { + sheet.largestUndimmedDetentIdentifier = nil; + } else { + RCTLogError(@"Unhandled value of sheetLargestUndimmedDetent passed"); + } + + if (_sheetAllowedDetents == RNSScreenDetentTypeMedium) { + sheet.detents = @[ UISheetPresentationControllerDetent.mediumDetent ]; + if (sheet.selectedDetentIdentifier != UISheetPresentationControllerDetentIdentifierMedium) { + [sheet animateChanges:^{ + sheet.selectedDetentIdentifier = UISheetPresentationControllerDetentIdentifierMedium; + }]; + } + } else if (_sheetAllowedDetents == RNSScreenDetentTypeLarge) { + sheet.detents = @[ UISheetPresentationControllerDetent.largeDetent ]; + if (sheet.selectedDetentIdentifier != UISheetPresentationControllerDetentIdentifierLarge) { + [sheet animateChanges:^{ + sheet.selectedDetentIdentifier = UISheetPresentationControllerDetentIdentifierLarge; + }]; + } + } else if (_sheetAllowedDetents == RNSScreenDetentTypeAll) { + sheet.detents = + @[ UISheetPresentationControllerDetent.mediumDetent, UISheetPresentationControllerDetent.largeDetent ]; + } else { + RCTLogError(@"Unhandled value of sheetAllowedDetents passed"); + } + } + } +#endif // Check for max allowed iOS version +} +#endif // !TARGET_OS_TV + +#pragma mark - Fabric specific +#ifdef RN_FABRIC_ENABLED + ++ (facebook::react::ComponentDescriptorProvider)componentDescriptorProvider +{ + return facebook::react::concreteComponentDescriptorProvider(); +} + +- (void)mountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +{ + [super mountChildComponentView:childComponentView index:index]; + if ([childComponentView isKindOfClass:[RNSScreenStackHeaderConfig class]]) { + _config = childComponentView; + ((RNSScreenStackHeaderConfig *)childComponentView).screenView = self; + } + [_reactSubviews insertObject:childComponentView atIndex:index]; +} + +- (void)unmountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +{ + if ([childComponentView isKindOfClass:[RNSScreenStackHeaderConfig class]]) { + _config = nil; + } + [_reactSubviews removeObject:childComponentView]; + [super unmountChildComponentView:childComponentView index:index]; +} + +#pragma mark - RCTComponentViewProtocol + +- (void)prepareForRecycle +{ + [super prepareForRecycle]; + // TODO: Make sure that there is no edge case when this should be uncommented + // _controller=nil; + _dismissed = NO; + _state.reset(); + _touchHandler = nil; + + // We set this prop to default value here to workaround view-recycling. + // Let's assume the view has had _stackPresentation == set + // before below line was executed. Then, when instantiated again (with the same modal presentation) + // updateProps:oldProps: method would be called and setter for stack presentation would not be called. + // This is crucial as in that setter we register `self.controller` as a delegate + // (UIAdaptivePresentationControllerDelegate) to presentation controller and this leads to buggy modal behaviour as we + // rely on UIAdaptivePresentationControllerDelegate callbacks. Restoring the default value and then comparing against + // it in updateProps:oldProps: allows for setter to be called, however if there was some additional logic to execute + // when stackPresentation is set to "push" the setter would not be triggered. + _stackPresentation = RNSScreenStackPresentationPush; +} + +- (void)updateProps:(facebook::react::Props::Shared const &)props + oldProps:(facebook::react::Props::Shared const &)oldProps +{ + const auto &oldScreenProps = *std::static_pointer_cast(_props); + const auto &newScreenProps = *std::static_pointer_cast(props); + + [self setFullScreenSwipeEnabled:newScreenProps.fullScreenSwipeEnabled]; + + [self setGestureEnabled:newScreenProps.gestureEnabled]; + + [self setTransitionDuration:[NSNumber numberWithInt:newScreenProps.transitionDuration]]; + + [self setHideKeyboardOnSwipe:newScreenProps.hideKeyboardOnSwipe]; + + [self setCustomAnimationOnSwipe:newScreenProps.customAnimationOnSwipe]; + + [self + setGestureResponseDistance:[RNSConvert + gestureResponseDistanceDictFromCppStruct:newScreenProps.gestureResponseDistance]]; + + [self setPreventNativeDismiss:newScreenProps.preventNativeDismiss]; + + [self setActivityStateOrNil:[NSNumber numberWithFloat:newScreenProps.activityState]]; + + [self setSwipeDirection:[RNSConvert RNSScreenSwipeDirectionFromCppEquivalent:newScreenProps.swipeDirection]]; + +#if !TARGET_OS_TV + if (newScreenProps.statusBarHidden != oldScreenProps.statusBarHidden) { + [self setStatusBarHidden:newScreenProps.statusBarHidden]; + } + + if (newScreenProps.statusBarStyle != oldScreenProps.statusBarStyle) { + [self setStatusBarStyle:[RCTConvert + RNSStatusBarStyle:RCTNSStringFromStringNilIfEmpty(newScreenProps.statusBarStyle)]]; + } + + if (newScreenProps.statusBarAnimation != oldScreenProps.statusBarAnimation) { + [self setStatusBarAnimation:[RCTConvert UIStatusBarAnimation:RCTNSStringFromStringNilIfEmpty( + newScreenProps.statusBarAnimation)]]; + } + + if (newScreenProps.screenOrientation != oldScreenProps.screenOrientation) { + [self setScreenOrientation:[RCTConvert UIInterfaceOrientationMask:RCTNSStringFromStringNilIfEmpty( + newScreenProps.screenOrientation)]]; + } + + if (newScreenProps.homeIndicatorHidden != oldScreenProps.homeIndicatorHidden) { + [self setHomeIndicatorHidden:newScreenProps.homeIndicatorHidden]; + } + + [self setSheetGrabberVisible:newScreenProps.sheetGrabberVisible]; + [self setSheetCornerRadius:newScreenProps.sheetCornerRadius]; + [self setSheetExpandsWhenScrolledToEdge:newScreenProps.sheetExpandsWhenScrolledToEdge]; + + if (newScreenProps.sheetAllowedDetents != oldScreenProps.sheetAllowedDetents) { + [self setSheetAllowedDetents:[RNSConvert RNSScreenDetentTypeFromAllowedDetents:newScreenProps.sheetAllowedDetents]]; + } + + if (newScreenProps.sheetLargestUndimmedDetent != oldScreenProps.sheetLargestUndimmedDetent) { + [self setSheetLargestUndimmedDetent: + [RNSConvert RNSScreenDetentTypeFromLargestUndimmedDetent:newScreenProps.sheetLargestUndimmedDetent]]; + } +#endif // !TARGET_OS_TV + + // Notice that we compare against _stackPresentation, not oldScreenProps.stackPresentation. + // See comment in prepareForRecycle method for explanation. + RNSScreenStackPresentation newStackPresentation = + [RNSConvert RNSScreenStackPresentationFromCppEquivalent:newScreenProps.stackPresentation]; + if (newStackPresentation != _stackPresentation) { + [self setStackPresentation:newStackPresentation]; + } + +#if !TARGET_OS_TV + // This must be called after setter for stackPresentation + [self updatePresentationStyle]; +#endif // !TARGET_OS_TV + + if (newScreenProps.stackAnimation != oldScreenProps.stackAnimation) { + [self setStackAnimation:[RNSConvert RNSScreenStackAnimationFromCppEquivalent:newScreenProps.stackAnimation]]; + } + + if (newScreenProps.replaceAnimation != oldScreenProps.replaceAnimation) { + [self setReplaceAnimation:[RNSConvert RNSScreenReplaceAnimationFromCppEquivalent:newScreenProps.replaceAnimation]]; + } + + [super updateProps:props oldProps:oldProps]; +} + +- (void)updateState:(facebook::react::State::Shared const &)state + oldState:(facebook::react::State::Shared const &)oldState +{ + _state = std::static_pointer_cast(state); +} + +- (void)updateLayoutMetrics:(const facebook::react::LayoutMetrics &)layoutMetrics + oldLayoutMetrics:(const facebook::react::LayoutMetrics &)oldLayoutMetrics +{ + _newLayoutMetrics = layoutMetrics; + _oldLayoutMetrics = oldLayoutMetrics; + UIViewController *parentVC = self.reactViewController.parentViewController; + if (parentVC != nil && ![parentVC isKindOfClass:[RNScreensNavigationController class]]) { + [super updateLayoutMetrics:layoutMetrics oldLayoutMetrics:oldLayoutMetrics]; + } + // when screen is mounted under RNScreensNavigationController it's size is controller + // by the navigation controller itself. That is, it is set to fill space of + // the controller. In that case we ignore react layout system from managing + // the screen dimensions and we wait for the screen VC to update and then we + // pass the dimensions to ui view manager to take into account when laying out + // subviews + // Explanation taken from `reactSetFrame`, which is old arch equivalent of this code. +} + +#pragma mark - Paper specific +#else + +- (void)didSetProps:(NSArray *)changedProps +{ + [super didSetProps:changedProps]; +#if !TARGET_OS_TV + [self updatePresentationStyle]; +#endif // !TARGET_OS_TV +} + +- (void)setPointerEvents:(RCTPointerEvents)pointerEvents +{ + // pointer events settings are managed by the parent screen container, we ignore + // any attempt of setting that via React props +} + +- (void)reactSetFrame:(CGRect)frame +{ + _reactFrame = frame; + UIViewController *parentVC = self.reactViewController.parentViewController; + if (parentVC != nil && ![parentVC isKindOfClass:[RNScreensNavigationController class]]) { + [super reactSetFrame:frame]; + } + // when screen is mounted under RNScreensNavigationController it's size is controller + // by the navigation controller itself. That is, it is set to fill space of + // the controller. In that case we ignore react layout system from managing + // the screen dimensions and we wait for the screen VC to update and then we + // pass the dimensions to ui view manager to take into account when laying out + // subviews +} + +- (void)invalidate +{ + _controller = nil; +} +#endif + +@end + +#ifdef RN_FABRIC_ENABLED +Class RNSScreenCls(void) +{ + return RNSScreenView.class; +} +#endif + +#pragma mark - RNSScreen + +@implementation RNSScreen { + __weak id _previousFirstResponder; + CGRect _lastViewFrame; + RNSScreenView *_initialView; + UIView *_fakeView; + CADisplayLink *_animationTimer; + CGFloat _currentAlpha; + BOOL _closing; + BOOL _goingForward; + int _dismissCount; + BOOL _isSwiping; + BOOL _shouldNotify; +} + +#pragma mark - Common + +- (instancetype)initWithView:(UIView *)view +{ + if (self = [super init]) { + self.view = view; + _fakeView = [UIView new]; + _shouldNotify = YES; +#ifdef RN_FABRIC_ENABLED + _initialView = (RNSScreenView *)view; +#endif + } + return self; +} + +// TODO: Find out why this is executed when screen is going out +- (void)viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; + if (!_isSwiping) { + [self.screenView notifyWillAppear]; + if (self.transitionCoordinator.isInteractive) { + // we started dismissing with swipe gesture + _isSwiping = YES; + } + } else { + // this event is also triggered if we cancelled the swipe. + // The _isSwiping is still true, but we don't want to notify then + _shouldNotify = NO; + } + + [self hideHeaderIfNecessary]; + // as per documentation of these methods + _goingForward = [self isBeingPresented] || [self isMovingToParentViewController]; + + [RNSScreenWindowTraits updateWindowTraits]; + if (_shouldNotify) { + _closing = NO; + [self notifyTransitionProgress:0.0 closing:_closing goingForward:_goingForward]; + [self setupProgressNotification]; + } +} + +- (void)viewWillDisappear:(BOOL)animated +{ + [super viewWillDisappear:animated]; + // self.navigationController might be null when we are dismissing a modal + if (!self.transitionCoordinator.isInteractive && self.navigationController != nil) { + // user might have long pressed ios 14 back button item, + // so he can go back more than one screen and we need to dismiss more screens in JS stack then. + // We check it by calculating the difference between the index of currently displayed screen + // and the index of the target screen, which is the view of topViewController at this point. + // If the value is lower than 1, it means we are dismissing a modal, or navigating forward, or going back with JS. + int selfIndex = [self getIndexOfView:self.screenView]; + int targetIndex = [self getIndexOfView:self.navigationController.topViewController.view]; + _dismissCount = selfIndex - targetIndex > 0 ? selfIndex - targetIndex : 1; + } else { + _dismissCount = 1; + } + + // same flow as in viewWillAppear + if (!_isSwiping) { + [self.screenView notifyWillDisappear]; + if (self.transitionCoordinator.isInteractive) { + _isSwiping = YES; + } + } else { + _shouldNotify = NO; + } + + // as per documentation of these methods + _goingForward = !([self isBeingDismissed] || [self isMovingFromParentViewController]); + + if (_shouldNotify) { + _closing = YES; + [self notifyTransitionProgress:0.0 closing:_closing goingForward:_goingForward]; + [self setupProgressNotification]; + } +} + +- (void)viewDidAppear:(BOOL)animated +{ + [super viewDidAppear:animated]; + if (!_isSwiping || _shouldNotify) { + // we are going forward or dismissing without swipe + // or successfully swiped back + [self.screenView notifyAppear]; + [self notifyTransitionProgress:1.0 closing:NO goingForward:_goingForward]; + } + + _isSwiping = NO; + _shouldNotify = YES; +} + +- (void)viewDidDisappear:(BOOL)animated +{ + [super viewDidDisappear:animated]; +#ifdef RN_FABRIC_ENABLED + [self resetViewToScreen]; +#endif + if (self.parentViewController == nil && self.presentingViewController == nil) { + if (self.screenView.preventNativeDismiss) { + // if we want to prevent the native dismiss, we do not send dismissal event, + // but instead call `updateContainer`, which restores the JS navigation stack + [self.screenView.reactSuperview updateContainer]; + [self.screenView notifyDismissCancelledWithDismissCount:_dismissCount]; + } else { + // screen dismissed, send event + [self.screenView notifyDismissedWithCount:_dismissCount]; + } + } + // same flow as in viewDidAppear + if (!_isSwiping || _shouldNotify) { + [self.screenView notifyDisappear]; + [self notifyTransitionProgress:1.0 closing:YES goingForward:_goingForward]; + } + + _isSwiping = NO; + _shouldNotify = YES; +#ifdef RN_FABRIC_ENABLED +#else + [self traverseForScrollView:self.screenView]; +#endif +} + +- (void)viewDidLayoutSubviews +{ + [super viewDidLayoutSubviews]; + + // The below code makes the screen view adapt dimensions provided by the system. We take these + // into account only when the view is mounted under RNScreensNavigationController in which case system + // provides additional padding to account for possible header, and in the case when screen is + // shown as a native modal, as the final dimensions of the modal on iOS 12+ are shorter than the + // screen size + BOOL isDisplayedWithinUINavController = + [self.parentViewController isKindOfClass:[RNScreensNavigationController class]]; + BOOL isPresentedAsNativeModal = self.parentViewController == nil && self.presentingViewController != nil; + + if (isDisplayedWithinUINavController || isPresentedAsNativeModal) { +#ifdef RN_FABRIC_ENABLED + [self.screenView updateBounds]; +#else + if (!CGRectEqualToRect(_lastViewFrame, self.screenView.frame)) { + _lastViewFrame = self.screenView.frame; + [((RNSScreenView *)self.viewIfLoaded) updateBounds]; + } +#endif + } +} + +- (void)notifyFinishTransitioning +{ + [_previousFirstResponder becomeFirstResponder]; + _previousFirstResponder = nil; + // the correct Screen for appearance is set after the transition, same for orientation. + [RNSScreenWindowTraits updateWindowTraits]; +} + +- (void)willMoveToParentViewController:(UIViewController *)parent +{ + [super willMoveToParentViewController:parent]; + if (parent == nil) { + id responder = [self findFirstResponder:self.screenView]; + if (responder != nil) { + _previousFirstResponder = responder; + } + } +} + +- (id)findFirstResponder:(UIView *)parent +{ + if (parent.isFirstResponder) { + return parent; + } + for (UIView *subView in parent.subviews) { + id responder = [self findFirstResponder:subView]; + if (responder != nil) { + return responder; + } + } + return nil; +} + +#pragma mark - transition progress related methods + +- (void)setupProgressNotification +{ + if (self.transitionCoordinator != nil) { + _fakeView.alpha = 0.0; + [self.transitionCoordinator + animateAlongsideTransition:^(id _Nonnull context) { + [[context containerView] addSubview:self->_fakeView]; + self->_fakeView.alpha = 1.0; + self->_animationTimer = [CADisplayLink displayLinkWithTarget:self selector:@selector(handleAnimation)]; + [self->_animationTimer addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; + } + completion:^(id _Nonnull context) { + [self->_animationTimer setPaused:YES]; + [self->_animationTimer invalidate]; + [self->_fakeView removeFromSuperview]; + }]; + } +} + +- (void)handleAnimation +{ + if ([[_fakeView layer] presentationLayer] != nil) { + CGFloat fakeViewAlpha = _fakeView.layer.presentationLayer.opacity; + if (_currentAlpha != fakeViewAlpha) { + _currentAlpha = fmax(0.0, fmin(1.0, fakeViewAlpha)); + [self notifyTransitionProgress:_currentAlpha closing:_closing goingForward:_goingForward]; + } + } +} + +- (void)notifyTransitionProgress:(double)progress closing:(BOOL)closing goingForward:(BOOL)goingForward +{ + if ([self.view isKindOfClass:[RNSScreenView class]]) { + // if the view is already snapshot, there is not sense in sending progress since on JS side + // the component is already not present + [(RNSScreenView *)self.view notifyTransitionProgress:progress closing:closing goingForward:goingForward]; + } +} + +#if !TARGET_OS_TV +// if the returned vc is a child, it means that it can provide config; +// if the returned vc is self, it means that there is no child for config and self has config to provide, +// so we return self which results in asking self for preferredStatusBarStyle/Animation etc.; +// if the returned vc is nil, it means none of children could provide config and self does not have config either, +// so if it was asked by parent, it will fallback to parent's option, or use default option if it is the top Screen +- (UIViewController *)findChildVCForConfigAndTrait:(RNSWindowTrait)trait includingModals:(BOOL)includingModals +{ + UIViewController *lastViewController = [[self childViewControllers] lastObject]; + if ([self.presentedViewController isKindOfClass:[RNSScreen class]]) { + lastViewController = self.presentedViewController; + // we don't want to allow controlling of status bar appearance when we present non-fullScreen modal + // and it is not possible if `modalPresentationCapturesStatusBarAppearance` is not set to YES, so even + // if we went into a modal here and ask it, it wouldn't take any effect. For fullScreen modals, the system + // asks them by itself, so we can stop traversing here. + // for screen orientation, we need to start the search again from that modal + return !includingModals + ? nil + : [(RNSScreen *)lastViewController findChildVCForConfigAndTrait:trait includingModals:includingModals] + ?: lastViewController; + } + + UIViewController *selfOrNil = [self hasTraitSet:trait] ? self : nil; + if (lastViewController == nil) { + return selfOrNil; + } else { + if ([lastViewController conformsToProtocol:@protocol(RNScreensViewControllerDelegate)]) { + // If there is a child (should be VC of ScreenContainer or ScreenStack), that has a child that could provide the + // trait, we recursively go into its findChildVCForConfig, and if one of the children has the trait set, we return + // it, otherwise we return self if this VC has config, and nil if it doesn't we use + // `childViewControllerForStatusBarStyle` for all options since the behavior is the same for all of them + UIViewController *childScreen = [lastViewController childViewControllerForStatusBarStyle]; + if ([childScreen isKindOfClass:[RNSScreen class]]) { + return [(RNSScreen *)childScreen findChildVCForConfigAndTrait:trait includingModals:includingModals] + ?: selfOrNil; + } else { + return selfOrNil; + } + } else { + // child vc is not from this library, so we don't ask it + return selfOrNil; + } + } +} + +- (BOOL)hasTraitSet:(RNSWindowTrait)trait +{ + switch (trait) { + case RNSWindowTraitStyle: { + return self.screenView.hasStatusBarStyleSet; + } + case RNSWindowTraitAnimation: { + return self.screenView.hasStatusBarAnimationSet; + } + case RNSWindowTraitHidden: { + return self.screenView.hasStatusBarHiddenSet; + } + case RNSWindowTraitOrientation: { + return self.screenView.hasOrientationSet; + } + case RNSWindowTraitHomeIndicatorHidden: { + return self.screenView.hasHomeIndicatorHiddenSet; + } + default: { + RCTLogError(@"Unknown trait passed: %d", (int)trait); + } + } + return NO; +} + +- (UIViewController *)childViewControllerForStatusBarHidden +{ + UIViewController *vc = [self findChildVCForConfigAndTrait:RNSWindowTraitHidden includingModals:NO]; + return vc == self ? nil : vc; +} + +- (BOOL)prefersStatusBarHidden +{ + return self.screenView.statusBarHidden; +} + +- (UIViewController *)childViewControllerForStatusBarStyle +{ + UIViewController *vc = [self findChildVCForConfigAndTrait:RNSWindowTraitStyle includingModals:NO]; + return vc == self ? nil : vc; +} + +- (UIStatusBarStyle)preferredStatusBarStyle +{ + return [RNSScreenWindowTraits statusBarStyleForRNSStatusBarStyle:self.screenView.statusBarStyle]; +} + +- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation +{ + UIViewController *vc = [self findChildVCForConfigAndTrait:RNSWindowTraitAnimation includingModals:NO]; + + if ([vc isKindOfClass:[RNSScreen class]]) { + return ((RNSScreen *)vc).screenView.statusBarAnimation; + } + return UIStatusBarAnimationFade; +} + +- (UIInterfaceOrientationMask)supportedInterfaceOrientations +{ + UIViewController *vc = [self findChildVCForConfigAndTrait:RNSWindowTraitOrientation includingModals:YES]; + + if ([vc isKindOfClass:[RNSScreen class]]) { + return ((RNSScreen *)vc).screenView.screenOrientation; + } + return UIInterfaceOrientationMaskAllButUpsideDown; +} + +- (UIViewController *)childViewControllerForHomeIndicatorAutoHidden +{ + UIViewController *vc = [self findChildVCForConfigAndTrait:RNSWindowTraitHomeIndicatorHidden includingModals:YES]; + return vc == self ? nil : vc; +} + +- (BOOL)prefersHomeIndicatorAutoHidden +{ + return self.screenView.homeIndicatorHidden; +} +- (int)getParentChildrenCount +{ + return (int)[[self.screenView.reactSuperview reactSubviews] count]; +} +#endif + +- (int)getIndexOfView:(UIView *)view +{ + return (int)[[self.screenView.reactSuperview reactSubviews] indexOfObject:view]; +} + +// since on Fabric the view of controller can be a snapshot of type `UIView`, +// when we want to check props of ScreenView, we need to get them from _initialView +- (RNSScreenView *)screenView +{ +#ifdef RN_FABRIC_ENABLED + return _initialView; +#else + return (RNSScreenView *)self.view; +#endif +} + +- (void)hideHeaderIfNecessary +{ +#if !TARGET_OS_TV + // On iOS >=13, there is a bug when user transitions from screen with active search bar to screen without header + // In that case default iOS header will be shown. To fix this we hide header when the screens that appears has header + // hidden and search bar was active on previous screen. We need to do it asynchronously, because default header is + // added after viewWillAppear. + if (@available(iOS 13.0, *)) { + NSUInteger currentIndex = [self.navigationController.viewControllers indexOfObject:self]; + + // we need to check whether reactSubviews array is empty, because on Fabric child nodes are unmounted first -> + // reactSubviews array may be empty + if (currentIndex > 0 && [self.screenView.reactSubviews count] > 0 && + [self.screenView.reactSubviews[0] isKindOfClass:[RNSScreenStackHeaderConfig class]]) { + UINavigationItem *prevNavigationItem = + [self.navigationController.viewControllers objectAtIndex:currentIndex - 1].navigationItem; + RNSScreenStackHeaderConfig *config = ((RNSScreenStackHeaderConfig *)self.screenView.reactSubviews[0]); + + BOOL wasSearchBarActive = prevNavigationItem.searchController.active; + +#ifdef RN_FABRIC_ENABLED + BOOL shouldHideHeader = !config.show; +#else + BOOL shouldHideHeader = config.hide; +#endif + + if (wasSearchBarActive && shouldHideHeader) { + dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 0); + dispatch_after(popTime, dispatch_get_main_queue(), ^(void) { + [self.navigationController setNavigationBarHidden:YES animated:NO]; + }); + } + } + } +#endif +} + +#ifdef RN_FABRIC_ENABLED +#pragma mark - Fabric specific + +- (void)setViewToSnapshot:(UIView *)snapshot +{ + // modals of native stack seem not to support + // changing their view by just setting the view + if (_initialView.stackPresentation != RNSScreenStackPresentationPush) { + UIView *superView = self.view.superview; + [self.view removeFromSuperview]; + self.view = snapshot; + [superView addSubview:self.view]; + } else { + [self.view removeFromSuperview]; + self.view = snapshot; + } +} + +- (void)resetViewToScreen +{ + if (self.view != _initialView) { + [self.view removeFromSuperview]; + self.view = _initialView; + } +} + +#else +#pragma mark - Paper specific + +- (void)traverseForScrollView:(UIView *)view +{ + if (![[self.view valueForKey:@"_bridge"] valueForKey:@"_jsThread"]) { + // we don't want to send `scrollViewDidEndDecelerating` event to JS before the JS thread is ready + return; + } + if ([view isKindOfClass:[UIScrollView class]] && + ([[(UIScrollView *)view delegate] respondsToSelector:@selector(scrollViewDidEndDecelerating:)])) { + [[(UIScrollView *)view delegate] scrollViewDidEndDecelerating:(id)view]; + } + [view.subviews enumerateObjectsUsingBlock:^(__kindof UIView *_Nonnull obj, NSUInteger idx, BOOL *_Nonnull stop) { + [self traverseForScrollView:obj]; + }]; +} +#endif + +@end + +@implementation RNSScreenManager + +RCT_EXPORT_MODULE() + +// we want to handle the case when activityState is nil +RCT_REMAP_VIEW_PROPERTY(activityState, activityStateOrNil, NSNumber) +RCT_EXPORT_VIEW_PROPERTY(customAnimationOnSwipe, BOOL); +RCT_EXPORT_VIEW_PROPERTY(fullScreenSwipeEnabled, BOOL); +RCT_EXPORT_VIEW_PROPERTY(gestureEnabled, BOOL) +RCT_EXPORT_VIEW_PROPERTY(gestureResponseDistance, NSDictionary) +RCT_EXPORT_VIEW_PROPERTY(hideKeyboardOnSwipe, BOOL) +RCT_EXPORT_VIEW_PROPERTY(preventNativeDismiss, BOOL) +RCT_EXPORT_VIEW_PROPERTY(replaceAnimation, RNSScreenReplaceAnimation) +RCT_EXPORT_VIEW_PROPERTY(stackPresentation, RNSScreenStackPresentation) +RCT_EXPORT_VIEW_PROPERTY(stackAnimation, RNSScreenStackAnimation) +RCT_EXPORT_VIEW_PROPERTY(swipeDirection, RNSScreenSwipeDirection) +RCT_EXPORT_VIEW_PROPERTY(transitionDuration, NSNumber) + +RCT_EXPORT_VIEW_PROPERTY(onAppear, RCTDirectEventBlock); +RCT_EXPORT_VIEW_PROPERTY(onDisappear, RCTDirectEventBlock); +RCT_EXPORT_VIEW_PROPERTY(onDismissed, RCTDirectEventBlock); +RCT_EXPORT_VIEW_PROPERTY(onNativeDismissCancelled, RCTDirectEventBlock); +RCT_EXPORT_VIEW_PROPERTY(onTransitionProgress, RCTDirectEventBlock); +RCT_EXPORT_VIEW_PROPERTY(onWillAppear, RCTDirectEventBlock); +RCT_EXPORT_VIEW_PROPERTY(onWillDisappear, RCTDirectEventBlock); + +#if !TARGET_OS_TV +RCT_EXPORT_VIEW_PROPERTY(screenOrientation, UIInterfaceOrientationMask) +RCT_EXPORT_VIEW_PROPERTY(statusBarAnimation, UIStatusBarAnimation) +RCT_EXPORT_VIEW_PROPERTY(statusBarHidden, BOOL) +RCT_EXPORT_VIEW_PROPERTY(statusBarStyle, RNSStatusBarStyle) +RCT_EXPORT_VIEW_PROPERTY(homeIndicatorHidden, BOOL) + +RCT_EXPORT_VIEW_PROPERTY(sheetAllowedDetents, RNSScreenDetentType); +RCT_EXPORT_VIEW_PROPERTY(sheetLargestUndimmedDetent, RNSScreenDetentType); +RCT_EXPORT_VIEW_PROPERTY(sheetGrabberVisible, BOOL); +RCT_EXPORT_VIEW_PROPERTY(sheetCornerRadius, CGFloat); +RCT_EXPORT_VIEW_PROPERTY(sheetExpandsWhenScrolledToEdge, BOOL); +#endif + +#if !TARGET_OS_TV +// See: +// 1. https://github.com/software-mansion/react-native-screens/pull/1543 +// 2. https://github.com/software-mansion/react-native-screens/pull/1596 +// This class is instatiated from React Native's internals during application startup +- (instancetype)init +{ + if (self = [super init]) { + dispatch_async(dispatch_get_main_queue(), ^{ + [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; + }); + } + return self; +} + +- (void)dealloc +{ + dispatch_sync(dispatch_get_main_queue(), ^{ + [[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications]; + }); +} +#endif // !TARGET_OS_TV + +- (UIView *)view +{ + return [[RNSScreenView alloc] initWithBridge:self.bridge]; +} + ++ (BOOL)requiresMainQueueSetup +{ + // Returning NO here despite the fact some initialization in -init method dispatches tasks + // on main queue, because the comments in RN source code states that modules which return YES + // here will be constructed ahead-of-time -- and this is not required in our case. + return NO; +} + +@end + +@implementation RCTConvert (RNSScreen) + +RCT_ENUM_CONVERTER( + RNSScreenStackPresentation, + (@{ + @"push" : @(RNSScreenStackPresentationPush), + @"modal" : @(RNSScreenStackPresentationModal), + @"fullScreenModal" : @(RNSScreenStackPresentationFullScreenModal), + @"formSheet" : @(RNSScreenStackPresentationFormSheet), + @"containedModal" : @(RNSScreenStackPresentationContainedModal), + @"transparentModal" : @(RNSScreenStackPresentationTransparentModal), + @"containedTransparentModal" : @(RNSScreenStackPresentationContainedTransparentModal) + }), + RNSScreenStackPresentationPush, + integerValue) + +RCT_ENUM_CONVERTER( + RNSScreenStackAnimation, + (@{ + @"default" : @(RNSScreenStackAnimationDefault), + @"none" : @(RNSScreenStackAnimationNone), + @"fade" : @(RNSScreenStackAnimationFade), + @"fade_from_bottom" : @(RNSScreenStackAnimationFadeFromBottom), + @"flip" : @(RNSScreenStackAnimationFlip), + @"simple_push" : @(RNSScreenStackAnimationSimplePush), + @"slide_from_bottom" : @(RNSScreenStackAnimationSlideFromBottom), + @"slide_from_right" : @(RNSScreenStackAnimationDefault), + @"slide_from_left" : @(RNSScreenStackAnimationDefault), + }), + RNSScreenStackAnimationDefault, + integerValue) + +RCT_ENUM_CONVERTER( + RNSScreenReplaceAnimation, + (@{ + @"push" : @(RNSScreenReplaceAnimationPush), + @"pop" : @(RNSScreenReplaceAnimationPop), + }), + RNSScreenReplaceAnimationPop, + integerValue) + +RCT_ENUM_CONVERTER( + RNSScreenSwipeDirection, + (@{ + @"vertical" : @(RNSScreenSwipeDirectionVertical), + @"horizontal" : @(RNSScreenSwipeDirectionHorizontal), + }), + RNSScreenSwipeDirectionHorizontal, + integerValue) + +#if !TARGET_OS_TV +RCT_ENUM_CONVERTER( + UIStatusBarAnimation, + (@{ + @"none" : @(UIStatusBarAnimationNone), + @"fade" : @(UIStatusBarAnimationFade), + @"slide" : @(UIStatusBarAnimationSlide) + }), + UIStatusBarAnimationNone, + integerValue) + +RCT_ENUM_CONVERTER( + RNSStatusBarStyle, + (@{ + @"auto" : @(RNSStatusBarStyleAuto), + @"inverted" : @(RNSStatusBarStyleInverted), + @"light" : @(RNSStatusBarStyleLight), + @"dark" : @(RNSStatusBarStyleDark), + }), + RNSStatusBarStyleAuto, + integerValue) + +RCT_ENUM_CONVERTER( + RNSScreenDetentType, + (@{ + @"large" : @(RNSScreenDetentTypeLarge), + @"medium" : @(RNSScreenDetentTypeMedium), + @"all" : @(RNSScreenDetentTypeAll), + }), + RNSScreenDetentTypeAll, + integerValue) + ++ (UIInterfaceOrientationMask)UIInterfaceOrientationMask:(id)json +{ + json = [self NSString:json]; + if ([json isEqualToString:@"default"]) { + return UIInterfaceOrientationMaskAllButUpsideDown; + } else if ([json isEqualToString:@"all"]) { + return UIInterfaceOrientationMaskAll; + } else if ([json isEqualToString:@"portrait"]) { + return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown; + } else if ([json isEqualToString:@"portrait_up"]) { + return UIInterfaceOrientationMaskPortrait; + } else if ([json isEqualToString:@"portrait_down"]) { + return UIInterfaceOrientationMaskPortraitUpsideDown; + } else if ([json isEqualToString:@"landscape"]) { + return UIInterfaceOrientationMaskLandscape; + } else if ([json isEqualToString:@"landscape_left"]) { + return UIInterfaceOrientationMaskLandscapeLeft; + } else if ([json isEqualToString:@"landscape_right"]) { + return UIInterfaceOrientationMaskLandscapeRight; + } + return UIInterfaceOrientationMaskAllButUpsideDown; +} +#endif + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenContainer.h b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenContainer.h new file mode 100644 index 00000000..4f482332 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenContainer.h @@ -0,0 +1,45 @@ +#ifdef RN_FABRIC_ENABLED +#import +#else +#endif + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol RNSScreenContainerDelegate + +- (void)markChildUpdated; +- (void)updateContainer; + +@end + +@protocol RNScreensViewControllerDelegate + +@end + +@interface RNScreensViewController : UIViewController + +- (UIViewController *)findActiveChildVC; + +@end + +@interface RNSScreenContainerManager : RCTViewManager + +@end + +@interface RNSScreenContainerView : +#ifdef RN_FABRIC_ENABLED + RCTViewComponentView +#else + UIView +#endif + +@property (nonatomic, retain) UIViewController *controller; +@property (nonatomic, retain) NSMutableArray *reactSubviews; + +- (void)maybeDismissVC; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenContainer.mm b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenContainer.mm new file mode 100644 index 00000000..baea98c1 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenContainer.mm @@ -0,0 +1,340 @@ +#import "RNSScreenContainer.h" +#import "RNSScreen.h" + +#ifdef RN_FABRIC_ENABLED +#import +#import +#import +#import +#endif + +@implementation RNScreensViewController + +#if !TARGET_OS_TV +- (UIViewController *)childViewControllerForStatusBarStyle +{ + return [self findActiveChildVC]; +} + +- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation +{ + return [self findActiveChildVC].preferredStatusBarUpdateAnimation; +} + +- (UIViewController *)childViewControllerForStatusBarHidden +{ + return [self findActiveChildVC]; +} + +- (UIInterfaceOrientationMask)supportedInterfaceOrientations +{ + return [self findActiveChildVC].supportedInterfaceOrientations; +} + +- (UIViewController *)childViewControllerForHomeIndicatorAutoHidden +{ + return [self findActiveChildVC]; +} +#endif + +- (UIViewController *)findActiveChildVC +{ + for (UIViewController *childVC in self.childViewControllers) { + if ([childVC isKindOfClass:[RNSScreen class]] && + ((RNSScreen *)childVC).screenView.activityState == RNSActivityStateOnTop) { + return childVC; + } + } + return [[self childViewControllers] lastObject]; +} + +@end + +@implementation RNSScreenContainerView { + BOOL _invalidated; + NSMutableSet *_activeScreens; +} + +- (instancetype)init +{ + if (self = [super init]) { +#ifdef RN_FABRIC_ENABLED + static const auto defaultProps = std::make_shared(); + _props = defaultProps; +#endif + _activeScreens = [NSMutableSet new]; + _reactSubviews = [NSMutableArray new]; + [self setupController]; + _invalidated = NO; + } + return self; +} + +- (void)setupController +{ + _controller = [[RNScreensViewController alloc] init]; + [self addSubview:_controller.view]; +} + +- (void)markChildUpdated +{ + // We want the attaching/detaching of children to be always made on main queue, which + // is currently true for `react-navigation` since this method is triggered + // by the changes of `Animated` value in stack's transition or adding/removing screens + // in all navigators + RCTAssertMainQueue(); + [self updateContainer]; +} + +- (void)insertReactSubview:(RNSScreenView *)subview atIndex:(NSInteger)atIndex +{ + subview.reactSuperview = self; + [_reactSubviews insertObject:subview atIndex:atIndex]; + [subview reactSetFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)]; +} + +- (void)removeReactSubview:(RNSScreenView *)subview +{ + subview.reactSuperview = nil; + [_reactSubviews removeObject:subview]; +} + +- (NSArray *)reactSubviews +{ + return _reactSubviews; +} + +- (UIViewController *)reactViewController +{ + return _controller; +} + +- (UIViewController *)findChildControllerForScreen:(RNSScreenView *)screen +{ + for (UIViewController *vc in _controller.childViewControllers) { + if (vc.view == screen) { + return vc; + } + } + return nil; +} + +- (void)prepareDetach:(RNSScreenView *)screen +{ + [[self findChildControllerForScreen:screen] willMoveToParentViewController:nil]; +} + +- (void)detachScreen:(RNSScreenView *)screen +{ + // We use findChildControllerForScreen method instead of directly accesing + // screen.controller because screen.controller may be reset to nil when the + // original screen view gets detached from the view hierarchy (we reset controller + // reference to avoid reference loops) + UIViewController *detachController = [self findChildControllerForScreen:screen]; + [detachController willMoveToParentViewController:nil]; + [screen removeFromSuperview]; + [detachController removeFromParentViewController]; + [_activeScreens removeObject:screen]; +} + +- (void)attachScreen:(RNSScreenView *)screen atIndex:(NSInteger)index +{ + [_controller addChildViewController:screen.controller]; + // the frame is already set at this moment because we adjust it in insertReactSubview. We don't + // want to update it here as react-driven animations may already run and hence changing the frame + // would result in visual glitches + [_controller.view insertSubview:screen.controller.view atIndex:index]; + [screen.controller didMoveToParentViewController:_controller]; + [_activeScreens addObject:screen]; +} + +- (void)updateContainer +{ + BOOL screenRemoved = NO; + // remove screens that are no longer active + NSMutableSet *orphaned = [NSMutableSet setWithSet:_activeScreens]; + for (RNSScreenView *screen in _reactSubviews) { + if (screen.activityState == RNSActivityStateInactive && [_activeScreens containsObject:screen]) { + screenRemoved = YES; + [self detachScreen:screen]; + } + [orphaned removeObject:screen]; + } + for (RNSScreenView *screen in orphaned) { + screenRemoved = YES; + [self detachScreen:screen]; + } + + // detect if new screen is going to be activated + BOOL screenAdded = NO; + for (RNSScreenView *screen in _reactSubviews) { + if (screen.activityState != RNSActivityStateInactive && ![_activeScreens containsObject:screen]) { + screenAdded = YES; + } + } + + if (screenAdded) { + // add new screens in order they are placed in subviews array + NSInteger index = 0; + for (RNSScreenView *screen in _reactSubviews) { + if (screen.activityState != RNSActivityStateInactive) { + if ([_activeScreens containsObject:screen] && screen.activityState == RNSActivityStateTransitioningOrBelowTop) { + // for screens that were already active we want to mimick the effect UINavigationController + // has when willMoveToWindow:nil is triggered before the animation starts + [self prepareDetach:screen]; + } else if (![_activeScreens containsObject:screen]) { + [self attachScreen:screen atIndex:index]; + } + index += 1; + } + } + } + + for (RNSScreenView *screen in _reactSubviews) { + if (screen.activityState == RNSActivityStateOnTop) { + [screen notifyFinishTransitioning]; + } + } + + if (screenRemoved || screenAdded) { + [self maybeDismissVC]; + } +} + +- (void)maybeDismissVC +{ + if (_controller.presentedViewController == nil && _controller.presentingViewController == nil) { + // if user has reachability enabled (one hand use) and the window is slided down the below + // method will force it to slide back up as it is expected to happen with UINavController when + // we push or pop views. + // We only do that if `presentedViewController` is nil, as otherwise it'd mean that modal has + // been presented on top of recently changed controller in which case the below method would + // dismiss such a modal (e.g., permission modal or alert) + [_controller dismissViewControllerAnimated:NO completion:nil]; + } +} + +- (void)didUpdateReactSubviews +{ + [self markChildUpdated]; +} + +- (void)didMoveToWindow +{ + if (self.window && !_invalidated) { + // We check whether the view has been invalidated before running side-effects in didMoveToWindow + // This is needed because when LayoutAnimations are used it is possible for view to be re-attached + // to a window despite the fact it has been removed from the React Native view hierarchy. + [self reactAddControllerToClosestParent:_controller]; + } +} + +- (void)layoutSubviews +{ + [super layoutSubviews]; + _controller.view.frame = self.bounds; + for (RNSScreenView *subview in _reactSubviews) { +#ifdef RN_FABRIC_ENABLED + facebook::react::LayoutMetrics screenLayoutMetrics = subview.newLayoutMetrics; + screenLayoutMetrics.frame = RCTRectFromCGRect(CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)); + [subview updateLayoutMetrics:screenLayoutMetrics oldLayoutMetrics:subview.oldLayoutMetrics]; +#else + [subview reactSetFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)]; +#endif + [subview setNeedsLayout]; + } +} + +#pragma mark-- Fabric specific +#ifdef RN_FABRIC_ENABLED + +- (void)mountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +{ + if (![childComponentView isKindOfClass:[RNSScreenView class]]) { + RCTLogError(@"ScreenContainer only accepts children of type Screen"); + return; + } + + RNSScreenView *screenView = (RNSScreenView *)childComponentView; + + RCTAssert( + childComponentView.reactSuperview == nil, + @"Attempt to mount already mounted component view. (parent: %@, child: %@, index: %@, existing parent: %@)", + self, + childComponentView, + @(index), + @([childComponentView.superview tag])); + + [_reactSubviews insertObject:screenView atIndex:index]; + screenView.reactSuperview = self; + facebook::react::LayoutMetrics screenLayoutMetrics = screenView.newLayoutMetrics; + screenLayoutMetrics.frame = RCTRectFromCGRect(CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)); + [screenView updateLayoutMetrics:screenLayoutMetrics oldLayoutMetrics:screenView.oldLayoutMetrics]; + [self markChildUpdated]; +} + +- (void)unmountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +{ + RCTAssert( + childComponentView.reactSuperview == self, + @"Attempt to unmount a view which is mounted inside different view. (parent: %@, child: %@, index: %@)", + self, + childComponentView, + @(index)); + RCTAssert( + (_reactSubviews.count > index) && [_reactSubviews objectAtIndex:index] == childComponentView, + @"Attempt to unmount a view which has a different index. (parent: %@, child: %@, index: %@, actual index: %@, tag at index: %@)", + self, + childComponentView, + @(index), + @([_reactSubviews indexOfObject:childComponentView]), + @([[_reactSubviews objectAtIndex:index] tag])); + ((RNSScreenView *)childComponentView).reactSuperview = nil; + [_reactSubviews removeObject:childComponentView]; + [childComponentView removeFromSuperview]; + [self markChildUpdated]; +} + ++ (facebook::react::ComponentDescriptorProvider)componentDescriptorProvider +{ + return facebook::react::concreteComponentDescriptorProvider(); +} + +- (void)prepareForRecycle +{ + [super prepareForRecycle]; + [_controller willMoveToParentViewController:nil]; + [_controller removeFromParentViewController]; +} + +#pragma mark-- Paper specific +#else + +- (void)invalidate +{ + _invalidated = YES; + [_controller willMoveToParentViewController:nil]; + [_controller removeFromParentViewController]; +} + +#endif + +@end + +#ifdef RN_FABRIC_ENABLED +Class RNSScreenContainerCls(void) +{ + return RNSScreenContainerView.class; +} +#endif + +@implementation RNSScreenContainerManager + +RCT_EXPORT_MODULE() + +- (UIView *)view +{ + return [[RNSScreenContainerView alloc] init]; +} + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenNavigationContainer.h b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenNavigationContainer.h new file mode 100644 index 00000000..bec5abec --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenNavigationContainer.h @@ -0,0 +1,16 @@ +#import + +#import "RNSScreenContainer.h" +#import "RNSScreenStack.h" + +@interface RNScreensContainerNavigationController : RNScreensNavigationController + +@end + +@interface RNSScreenNavigationContainerView : RNSScreenContainerView + +@end + +@interface RNSScreenNavigationContainerManager : RNSScreenContainerManager + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenNavigationContainer.mm b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenNavigationContainer.mm new file mode 100644 index 00000000..b32546c9 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenNavigationContainer.mm @@ -0,0 +1,65 @@ +#import "RNSScreenNavigationContainer.h" +#import "RNSScreen.h" +#import "RNSScreenContainer.h" + +#ifdef RN_FABRIC_ENABLED +#import +#import +#import +#endif + +@implementation RNScreensContainerNavigationController + +@end + +@implementation RNSScreenNavigationContainerView + +- (void)setupController +{ + self.controller = [[RNScreensContainerNavigationController alloc] init]; + [(RNScreensContainerNavigationController *)self.controller setNavigationBarHidden:YES animated:NO]; + [self addSubview:self.controller.view]; +} + +- (void)updateContainer +{ + for (RNSScreenView *screen in self.reactSubviews) { + if (screen.activityState == RNSActivityStateOnTop) { + // there should never be more than one screen with `RNSActivityStateOnTop` + // since this component should be used for `tabs` and `drawer` navigators + [(RNScreensContainerNavigationController *)self.controller setViewControllers:@[ screen.controller ] animated:NO]; + [screen notifyFinishTransitioning]; + } + } + + [self maybeDismissVC]; +} + +#pragma mark-- Fabric specific +#ifdef RN_FABRIC_ENABLED ++ (facebook::react::ComponentDescriptorProvider)componentDescriptorProvider +{ + return facebook::react::concreteComponentDescriptorProvider< + facebook::react::RNSScreenNavigationContainerComponentDescriptor>(); +} +#endif + +@end + +#ifdef RN_FABRIC_ENABLED +Class RNSScreenNavigationContainerCls(void) +{ + return RNSScreenNavigationContainerView.class; +} +#endif + +@implementation RNSScreenNavigationContainerManager + +RCT_EXPORT_MODULE() + +- (UIView *)view +{ + return [[RNSScreenNavigationContainerView alloc] init]; +} + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStack.h b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStack.h new file mode 100644 index 00000000..efaf428c --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStack.h @@ -0,0 +1,37 @@ +#ifdef RN_FABRIC_ENABLED +#import +#else +#import +#import +#endif + +#import "RNSScreenContainer.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface RNScreensNavigationController : UINavigationController + +@end + +@interface RNSScreenStackView : +#ifdef RN_FABRIC_ENABLED + RCTViewComponentView +#else + UIView +#endif + +- (void)markChildUpdated; +- (void)didUpdateChildren; + +#ifdef RN_FABRIC_ENABLED +#else +@property (nonatomic, copy) RCTDirectEventBlock onFinishTransitioning; +#endif // RN_FABRIC_ENABLED + +@end + +@interface RNSScreenStackManager : RCTViewManager + +@end + +NS_ASSUME_NONNULL_END diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStack.mm b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStack.mm new file mode 100644 index 00000000..8744a64f --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStack.mm @@ -0,0 +1,1056 @@ +#ifdef RN_FABRIC_ENABLED +#import +#import +#import +#import +#import +#import +#import + +#import + +#else +#import +#import +#import +#import +#import +#import +#endif // RN_FABRIC_ENABLED + +#import "RNSScreen.h" +#import "RNSScreenStack.h" +#import "RNSScreenStackAnimator.h" +#import "RNSScreenStackHeaderConfig.h" +#import "RNSScreenWindowTraits.h" + +@interface RNSScreenStackView () < + UINavigationControllerDelegate, + UIAdaptivePresentationControllerDelegate, + UIGestureRecognizerDelegate, + UIViewControllerTransitioningDelegate +#ifdef RN_FABRIC_ENABLED + , + RCTMountingTransactionObserving +#endif + > + +@property (nonatomic) NSMutableArray *presentedModals; +@property (nonatomic) BOOL updatingModals; +@property (nonatomic) BOOL scheduleModalsUpdate; + +@end + +@implementation RNScreensNavigationController + +#if !TARGET_OS_TV +- (UIViewController *)childViewControllerForStatusBarStyle +{ + return [self topViewController]; +} + +- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation +{ + return [self topViewController].preferredStatusBarUpdateAnimation; +} + +- (UIViewController *)childViewControllerForStatusBarHidden +{ + return [self topViewController]; +} + +- (UIInterfaceOrientationMask)supportedInterfaceOrientations +{ + return [self topViewController].supportedInterfaceOrientations; +} + +- (UIViewController *)childViewControllerForHomeIndicatorAutoHidden +{ + return [self topViewController]; +} +#endif + +@end + +#if !TARGET_OS_TV +@interface RNSScreenEdgeGestureRecognizer : UIScreenEdgePanGestureRecognizer +@end + +@implementation RNSScreenEdgeGestureRecognizer +@end + +@interface RNSPanGestureRecognizer : UIPanGestureRecognizer +@end + +@implementation RNSPanGestureRecognizer +@end +#endif + +@implementation RNSScreenStackView { + UINavigationController *_controller; + NSMutableArray *_reactSubviews; + BOOL _invalidated; + BOOL _isFullWidthSwiping; + UIPercentDrivenInteractiveTransition *_interactionController; + BOOL _hasLayout; + __weak RNSScreenStackManager *_manager; + BOOL _updateScheduled; +#ifdef RN_FABRIC_ENABLED + UIView *_snapshot; +#endif +} + +#ifdef RN_FABRIC_ENABLED +- (instancetype)initWithFrame:(CGRect)frame +{ + if (self = [super initWithFrame:frame]) { + static const auto defaultProps = std::make_shared(); + _props = defaultProps; + [self initCommonProps]; + } + + return self; +} +#endif // RN_FABRIC_ENABLED + +- (instancetype)initWithManager:(RNSScreenStackManager *)manager +{ + if (self = [super init]) { + _hasLayout = NO; + _invalidated = NO; + _manager = manager; + [self initCommonProps]; + } + return self; +} + +- (void)initCommonProps +{ + _reactSubviews = [NSMutableArray new]; + _presentedModals = [NSMutableArray new]; + _controller = [RNScreensNavigationController new]; + _controller.delegate = self; +#if !TARGET_OS_TV + [self setupGestureHandlers]; +#endif + // we have to initialize viewControllers with a non empty array for + // largeTitle header to render in the opened state. If it is empty + // the header will render in collapsed state which is perhaps a bug + // in UIKit but ¯\_(ツ)_/¯ + [_controller setViewControllers:@[ [UIViewController new] ]]; +} + +#pragma mark - Common + +- (void)emitOnFinishTransitioningEvent +{ +#ifdef RN_FABRIC_ENABLED + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onFinishTransitioning(facebook::react::RNSScreenStackEventEmitter::OnFinishTransitioning{}); + } +#else + if (self.onFinishTransitioning) { + self.onFinishTransitioning(nil); + } +#endif +} + +- (void)navigationController:(UINavigationController *)navigationController + willShowViewController:(UIViewController *)viewController + animated:(BOOL)animated +{ + UIView *view = viewController.view; +#ifdef RN_FABRIC_ENABLED + if (![view isKindOfClass:[RNSScreenView class]]) { + // if the current view is a snapshot, config was already removed so we don't trigger the method + return; + } +#endif + RNSScreenStackHeaderConfig *config = nil; + for (UIView *subview in view.reactSubviews) { + if ([subview isKindOfClass:[RNSScreenStackHeaderConfig class]]) { + config = (RNSScreenStackHeaderConfig *)subview; + break; + } + } + [RNSScreenStackHeaderConfig willShowViewController:viewController animated:animated withConfig:config]; +} + +- (void)presentationControllerDidDismiss:(UIPresentationController *)presentationController +{ + // We don't directly set presentation delegate but instead rely on the ScreenView's delegate to + // forward certain calls to the container (Stack). + if ([presentationController.presentedViewController isKindOfClass:[RNSScreen class]]) { + // we trigger the update of status bar's appearance here because there is no other lifecycle method + // that can handle it when dismissing a modal, the same for orientation + [RNSScreenWindowTraits updateWindowTraits]; + [_presentedModals removeObject:presentationController.presentedViewController]; + + _updatingModals = NO; +#ifdef RN_FABRIC_ENABLED + [self emitOnFinishTransitioningEvent]; +#else + // we double check if there are no new controllers pending to be presented since someone could + // have tried to push another one during the transition. + // We don't do it on Fabric since update of container will be triggered from "unmount" method afterwards + [self updateContainer]; + if (self.onFinishTransitioning) { + // instead of directly triggering onFinishTransitioning this time we enqueue the event on the + // main queue. We do that because onDismiss event is also enqueued and we want for the transition + // finish event to arrive later than onDismiss (see RNSScreen#notifyDismiss) + dispatch_async(dispatch_get_main_queue(), ^{ + [self emitOnFinishTransitioningEvent]; + }); + } +#endif + } +} + +- (NSArray *)reactSubviews +{ + return _reactSubviews; +} + +- (void)didMoveToWindow +{ + [super didMoveToWindow]; +#ifdef RN_FABRIC_ENABLED + // for handling nested stacks + [self maybeAddToParentAndUpdateContainer]; +#else + if (!_invalidated) { + // We check whether the view has been invalidated before running side-effects in didMoveToWindow + // This is needed because when LayoutAnimations are used it is possible for view to be re-attached + // to a window despite the fact it has been removed from the React Native view hierarchy. + [self maybeAddToParentAndUpdateContainer]; + } +#endif +} + +- (void)maybeAddToParentAndUpdateContainer +{ + BOOL wasScreenMounted = _controller.parentViewController != nil; +#ifdef RN_FABRIC_ENABLED + BOOL isScreenReadyForShowing = self.window; +#else + BOOL isScreenReadyForShowing = self.window && _hasLayout; +#endif + if (!isScreenReadyForShowing && !wasScreenMounted) { + // We wait with adding to parent controller until the stack is mounted and has its initial + // layout done. + // If we add it before layout, some of the items (specifically items from the navigation bar), + // won't be able to position properly. Also the position and size of such items, even if it + // happens to change, won't be properly updated (this is perhaps some internal issue of UIKit). + // If we add it when window is not attached, some of the view transitions will be bloced (i.e. + // modal transitions) and the internal view controler's state will get out of sync with what's + // on screen without us knowing. + return; + } + [self updateContainer]; + if (!wasScreenMounted) { + // when stack hasn't been added to parent VC yet we do two things: + // 1) we run updateContainer (the one above) – we do this because we want push view controllers to + // be installed before the VC is mounted. If we do that after it is added to parent the push + // updates operations are going to be blocked by UIKit. + // 2) we add navigation VS to parent – this is needed for the VC lifecycle events to be dispatched + // properly + // 3) we again call updateContainer – this time we do this to open modal controllers. Modals + // won't open in (1) because they require navigator to be added to parent. We handle that case + // gracefully in setModalViewControllers and can retry opening at any point. + [self reactAddControllerToClosestParent:_controller]; + [self updateContainer]; + } +} + +- (void)reactAddControllerToClosestParent:(UIViewController *)controller +{ + if (!controller.parentViewController) { + UIView *parentView = (UIView *)self.reactSuperview; + while (parentView) { + if (parentView.reactViewController) { + [parentView.reactViewController addChildViewController:controller]; + [self addSubview:controller.view]; +#if !TARGET_OS_TV + _controller.interactivePopGestureRecognizer.delegate = self; +#endif + [controller didMoveToParentViewController:parentView.reactViewController]; + // On iOS pre 12 we observed that `willShowViewController` delegate method does not always + // get triggered when the navigation controller is instantiated. As the only thing we do in + // that delegate method is ask nav header to update to the current state it does not hurt to + // trigger that logic from here too such that we can be sure the header is properly updated. + [self navigationController:_controller willShowViewController:_controller.topViewController animated:NO]; + break; + } + parentView = (UIView *)parentView.reactSuperview; + } + return; + } +} + +- (void)setModalViewControllers:(NSArray *)controllers +{ + // prevent re-entry + if (_updatingModals) { + _scheduleModalsUpdate = YES; + return; + } + + // when there is no change we return immediately. This check is important because sometime we may + // accidently trigger modal dismiss if we don't verify to run the below code only when an actual + // change in the list of presented modal was made. + if ([_presentedModals isEqualToArray:controllers]) { + return; + } + + // if view controller is not yet attached to window we skip updates now and run them when view + // is attached + if (self.window == nil && _presentedModals.lastObject.view.window == nil) { + return; + } + + _updatingModals = YES; + + NSMutableArray *newControllers = [NSMutableArray arrayWithArray:controllers]; + [newControllers removeObjectsInArray:_presentedModals]; + + // find bottom-most controller that should stay on the stack for the duration of transition + NSUInteger changeRootIndex = 0; + UIViewController *changeRootController = _controller; + for (NSUInteger i = 0; i < MIN(_presentedModals.count, controllers.count); i++) { + if (_presentedModals[i] == controllers[i]) { + changeRootController = controllers[i]; + changeRootIndex = i + 1; + } else { + break; + } + } + + // we verify that controllers added on top of changeRootIndex are all new. Unfortunately modal + // VCs cannot be reshuffled (there are some visual glitches when we try to dismiss then show as + // even non-animated dismissal has delay and updates the screen several times) + for (NSUInteger i = changeRootIndex; i < controllers.count; i++) { + if ([_presentedModals containsObject:controllers[i]]) { + RCTAssert(false, @"Modally presented controllers are being reshuffled, this is not allowed"); + } + } + + __weak RNSScreenStackView *weakSelf = self; + + void (^afterTransitions)(void) = ^{ + [weakSelf emitOnFinishTransitioningEvent]; + weakSelf.updatingModals = NO; + if (weakSelf.scheduleModalsUpdate) { + // if modals update was requested during setModalViewControllers we set scheduleModalsUpdate + // flag in order to perform updates at a later point. Here we are done with all modals + // transitions and check this flag again. If it was set, we reset the flag and execute updates. + weakSelf.scheduleModalsUpdate = NO; + [weakSelf updateContainer]; + } + // we trigger the update of orientation here because, when dismissing the modal from JS, + // neither `viewWillAppear` nor `presentationControllerDidDismiss` are called, same for status bar. + [RNSScreenWindowTraits updateWindowTraits]; + }; + + void (^finish)(void) = ^{ + NSUInteger oldCount = weakSelf.presentedModals.count; + if (changeRootIndex < oldCount) { + [weakSelf.presentedModals removeObjectsInRange:NSMakeRange(changeRootIndex, oldCount - changeRootIndex)]; + } + BOOL isAttached = + changeRootController.parentViewController != nil || changeRootController.presentingViewController != nil; + if (!isAttached || changeRootIndex >= controllers.count) { + // if change controller view is not attached, presenting modals will silently fail on iOS. + // In such a case we trigger controllers update from didMoveToWindow. + // We also don't run any present transitions if changeRootIndex is greater or equal to the size + // of new controllers array. This means that no new controllers should be presented. + afterTransitions(); + return; + } else { + UIViewController *previous = changeRootController; + for (NSUInteger i = changeRootIndex; i < controllers.count; i++) { + UIViewController *next = controllers[i]; + BOOL lastModal = (i == controllers.count - 1); + +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 + if (@available(iOS 13.0, tvOS 13.0, *)) { + // Inherit UI style from its parent - solves an issue with incorrect style being applied to some UIKit views + // like date picker or segmented control. + next.overrideUserInterfaceStyle = self->_controller.overrideUserInterfaceStyle; + } +#endif + + BOOL shouldAnimate = lastModal && [next isKindOfClass:[RNSScreen class]] && + ((RNSScreen *)next).screenView.stackAnimation != RNSScreenStackAnimationNone; + + // if you want to present another modal quick enough after dismissing the previous one, + // it will result in wrong changeRootController, see repro in + // https://github.com/software-mansion/react-native-screens/issues/1299 We call `updateContainer` again in + // `presentationControllerDidDismiss` to cover this case and present new controller + if (previous.beingDismissed) { + return; + } + + [previous presentViewController:next + animated:shouldAnimate + completion:^{ + [weakSelf.presentedModals addObject:next]; + if (lastModal) { + afterTransitions(); + }; + }]; + previous = next; + } + } + }; + + if (changeRootController.presentedViewController != nil && + [_presentedModals containsObject:changeRootController.presentedViewController]) { + BOOL shouldAnimate = changeRootIndex == controllers.count && + [changeRootController.presentedViewController isKindOfClass:[RNSScreen class]] && + ((RNSScreen *)changeRootController.presentedViewController).screenView.stackAnimation != + RNSScreenStackAnimationNone; + [changeRootController dismissViewControllerAnimated:shouldAnimate completion:finish]; + } else { + finish(); + } +} + +- (void)setPushViewControllers:(NSArray *)controllers +{ + // when there is no change we return immediately + if ([_controller.viewControllers isEqualToArray:controllers]) { + return; + } + + // if view controller is not yet attached to window we skip updates now and run them when view + // is attached + if (self.window == nil) { + return; + } + // when transition is ongoing, any updates made to the controller will not be reflected until the + // transition is complete. In particular, when we push/pop view controllers we expect viewControllers + // property to be updated immediately. Based on that property we then calculate future updates. + // When the transition is ongoing the property won't be updated immediatly. We therefore avoid + // making any updated when transition is ongoing and schedule updates for when the transition + // is complete. + if (_controller.transitionCoordinator != nil) { + if (!_updateScheduled) { + _updateScheduled = YES; + __weak RNSScreenStackView *weakSelf = self; + [_controller.transitionCoordinator + animateAlongsideTransition:^(id _Nonnull context) { + // do nothing here, we only want to be notified when transition is complete + } + completion:^(id _Nonnull context) { + self->_updateScheduled = NO; + [weakSelf updateContainer]; + }]; + } + return; + } + + UIViewController *top = controllers.lastObject; +#ifdef RN_FABRIC_ENABLED + UIViewController *previousTop = _controller.topViewController; +#else + UIViewController *previousTop = _controller.viewControllers.lastObject; +#endif + + // At the start we set viewControllers to contain a single UIViewController + // instance. This is a workaround for header height adjustment bug (see comment + // in the init function). Here, we need to detect if the initial empty + // controller is still there + BOOL firstTimePush = ![previousTop isKindOfClass:[RNSScreen class]]; + + if (firstTimePush) { + // nothing pushed yet + [_controller setViewControllers:controllers animated:NO]; + } else if (top != previousTop) { + if (![controllers containsObject:previousTop]) { + // if the previous top screen does not exist anymore and the new top was not on the stack before, probably replace + // was called, so we check the animation + if (![_controller.viewControllers containsObject:top] && + ((RNSScreenView *)top.view).replaceAnimation == RNSScreenReplaceAnimationPush) { + // setting new controllers with animation does `push` animation by default +#ifdef RN_FABRIC_ENABLED + auto screenController = (RNSScreen *)top; + [screenController resetViewToScreen]; +#endif + [_controller setViewControllers:controllers animated:YES]; + } else { + // last top controller is no longer on stack + // in this case we set the controllers stack to the new list with + // added the last top element to it and perform (animated) pop + NSMutableArray *newControllers = [NSMutableArray arrayWithArray:controllers]; + [newControllers addObject:previousTop]; + [_controller setViewControllers:newControllers animated:NO]; + [_controller popViewControllerAnimated:YES]; + } + } else if (![_controller.viewControllers containsObject:top]) { + // new top controller is not on the stack + // in such case we update the stack except from the last element with + // no animation and do animated push of the last item + NSMutableArray *newControllers = [NSMutableArray arrayWithArray:controllers]; + [newControllers removeLastObject]; + [_controller setViewControllers:newControllers animated:NO]; +#ifdef RN_FABRIC_ENABLED + auto screenController = (RNSScreen *)top; + [screenController resetViewToScreen]; +#endif + [_controller pushViewController:top animated:YES]; + } else { + // don't really know what this case could be, but may need to handle it + // somehow + [_controller setViewControllers:controllers animated:NO]; + } + } else { + // change wasn't on the top of the stack. We don't need animation. + [_controller setViewControllers:controllers animated:NO]; + } +} + +- (void)updateContainer +{ + NSMutableArray *pushControllers = [NSMutableArray new]; + NSMutableArray *modalControllers = [NSMutableArray new]; + for (RNSScreenView *screen in _reactSubviews) { + if (!screen.dismissed && screen.controller != nil) { + if (pushControllers.count == 0) { + // first screen on the list needs to be places as "push controller" + [pushControllers addObject:screen.controller]; + } else { + if (screen.stackPresentation == RNSScreenStackPresentationPush) { + [pushControllers addObject:screen.controller]; + } else { + [modalControllers addObject:screen.controller]; + } + } + } + } + + [self setPushViewControllers:pushControllers]; + [self setModalViewControllers:modalControllers]; +} + +- (void)layoutSubviews +{ + [super layoutSubviews]; + _controller.view.frame = self.bounds; +} + +- (void)dismissOnReload +{ +#ifdef RN_FABRIC_ENABLED + if ([_controller.visibleViewController isKindOfClass:[RNSScreen class]]) { + [(RNSScreen *)_controller.visibleViewController resetViewToScreen]; + } +#else + dispatch_async(dispatch_get_main_queue(), ^{ + [self invalidate]; + }); +#endif +} + +#pragma mark methods connected to transitioning + +- (id)navigationController:(UINavigationController *)navigationController + animationControllerForOperation:(UINavigationControllerOperation)operation + fromViewController:(UIViewController *)fromVC + toViewController:(UIViewController *)toVC +{ + RNSScreenView *screen; + if (operation == UINavigationControllerOperationPush) { + screen = ((RNSScreen *)toVC).screenView; + } else if (operation == UINavigationControllerOperationPop) { + screen = ((RNSScreen *)fromVC).screenView; + } + if (screen != nil && + // we need to return the animator when full width swiping even if the animation is not custom, + // otherwise the screen will be just popped immediately due to no animation + (_isFullWidthSwiping || [RNSScreenStackAnimator isCustomAnimation:screen.stackAnimation])) { + return [[RNSScreenStackAnimator alloc] initWithOperation:operation]; + } + return nil; +} + +- (void)cancelTouchesInParent +{ + // cancel touches in parent, this is needed to cancel RN touch events. For example when Touchable + // item is close to an edge and we start pulling from edge we want the Touchable to be cancelled. + // Without the below code the Touchable will remain active (highlighted) for the duration of back + // gesture and onPress may fire when we release the finger. + UIView *parent = _controller.view; + while (parent != nil && ![parent respondsToSelector:@selector(touchHandler)]) + parent = parent.superview; + if (parent != nil) { +#ifdef RN_FABRIC_ENABLED + RCTSurfaceTouchHandler *touchHandler = [parent performSelector:@selector(touchHandler)]; +#else + RCTTouchHandler *touchHandler = [parent performSelector:@selector(touchHandler)]; +#endif + [touchHandler setEnabled:NO]; + [touchHandler setEnabled:YES]; + [touchHandler reset]; + } +} + +- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer +{ + RNSScreenView *topScreen = _reactSubviews.lastObject; + +#if TARGET_OS_TV + [self cancelTouchesInParent]; + return YES; +#else + // RNSPanGestureRecognizer will receive events iff topScreen.fullScreenSwipeEnabled == YES; + // Events are filtered in gestureRecognizer:shouldReceivePressOrTouchEvent: method + if ([gestureRecognizer isKindOfClass:[RNSPanGestureRecognizer class]]) { + if ([self isInGestureResponseDistance:gestureRecognizer topScreen:topScreen]) { + _isFullWidthSwiping = YES; + [self cancelTouchesInParent]; + return YES; + } + return NO; + } + + // Now we're dealing with RNSScreenEdgeGestureRecognizer (or _UIParallaxTransitionPanGestureRecognizer) + if (topScreen.customAnimationOnSwipe && [RNSScreenStackAnimator isCustomAnimation:topScreen.stackAnimation]) { + if ([gestureRecognizer isKindOfClass:[RNSScreenEdgeGestureRecognizer class]]) { + // if we do not set any explicit `semanticContentAttribute`, it is `UISemanticContentAttributeUnspecified` instead + // of `UISemanticContentAttributeForceLeftToRight`, so we just check if it is RTL or not + BOOL isCorrectEdge = (_controller.view.semanticContentAttribute == UISemanticContentAttributeForceRightToLeft && + ((RNSScreenEdgeGestureRecognizer *)gestureRecognizer).edges == UIRectEdgeRight) || + (_controller.view.semanticContentAttribute != UISemanticContentAttributeForceRightToLeft && + ((RNSScreenEdgeGestureRecognizer *)gestureRecognizer).edges == UIRectEdgeLeft); + if (isCorrectEdge) { + [self cancelTouchesInParent]; + return YES; + } + } + return NO; + } else { + if ([gestureRecognizer isKindOfClass:[RNSScreenEdgeGestureRecognizer class]]) { + // it should only recognize with `customAnimationOnSwipe` set + return NO; + } + // _UIParallaxTransitionPanGestureRecognizer (other...) + [self cancelTouchesInParent]; + return YES; + } + +#endif // TARGET_OS_TV +} + +#if !TARGET_OS_TV +- (void)setupGestureHandlers +{ + // gesture recognizers for custom stack animations + RNSScreenEdgeGestureRecognizer *leftEdgeSwipeGestureRecognizer = + [[RNSScreenEdgeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipe:)]; + leftEdgeSwipeGestureRecognizer.edges = UIRectEdgeLeft; + leftEdgeSwipeGestureRecognizer.delegate = self; + [self addGestureRecognizer:leftEdgeSwipeGestureRecognizer]; + + RNSScreenEdgeGestureRecognizer *rightEdgeSwipeGestureRecognizer = + [[RNSScreenEdgeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipe:)]; + rightEdgeSwipeGestureRecognizer.edges = UIRectEdgeRight; + rightEdgeSwipeGestureRecognizer.delegate = self; + [self addGestureRecognizer:rightEdgeSwipeGestureRecognizer]; + + // gesture recognizer for full width swipe gesture + RNSPanGestureRecognizer *panRecognizer = [[RNSPanGestureRecognizer alloc] initWithTarget:self + action:@selector(handleSwipe:)]; + panRecognizer.delegate = self; + [self addGestureRecognizer:panRecognizer]; +} + +- (void)handleSwipe:(UIPanGestureRecognizer *)gestureRecognizer +{ + RNSScreenView *topScreen = _reactSubviews.lastObject; + float translation; + float velocity; + float distance; + if (topScreen.swipeDirection == RNSScreenSwipeDirectionVertical) { + translation = [gestureRecognizer translationInView:gestureRecognizer.view].y; + velocity = [gestureRecognizer velocityInView:gestureRecognizer.view].y; + distance = gestureRecognizer.view.bounds.size.height; + } else { + translation = [gestureRecognizer translationInView:gestureRecognizer.view].x; + velocity = [gestureRecognizer velocityInView:gestureRecognizer.view].x; + distance = gestureRecognizer.view.bounds.size.width; + BOOL isRTL = _controller.view.semanticContentAttribute == UISemanticContentAttributeForceRightToLeft; + if (isRTL) { + translation = -translation; + velocity = -velocity; + } + } + + float transitionProgress = (translation / distance); + + switch (gestureRecognizer.state) { + case UIGestureRecognizerStateBegan: { + _interactionController = [UIPercentDrivenInteractiveTransition new]; + [_controller popViewControllerAnimated:YES]; + break; + } + + case UIGestureRecognizerStateChanged: { + [_interactionController updateInteractiveTransition:transitionProgress]; + break; + } + + case UIGestureRecognizerStateCancelled: { + [_interactionController cancelInteractiveTransition]; + break; + } + + case UIGestureRecognizerStateEnded: { + // values taken from + // https://github.com/react-navigation/react-navigation/blob/54739828598d7072c1bf7b369659e3682db3edc5/packages/stack/src/views/Stack/Card.tsx#L316 + BOOL shouldFinishTransition = (translation + velocity * 0.3) > (distance / 2); + if (shouldFinishTransition) { + [_interactionController finishInteractiveTransition]; + } else { + [_interactionController cancelInteractiveTransition]; + } + _interactionController = nil; + } + default: { + break; + } + } +} + +- (id)navigationController:(UINavigationController *)navigationController + interactionControllerForAnimationController: + (id)animationController +{ + return _interactionController; +} + +- (id)interactionControllerForDismissal: + (id)animator +{ + return _interactionController; +} + +- (void)navigationController:(UINavigationController *)navigationController + didShowViewController:(UIViewController *)viewController + animated:(BOOL)animated +{ + [self emitOnFinishTransitioningEvent]; + [RNSScreenWindowTraits updateWindowTraits]; +} +#endif + +- (void)markChildUpdated +{ + // do nothing +} + +- (void)didUpdateChildren +{ + // do nothing +} + +- (UIViewController *)reactViewController +{ + return _controller; +} + +- (BOOL)isInGestureResponseDistance:(UIGestureRecognizer *)gestureRecognizer topScreen:(RNSScreenView *)topScreen +{ + NSDictionary *gestureResponseDistanceValues = topScreen.gestureResponseDistance; + float x = [gestureRecognizer locationInView:gestureRecognizer.view].x; + float y = [gestureRecognizer locationInView:gestureRecognizer.view].y; + BOOL isRTL = _controller.view.semanticContentAttribute == UISemanticContentAttributeForceRightToLeft; + if (isRTL) { + x = _controller.view.frame.size.width - x; + } + + // see: + // https://github.com/software-mansion/react-native-screens/pull/1442/commits/74d4bae321875d8305ad021b3d448ebf713e7d56 + // this prop is always default initialized so we do not expect any nils + float start = [gestureResponseDistanceValues[@"start"] floatValue]; + float end = [gestureResponseDistanceValues[@"end"] floatValue]; + float top = [gestureResponseDistanceValues[@"top"] floatValue]; + float bottom = [gestureResponseDistanceValues[@"bottom"] floatValue]; + + // we check if any of the constraints are violated and return NO if so + return !( + (start != -1 && x < start) || (end != -1 && x > end) || (top != -1 && y < top) || (bottom != -1 && y > bottom)); +} + +// By default, the header buttons that are not inside the native hit area +// cannot be clicked, so we check it by ourselves +- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event +{ + if (CGRectContainsPoint(_controller.navigationBar.frame, point)) { + // headerConfig should be the first subview of the topmost screen + UIView *headerConfig = [[_reactSubviews.lastObject reactSubviews] firstObject]; + if ([headerConfig isKindOfClass:[RNSScreenStackHeaderConfig class]]) { + UIView *headerHitTestResult = [headerConfig hitTest:point withEvent:event]; + if (headerHitTestResult != nil) { + return headerHitTestResult; + } + } + } + return [super hitTest:point withEvent:event]; +} + +#if !TARGET_OS_TV + +- (BOOL)isScrollViewPanGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer +{ + // NOTE: This hack is required to restore native behavior of edge swipe (interactive pop gesture) + // without this, on a screen with a scroll view, it's only possible to pop view by panning horizontally + // if even slightly diagonal (or if in motion), scroll view will scroll, and edge swipe will be cancelled + if (![[gestureRecognizer view] isKindOfClass:[UIScrollView class]]) { + return NO; + } + UIScrollView *scrollView = (UIScrollView *)gestureRecognizer.view; + return scrollView.panGestureRecognizer == gestureRecognizer; +} + +// Custom method for compatibility with iOS < 13.4 +// RNSScreenStackView is a UIGestureRecognizerDelegate for three types of gesture recognizers: +// RNSPanGestureRecognizer, RNSScreenEdgeGestureRecognizer, _UIParallaxTransitionPanGestureRecognizer +// Be careful when adding another type of gesture recognizer. +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceivePressOrTouchEvent:(NSObject *)event +{ + RNSScreenView *topScreen = _reactSubviews.lastObject; + + if (![topScreen isKindOfClass:[RNSScreenView class]] || !topScreen.gestureEnabled || + _controller.viewControllers.count < 2 || [topScreen isModal]) { + return NO; + } + + // We want to pass events to RNSPanGestureRecognizer iff full screen swipe is enabled. + if ([gestureRecognizer isKindOfClass:[RNSPanGestureRecognizer class]]) { + return topScreen.fullScreenSwipeEnabled; + } + + // RNSScreenEdgeGestureRecognizer || _UIParallaxTransitionPanGestureRecognizer + return YES; +} + +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceivePress:(UIPress *)press; +{ + return [self gestureRecognizer:gestureRecognizer shouldReceivePressOrTouchEvent:press]; +} + +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch; +{ + return [self gestureRecognizer:gestureRecognizer shouldReceivePressOrTouchEvent:touch]; +} + +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer + shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer +{ + if ([gestureRecognizer isKindOfClass:[RNSPanGestureRecognizer class]] && + [self isScrollViewPanGestureRecognizer:otherGestureRecognizer]) { + RNSPanGestureRecognizer *panGestureRecognizer = (RNSPanGestureRecognizer *)gestureRecognizer; + BOOL isBackGesture = [panGestureRecognizer translationInView:panGestureRecognizer.view].x > 0 && + _controller.viewControllers.count > 1; + + if (gestureRecognizer.state == UIGestureRecognizerStateBegan || isBackGesture) { + return NO; + } + + return YES; + } + return NO; +} + +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer + shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer +{ + return ( + [gestureRecognizer isKindOfClass:[UIScreenEdgePanGestureRecognizer class]] && + [self isScrollViewPanGestureRecognizer:otherGestureRecognizer]); +} + +#endif // !TARGET_OS_TV + +- (void)insertReactSubview:(RNSScreenView *)subview atIndex:(NSInteger)atIndex +{ + if (![subview isKindOfClass:[RNSScreenView class]]) { + RCTLogError(@"ScreenStack only accepts children of type Screen"); + return; + } + subview.reactSuperview = self; + [_reactSubviews insertObject:subview atIndex:atIndex]; +} + +- (void)removeReactSubview:(RNSScreenView *)subview +{ + subview.reactSuperview = nil; + [_reactSubviews removeObject:subview]; +} + +- (void)didUpdateReactSubviews +{ + // we need to wait until children have their layout set. At this point they don't have the layout + // set yet, however the layout call is already enqueued on ui thread. Enqueuing update call on the + // ui queue will guarantee that the update will run after layout. + dispatch_async(dispatch_get_main_queue(), ^{ + self->_hasLayout = YES; + [self maybeAddToParentAndUpdateContainer]; + }); +} + +#ifdef RN_FABRIC_ENABLED +#pragma mark - Fabric specific + +- (void)mountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +{ + if (![childComponentView isKindOfClass:[RNSScreenView class]]) { + RCTLogError(@"ScreenStack only accepts children of type Screen"); + return; + } + + RCTAssert( + childComponentView.reactSuperview == nil, + @"Attempt to mount already mounted component view. (parent: %@, child: %@, index: %@, existing parent: %@)", + self, + childComponentView, + @(index), + @([childComponentView.superview tag])); + + [_reactSubviews insertObject:(RNSScreenView *)childComponentView atIndex:index]; + ((RNSScreenView *)childComponentView).reactSuperview = self; + dispatch_async(dispatch_get_main_queue(), ^{ + [self maybeAddToParentAndUpdateContainer]; + }); +} + +- (void)unmountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +{ + RNSScreenView *screenChildComponent = (RNSScreenView *)childComponentView; + // We should only do a snapshot of a screen that is on the top. + // We also check `_presentedModals` since if you push 2 modals, second one is not a "child" of _controller. + // Also, when dissmised with a gesture, the screen already is not under the window, so we don't need to apply + // snapshot. + if (screenChildComponent.window != nil && + ((screenChildComponent == _controller.visibleViewController.view && _presentedModals.count < 2) || + screenChildComponent == [_presentedModals.lastObject view])) { + [screenChildComponent.controller setViewToSnapshot:_snapshot]; + } + + RCTAssert( + screenChildComponent.reactSuperview == self, + @"Attempt to unmount a view which is mounted inside different view. (parent: %@, child: %@, index: %@)", + self, + screenChildComponent, + @(index)); + RCTAssert( + (_reactSubviews.count > index) && [_reactSubviews objectAtIndex:index] == childComponentView, + @"Attempt to unmount a view which has a different index. (parent: %@, child: %@, index: %@, actual index: %@, tag at index: %@)", + self, + screenChildComponent, + @(index), + @([_reactSubviews indexOfObject:screenChildComponent]), + @([[_reactSubviews objectAtIndex:index] tag])); + screenChildComponent.reactSuperview = nil; + [_reactSubviews removeObject:screenChildComponent]; + [screenChildComponent removeFromSuperview]; + dispatch_async(dispatch_get_main_queue(), ^{ + [self maybeAddToParentAndUpdateContainer]; + }); +} + +- (void)takeSnapshot +{ + _snapshot = [_controller.visibleViewController.view snapshotViewAfterScreenUpdates:NO]; +} + +- (void)mountingTransactionWillMount:(facebook::react::MountingTransaction const &)transaction + withSurfaceTelemetry:(facebook::react::SurfaceTelemetry const &)surfaceTelemetry +{ + for (auto &mutation : transaction.getMutations()) { + if (mutation.type == facebook::react::ShadowViewMutation::Type::Remove && + mutation.parentShadowView.componentName != nil && + strcmp(mutation.parentShadowView.componentName, "RNSScreenStack") == 0) { + [self takeSnapshot]; + return; + } + } +} + +- (void)prepareForRecycle +{ + [super prepareForRecycle]; + _reactSubviews = [NSMutableArray new]; + + for (UIViewController *controller in _presentedModals) { + [controller dismissViewControllerAnimated:NO completion:nil]; + } + + [_presentedModals removeAllObjects]; + [self dismissOnReload]; + [_controller willMoveToParentViewController:nil]; + [_controller removeFromParentViewController]; + [_controller setViewControllers:@[ [UIViewController new] ]]; +} + ++ (facebook::react::ComponentDescriptorProvider)componentDescriptorProvider +{ + return facebook::react::concreteComponentDescriptorProvider(); +} +#else +#pragma mark - Paper specific + +- (void)invalidate +{ + _invalidated = YES; + for (UIViewController *controller in _presentedModals) { + [controller dismissViewControllerAnimated:NO completion:nil]; + } + [_presentedModals removeAllObjects]; + [_controller willMoveToParentViewController:nil]; + [_controller removeFromParentViewController]; +} + +#endif // RN_FABRIC_ENABLED + +@end + +#ifdef RN_FABRIC_ENABLED +Class RNSScreenStackCls(void) +{ + return RNSScreenStackView.class; +} +#endif + +@implementation RNSScreenStackManager { + NSPointerArray *_stacks; +} + +RCT_EXPORT_MODULE() + +RCT_EXPORT_VIEW_PROPERTY(onFinishTransitioning, RCTDirectEventBlock); + +#ifdef RN_FABRIC_ENABLED +#else +- (UIView *)view +{ + RNSScreenStackView *view = [[RNSScreenStackView alloc] initWithManager:self]; + if (!_stacks) { + _stacks = [NSPointerArray weakObjectsPointerArray]; + } + [_stacks addPointer:(__bridge void *)view]; + return view; +} +#endif // RN_FABRIC_ENABLED + +- (void)invalidate +{ + for (RNSScreenStackView *stack in _stacks) { + [stack dismissOnReload]; + } + _stacks = nil; +} + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackAnimator.h b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackAnimator.h new file mode 100644 index 00000000..f96eae77 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackAnimator.h @@ -0,0 +1,8 @@ +#import "RNSScreen.h" + +@interface RNSScreenStackAnimator : NSObject + +- (instancetype)initWithOperation:(UINavigationControllerOperation)operation; ++ (BOOL)isCustomAnimation:(RNSScreenStackAnimation)animation; + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm new file mode 100644 index 00000000..6fc0542d --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm @@ -0,0 +1,320 @@ +#import "RNSScreenStackAnimator.h" +#import "RNSScreenStack.h" + +#import "RNSScreen.h" + +// proportions to default transition duration +static const float RNSSlideOpenTransitionDurationProportion = 1; +static const float RNSFadeOpenTransitionDurationProportion = 0.2 / 0.35; +static const float RNSSlideCloseTransitionDurationProportion = 0.25 / 0.35; +static const float RNSFadeCloseTransitionDurationProportion = 0.15 / 0.35; +static const float RNSFadeCloseDelayTransitionDurationProportion = 0.1 / 0.35; + +@implementation RNSScreenStackAnimator { + UINavigationControllerOperation _operation; + NSTimeInterval _transitionDuration; +} + +- (instancetype)initWithOperation:(UINavigationControllerOperation)operation +{ + if (self = [super init]) { + _operation = operation; + _transitionDuration = 0.35; // default duration in seconds + } + return self; +} + +- (NSTimeInterval)transitionDuration:(id)transitionContext +{ + RNSScreenView *screen; + if (_operation == UINavigationControllerOperationPush) { + UIViewController *toViewController = + [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; + screen = ((RNSScreen *)toViewController).screenView; + } else if (_operation == UINavigationControllerOperationPop) { + UIViewController *fromViewController = + [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; + screen = ((RNSScreen *)fromViewController).screenView; + } + + if (screen != nil && screen.stackAnimation == RNSScreenStackAnimationNone) { + return 0; + } + + if (screen != nil && screen.transitionDuration != nil && [screen.transitionDuration floatValue] >= 0) { + float durationInSeconds = [screen.transitionDuration floatValue] / 1000.0; + return durationInSeconds; + } + + return _transitionDuration; +} + +- (void)animateTransition:(id)transitionContext +{ + UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; + UIViewController *fromViewController = + [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; + toViewController.view.frame = [transitionContext finalFrameForViewController:toViewController]; + + RNSScreenView *screen; + if (_operation == UINavigationControllerOperationPush) { + screen = ((RNSScreen *)toViewController).screenView; + } else if (_operation == UINavigationControllerOperationPop) { + screen = ((RNSScreen *)fromViewController).screenView; + } + + if (screen != nil) { + if (screen.fullScreenSwipeEnabled && transitionContext.isInteractive) { + // we are swiping with full width gesture + if (screen.customAnimationOnSwipe) { + [self animateTransitionWithStackAnimation:screen.stackAnimation + transitionContext:transitionContext + toVC:toViewController + fromVC:fromViewController]; + } else { + // we have to provide an animation when swiping, otherwise the screen will be popped immediately, + // so in case of no custom animation on swipe set, we provide the one closest to the default + [self animateSimplePushWithTransitionContext:transitionContext toVC:toViewController fromVC:fromViewController]; + } + } else { + // we are going forward or provided custom animation on swipe or clicked native header back button + [self animateTransitionWithStackAnimation:screen.stackAnimation + transitionContext:transitionContext + toVC:toViewController + fromVC:fromViewController]; + } + } +} + +- (void)animateSimplePushWithTransitionContext:(id)transitionContext + toVC:(UIViewController *)toViewController + fromVC:(UIViewController *)fromViewController +{ + float containerWidth = transitionContext.containerView.bounds.size.width; + float belowViewWidth = containerWidth * 0.3; + + CGAffineTransform rightTransform = CGAffineTransformMakeTranslation(containerWidth, 0); + CGAffineTransform leftTransform = CGAffineTransformMakeTranslation(-belowViewWidth, 0); + + if (toViewController.navigationController.view.semanticContentAttribute == + UISemanticContentAttributeForceRightToLeft) { + rightTransform = CGAffineTransformMakeTranslation(-containerWidth, 0); + leftTransform = CGAffineTransformMakeTranslation(belowViewWidth, 0); + } + + if (_operation == UINavigationControllerOperationPush) { + toViewController.view.transform = rightTransform; + [[transitionContext containerView] addSubview:toViewController.view]; + [UIView animateWithDuration:[self transitionDuration:transitionContext] + animations:^{ + fromViewController.view.transform = leftTransform; + toViewController.view.transform = CGAffineTransformIdentity; + } + completion:^(BOOL finished) { + fromViewController.view.transform = CGAffineTransformIdentity; + toViewController.view.transform = CGAffineTransformIdentity; + [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; + }]; + } else if (_operation == UINavigationControllerOperationPop) { + toViewController.view.transform = leftTransform; + [[transitionContext containerView] insertSubview:toViewController.view belowSubview:fromViewController.view]; + + void (^animationBlock)(void) = ^{ + toViewController.view.transform = CGAffineTransformIdentity; + fromViewController.view.transform = rightTransform; + }; + void (^completionBlock)(BOOL) = ^(BOOL finished) { + fromViewController.view.transform = CGAffineTransformIdentity; + toViewController.view.transform = CGAffineTransformIdentity; + [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; + }; + + if (!transitionContext.isInteractive) { + [UIView animateWithDuration:[self transitionDuration:transitionContext] + animations:animationBlock + completion:completionBlock]; + } else { + // we don't want the EaseInOut option when swiping to dismiss the view, it is the same in default animation option + [UIView animateWithDuration:[self transitionDuration:transitionContext] + delay:0.0 + options:UIViewAnimationOptionCurveLinear + animations:animationBlock + completion:completionBlock]; + } + } +} + +- (void)animateFadeWithTransitionContext:(id)transitionContext + toVC:(UIViewController *)toViewController + fromVC:(UIViewController *)fromViewController +{ + toViewController.view.frame = [transitionContext finalFrameForViewController:toViewController]; + + if (_operation == UINavigationControllerOperationPush) { + [[transitionContext containerView] addSubview:toViewController.view]; + toViewController.view.alpha = 0.0; + [UIView animateWithDuration:[self transitionDuration:transitionContext] + animations:^{ + toViewController.view.alpha = 1.0; + } + completion:^(BOOL finished) { + toViewController.view.alpha = 1.0; + [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; + }]; + } else if (_operation == UINavigationControllerOperationPop) { + [[transitionContext containerView] insertSubview:toViewController.view belowSubview:fromViewController.view]; + + [UIView animateWithDuration:[self transitionDuration:transitionContext] + animations:^{ + fromViewController.view.alpha = 0.0; + } + completion:^(BOOL finished) { + fromViewController.view.alpha = 1.0; + + [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; + }]; + } +} + +- (void)animateSlideFromBottomWithTransitionContext:(id)transitionContext + toVC:(UIViewController *)toViewController + fromVC:(UIViewController *)fromViewController +{ + CGAffineTransform topBottomTransform = + CGAffineTransformMakeTranslation(0, transitionContext.containerView.bounds.size.height); + + if (_operation == UINavigationControllerOperationPush) { + toViewController.view.transform = topBottomTransform; + [[transitionContext containerView] addSubview:toViewController.view]; + [UIView animateWithDuration:[self transitionDuration:transitionContext] + animations:^{ + fromViewController.view.transform = CGAffineTransformIdentity; + toViewController.view.transform = CGAffineTransformIdentity; + } + completion:^(BOOL finished) { + fromViewController.view.transform = CGAffineTransformIdentity; + toViewController.view.transform = CGAffineTransformIdentity; + [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; + }]; + } else if (_operation == UINavigationControllerOperationPop) { + toViewController.view.transform = CGAffineTransformIdentity; + [[transitionContext containerView] insertSubview:toViewController.view belowSubview:fromViewController.view]; + + void (^animationBlock)(void) = ^{ + toViewController.view.transform = CGAffineTransformIdentity; + fromViewController.view.transform = topBottomTransform; + }; + void (^completionBlock)(BOOL) = ^(BOOL finished) { + fromViewController.view.transform = CGAffineTransformIdentity; + toViewController.view.transform = CGAffineTransformIdentity; + [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; + }; + + if (!transitionContext.isInteractive) { + [UIView animateWithDuration:[self transitionDuration:transitionContext] + animations:animationBlock + completion:completionBlock]; + } else { + // we don't want the EaseInOut option when swiping to dismiss the view, it is the same in default animation option + [UIView animateWithDuration:[self transitionDuration:transitionContext] + delay:0.0 + options:UIViewAnimationOptionCurveLinear + animations:animationBlock + completion:completionBlock]; + } + } +} + +- (void)animateFadeFromBottomWithTransitionContext:(id)transitionContext + toVC:(UIViewController *)toViewController + fromVC:(UIViewController *)fromViewController +{ + CGAffineTransform topBottomTransform = + CGAffineTransformMakeTranslation(0, 0.08 * transitionContext.containerView.bounds.size.height); + + const float transitionDuration = [self transitionDuration:transitionContext]; + + if (_operation == UINavigationControllerOperationPush) { + toViewController.view.transform = topBottomTransform; + toViewController.view.alpha = 0.0; + [[transitionContext containerView] addSubview:toViewController.view]; + + // Android Nougat open animation + // http://aosp.opersys.com/xref/android-7.1.2_r37/xref/frameworks/base/core/res/res/anim/activity_open_enter.xml + [UIView animateWithDuration:transitionDuration * RNSSlideOpenTransitionDurationProportion // defaults to 0.35 s + delay:0 + options:UIViewAnimationOptionCurveEaseOut + animations:^{ + fromViewController.view.transform = CGAffineTransformIdentity; + toViewController.view.transform = CGAffineTransformIdentity; + } + completion:^(BOOL finished) { + fromViewController.view.transform = CGAffineTransformIdentity; + [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; + }]; + [UIView animateWithDuration:transitionDuration * RNSFadeOpenTransitionDurationProportion // defaults to 0.2 s + delay:0 + options:UIViewAnimationOptionCurveEaseOut + animations:^{ + toViewController.view.alpha = 1.0; + } + completion:nil]; + + } else if (_operation == UINavigationControllerOperationPop) { + toViewController.view.transform = CGAffineTransformIdentity; + [[transitionContext containerView] insertSubview:toViewController.view belowSubview:fromViewController.view]; + + // Android Nougat exit animation + // http://aosp.opersys.com/xref/android-7.1.2_r37/xref/frameworks/base/core/res/res/anim/activity_close_exit.xml + [UIView animateWithDuration:transitionDuration * RNSSlideCloseTransitionDurationProportion // defaults to 0.25 s + delay:0 + options:UIViewAnimationOptionCurveEaseIn + animations:^{ + toViewController.view.transform = CGAffineTransformIdentity; + fromViewController.view.transform = topBottomTransform; + } + completion:^(BOOL finished) { + fromViewController.view.transform = CGAffineTransformIdentity; + toViewController.view.transform = CGAffineTransformIdentity; + fromViewController.view.alpha = 1.0; + toViewController.view.alpha = 1.0; + [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; + }]; + [UIView animateWithDuration:transitionDuration * RNSFadeCloseTransitionDurationProportion // defaults to 0.15 s + delay:transitionDuration * RNSFadeCloseDelayTransitionDurationProportion // defaults to 0.1 s + options:UIViewAnimationOptionCurveLinear + animations:^{ + fromViewController.view.alpha = 0.0; + } + completion:nil]; + } +} + ++ (BOOL)isCustomAnimation:(RNSScreenStackAnimation)animation +{ + return (animation != RNSScreenStackAnimationFlip && animation != RNSScreenStackAnimationDefault); +} + +- (void)animateTransitionWithStackAnimation:(RNSScreenStackAnimation)animation + transitionContext:(id)transitionContext + toVC:(UIViewController *)toVC + fromVC:(UIViewController *)fromVC +{ + if (animation == RNSScreenStackAnimationSimplePush) { + [self animateSimplePushWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC]; + return; + } else if (animation == RNSScreenStackAnimationFade || animation == RNSScreenStackAnimationNone) { + [self animateFadeWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC]; + return; + } else if (animation == RNSScreenStackAnimationSlideFromBottom) { + [self animateSlideFromBottomWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC]; + return; + } else if (animation == RNSScreenStackAnimationFadeFromBottom) { + [self animateFadeFromBottomWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC]; + return; + } + // simple_push is the default custom animation + [self animateSimplePushWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC]; +} + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderConfig.h b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderConfig.h new file mode 100644 index 00000000..600aa303 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderConfig.h @@ -0,0 +1,67 @@ +#ifdef RN_FABRIC_ENABLED +#import +#else +#import +#endif + +#import +#import "RNSScreen.h" +#import "RNSScreenStackHeaderSubview.h" +#import "RNSSearchBar.h" + +@interface RNSScreenStackHeaderConfig : +#ifdef RN_FABRIC_ENABLED + RCTViewComponentView +#else + UIView +#endif + +@property (nonatomic, weak) RNSScreenView *screenView; + +#ifdef RN_FABRIC_ENABLED +@property (nonatomic) BOOL show; +#else +@property (nonatomic) UIBlurEffectStyle blurEffect; +@property (nonatomic) BOOL hide; +#endif + +@property (nonatomic, retain) NSString *title; +@property (nonatomic, retain) NSString *titleFontFamily; +@property (nonatomic, retain) NSNumber *titleFontSize; +@property (nonatomic, retain) NSString *titleFontWeight; +@property (nonatomic, retain) UIColor *titleColor; +@property (nonatomic, retain) NSString *backTitle; +@property (nonatomic, retain) NSString *backTitleFontFamily; +@property (nonatomic, retain) NSNumber *backTitleFontSize; +@property (nonatomic, retain) UIColor *backgroundColor; +@property (nonatomic, retain) UIColor *color; +@property (nonatomic) BOOL largeTitle; +@property (nonatomic, retain) NSString *largeTitleFontFamily; +@property (nonatomic, retain) NSNumber *largeTitleFontSize; +@property (nonatomic, retain) NSString *largeTitleFontWeight; +@property (nonatomic, retain) UIColor *largeTitleBackgroundColor; +@property (nonatomic) BOOL largeTitleHideShadow; +@property (nonatomic, retain) UIColor *largeTitleColor; +@property (nonatomic) BOOL hideBackButton; +@property (nonatomic) BOOL disableBackButtonMenu; +@property (nonatomic) BOOL hideShadow; +@property (nonatomic) BOOL translucent; +@property (nonatomic) BOOL backButtonInCustomView; +@property (nonatomic) UISemanticContentAttribute direction; + ++ (void)willShowViewController:(UIViewController *)vc + animated:(BOOL)animated + withConfig:(RNSScreenStackHeaderConfig *)config; + +@end + +@interface RNSScreenStackHeaderConfigManager : RCTViewManager + +@end + +@interface RCTConvert (RNSScreenStackHeader) + ++ (UIBlurEffectStyle)UIBlurEffectStyle:(id)json; ++ (UISemanticContentAttribute)UISemanticContentAttribute:(id)json; + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderConfig.mm b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderConfig.mm new file mode 100644 index 00000000..5163c490 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderConfig.mm @@ -0,0 +1,903 @@ +#ifdef RN_FABRIC_ENABLED +#import +#import +#import +#import +#import +#import +#import +#else +#import +#import +#import +#import +#import +#import +#import +#endif +#import +#import "RNSScreen.h" +#import "RNSScreenStackHeaderConfig.h" +#import "RNSSearchBar.h" +#import "RNSUIBarButtonItem.h" + +#ifdef RN_FABRIC_ENABLED +#else +// Some RN private method hacking below. Couldn't figure out better way to access image data +// of a given RCTImageView. See more comments in the code section processing SubviewTypeBackButton +@interface RCTImageView (Private) +- (UIImage *)image; +@end + +@interface RCTImageLoader (Private) +- (id)imageCache; +@end +#endif + +@implementation RNSScreenStackHeaderConfig { + NSMutableArray *_reactSubviews; +#ifdef RN_FABRIC_ENABLED + BOOL _initialPropsSet; +#else +#endif +} + +#ifdef RN_FABRIC_ENABLED +- (instancetype)initWithFrame:(CGRect)frame +{ + if (self = [super initWithFrame:frame]) { + static const auto defaultProps = std::make_shared(); + _props = defaultProps; + self.hidden = YES; + _show = YES; + _translucent = NO; + _reactSubviews = [NSMutableArray new]; + } + return self; +} +#else +- (instancetype)init +{ + if (self = [super init]) { + self.hidden = YES; + _translucent = YES; + _reactSubviews = [NSMutableArray new]; + } + return self; +} +#endif + +- (UIView *)reactSuperview +{ + return _screenView; +} + +- (NSArray *)reactSubviews +{ + return _reactSubviews; +} + +- (void)removeFromSuperview +{ + [super removeFromSuperview]; + _screenView = nil; +} + +// this method is never invoked by the system since this view +// is not added to native view hierarchy so we can apply our logic +- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event +{ + for (RNSScreenStackHeaderSubview *subview in _reactSubviews) { + if (subview.type == RNSScreenStackHeaderSubviewTypeLeft || subview.type == RNSScreenStackHeaderSubviewTypeRight) { + // we wrap the headerLeft/Right component in a UIBarButtonItem + // so we need to use the only subview of it to retrieve the correct view + UIView *headerComponent = subview.subviews.firstObject; + // we convert the point to RNSScreenStackView since it always contains the header inside it + CGPoint convertedPoint = [_screenView.reactSuperview convertPoint:point toView:headerComponent]; + + UIView *hitTestResult = [headerComponent hitTest:convertedPoint withEvent:event]; + if (hitTestResult != nil) { + return hitTestResult; + } + } + } + return nil; +} + +- (void)updateViewControllerIfNeeded +{ + UIViewController *vc = _screenView.controller; + UINavigationController *nav = (UINavigationController *)vc.parentViewController; + UIViewController *nextVC = nav.visibleViewController; + if (nav.transitionCoordinator != nil) { + // if navigator is performing transition instead of allowing to update of `visibleConttroller` + // we look at `topController`. This is because during transitiong the `visibleController` won't + // point to the controller that is going to be revealed after transition. This check fixes the + // problem when config gets updated while the transition is ongoing. + nextVC = nav.topViewController; + } + + // we want updates sent to the VC below modal too since it is also visible + BOOL isPresentingVC = nextVC != nil && vc.presentedViewController == nextVC; + + BOOL isInFullScreenModal = nav == nil && _screenView.stackPresentation == RNSScreenStackPresentationFullScreenModal; + // if nav is nil, it means we can be in a fullScreen modal, so there is no nextVC, but we still want to update + if (vc != nil && (nextVC == vc || isInFullScreenModal || isPresentingVC)) { + [RNSScreenStackHeaderConfig updateViewController:self.screenView.controller withConfig:self animated:YES]; + } +} + +- (void)layoutNavigationControllerView +{ + // We need to layout navigation controller view after translucent prop changes, because otherwise + // frame of RNSScreen will not be changed and screen content will remain the same size. + // For more details look at https://github.com/software-mansion/react-native-screens/issues/1158 + UIViewController *vc = _screenView.controller; + UINavigationController *navctr = vc.navigationController; + [navctr.view setNeedsLayout]; +} + ++ (void)setAnimatedConfig:(UIViewController *)vc withConfig:(RNSScreenStackHeaderConfig *)config +{ + UINavigationBar *navbar = ((UINavigationController *)vc.parentViewController).navigationBar; + // It is workaround for loading custom back icon when transitioning from a screen without header to the screen which + // has one. This action fails when navigating to the screen with header for the second time and loads default back + // button. It looks like changing the tint color of navbar triggers an update of the items belonging to it and it + // seems to load the custom back image so we change the tint color's alpha by a very small amount and then set it to + // the one it should have. +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_14_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_0 + // it brakes the behavior of `headerRight` in iOS 14, where the bug desribed above seems to be fixed, so we do nothing + // in iOS 14 + if (@available(iOS 14.0, *)) { + } else +#endif + { + [navbar setTintColor:[config.color colorWithAlphaComponent:CGColorGetAlpha(config.color.CGColor) - 0.01]]; + } + [navbar setTintColor:config.color]; + +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 + if (@available(iOS 13.0, *)) { + // font customized on the navigation item level, so nothing to do here + } else +#endif + { + BOOL hideShadow = config.hideShadow; + + if (config.backgroundColor && CGColorGetAlpha(config.backgroundColor.CGColor) == 0.) { + [navbar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; + [navbar setBarTintColor:[UIColor clearColor]]; + hideShadow = YES; + } else { + [navbar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault]; + [navbar setBarTintColor:config.backgroundColor]; + } + [navbar setTranslucent:config.translucent]; + [navbar setValue:@(hideShadow ? YES : NO) forKey:@"hidesShadow"]; + + if (config.titleFontFamily || config.titleFontSize || config.titleFontWeight || config.titleColor) { + NSMutableDictionary *attrs = [NSMutableDictionary new]; + + if (config.titleColor) { + attrs[NSForegroundColorAttributeName] = config.titleColor; + } + + NSString *family = config.titleFontFamily ?: nil; + NSNumber *size = config.titleFontSize ?: @17; + NSString *weight = config.titleFontWeight ?: nil; + if (family || weight) { + attrs[NSFontAttributeName] = [RCTFont updateFont:nil + withFamily:family + size:size + weight:weight + style:nil + variant:nil + scaleMultiplier:1.0]; + } else { + attrs[NSFontAttributeName] = [UIFont boldSystemFontOfSize:[size floatValue]]; + } + [navbar setTitleTextAttributes:attrs]; + } + +#if !TARGET_OS_TV + if (@available(iOS 11.0, *)) { + if (config.largeTitle && + (config.largeTitleFontFamily || config.largeTitleFontSize || config.largeTitleFontWeight || + config.largeTitleColor || config.titleColor)) { + NSMutableDictionary *largeAttrs = [NSMutableDictionary new]; + if (config.largeTitleColor || config.titleColor) { + largeAttrs[NSForegroundColorAttributeName] = + config.largeTitleColor ? config.largeTitleColor : config.titleColor; + } + NSString *largeFamily = config.largeTitleFontFamily ?: nil; + NSNumber *largeSize = config.largeTitleFontSize ?: @34; + NSString *largeWeight = config.largeTitleFontWeight ?: nil; + if (largeFamily || largeWeight) { + largeAttrs[NSFontAttributeName] = [RCTFont updateFont:nil + withFamily:largeFamily + size:largeSize + weight:largeWeight + style:nil + variant:nil + scaleMultiplier:1.0]; + } else { + largeAttrs[NSFontAttributeName] = [UIFont systemFontOfSize:[largeSize floatValue] weight:UIFontWeightBold]; + } + [navbar setLargeTitleTextAttributes:largeAttrs]; + } + } +#endif + } +} + ++ (void)setTitleAttibutes:(NSDictionary *)attrs forButton:(UIBarButtonItem *)button +{ + [button setTitleTextAttributes:attrs forState:UIControlStateNormal]; + [button setTitleTextAttributes:attrs forState:UIControlStateHighlighted]; + [button setTitleTextAttributes:attrs forState:UIControlStateDisabled]; + [button setTitleTextAttributes:attrs forState:UIControlStateSelected]; + [button setTitleTextAttributes:attrs forState:UIControlStateFocused]; +} + ++ (UIImage *)loadBackButtonImageInViewController:(UIViewController *)vc withConfig:(RNSScreenStackHeaderConfig *)config +{ +#ifdef RN_FABRIC_ENABLED + @throw([NSException exceptionWithName:@"UNIMPLEMENTED" reason:@"Implement" userInfo:nil]); +#else + BOOL hasBackButtonImage = NO; + for (RNSScreenStackHeaderSubview *subview in config.reactSubviews) { + if (subview.type == RNSScreenStackHeaderSubviewTypeBackButton && subview.subviews.count > 0) { + hasBackButtonImage = YES; + RCTImageView *imageView = subview.subviews[0]; + if (imageView.image == nil) { + // This is yet another workaround for loading custom back icon. It turns out that under + // certain circumstances image attribute can be null despite the app running in production + // mode (when images are loaded from the filesystem). This can happen because image attribute + // is reset when image view is detached from window, and also in some cases initialization + // does not populate the frame of the image view before the loading start. The latter result + // in the image attribute not being updated. We manually set frame to the size of an image + // in order to trigger proper reload that'd update the image attribute. + RCTImageSource *source = imageView.imageSources[0]; + [imageView reactSetFrame:CGRectMake( + imageView.frame.origin.x, + imageView.frame.origin.y, + source.size.width, + source.size.height)]; + } + UIImage *image = imageView.image; + // IMPORTANT!!! + // image can be nil in DEV MODE ONLY + // + // It is so, because in dev mode images are loaded over HTTP from the packager. In that case + // we first check if image is already loaded in cache and if it is, we take it from cache and + // display immediately. Otherwise we wait for the transition to finish and retry updating + // header config. + // Unfortunately due to some problems in UIKit we cannot update the image while the screen + // transition is ongoing. This results in the settings being reset after the transition is done + // to the state from before the transition. + if (image == nil) { + // in DEV MODE we try to load from cache (we use private API for that as it is not exposed + // publically in headers). + RCTImageSource *source = imageView.imageSources[0]; + RCTImageLoader *imageloader = [subview.bridge moduleForClass:[RCTImageLoader class]]; + image = [imageloader.imageCache imageForUrl:source.request.URL.absoluteString + size:source.size + scale:source.scale + resizeMode:imageView.resizeMode]; + } + if (image == nil) { + // This will be triggered if the image is not in the cache yet. What we do is we wait until + // the end of transition and run header config updates again. We could potentially wait for + // image on load to trigger, but that would require even more private method hacking. + if (vc.transitionCoordinator) { + [vc.transitionCoordinator + animateAlongsideTransition:^(id _Nonnull context) { + // nothing, we just want completion + } + completion:^(id _Nonnull context) { + // in order for new back button image to be loaded we need to trigger another change + // in back button props that'd make UIKit redraw the button. Otherwise the changes are + // not reflected. Here we change back button visibility which is then immediately restored +#if !TARGET_OS_TV + vc.navigationItem.hidesBackButton = YES; +#endif + [config updateViewControllerIfNeeded]; + }]; + } + return [UIImage new]; + } else { + return image; + } + } + } +#endif // RN_FABRIC_ENABLED + return nil; +} + ++ (void)willShowViewController:(UIViewController *)vc + animated:(BOOL)animated + withConfig:(RNSScreenStackHeaderConfig *)config +{ + [self updateViewController:vc withConfig:config animated:animated]; +} + +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 ++ (UINavigationBarAppearance *)buildAppearance:(UIViewController *)vc + withConfig:(RNSScreenStackHeaderConfig *)config API_AVAILABLE(ios(13.0)) +{ + UINavigationBarAppearance *appearance = [UINavigationBarAppearance new]; + + if (config.backgroundColor && CGColorGetAlpha(config.backgroundColor.CGColor) == 0.) { + // transparent background color + [appearance configureWithTransparentBackground]; + } else { + [appearance configureWithOpaqueBackground]; + } + + // set background color if specified + if (config.backgroundColor) { + appearance.backgroundColor = config.backgroundColor; + } + + // TODO: implement blurEffect on Fabric +#ifdef RN_FABRIC_ENABLED +#else + if (config.blurEffect) { + appearance.backgroundEffect = [UIBlurEffect effectWithStyle:config.blurEffect]; + } +#endif + + if (config.hideShadow) { + appearance.shadowColor = nil; + } + + if (config.titleFontFamily || config.titleFontSize || config.titleFontWeight || config.titleColor) { + NSMutableDictionary *attrs = [NSMutableDictionary new]; + + if (config.titleColor) { + attrs[NSForegroundColorAttributeName] = config.titleColor; + } + + NSString *family = config.titleFontFamily ?: nil; + NSNumber *size = config.titleFontSize ?: @17; + NSString *weight = config.titleFontWeight ?: nil; + if (family || weight) { + attrs[NSFontAttributeName] = [RCTFont updateFont:nil + withFamily:config.titleFontFamily + size:size + weight:weight + style:nil + variant:nil + scaleMultiplier:1.0]; + } else { + attrs[NSFontAttributeName] = [UIFont boldSystemFontOfSize:[size floatValue]]; + } + appearance.titleTextAttributes = attrs; + } + + if (config.largeTitleFontFamily || config.largeTitleFontSize || config.largeTitleFontWeight || + config.largeTitleColor || config.titleColor) { + NSMutableDictionary *largeAttrs = [NSMutableDictionary new]; + + if (config.largeTitleColor || config.titleColor) { + largeAttrs[NSForegroundColorAttributeName] = config.largeTitleColor ? config.largeTitleColor : config.titleColor; + } + + NSString *largeFamily = config.largeTitleFontFamily ?: nil; + NSNumber *largeSize = config.largeTitleFontSize ?: @34; + NSString *largeWeight = config.largeTitleFontWeight ?: nil; + if (largeFamily || largeWeight) { + largeAttrs[NSFontAttributeName] = [RCTFont updateFont:nil + withFamily:largeFamily + size:largeSize + weight:largeWeight + style:nil + variant:nil + scaleMultiplier:1.0]; + } else { + largeAttrs[NSFontAttributeName] = [UIFont systemFontOfSize:[largeSize floatValue] weight:UIFontWeightBold]; + } + + appearance.largeTitleTextAttributes = largeAttrs; + } + +#ifdef RN_FABRIC_ENABLED + [appearance setBackIndicatorImage:nil transitionMaskImage:nil]; +#else + UIImage *backButtonImage = [self loadBackButtonImageInViewController:vc withConfig:config]; + if (backButtonImage) { + [appearance setBackIndicatorImage:backButtonImage transitionMaskImage:backButtonImage]; + } else if (appearance.backIndicatorImage) { + [appearance setBackIndicatorImage:nil transitionMaskImage:nil]; + } +#endif // RN_FABRIC_ENABLED + return appearance; +} +#endif + ++ (void)updateViewController:(UIViewController *)vc + withConfig:(RNSScreenStackHeaderConfig *)config + animated:(BOOL)animated +{ + UINavigationItem *navitem = vc.navigationItem; + UINavigationController *navctr = (UINavigationController *)vc.parentViewController; + + NSUInteger currentIndex = [navctr.viewControllers indexOfObject:vc]; + UINavigationItem *prevItem = + currentIndex > 0 ? [navctr.viewControllers objectAtIndex:currentIndex - 1].navigationItem : nil; + + BOOL wasHidden = navctr.navigationBarHidden; +#ifdef RN_FABRIC_ENABLED + BOOL shouldHide = config == nil || !config.show; +#else + BOOL shouldHide = config == nil || config.hide; +#endif + + if (!shouldHide && !config.translucent) { + // when nav bar is not translucent we chage edgesForExtendedLayout to avoid system laying out + // the screen underneath navigation controllers + vc.edgesForExtendedLayout = UIRectEdgeNone; + } else { + // system default is UIRectEdgeAll + vc.edgesForExtendedLayout = UIRectEdgeAll; + } + + [navctr setNavigationBarHidden:shouldHide animated:animated]; + + if ((config.direction == UISemanticContentAttributeForceLeftToRight || + config.direction == UISemanticContentAttributeForceRightToLeft) && + // iOS 12 cancels swipe gesture when direction is changed. See #1091 + navctr.view.semanticContentAttribute != config.direction) { + navctr.view.semanticContentAttribute = config.direction; + navctr.navigationBar.semanticContentAttribute = config.direction; + } + + if (shouldHide) { + return; + } + +#if !TARGET_OS_TV + // Fix for github.com/react-navigation/react-navigation/issues/11015 + // It allows to hide back button title and use back button menu as normal. + // Back button display mode and back button menu are available since iOS 14. + if (@available(iOS 14.0, *)) { + // Make sure to set display mode to default. + // This line resets back button display mode - especially needed on the Fabric architecture. + navitem.backButtonDisplayMode = UINavigationItemBackButtonDisplayModeDefault; + + NSString *trimmedBackTitle = + [config.backTitle stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; + + // When an whitespace only back title is passed set back button mode to minimal. + if (config.backTitle != nil && [trimmedBackTitle length] == 0) { + navitem.backButtonDisplayMode = UINavigationItemBackButtonDisplayModeMinimal; + } + } else if ( + config.backTitle != nil || config.backTitleFontFamily || config.backTitleFontSize || + config.disableBackButtonMenu) { + RNSUIBarButtonItem *backBarButtonItem = [[RNSUIBarButtonItem alloc] initWithTitle:config.backTitle ?: prevItem.title + style:UIBarButtonItemStylePlain + target:nil + action:nil]; + + [backBarButtonItem setMenuHidden:config.disableBackButtonMenu]; + + prevItem.backBarButtonItem = backBarButtonItem; + if (config.backTitleFontFamily || config.backTitleFontSize) { + NSMutableDictionary *attrs = [NSMutableDictionary new]; + NSNumber *size = config.backTitleFontSize ?: @17; + if (config.backTitleFontFamily) { + attrs[NSFontAttributeName] = [RCTFont updateFont:nil + withFamily:config.backTitleFontFamily + size:size + weight:nil + style:nil + variant:nil + scaleMultiplier:1.0]; + } else { + attrs[NSFontAttributeName] = [UIFont boldSystemFontOfSize:[size floatValue]]; + } + [self setTitleAttibutes:attrs forButton:prevItem.backBarButtonItem]; + } + } else { + prevItem.backBarButtonItem = nil; + } + + if (@available(iOS 11.0, *)) { + if (config.largeTitle) { + navctr.navigationBar.prefersLargeTitles = YES; + } + navitem.largeTitleDisplayMode = + config.largeTitle ? UINavigationItemLargeTitleDisplayModeAlways : UINavigationItemLargeTitleDisplayModeNever; + } +#endif + +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 + if (@available(iOS 13.0, tvOS 13.0, *)) { + UINavigationBarAppearance *appearance = [self buildAppearance:vc withConfig:config]; + navitem.standardAppearance = appearance; + navitem.compactAppearance = appearance; + + UINavigationBarAppearance *scrollEdgeAppearance = + [[UINavigationBarAppearance alloc] initWithBarAppearance:appearance]; + if (config.largeTitleBackgroundColor != nil) { + scrollEdgeAppearance.backgroundColor = config.largeTitleBackgroundColor; + } + if (config.largeTitleHideShadow) { + scrollEdgeAppearance.shadowColor = nil; + } + navitem.scrollEdgeAppearance = scrollEdgeAppearance; + } else +#endif + { +#if !TARGET_OS_TV + // updating backIndicatotImage does not work when called during transition. On iOS pre 13 we need + // to update it before the navigation starts. + UIImage *backButtonImage = [self loadBackButtonImageInViewController:vc withConfig:config]; + if (backButtonImage) { + navctr.navigationBar.backIndicatorImage = backButtonImage; + navctr.navigationBar.backIndicatorTransitionMaskImage = backButtonImage; + } else if (navctr.navigationBar.backIndicatorImage) { + navctr.navigationBar.backIndicatorImage = nil; + navctr.navigationBar.backIndicatorTransitionMaskImage = nil; + } +#endif + } +#if !TARGET_OS_TV + navitem.hidesBackButton = config.hideBackButton; +#endif + navitem.leftBarButtonItem = nil; + navitem.rightBarButtonItem = nil; + navitem.titleView = nil; + + for (RNSScreenStackHeaderSubview *subview in config.reactSubviews) { + switch (subview.type) { + case RNSScreenStackHeaderSubviewTypeLeft: { +#if !TARGET_OS_TV + navitem.leftItemsSupplementBackButton = config.backButtonInCustomView; +#endif + UIBarButtonItem *buttonItem = [[UIBarButtonItem alloc] initWithCustomView:subview]; + navitem.leftBarButtonItem = buttonItem; + break; + } + case RNSScreenStackHeaderSubviewTypeRight: { + UIBarButtonItem *buttonItem = [[UIBarButtonItem alloc] initWithCustomView:subview]; + navitem.rightBarButtonItem = buttonItem; + break; + } + case RNSScreenStackHeaderSubviewTypeCenter: + case RNSScreenStackHeaderSubviewTypeTitle: { + navitem.titleView = subview; + break; + } + case RNSScreenStackHeaderSubviewTypeSearchBar: { + if (subview.subviews == nil || [subview.subviews count] == 0) { + RCTLogWarn( + @"Failed to attach search bar to the header. We recommend using `useLayoutEffect` when managing " + "searchBar properties dynamically. \n\nSee: github.com/software-mansion/react-native-screens/issues/1188"); + break; + } + + if ([subview.subviews[0] isKindOfClass:[RNSSearchBar class]]) { +#if !TARGET_OS_TV + if (@available(iOS 11.0, *)) { + RNSSearchBar *searchBar = subview.subviews[0]; + navitem.searchController = searchBar.controller; + navitem.hidesSearchBarWhenScrolling = searchBar.hideWhenScrolling; + } +#endif + } + break; + } + case RNSScreenStackHeaderSubviewTypeBackButton: { +#ifdef RN_FABRIC_ENABLED + RCTLogWarn(@"Back button subview is not yet Fabric compatible in react-native-screens"); +#endif + break; + } + } + } + + // This assignment should be done after `navitem.titleView = ...` assignment (iOS 16.0 bug). + // See: https://github.com/software-mansion/react-native-screens/issues/1570 (comments) + navitem.title = config.title; + + if (animated && vc.transitionCoordinator != nil && + vc.transitionCoordinator.presentationStyle == UIModalPresentationNone && !wasHidden) { + // when there is an ongoing transition we may need to update navbar setting in animation block + // using animateAlongsideTransition. However, we only do that given the transition is not a modal + // transition (presentationStyle == UIModalPresentationNone) and that the bar was not previously + // hidden. This is because both for modal transitions and transitions from screen with hidden bar + // the transition animation block does not get triggered. This is ok, because with both of those + // types of transitions there is no "shared" navigation bar that needs to be updated in an animated + // way. + [vc.transitionCoordinator + animateAlongsideTransition:^(id _Nonnull context) { + [self setAnimatedConfig:vc withConfig:config]; + } + completion:^(id _Nonnull context) { + if ([context isCancelled]) { + UIViewController *fromVC = [context viewControllerForKey:UITransitionContextFromViewControllerKey]; + RNSScreenStackHeaderConfig *config = nil; + for (UIView *subview in fromVC.view.reactSubviews) { + if ([subview isKindOfClass:[RNSScreenStackHeaderConfig class]]) { + config = (RNSScreenStackHeaderConfig *)subview; + break; + } + } + [self setAnimatedConfig:fromVC withConfig:config]; + } + }]; + } else { + [self setAnimatedConfig:vc withConfig:config]; + } +} + +- (void)insertReactSubview:(RNSScreenStackHeaderSubview *)subview atIndex:(NSInteger)atIndex +{ + [_reactSubviews insertObject:subview atIndex:atIndex]; + subview.reactSuperview = self; +} + +- (void)removeReactSubview:(RNSScreenStackHeaderSubview *)subview +{ + [_reactSubviews removeObject:subview]; +} + +- (void)didUpdateReactSubviews +{ + [super didUpdateReactSubviews]; + [self updateViewControllerIfNeeded]; +} + +#ifdef RN_FABRIC_ENABLED +#pragma mark - Fabric specific + +- (void)mountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +{ + if (![childComponentView isKindOfClass:[RNSScreenStackHeaderSubview class]]) { + RCTLogError(@"ScreenStackHeader only accepts children of type ScreenStackHeaderSubview"); + return; + } + + RCTAssert( + childComponentView.superview == nil, + @"Attempt to mount already mounted component view. (parent: %@, child: %@, index: %@, existing parent: %@)", + self, + childComponentView, + @(index), + @([childComponentView.superview tag])); + + // [_reactSubviews insertObject:(RNSScreenStackHeaderSubview *)childComponentView atIndex:index]; + [self insertReactSubview:(RNSScreenStackHeaderSubview *)childComponentView atIndex:index]; + [self updateViewControllerIfNeeded]; +} + +- (void)unmountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +{ + [_reactSubviews removeObject:(RNSScreenStackHeaderSubview *)childComponentView]; + [childComponentView removeFromSuperview]; +} + +#pragma mark - RCTComponentViewProtocol + +- (void)prepareForRecycle +{ + [super prepareForRecycle]; + _initialPropsSet = NO; +} + ++ (facebook::react::ComponentDescriptorProvider)componentDescriptorProvider +{ + return facebook::react::concreteComponentDescriptorProvider< + facebook::react::RNSScreenStackHeaderConfigComponentDescriptor>(); +} + +- (NSNumber *)getFontSizePropValue:(int)value +{ + if (value > 0) + return [NSNumber numberWithInt:value]; + return nil; +} + +- (UISemanticContentAttribute)getDirectionPropValue:(facebook::react::RNSScreenStackHeaderConfigDirection)direction +{ + switch (direction) { + case facebook::react::RNSScreenStackHeaderConfigDirection::Rtl: + return UISemanticContentAttributeForceRightToLeft; + case facebook::react::RNSScreenStackHeaderConfigDirection::Ltr: + return UISemanticContentAttributeForceLeftToRight; + } +} + +- (void)updateProps:(facebook::react::Props::Shared const &)props + oldProps:(facebook::react::Props::Shared const &)oldProps +{ + [super updateProps:props oldProps:oldProps]; + + const auto &oldScreenProps = + *std::static_pointer_cast(_props); + const auto &newScreenProps = *std::static_pointer_cast(props); + + BOOL needsNavigationControllerLayout = !_initialPropsSet; + + if (newScreenProps.hidden != !_show) { + _show = !newScreenProps.hidden; + needsNavigationControllerLayout = YES; + } + + if (newScreenProps.translucent != _translucent) { + _translucent = newScreenProps.translucent; + needsNavigationControllerLayout = YES; + } + + if (newScreenProps.backButtonInCustomView != _backButtonInCustomView) { + [self setBackButtonInCustomView:newScreenProps.backButtonInCustomView]; + } + + _title = RCTNSStringFromStringNilIfEmpty(newScreenProps.title); + if (newScreenProps.titleFontFamily != oldScreenProps.titleFontFamily) { + _titleFontFamily = RCTNSStringFromStringNilIfEmpty(newScreenProps.titleFontFamily); + } + _titleFontWeight = RCTNSStringFromStringNilIfEmpty(newScreenProps.titleFontWeight); + _titleFontSize = [self getFontSizePropValue:newScreenProps.titleFontSize]; + _hideShadow = newScreenProps.hideShadow; + + _largeTitle = newScreenProps.largeTitle; + if (newScreenProps.largeTitleFontFamily != oldScreenProps.largeTitleFontFamily) { + _largeTitleFontFamily = RCTNSStringFromStringNilIfEmpty(newScreenProps.largeTitleFontFamily); + } + _largeTitleFontWeight = RCTNSStringFromStringNilIfEmpty(newScreenProps.largeTitleFontWeight); + _largeTitleFontSize = [self getFontSizePropValue:newScreenProps.largeTitleFontSize]; + _largeTitleHideShadow = newScreenProps.largeTitleHideShadow; + + _backTitle = RCTNSStringFromStringNilIfEmpty(newScreenProps.backTitle); + if (newScreenProps.backTitleFontFamily != oldScreenProps.backTitleFontFamily) { + _backTitleFontFamily = RCTNSStringFromStringNilIfEmpty(newScreenProps.backTitleFontFamily); + } + _backTitleFontSize = [self getFontSizePropValue:newScreenProps.backTitleFontSize]; + _hideBackButton = newScreenProps.hideBackButton; + _disableBackButtonMenu = newScreenProps.disableBackButtonMenu; + + if (newScreenProps.direction != oldScreenProps.direction) { + _direction = [self getDirectionPropValue:newScreenProps.direction]; + } + + // We cannot compare SharedColor because it is shared value. + // We could compare color value, but it is more performant to just assign new value + _titleColor = RCTUIColorFromSharedColor(newScreenProps.titleColor); + _largeTitleColor = RCTUIColorFromSharedColor(newScreenProps.largeTitleColor); + _color = RCTUIColorFromSharedColor(newScreenProps.color); + _backgroundColor = RCTUIColorFromSharedColor(newScreenProps.backgroundColor); + + [self updateViewControllerIfNeeded]; + + if (needsNavigationControllerLayout) { + [self layoutNavigationControllerView]; + } + + _initialPropsSet = YES; + _props = std::static_pointer_cast(props); +} + +#else +#pragma mark - Paper specific + +- (void)didSetProps:(NSArray *)changedProps +{ + [super didSetProps:changedProps]; + [self updateViewControllerIfNeeded]; + // We need to layout navigation controller view after translucent prop changes, because otherwise + // frame of RNSScreen will not be changed and screen content will remain the same size. + // For more details look at https://github.com/software-mansion/react-native-screens/issues/1158 + if ([changedProps containsObject:@"translucent"]) { + [self layoutNavigationControllerView]; + } +} + +#endif +@end + +#ifdef RN_FABRIC_ENABLED +Class RNSScreenStackHeaderConfigCls(void) +{ + return RNSScreenStackHeaderConfig.class; +} +#endif + +@implementation RNSScreenStackHeaderConfigManager + +RCT_EXPORT_MODULE() + +- (UIView *)view +{ + return [RNSScreenStackHeaderConfig new]; +} + +RCT_EXPORT_VIEW_PROPERTY(title, NSString) +RCT_EXPORT_VIEW_PROPERTY(titleFontFamily, NSString) +RCT_EXPORT_VIEW_PROPERTY(titleFontSize, NSNumber) +RCT_EXPORT_VIEW_PROPERTY(titleFontWeight, NSString) +RCT_EXPORT_VIEW_PROPERTY(titleColor, UIColor) +RCT_EXPORT_VIEW_PROPERTY(backTitle, NSString) +RCT_EXPORT_VIEW_PROPERTY(backTitleFontFamily, NSString) +RCT_EXPORT_VIEW_PROPERTY(backTitleFontSize, NSNumber) +RCT_EXPORT_VIEW_PROPERTY(backgroundColor, UIColor) +RCT_EXPORT_VIEW_PROPERTY(blurEffect, UIBlurEffectStyle) +RCT_EXPORT_VIEW_PROPERTY(color, UIColor) +RCT_EXPORT_VIEW_PROPERTY(direction, UISemanticContentAttribute) +RCT_EXPORT_VIEW_PROPERTY(largeTitle, BOOL) +RCT_EXPORT_VIEW_PROPERTY(largeTitleFontFamily, NSString) +RCT_EXPORT_VIEW_PROPERTY(largeTitleFontSize, NSNumber) +RCT_EXPORT_VIEW_PROPERTY(largeTitleFontWeight, NSString) +RCT_EXPORT_VIEW_PROPERTY(largeTitleColor, UIColor) +RCT_EXPORT_VIEW_PROPERTY(largeTitleBackgroundColor, UIColor) +RCT_EXPORT_VIEW_PROPERTY(largeTitleHideShadow, BOOL) +RCT_EXPORT_VIEW_PROPERTY(hideBackButton, BOOL) +RCT_EXPORT_VIEW_PROPERTY(hideShadow, BOOL) +RCT_EXPORT_VIEW_PROPERTY(backButtonInCustomView, BOOL) +RCT_EXPORT_VIEW_PROPERTY(disableBackButtonMenu, BOOL) +// `hidden` is an UIView property, we need to use different name internally +RCT_REMAP_VIEW_PROPERTY(hidden, hide, BOOL) +RCT_EXPORT_VIEW_PROPERTY(translucent, BOOL) + +@end + +@implementation RCTConvert (RNSScreenStackHeader) + ++ (NSMutableDictionary *)blurEffectsForIOSVersion +{ + NSMutableDictionary *blurEffects = [NSMutableDictionary new]; + [blurEffects addEntriesFromDictionary:@{ + @"extraLight" : @(UIBlurEffectStyleExtraLight), + @"light" : @(UIBlurEffectStyleLight), + @"dark" : @(UIBlurEffectStyleDark), + }]; + + if (@available(iOS 10.0, *)) { + [blurEffects addEntriesFromDictionary:@{ + @"regular" : @(UIBlurEffectStyleRegular), + @"prominent" : @(UIBlurEffectStyleProminent), + }]; + } +#if !TARGET_OS_TV && defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 + if (@available(iOS 13.0, *)) { + [blurEffects addEntriesFromDictionary:@{ + @"systemUltraThinMaterial" : @(UIBlurEffectStyleSystemUltraThinMaterial), + @"systemThinMaterial" : @(UIBlurEffectStyleSystemThinMaterial), + @"systemMaterial" : @(UIBlurEffectStyleSystemMaterial), + @"systemThickMaterial" : @(UIBlurEffectStyleSystemThickMaterial), + @"systemChromeMaterial" : @(UIBlurEffectStyleSystemChromeMaterial), + @"systemUltraThinMaterialLight" : @(UIBlurEffectStyleSystemUltraThinMaterialLight), + @"systemThinMaterialLight" : @(UIBlurEffectStyleSystemThinMaterialLight), + @"systemMaterialLight" : @(UIBlurEffectStyleSystemMaterialLight), + @"systemThickMaterialLight" : @(UIBlurEffectStyleSystemThickMaterialLight), + @"systemChromeMaterialLight" : @(UIBlurEffectStyleSystemChromeMaterialLight), + @"systemUltraThinMaterialDark" : @(UIBlurEffectStyleSystemUltraThinMaterialDark), + @"systemThinMaterialDark" : @(UIBlurEffectStyleSystemThinMaterialDark), + @"systemMaterialDark" : @(UIBlurEffectStyleSystemMaterialDark), + @"systemThickMaterialDark" : @(UIBlurEffectStyleSystemThickMaterialDark), + @"systemChromeMaterialDark" : @(UIBlurEffectStyleSystemChromeMaterialDark), + }]; + } +#endif + return blurEffects; +} + +RCT_ENUM_CONVERTER( + UISemanticContentAttribute, + (@{ + @"ltr" : @(UISemanticContentAttributeForceLeftToRight), + @"rtl" : @(UISemanticContentAttributeForceRightToLeft), + }), + UISemanticContentAttributeUnspecified, + integerValue) + +RCT_ENUM_CONVERTER(UIBlurEffectStyle, ([self blurEffectsForIOSVersion]), UIBlurEffectStyleExtraLight, integerValue) + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderSubview.h b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderSubview.h new file mode 100644 index 00000000..30bffb96 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderSubview.h @@ -0,0 +1,45 @@ + +#ifdef RN_FABRIC_ENABLED +#import +#endif + +#import +#import +#import "RNSEnums.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface RNSScreenStackHeaderSubview : +#ifdef RN_FABRIC_ENABLED + RCTViewComponentView +#else + UIView +#endif + +@property (nonatomic) RNSScreenStackHeaderSubviewType type; + +@property (nonatomic, weak) UIView *reactSuperview; + +#ifdef RN_FABRIC_ENABLED +#else +@property (nonatomic, weak) RCTBridge *bridge; + +- (instancetype)initWithBridge:(RCTBridge *)bridge; + +#endif + +@end + +@interface RNSScreenStackHeaderSubviewManager : RCTViewManager + +@property (nonatomic) RNSScreenStackHeaderSubviewType type; + +@end + +@interface RCTConvert (RNSScreenStackHeaderSubview) + ++ (RNSScreenStackHeaderSubviewType)RNSScreenStackHeaderSubviewType:(id)json; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderSubview.mm b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderSubview.mm new file mode 100644 index 00000000..70a430b0 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenStackHeaderSubview.mm @@ -0,0 +1,137 @@ +#import "RNSScreenStackHeaderSubview.h" +#import "RNSConvert.h" + +#ifdef RN_FABRIC_ENABLED +#import +#import +#import + +#import +#import +#endif + +@implementation RNSScreenStackHeaderSubview + +#pragma mark - Common + +#ifdef RN_FABRIC_ENABLED + +#pragma mark - Fabric specific + +- (instancetype)initWithFrame:(CGRect)frame +{ + if (self = [super initWithFrame:frame]) { + static const auto defaultProps = std::make_shared(); + _props = defaultProps; + } + + return self; +} + +#pragma mark - RCTComponentViewProtocol + +- (void)prepareForRecycle +{ + [super prepareForRecycle]; +} + +- (void)updateProps:(facebook::react::Props::Shared const &)props + oldProps:(facebook::react::Props::Shared const &)oldProps +{ + const auto &newHeaderSubviewProps = + *std::static_pointer_cast(props); + const auto &oldHeaderSubviewProps = + *std::static_pointer_cast(_props); + + if (newHeaderSubviewProps.type != oldHeaderSubviewProps.type) { + _type = [RNSConvert RNSScreenStackHeaderSubviewTypeFromCppEquivalent:newHeaderSubviewProps.type]; + } + + [super updateProps:props oldProps:oldProps]; +} + ++ (facebook::react::ComponentDescriptorProvider)componentDescriptorProvider +{ + return facebook::react::concreteComponentDescriptorProvider< + facebook::react::RNSScreenStackHeaderSubviewComponentDescriptor>(); +} + +- (void)updateLayoutMetrics:(const facebook::react::LayoutMetrics &)layoutMetrics + oldLayoutMetrics:(const facebook::react::LayoutMetrics &)oldLayoutMetrics +{ + CGRect frame = RCTCGRectFromRect(layoutMetrics.frame); + // CALayer will crash if we pass NaN or Inf values. + // It's unclear how to detect this case on cross-platform manner holistically, so we have to do it on the mounting + // layer as well. NaN/Inf is a kinda valid result of some math operations. Even if we can (and should) detect (and + // report early) incorrect (NaN and Inf) values which come from JavaScript side, we sometimes cannot backtrace the + // sources of a calculation that produced an incorrect/useless result. + if (!std::isfinite(frame.size.width) || !std::isfinite(frame.size.height)) { + RCTLogWarn( + @"-[UIView(ComponentViewProtocol) updateLayoutMetrics:oldLayoutMetrics:]: Received invalid layout metrics (%@) for a view (%@).", + NSStringFromCGRect(frame), + self); + } else { + self.bounds = CGRect{CGPointZero, frame.size}; + } +} + +#else +#pragma mark - Paper specific + +- (instancetype)initWithBridge:(RCTBridge *)bridge +{ + if (self = [super init]) { + _bridge = bridge; + } + return self; +} + +- (void)reactSetFrame:(CGRect)frame +{ + // Block any attempt to set coordinates on RNSScreenStackHeaderSubview. This + // makes UINavigationBar the only one to control the position of header content. + [super reactSetFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)]; +} + +#endif // RN_FABRIC_ENABLED +@end + +@implementation RNSScreenStackHeaderSubviewManager + +RCT_EXPORT_MODULE() + +RCT_EXPORT_VIEW_PROPERTY(type, RNSScreenStackHeaderSubviewType) + +#ifdef RN_FABRIC_ENABLED +#else +- (UIView *)view +{ + return [[RNSScreenStackHeaderSubview alloc] initWithBridge:self.bridge]; +} +#endif + +@end + +#ifdef RN_FABRIC_ENABLED +Class RNSScreenStackHeaderSubviewCls(void) +{ + return RNSScreenStackHeaderSubview.class; +} +#endif + +@implementation RCTConvert (RNSScreenStackHeaderSubview) + +RCT_ENUM_CONVERTER( + RNSScreenStackHeaderSubviewType, + (@{ + @"back" : @(RNSScreenStackHeaderSubviewTypeBackButton), + @"left" : @(RNSScreenStackHeaderSubviewTypeLeft), + @"right" : @(RNSScreenStackHeaderSubviewTypeRight), + @"title" : @(RNSScreenStackHeaderSubviewTypeTitle), + @"center" : @(RNSScreenStackHeaderSubviewTypeCenter), + @"searchBar" : @(RNSScreenStackHeaderSubviewTypeSearchBar), + }), + RNSScreenStackHeaderSubviewTypeTitle, + integerValue) + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenViewEvent.h b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenViewEvent.h new file mode 100644 index 00000000..b46e8a2e --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenViewEvent.h @@ -0,0 +1,12 @@ +#import +#import + +@interface RNSScreenViewEvent : NSObject + +- (instancetype)initWithEventName:(NSString *)eventName + reactTag:(NSNumber *)reactTag + progress:(double)progress + closing:(int)closing + goingForward:(int)goingForward; + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenViewEvent.mm b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenViewEvent.mm new file mode 100644 index 00000000..5ee89b47 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenViewEvent.mm @@ -0,0 +1,59 @@ +#import "RNSScreenViewEvent.h" +#import + +@implementation RNSScreenViewEvent { + double _progress; + int _closing; + int _goingForward; +} + +@synthesize viewTag = _viewTag; +@synthesize eventName = _eventName; + +- (instancetype)initWithEventName:(NSString *)eventName + reactTag:(NSNumber *)reactTag + progress:(double)progress + closing:(int)closing + goingForward:(int)goingForward +{ + RCTAssertParam(reactTag); + + if ((self = [super init])) { + _eventName = [eventName copy]; + _viewTag = reactTag; + _progress = progress; + _closing = closing; + _goingForward = goingForward; + } + return self; +} + +RCT_NOT_IMPLEMENTED(-(instancetype)init) + +- (NSDictionary *)body +{ + NSDictionary *body = @{ + @"progress" : @(_progress), + @"closing" : @(_closing ? 1 : 0), + @"goingForward" : @(_goingForward ? 1 : 0), + }; + + return body; +} + +- (BOOL)canCoalesce +{ + return NO; +} + ++ (NSString *)moduleDotMethod +{ + return @"RCTEventEmitter.receiveEvent"; +} + +- (NSArray *)arguments +{ + return @[ self.viewTag, RCTNormalizeInputEventName(self.eventName), [self body] ]; +} + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenWindowTraits.h b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenWindowTraits.h new file mode 100644 index 00000000..1970b9d0 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenWindowTraits.h @@ -0,0 +1,26 @@ +#import "RNSScreen.h" + +@interface RNSScreenWindowTraits : NSObject + ++ (void)updateWindowTraits; + +#if !TARGET_OS_TV ++ (void)assertViewControllerBasedStatusBarAppearenceSet; +#endif ++ (void)updateStatusBarAppearance; ++ (void)enforceDesiredDeviceOrientation; ++ (void)updateHomeIndicatorAutoHidden; + +#if !TARGET_OS_TV ++ (UIStatusBarStyle)statusBarStyleForRNSStatusBarStyle:(RNSStatusBarStyle)statusBarStyle; ++ (UIInterfaceOrientation)defaultOrientationForOrientationMask:(UIInterfaceOrientationMask)orientationMask; ++ (UIInterfaceOrientation)interfaceOrientationFromDeviceOrientation:(UIDeviceOrientation)deviceOrientation; ++ (UIInterfaceOrientationMask)maskFromOrientation:(UIInterfaceOrientation)orientation; +#endif + ++ (BOOL)shouldAskScreensForTrait:(RNSWindowTrait)trait + includingModals:(BOOL)includingModals + inViewController:(UIViewController *)vc; ++ (BOOL)shouldAskScreensForScreenOrientationInViewController:(UIViewController *)vc; + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenWindowTraits.mm b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenWindowTraits.mm new file mode 100644 index 00000000..5b1bdc9b --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSScreenWindowTraits.mm @@ -0,0 +1,243 @@ +#import "RNSScreenWindowTraits.h" +#import "RNSScreenContainer.h" +#import "RNSScreenStack.h" + +@implementation RNSScreenWindowTraits + +#if !TARGET_OS_TV ++ (void)assertViewControllerBasedStatusBarAppearenceSet +{ + static dispatch_once_t once; + static bool viewControllerBasedAppearence; + dispatch_once(&once, ^{ + viewControllerBasedAppearence = + [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIViewControllerBasedStatusBarAppearance"] boolValue]; + }); + if (!viewControllerBasedAppearence) { + RCTLogError(@"If you want to change the appearance of status bar, you have to change \ + UIViewControllerBasedStatusBarAppearance key in the Info.plist to YES"); + } +} +#endif + ++ (void)updateStatusBarAppearance +{ +#if !TARGET_OS_TV + [UIView animateWithDuration:0.4 + animations:^{ // duration based on "Programming iOS 13" p. 311 implementation +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 + if (@available(iOS 13, *)) { + UIWindow *firstWindow = [[[UIApplication sharedApplication] windows] firstObject]; + if (firstWindow != nil) { + [[firstWindow rootViewController] setNeedsStatusBarAppearanceUpdate]; + } + } else +#endif + { + [UIApplication.sharedApplication.keyWindow.rootViewController setNeedsStatusBarAppearanceUpdate]; + } + }]; +#endif +} + ++ (void)updateHomeIndicatorAutoHidden +{ +#if !TARGET_OS_TV + +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 + if (@available(iOS 13, *)) { + UIWindow *firstWindow = [[[UIApplication sharedApplication] windows] firstObject]; + if (firstWindow != nil) { + [[firstWindow rootViewController] setNeedsUpdateOfHomeIndicatorAutoHidden]; + } + } else +#endif + { + if (@available(iOS 11.0, *)) { + [UIApplication.sharedApplication.keyWindow.rootViewController setNeedsUpdateOfHomeIndicatorAutoHidden]; + } + } +#endif +} + +#if !TARGET_OS_TV ++ (UIStatusBarStyle)statusBarStyleForRNSStatusBarStyle:(RNSStatusBarStyle)statusBarStyle +{ +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 + if (@available(iOS 13.0, *)) { + switch (statusBarStyle) { + case RNSStatusBarStyleAuto: + return [UITraitCollection.currentTraitCollection userInterfaceStyle] == UIUserInterfaceStyleDark + ? UIStatusBarStyleLightContent + : UIStatusBarStyleDarkContent; + case RNSStatusBarStyleInverted: + return [UITraitCollection.currentTraitCollection userInterfaceStyle] == UIUserInterfaceStyleDark + ? UIStatusBarStyleDarkContent + : UIStatusBarStyleLightContent; + case RNSStatusBarStyleLight: + return UIStatusBarStyleLightContent; + case RNSStatusBarStyleDark: + return UIStatusBarStyleDarkContent; + default: + return UIStatusBarStyleLightContent; + } + } +#endif + // it is the only non-default style available for iOS < 13 + if (statusBarStyle == RNSStatusBarStyleLight) { + return UIStatusBarStyleLightContent; + } + return UIStatusBarStyleDefault; +} +#endif + +#if !TARGET_OS_TV ++ (UIInterfaceOrientation)defaultOrientationForOrientationMask:(UIInterfaceOrientationMask)orientationMask +{ + if (UIInterfaceOrientationMaskPortrait & orientationMask) { + return UIInterfaceOrientationPortrait; + } else if (UIInterfaceOrientationMaskLandscapeLeft & orientationMask) { + return UIInterfaceOrientationLandscapeLeft; + } else if (UIInterfaceOrientationMaskLandscapeRight & orientationMask) { + return UIInterfaceOrientationLandscapeRight; + } else if (UIInterfaceOrientationMaskPortraitUpsideDown & orientationMask) { + return UIInterfaceOrientationPortraitUpsideDown; + } + return UIInterfaceOrientationUnknown; +} + ++ (UIInterfaceOrientation)interfaceOrientationFromDeviceOrientation:(UIDeviceOrientation)deviceOrientation +{ + switch (deviceOrientation) { + case UIDeviceOrientationPortrait: + return UIInterfaceOrientationPortrait; + case UIDeviceOrientationPortraitUpsideDown: + return UIInterfaceOrientationPortraitUpsideDown; + // UIDevice and UIInterface landscape orientations are switched + case UIDeviceOrientationLandscapeLeft: + return UIInterfaceOrientationLandscapeRight; + case UIDeviceOrientationLandscapeRight: + return UIInterfaceOrientationLandscapeLeft; + default: + return UIInterfaceOrientationUnknown; + } +} + ++ (UIInterfaceOrientationMask)maskFromOrientation:(UIInterfaceOrientation)orientation +{ + return 1 << orientation; +} +#endif + ++ (void)enforceDesiredDeviceOrientation +{ +#if !TARGET_OS_TV + dispatch_async(dispatch_get_main_queue(), ^{ + UIInterfaceOrientationMask orientationMask = UIInterfaceOrientationMaskAllButUpsideDown; +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 + if (@available(iOS 13, *)) { + UIWindow *firstWindow = [[[UIApplication sharedApplication] windows] firstObject]; + if (firstWindow != nil) { + orientationMask = [firstWindow rootViewController].supportedInterfaceOrientations; + } + } else +#endif + { + orientationMask = UIApplication.sharedApplication.keyWindow.rootViewController.supportedInterfaceOrientations; + } + UIInterfaceOrientation currentDeviceOrientation = + [RNSScreenWindowTraits interfaceOrientationFromDeviceOrientation:[[UIDevice currentDevice] orientation]]; + UIInterfaceOrientation currentInterfaceOrientation = [RNSScreenWindowTraits interfaceOrientation]; + UIInterfaceOrientation newOrientation = UIInterfaceOrientationUnknown; + if ([RNSScreenWindowTraits maskFromOrientation:currentDeviceOrientation] & orientationMask) { + if (!([RNSScreenWindowTraits maskFromOrientation:currentInterfaceOrientation] & orientationMask)) { + // if the device orientation is in the mask, but interface orientation is not, we rotate to device's orientation + newOrientation = currentDeviceOrientation; + } else { + if (currentDeviceOrientation != currentInterfaceOrientation) { + // if both device orientation and interface orientation are in the mask, but in different orientations, we + // rotate to device's orientation + newOrientation = currentDeviceOrientation; + } + } + } else { + if (!([RNSScreenWindowTraits maskFromOrientation:currentInterfaceOrientation] & orientationMask)) { + // if both device orientation and interface orientation are not in the mask, we rotate to closest available + // rotation from mask + newOrientation = [RNSScreenWindowTraits defaultOrientationForOrientationMask:orientationMask]; + } else { + // if the device orientation is not in the mask, but interface orientation is in the mask, do nothing + } + } + if (newOrientation != UIInterfaceOrientationUnknown) { + [[UIDevice currentDevice] setValue:@(newOrientation) forKey:@"orientation"]; + [UIViewController attemptRotationToDeviceOrientation]; + } + }); +#endif +} + ++ (void)updateWindowTraits +{ + [RNSScreenWindowTraits updateStatusBarAppearance]; + [RNSScreenWindowTraits enforceDesiredDeviceOrientation]; + [RNSScreenWindowTraits updateHomeIndicatorAutoHidden]; +} + +#if !TARGET_OS_TV +// based on +// https://stackoverflow.com/questions/57965701/statusbarorientation-was-deprecated-in-ios-13-0-when-attempting-to-get-app-ori/61249908#61249908 ++ (UIInterfaceOrientation)interfaceOrientation +{ +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 + if (@available(iOS 13.0, *)) { + UIWindow *firstWindow = [[[UIApplication sharedApplication] windows] firstObject]; + if (firstWindow == nil) { + return UIInterfaceOrientationUnknown; + } + UIWindowScene *windowScene = firstWindow.windowScene; + if (windowScene == nil) { + return UIInterfaceOrientationUnknown; + } + return windowScene.interfaceOrientation; + } else +#endif + { + return UIApplication.sharedApplication.statusBarOrientation; + } +} +#endif + +// method to be used in Expo for checking if RNScreens have trait set ++ (BOOL)shouldAskScreensForTrait:(RNSWindowTrait)trait + includingModals:(BOOL)includingModals + inViewController:(UIViewController *)vc +{ + UIViewController *lastViewController = [[vc childViewControllers] lastObject]; + if ([lastViewController conformsToProtocol:@protocol(RNScreensViewControllerDelegate)]) { + UIViewController *vc = nil; + if ([lastViewController isKindOfClass:[RNScreensViewController class]]) { + vc = [(RNScreensViewController *)lastViewController findActiveChildVC]; + } else if ([lastViewController isKindOfClass:[RNScreensNavigationController class]]) { + vc = [(RNScreensNavigationController *)lastViewController topViewController]; + } + return [vc isKindOfClass:[RNSScreen class]] && + [(RNSScreen *)vc findChildVCForConfigAndTrait:trait includingModals:includingModals] != nil; + } + return NO; +} + +// same method as above, but directly for orientation ++ (BOOL)shouldAskScreensForScreenOrientationInViewController:(UIViewController *)vc +{ + return [RNSScreenWindowTraits shouldAskScreensForTrait:RNSWindowTraitOrientation + includingModals:YES + inViewController:vc]; +} + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSSearchBar.h b/iut-expo-starter/node_modules/react-native-screens/ios/RNSSearchBar.h new file mode 100644 index 00000000..9c8a90c2 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSSearchBar.h @@ -0,0 +1,35 @@ +#import + +#ifdef RN_FABRIC_ENABLED +#import +#endif + +#import +#import +#import + +@interface RNSSearchBar : +#ifdef RN_FABRIC_ENABLED + RCTViewComponentView +#else + UIView +#endif + +@property (nonatomic) BOOL hideWhenScrolling; + +@property (nonatomic, retain) UISearchController *controller; + +#ifdef RN_FABRIC_ENABLED +#else +@property (nonatomic, copy) RCTBubblingEventBlock onChangeText; +@property (nonatomic, copy) RCTBubblingEventBlock onCancelButtonPress; +@property (nonatomic, copy) RCTBubblingEventBlock onSearchButtonPress; +@property (nonatomic, copy) RCTBubblingEventBlock onFocus; +@property (nonatomic, copy) RCTBubblingEventBlock onBlur; +#endif + +@end + +@interface RNSSearchBarManager : RCTViewManager + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNSSearchBar.mm b/iut-expo-starter/node_modules/react-native-screens/ios/RNSSearchBar.mm new file mode 100644 index 00000000..ebd32240 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNSSearchBar.mm @@ -0,0 +1,351 @@ +#import + +#import "RNSSearchBar.h" + +#import +#import +#import + +#ifdef RN_FABRIC_ENABLED +#import +#import +#import +#import +#import +#import +#import "RNSConvert.h" +#endif + +@implementation RNSSearchBar { + __weak RCTBridge *_bridge; + UISearchController *_controller; + UIColor *_textColor; +} + +@synthesize controller = _controller; + +- (instancetype)initWithBridge:(RCTBridge *)bridge +{ + if (self = [super init]) { + _bridge = bridge; + [self initCommonProps]; + } + return self; +} + +#ifdef RN_FABRIC_ENABLED +- (instancetype)init +{ + if (self = [super init]) { + static const auto defaultProps = std::make_shared(); + _props = defaultProps; + [self initCommonProps]; + } + return self; +} +#endif + +- (void)initCommonProps +{ + _controller = [[UISearchController alloc] initWithSearchResultsController:nil]; + _controller.searchBar.delegate = self; + _hideWhenScrolling = YES; +} + +- (void)emitOnFocusEvent +{ +#ifdef RN_FABRIC_ENABLED + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onFocus(facebook::react::RNSSearchBarEventEmitter::OnFocus{}); + } +#else + if (self.onFocus) { + self.onFocus(@{}); + } +#endif +} + +- (void)emitOnBlurEvent +{ +#ifdef RN_FABRIC_ENABLED + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onBlur(facebook::react::RNSSearchBarEventEmitter::OnBlur{}); + } +#else + if (self.onBlur) { + self.onBlur(@{}); + } +#endif +} + +- (void)emitOnSearchButtonPressEventWithText:(NSString *)text +{ +#ifdef RN_FABRIC_ENABLED + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onSearchButtonPress( + facebook::react::RNSSearchBarEventEmitter::OnSearchButtonPress{.text = RCTStringFromNSString(text)}); + } +#else + if (self.onSearchButtonPress) { + self.onSearchButtonPress(@{ + @"text" : text, + }); + } +#endif +} + +- (void)emitOnCancelButtonPressEvent +{ +#ifdef RN_FABRIC_ENABLED + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onCancelButtonPress(facebook::react::RNSSearchBarEventEmitter::OnCancelButtonPress{}); + } +#else + if (self.onCancelButtonPress) { + self.onCancelButtonPress(@{}); + } +#endif +} + +- (void)emitOnChangeTextEventWithText:(NSString *)text +{ +#ifdef RN_FABRIC_ENABLED + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onChangeText(facebook::react::RNSSearchBarEventEmitter::OnChangeText{.text = RCTStringFromNSString(text)}); + } +#else + if (self.onChangeText) { + self.onChangeText(@{ + @"text" : text, + }); + } +#endif +} + +- (void)setObscureBackground:(BOOL)obscureBackground +{ + if (@available(iOS 9.1, *)) { + [_controller setObscuresBackgroundDuringPresentation:obscureBackground]; + } +} + +- (void)setHideNavigationBar:(BOOL)hideNavigationBar +{ + [_controller setHidesNavigationBarDuringPresentation:hideNavigationBar]; +} + +- (void)setHideWhenScrolling:(BOOL)hideWhenScrolling +{ + _hideWhenScrolling = hideWhenScrolling; +} + +- (void)setAutoCapitalize:(UITextAutocapitalizationType)autoCapitalize +{ + [_controller.searchBar setAutocapitalizationType:autoCapitalize]; +} + +- (void)setPlaceholder:(NSString *)placeholder +{ + [_controller.searchBar setPlaceholder:placeholder]; +} + +- (void)setBarTintColor:(UIColor *)barTintColor +{ +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 && !TARGET_OS_TV + if (@available(iOS 13.0, *)) { + [_controller.searchBar.searchTextField setBackgroundColor:barTintColor]; + } +#endif +} + +- (void)setTintColor:(UIColor *)tintColor +{ + [_controller.searchBar setTintColor:tintColor]; +} + +- (void)setTextColor:(UIColor *)textColor +{ +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 && !TARGET_OS_TV + _textColor = textColor; + if (@available(iOS 13.0, *)) { + [_controller.searchBar.searchTextField setTextColor:_textColor]; + } +#endif +} + +- (void)setCancelButtonText:(NSString *)text +{ + [_controller.searchBar setValue:text forKey:@"cancelButtonText"]; +} + +- (void)hideCancelButton +{ +#if !TARGET_OS_TV + if (@available(iOS 13, *)) { + // On iOS 13+ UISearchController automatically shows/hides cancel button + // https://developer.apple.com/documentation/uikit/uisearchcontroller/3152926-automaticallyshowscancelbutton?language=objc + } else { + [_controller.searchBar setShowsCancelButton:NO animated:YES]; + } +#endif +} + +- (void)showCancelButton +{ +#if !TARGET_OS_TV + if (@available(iOS 13, *)) { + // On iOS 13+ UISearchController automatically shows/hides cancel button + // https://developer.apple.com/documentation/uikit/uisearchcontroller/3152926-automaticallyshowscancelbutton?language=objc + } else { + [_controller.searchBar setShowsCancelButton:YES animated:YES]; + } +#endif +} + +#pragma mark delegate methods + +- (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar +{ +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 && !TARGET_OS_TV + if (@available(iOS 13.0, *)) { + // for some reason, the color does not change when set at the beginning, + // so we apply it again here + if (_textColor != nil) { + [_controller.searchBar.searchTextField setTextColor:_textColor]; + } + } +#endif + + [self showCancelButton]; + [self becomeFirstResponder]; + [self emitOnFocusEvent]; +} + +- (void)searchBarTextDidEndEditing:(UISearchBar *)searchBar +{ + [self emitOnBlurEvent]; + [self hideCancelButton]; +} + +- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText +{ + [self emitOnChangeTextEventWithText:_controller.searchBar.text]; +} + +- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar +{ + [self emitOnSearchButtonPressEventWithText:_controller.searchBar.text]; +} + +#if !TARGET_OS_TV +- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar +{ + _controller.searchBar.text = @""; + [self resignFirstResponder]; + [self hideCancelButton]; + + [self emitOnCancelButtonPressEvent]; + [self emitOnChangeTextEventWithText:_controller.searchBar.text]; +} +#endif // !TARGET_OS_TV + +#pragma mark-- Fabric specific + +#ifdef RN_FABRIC_ENABLED +- (void)updateProps:(facebook::react::Props::Shared const &)props + oldProps:(facebook::react::Props::Shared const &)oldProps +{ + const auto &oldScreenProps = *std::static_pointer_cast(_props); + const auto &newScreenProps = *std::static_pointer_cast(props); + + [self setHideWhenScrolling:newScreenProps.hideWhenScrolling]; + + if (oldScreenProps.cancelButtonText != newScreenProps.cancelButtonText) { + [self setCancelButtonText:RCTNSStringFromStringNilIfEmpty(newScreenProps.cancelButtonText)]; + } + + if (oldScreenProps.obscureBackground != newScreenProps.obscureBackground) { + [self setObscureBackground:newScreenProps.obscureBackground]; + } + + if (oldScreenProps.hideNavigationBar != newScreenProps.hideNavigationBar) { + [self setHideNavigationBar:newScreenProps.hideNavigationBar]; + } + + if (oldScreenProps.placeholder != newScreenProps.placeholder) { + [self setPlaceholder:RCTNSStringFromStringNilIfEmpty(newScreenProps.placeholder)]; + } + + if (oldScreenProps.autoCapitalize != newScreenProps.autoCapitalize) { + [self setAutoCapitalize:[RNSConvert UITextAutocapitalizationTypeFromCppEquivalent:newScreenProps.autoCapitalize]]; + } + + if (oldScreenProps.tintColor != newScreenProps.tintColor) { + [self setTintColor:RCTUIColorFromSharedColor(newScreenProps.tintColor)]; + } + + if (oldScreenProps.barTintColor != newScreenProps.barTintColor) { + [self setBarTintColor:RCTUIColorFromSharedColor(newScreenProps.barTintColor)]; + } + + if (oldScreenProps.textColor != newScreenProps.textColor) { + [self setTextColor:RCTUIColorFromSharedColor(newScreenProps.textColor)]; + } + + [super updateProps:props oldProps:oldProps]; +} + ++ (facebook::react::ComponentDescriptorProvider)componentDescriptorProvider +{ + return facebook::react::concreteComponentDescriptorProvider(); +} + +#else +#endif + +@end + +#ifdef RN_FABRIC_ENABLED +Class RNSSearchBarCls(void) +{ + return RNSSearchBar.class; +} +#endif + +@implementation RNSSearchBarManager + +RCT_EXPORT_MODULE() + +#ifdef RN_FABRIC_ENABLED +#else +- (UIView *)view +{ + return [[RNSSearchBar alloc] initWithBridge:self.bridge]; +} +#endif + +RCT_EXPORT_VIEW_PROPERTY(obscureBackground, BOOL) +RCT_EXPORT_VIEW_PROPERTY(hideNavigationBar, BOOL) +RCT_EXPORT_VIEW_PROPERTY(hideWhenScrolling, BOOL) +RCT_EXPORT_VIEW_PROPERTY(autoCapitalize, UITextAutocapitalizationType) +RCT_EXPORT_VIEW_PROPERTY(placeholder, NSString) +RCT_EXPORT_VIEW_PROPERTY(barTintColor, UIColor) +RCT_EXPORT_VIEW_PROPERTY(tintColor, UIColor) +RCT_EXPORT_VIEW_PROPERTY(textColor, UIColor) +RCT_EXPORT_VIEW_PROPERTY(cancelButtonText, NSString) + +RCT_EXPORT_VIEW_PROPERTY(onChangeText, RCTBubblingEventBlock) +RCT_EXPORT_VIEW_PROPERTY(onCancelButtonPress, RCTBubblingEventBlock) +RCT_EXPORT_VIEW_PROPERTY(onSearchButtonPress, RCTBubblingEventBlock) +RCT_EXPORT_VIEW_PROPERTY(onFocus, RCTBubblingEventBlock) +RCT_EXPORT_VIEW_PROPERTY(onBlur, RCTBubblingEventBlock) + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/RNScreens.xcodeproj/project.pbxproj b/iut-expo-starter/node_modules/react-native-screens/ios/RNScreens.xcodeproj/project.pbxproj new file mode 100644 index 00000000..436084e4 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/RNScreens.xcodeproj/project.pbxproj @@ -0,0 +1,461 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 442389EC22DF259000611BBE /* RNSScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 442389EB22DF259000611BBE /* RNSScreen.m */; }; + 448078F52114595900280661 /* RNSScreenContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = 448078F12114595900280661 /* RNSScreenContainer.m */; }; + 4482D5EF22CB391800D5A5B9 /* RNSScreenStackHeaderConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 4482D5EE22CB391800D5A5B9 /* RNSScreenStackHeaderConfig.m */; }; + 44A67C3122C3B8B40017156F /* RNSScreenStack.m in Sources */ = {isa = PBXBuildFile; fileRef = 44A67C3022C3B8B40017156F /* RNSScreenStack.m */; }; + B5C32A48220C6379000FFB8D /* RNSScreenContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = 448078F12114595900280661 /* RNSScreenContainer.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 58B511D91A9E6C8500147676 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B5C32A4A220C6379000FFB8D /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 134814201AA4EA6300B7C361 /* libRNScreens.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNScreens.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 442389EB22DF259000611BBE /* RNSScreen.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNSScreen.m; sourceTree = ""; }; + 448078EF2114595900280661 /* RNSScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNSScreen.h; sourceTree = ""; }; + 448078F02114595900280661 /* RNSScreenContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNSScreenContainer.h; sourceTree = ""; }; + 448078F12114595900280661 /* RNSScreenContainer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNSScreenContainer.m; sourceTree = ""; }; + 4482D5ED22CB391800D5A5B9 /* RNSScreenStackHeaderConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNSScreenStackHeaderConfig.h; sourceTree = ""; }; + 4482D5EE22CB391800D5A5B9 /* RNSScreenStackHeaderConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNSScreenStackHeaderConfig.m; sourceTree = ""; }; + 44A67C2F22C3B8B40017156F /* RNSScreenStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNSScreenStack.h; sourceTree = ""; }; + 44A67C3022C3B8B40017156F /* RNSScreenStack.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNSScreenStack.m; sourceTree = ""; }; + A3AF377826398E26003653D6 /* RNSSearchBar.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNSSearchBar.m; sourceTree = ""; }; + A3AF377926398E27003653D6 /* RNSSearchBar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNSSearchBar.h; sourceTree = ""; }; + B5C32A4F220C6379000FFB8D /* libRNScreens-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libRNScreens-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 58B511D81A9E6C8500147676 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B5C32A49220C6379000FFB8D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 134814211AA4EA7D00B7C361 /* Products */ = { + isa = PBXGroup; + children = ( + 134814201AA4EA6300B7C361 /* libRNScreens.a */, + ); + name = Products; + sourceTree = ""; + }; + 58B511D21A9E6C8500147676 = { + isa = PBXGroup; + children = ( + A3AF377926398E27003653D6 /* RNSSearchBar.h */, + A3AF377826398E26003653D6 /* RNSSearchBar.m */, + 4482D5ED22CB391800D5A5B9 /* RNSScreenStackHeaderConfig.h */, + 4482D5EE22CB391800D5A5B9 /* RNSScreenStackHeaderConfig.m */, + 44A67C2F22C3B8B40017156F /* RNSScreenStack.h */, + 44A67C3022C3B8B40017156F /* RNSScreenStack.m */, + 448078EF2114595900280661 /* RNSScreen.h */, + 442389EB22DF259000611BBE /* RNSScreen.m */, + 448078F02114595900280661 /* RNSScreenContainer.h */, + 448078F12114595900280661 /* RNSScreenContainer.m */, + 134814211AA4EA7D00B7C361 /* Products */, + B5C32A4F220C6379000FFB8D /* libRNScreens-tvOS.a */, + ); + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 58B511DA1A9E6C8500147676 /* RNScreens */ = { + isa = PBXNativeTarget; + buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNScreens" */; + buildPhases = ( + 58B511D71A9E6C8500147676 /* Sources */, + 58B511D81A9E6C8500147676 /* Frameworks */, + 58B511D91A9E6C8500147676 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RNScreens; + productName = RCTDataManager; + productReference = 134814201AA4EA6300B7C361 /* libRNScreens.a */; + productType = "com.apple.product-type.library.static"; + }; + B5C32A45220C6379000FFB8D /* RNScreens-tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = B5C32A4B220C6379000FFB8D /* Build configuration list for PBXNativeTarget "RNScreens-tvOS" */; + buildPhases = ( + B5C32A46220C6379000FFB8D /* Sources */, + B5C32A49220C6379000FFB8D /* Frameworks */, + B5C32A4A220C6379000FFB8D /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "RNScreens-tvOS"; + productName = RCTDataManager; + productReference = B5C32A4F220C6379000FFB8D /* libRNScreens-tvOS.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 58B511D31A9E6C8500147676 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 920; + ORGANIZATIONNAME = Facebook; + TargetAttributes = { + 58B511DA1A9E6C8500147676 = { + CreatedOnToolsVersion = 6.1.1; + }; + }; + }; + buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNScreens" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + ); + mainGroup = 58B511D21A9E6C8500147676; + productRefGroup = 58B511D21A9E6C8500147676; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 58B511DA1A9E6C8500147676 /* RNScreens */, + B5C32A45220C6379000FFB8D /* RNScreens-tvOS */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 58B511D71A9E6C8500147676 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 442389EC22DF259000611BBE /* RNSScreen.m in Sources */, + 448078F52114595900280661 /* RNSScreenContainer.m in Sources */, + 44A67C3122C3B8B40017156F /* RNSScreenStack.m in Sources */, + 4482D5EF22CB391800D5A5B9 /* RNSScreenStackHeaderConfig.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B5C32A46220C6379000FFB8D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B5C32A48220C6379000FFB8D /* RNSScreenContainer.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 0CE596A6BAEE45CA860361AD /* Testflight */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/../../../React/**", + "$(SRCROOT)/../../react-native/React/**", + ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = RNScreens; + SKIP_INSTALL = YES; + }; + name = Testflight; + }; + 58B511ED1A9E6C8500147676 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 58B511EE1A9E6C8500147676 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 58B511F01A9E6C8500147676 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/../../../React/**", + "$(SRCROOT)/../../react-native/React/**", + ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = RNScreens; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 58B511F11A9E6C8500147676 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/../../../React/**", + "$(SRCROOT)/../../react-native/React/**", + ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = RNScreens; + SKIP_INSTALL = YES; + }; + name = Release; + }; + B5C32A4C220C6379000FFB8D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/../../../React/**", + "$(SRCROOT)/../../react-native/React/**", + ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + B5C32A4D220C6379000FFB8D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/../../../React/**", + "$(SRCROOT)/../../react-native/React/**", + ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + }; + name = Release; + }; + B5C32A4E220C6379000FFB8D /* Testflight */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/../../../React/**", + "$(SRCROOT)/../../react-native/React/**", + ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + }; + name = Testflight; + }; + C7F03305A3464E75B4F5A6CE /* Testflight */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Testflight; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNScreens" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 58B511ED1A9E6C8500147676 /* Debug */, + 58B511EE1A9E6C8500147676 /* Release */, + C7F03305A3464E75B4F5A6CE /* Testflight */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNScreens" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 58B511F01A9E6C8500147676 /* Debug */, + 58B511F11A9E6C8500147676 /* Release */, + 0CE596A6BAEE45CA860361AD /* Testflight */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B5C32A4B220C6379000FFB8D /* Build configuration list for PBXNativeTarget "RNScreens-tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B5C32A4C220C6379000FFB8D /* Debug */, + B5C32A4D220C6379000FFB8D /* Release */, + B5C32A4E220C6379000FFB8D /* Testflight */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 58B511D31A9E6C8500147676 /* Project object */; +} diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/UIViewController+RNScreens.h b/iut-expo-starter/node_modules/react-native-screens/ios/UIViewController+RNScreens.h new file mode 100644 index 00000000..4c1c2d07 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/UIViewController+RNScreens.h @@ -0,0 +1,9 @@ +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface UIViewController (RNScreens) + +@end + +NS_ASSUME_NONNULL_END diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/UIViewController+RNScreens.mm b/iut-expo-starter/node_modules/react-native-screens/ios/UIViewController+RNScreens.mm new file mode 100644 index 00000000..3cec82de --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/UIViewController+RNScreens.mm @@ -0,0 +1,78 @@ +#import "RNSScreenContainer.h" +#import "UIViewController+RNScreens.h" + +#import + +@implementation UIViewController (RNScreens) + +#if !TARGET_OS_TV +- (UIViewController *)reactNativeScreensChildViewControllerForStatusBarStyle +{ + UIViewController *childVC = [self findChildRNScreensViewController]; + return childVC ?: [self reactNativeScreensChildViewControllerForStatusBarStyle]; +} + +- (UIViewController *)reactNativeScreensChildViewControllerForStatusBarHidden +{ + UIViewController *childVC = [self findChildRNScreensViewController]; + return childVC ?: [self reactNativeScreensChildViewControllerForStatusBarHidden]; +} + +- (UIStatusBarAnimation)reactNativeScreensPreferredStatusBarUpdateAnimation +{ + UIViewController *childVC = [self findChildRNScreensViewController]; + return childVC ? childVC.preferredStatusBarUpdateAnimation + : [self reactNativeScreensPreferredStatusBarUpdateAnimation]; +} + +- (UIInterfaceOrientationMask)reactNativeScreensSupportedInterfaceOrientations +{ + UIViewController *childVC = [self findChildRNScreensViewController]; + return childVC ? childVC.supportedInterfaceOrientations : [self reactNativeScreensSupportedInterfaceOrientations]; +} + +- (UIViewController *)reactNativeScreensChildViewControllerForHomeIndicatorAutoHidden +{ + UIViewController *childVC = [self findChildRNScreensViewController]; + return childVC ?: [self reactNativeScreensChildViewControllerForHomeIndicatorAutoHidden]; +} + +- (UIViewController *)findChildRNScreensViewController +{ + UIViewController *lastViewController = [[self childViewControllers] lastObject]; + if ([lastViewController conformsToProtocol:@protocol(RNScreensViewControllerDelegate)]) { + return lastViewController; + } + return nil; +} + ++ (void)load +{ + static dispatch_once_t once_token; + dispatch_once(&once_token, ^{ + Class uiVCClass = [UIViewController class]; + + method_exchangeImplementations( + class_getInstanceMethod(uiVCClass, @selector(childViewControllerForStatusBarStyle)), + class_getInstanceMethod(uiVCClass, @selector(reactNativeScreensChildViewControllerForStatusBarStyle))); + + method_exchangeImplementations( + class_getInstanceMethod(uiVCClass, @selector(childViewControllerForStatusBarHidden)), + class_getInstanceMethod(uiVCClass, @selector(reactNativeScreensChildViewControllerForStatusBarHidden))); + + method_exchangeImplementations( + class_getInstanceMethod(uiVCClass, @selector(preferredStatusBarUpdateAnimation)), + class_getInstanceMethod(uiVCClass, @selector(reactNativeScreensPreferredStatusBarUpdateAnimation))); + + method_exchangeImplementations( + class_getInstanceMethod(uiVCClass, @selector(supportedInterfaceOrientations)), + class_getInstanceMethod(uiVCClass, @selector(reactNativeScreensSupportedInterfaceOrientations))); + + method_exchangeImplementations( + class_getInstanceMethod(uiVCClass, @selector(childViewControllerForHomeIndicatorAutoHidden)), + class_getInstanceMethod(uiVCClass, @selector(reactNativeScreensChildViewControllerForHomeIndicatorAutoHidden))); + }); +} +#endif + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/UIWindow+RNScreens.h b/iut-expo-starter/node_modules/react-native-screens/ios/UIWindow+RNScreens.h new file mode 100644 index 00000000..77484b79 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/UIWindow+RNScreens.h @@ -0,0 +1,9 @@ +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface UIWindow (RNScreens) + +@end + +NS_ASSUME_NONNULL_END diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/UIWindow+RNScreens.mm b/iut-expo-starter/node_modules/react-native-screens/ios/UIWindow+RNScreens.mm new file mode 100644 index 00000000..e295dcc1 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/UIWindow+RNScreens.mm @@ -0,0 +1,17 @@ +#import "RNSFullWindowOverlay.h" +#import "UIWindow+RNScreens.h" + +@implementation UIWindow (RNScreens) + +- (void)didAddSubview:(UIView *)subview +{ + if (![subview isKindOfClass:[RNSFullWindowOverlayContainer class]]) { + for (UIView *view in self.subviews) { + if ([view isKindOfClass:[RNSFullWindowOverlayContainer class]]) { + [self bringSubviewToFront:view]; + } + } + } +} + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/utils/RNSUIBarButtonItem.h b/iut-expo-starter/node_modules/react-native-screens/ios/utils/RNSUIBarButtonItem.h new file mode 100644 index 00000000..e35f2904 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/utils/RNSUIBarButtonItem.h @@ -0,0 +1,5 @@ +@interface RNSUIBarButtonItem : UIBarButtonItem + +@property (nonatomic) BOOL menuHidden; + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/ios/utils/RNSUIBarButtonItem.mm b/iut-expo-starter/node_modules/react-native-screens/ios/utils/RNSUIBarButtonItem.mm new file mode 100644 index 00000000..5b23938b --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/ios/utils/RNSUIBarButtonItem.mm @@ -0,0 +1,22 @@ +#import "./RNSUIBarButtonItem.h" + +@implementation RNSUIBarButtonItem + +- (void)setMenuHidden:(BOOL)menuHidden +{ + _menuHidden = menuHidden; +} + +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_14_0) && \ + __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_0 +- (void)setMenu:(UIMenu *)menu +{ + if (@available(iOS 14.0, *)) { + if (!_menuHidden) { + super.menu = menu; + } + } +} +#endif + +@end diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/TransitionProgressContext.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/TransitionProgressContext.js new file mode 100644 index 00000000..7bd9a205 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/TransitionProgressContext.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +var _default = /*#__PURE__*/React.createContext(undefined); +exports.default = _default; +//# sourceMappingURL=TransitionProgressContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/TransitionProgressContext.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/TransitionProgressContext.js.map new file mode 100644 index 00000000..61c632c7 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/TransitionProgressContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","createContext","undefined"],"sources":["TransitionProgressContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Animated } from 'react-native';\n\ntype TransitionProgressContextBody = {\n progress: Animated.Value;\n closing: Animated.Value;\n goingForward: Animated.Value;\n};\n\nexport default React.createContext(\n undefined\n);\n"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAAA,4BAShBA,KAAK,CAACC,aAAa,CAChCC,SAAS,CACV;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/createNativeStackNavigator.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/createNativeStackNavigator.js new file mode 100644 index 00000000..11a03862 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/createNativeStackNavigator.js @@ -0,0 +1,374 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _react = _interopRequireDefault(require("react")); +var _reactNative = require("react-native"); +var _reactNativeScreens = require("react-native-screens"); +var _reactNavigation = require("react-navigation"); +var _reactNavigationStack = require("react-navigation-stack"); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +const REMOVE_ACTION = 'NativeStackNavigator/REMOVE'; +const isAndroid = _reactNative.Platform.OS === 'android'; +let didWarn = isAndroid; +function renderComponentOrThunk(componentOrThunk, props) { + if (typeof componentOrThunk === 'function') { + return componentOrThunk(props); + } + return componentOrThunk; +} +function removeScene(route, dismissCount, navigation) { + navigation.dispatch({ + // @ts-ignore special navigation action for native stack + type: REMOVE_ACTION, + immediate: true, + key: route.key, + dismissCount + }); +} +function onAppear(route, descriptor, navigation) { + var _descriptor$options, _descriptor$options$o; + (_descriptor$options = descriptor.options) === null || _descriptor$options === void 0 ? void 0 : (_descriptor$options$o = _descriptor$options.onAppear) === null || _descriptor$options$o === void 0 ? void 0 : _descriptor$options$o.call(_descriptor$options); + navigation.dispatch(_reactNavigation.StackActions.completeTransition({ + toChildKey: route.key, + key: navigation.state.key + })); +} +function onFinishTransitioning(navigation) { + const { + routes + } = navigation.state; + const lastRoute = (routes === null || routes === void 0 ? void 0 : routes.length) && routes[routes.length - 1]; + if (lastRoute) { + navigation.dispatch(_reactNavigation.StackActions.completeTransition({ + toChildKey: lastRoute.key, + key: navigation.state.key + })); + } +} +function renderHeaderConfig(index, route, descriptor, navigationConfig) { + const { + options + } = descriptor; + const { + headerMode + } = navigationConfig; + const { + backButtonInCustomView, + direction, + disableBackButtonMenu, + headerBackTitle, + headerBackTitleStyle, + headerBackTitleVisible, + headerHideBackButton, + headerHideShadow, + headerLargeStyle, + headerLargeTitle, + headerLargeTitleHideShadow, + headerLargeTitleStyle, + headerShown, + headerStyle, + headerTintColor, + headerTitleStyle, + headerTopInsetEnabled = true, + headerTranslucent, + hideShadow, + largeTitle, + largeTitleHideShadow, + title, + translucent + } = options; + const scene = { + index, + key: route.key, + route, + descriptor + }; + const headerOptions = { + backButtonInCustomView, + backTitle: headerBackTitleVisible === false ? '' : headerBackTitle, + backTitleFontFamily: headerBackTitleStyle === null || headerBackTitleStyle === void 0 ? void 0 : headerBackTitleStyle.fontFamily, + backTitleFontSize: headerBackTitleStyle === null || headerBackTitleStyle === void 0 ? void 0 : headerBackTitleStyle.fontSize, + color: headerTintColor, + direction, + disableBackButtonMenu, + topInsetEnabled: headerTopInsetEnabled, + hideBackButton: headerHideBackButton, + hideShadow: headerHideShadow || hideShadow, + largeTitle: headerLargeTitle || largeTitle, + largeTitleBackgroundColor: (headerLargeStyle === null || headerLargeStyle === void 0 ? void 0 : headerLargeStyle.backgroundColor) || ( // @ts-ignore old implementation, will not be present in TS API, but can be used here + headerLargeTitleStyle === null || headerLargeTitleStyle === void 0 ? void 0 : headerLargeTitleStyle.backgroundColor), + largeTitleColor: headerLargeTitleStyle === null || headerLargeTitleStyle === void 0 ? void 0 : headerLargeTitleStyle.color, + largeTitleFontFamily: headerLargeTitleStyle === null || headerLargeTitleStyle === void 0 ? void 0 : headerLargeTitleStyle.fontFamily, + largeTitleFontSize: headerLargeTitleStyle === null || headerLargeTitleStyle === void 0 ? void 0 : headerLargeTitleStyle.fontSize, + largeTitleFontWeight: headerLargeTitleStyle === null || headerLargeTitleStyle === void 0 ? void 0 : headerLargeTitleStyle.fontWeight, + largeTitleHideShadow: largeTitleHideShadow || headerLargeTitleHideShadow, + title, + titleColor: (headerTitleStyle === null || headerTitleStyle === void 0 ? void 0 : headerTitleStyle.color) || headerTintColor, + titleFontFamily: headerTitleStyle === null || headerTitleStyle === void 0 ? void 0 : headerTitleStyle.fontFamily, + titleFontSize: headerTitleStyle === null || headerTitleStyle === void 0 ? void 0 : headerTitleStyle.fontSize, + titleFontWeight: headerTitleStyle === null || headerTitleStyle === void 0 ? void 0 : headerTitleStyle.fontWeight, + translucent: headerTranslucent || translucent || false + }; + const hasHeader = headerShown !== false && headerMode !== 'none' && options.header !== null; + if (!hasHeader) { + return /*#__PURE__*/_react.default.createElement(_reactNativeScreens.ScreenStackHeaderConfig, _extends({}, headerOptions, { + hidden: true + })); + } + if (headerStyle !== undefined) { + headerOptions.backgroundColor = headerStyle.backgroundColor; + headerOptions.blurEffect = headerStyle.blurEffect; + } + const children = []; + if (options.backButtonImage) { + children.push( /*#__PURE__*/_react.default.createElement(_reactNativeScreens.ScreenStackHeaderBackButtonImage, { + key: "backImage", + source: options.backButtonImage + })); + } + if (_reactNative.Platform.OS === 'ios' && options.searchBar) { + children.push( /*#__PURE__*/_react.default.createElement(_reactNativeScreens.ScreenStackHeaderSearchBarView, null, /*#__PURE__*/_react.default.createElement(_reactNativeScreens.SearchBar, options.searchBar))); + } + if (options.headerLeft !== undefined) { + children.push( /*#__PURE__*/_react.default.createElement(_reactNativeScreens.ScreenStackHeaderLeftView, { + key: "left" + }, renderComponentOrThunk(options.headerLeft, { + scene + }))); + } else if (options.headerBackImage !== undefined) { + const goBack = () => { + // Go back on next tick because button ripple effect needs to happen on Android + requestAnimationFrame(() => { + descriptor.navigation.goBack(descriptor.key); + }); + }; + children.push( /*#__PURE__*/_react.default.createElement(_reactNativeScreens.ScreenStackHeaderLeftView, { + key: "left" + }, /*#__PURE__*/_react.default.createElement(_reactNavigationStack.HeaderBackButton, { + onPress: goBack, + pressColorAndroid: options.headerPressColorAndroid, + tintColor: options.headerTintColor, + backImage: options.headerBackImage, + label: options.backButtonTitle, + truncatedLabel: options.truncatedBackButtonTitle, + labelVisible: options.backTitleVisible, + labelStyle: options.headerBackTitleStyle, + titleLayout: options.layoutPreset + // @ts-ignore old props kept for very old version of `react-navigation-stack` + , + title: options.backButtonTitle, + truncatedTitle: options.truncatedBackButtonTitle, + backTitleVisible: options.backTitleVisible, + titleStyle: options.headerBackTitleStyle, + layoutPreset: options.layoutPreset, + scene: scene + }))); + } + if (options.headerTitle) { + if (title === undefined && typeof options.headerTitle === 'string') { + headerOptions.title = options.headerTitle; + } else { + children.push( /*#__PURE__*/_react.default.createElement(_reactNativeScreens.ScreenStackHeaderCenterView, { + key: "center" + }, renderComponentOrThunk(options.headerTitle, { + scene + }))); + } + } + if (options.headerRight) { + children.push( /*#__PURE__*/_react.default.createElement(_reactNativeScreens.ScreenStackHeaderRightView, { + key: "right" + }, renderComponentOrThunk(options.headerRight, { + scene + }))); + } + if (children.length > 0) { + headerOptions.children = children; + } + return /*#__PURE__*/_react.default.createElement(_reactNativeScreens.ScreenStackHeaderConfig, headerOptions); +} +const MaybeNestedStack = _ref => { + let { + isHeaderInModal, + screenProps, + route, + navigation, + SceneComponent, + index, + descriptor, + navigationConfig + } = _ref; + const Screen = _react.default.useContext(_reactNativeScreens.ScreenContext); + if (isHeaderInModal) { + return /*#__PURE__*/_react.default.createElement(_reactNativeScreens.ScreenStack, { + style: styles.scenes + }, /*#__PURE__*/_react.default.createElement(Screen, { + style: _reactNative.StyleSheet.absoluteFill, + enabled: true, + isNativeStack: true + }, renderHeaderConfig(index, route, descriptor, navigationConfig), /*#__PURE__*/_react.default.createElement(_reactNavigation.SceneView, { + screenProps: screenProps, + navigation: navigation, + component: SceneComponent + }))); + } + return /*#__PURE__*/_react.default.createElement(_reactNavigation.SceneView, { + screenProps: screenProps, + navigation: navigation, + component: SceneComponent + }); +}; +function StackView(_ref2) { + let { + navigation, + descriptors, + navigationConfig, + screenProps + } = _ref2; + const { + routes + } = navigation.state; + const Screen = _react.default.useContext(_reactNativeScreens.ScreenContext); + return /*#__PURE__*/_react.default.createElement(_reactNativeScreens.ScreenStack, { + style: styles.scenes, + onFinishTransitioning: () => onFinishTransitioning(navigation) + }, routes.map((route, index) => { + const descriptor = descriptors[route.key]; + const { + getComponent, + options + } = descriptor; + const routeNavigationProp = descriptor.navigation; + const { + mode, + transparentCard + } = navigationConfig; + const SceneComponent = getComponent(); + let stackPresentation = 'push'; + if (options.stackPresentation) { + stackPresentation = options.stackPresentation; + } else { + // this shouldn't be used because we have a prop for that + if (mode === 'modal' || mode === 'containedModal') { + stackPresentation = mode; + if (transparentCard || options.cardTransparent) { + stackPresentation = mode === 'containedModal' ? 'containedTransparentModal' : 'transparentModal'; + } + } + } + let stackAnimation = options.stackAnimation; + if (options.animationEnabled === false) { + stackAnimation = 'none'; + } + const hasHeader = options.headerShown !== false && (navigationConfig === null || navigationConfig === void 0 ? void 0 : navigationConfig.headerMode) !== 'none' && options.header !== null; + if (!didWarn && stackPresentation !== 'push' && options.headerShown !== undefined) { + didWarn = true; + console.warn('Be aware that changing the visibility of header in modal on iOS will result in resetting the state of the screen.'); + } + const isHeaderInModal = isAndroid ? false : stackPresentation !== 'push' && hasHeader && options.headerShown === true; + const isHeaderInPush = isAndroid ? hasHeader : stackPresentation === 'push' && hasHeader; + return /*#__PURE__*/_react.default.createElement(Screen, { + key: `screen_${route.key}`, + enabled: true, + isNativeStack: true, + style: [_reactNative.StyleSheet.absoluteFill, options.cardStyle], + stackAnimation: stackAnimation, + customAnimationOnSwipe: options.customAnimationOnSwipe, + stackPresentation: stackPresentation, + replaceAnimation: options.replaceAnimation === undefined ? 'pop' : options.replaceAnimation, + pointerEvents: index === navigation.state.routes.length - 1 ? 'auto' : 'none', + gestureEnabled: _reactNative.Platform.OS === 'android' ? false : options.gestureEnabled === undefined ? true : options.gestureEnabled, + nativeBackButtonDismissalEnabled: options.nativeBackButtonDismissalEnabled, + fullScreenSwipeEnabled: options.fullScreenSwipeEnabled, + screenOrientation: options.screenOrientation, + statusBarAnimation: options.statusBarAnimation, + statusBarColor: options.statusBarColor, + statusBarHidden: options.statusBarHidden, + statusBarStyle: options.statusBarStyle, + statusBarTranslucent: options.statusBarTranslucent, + onAppear: () => onAppear(route, descriptor, routeNavigationProp), + onWillAppear: () => { + var _options$onWillAppear; + return options === null || options === void 0 ? void 0 : (_options$onWillAppear = options.onWillAppear) === null || _options$onWillAppear === void 0 ? void 0 : _options$onWillAppear.call(options); + }, + onWillDisappear: () => { + var _options$onWillDisapp; + return options === null || options === void 0 ? void 0 : (_options$onWillDisapp = options.onWillDisappear) === null || _options$onWillDisapp === void 0 ? void 0 : _options$onWillDisapp.call(options); + }, + onDisappear: () => { + var _options$onDisappear; + return options === null || options === void 0 ? void 0 : (_options$onDisappear = options.onDisappear) === null || _options$onDisappear === void 0 ? void 0 : _options$onDisappear.call(options); + }, + onHeaderBackButtonClicked: () => removeScene(route, 1, routeNavigationProp), + onDismissed: e => removeScene(route, e.nativeEvent.dismissCount, routeNavigationProp) + }, isHeaderInPush && renderHeaderConfig(index, route, descriptor, navigationConfig), /*#__PURE__*/_react.default.createElement(MaybeNestedStack, { + isHeaderInModal: isHeaderInModal, + screenProps: screenProps, + route: route, + navigation: routeNavigationProp, + SceneComponent: SceneComponent, + index: index, + descriptor: descriptor, + navigationConfig: navigationConfig + })); + })); +} +const styles = _reactNative.StyleSheet.create({ + scenes: { + flex: 1 + } +}); +function createStackNavigator(routeConfigMap) { + let stackConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + const router = (0, _reactNavigation.StackRouter)(routeConfigMap, stackConfig); + + // below we override getStateForAction method in order to add handling for + // a custom native stack navigation action. The action REMOVE that we want to + // add works in a similar way to POP, but it does not remove all the routes + // that sit on top of the removed route. For example if we have three routes + // [a,b,c] and call POP on b, then both b and c will go away. In case we + // call REMOVE on b, only b will be removed from the stack and the resulting + // state will be [a, c] + const superGetStateForAction = router.getStateForAction; + router.getStateForAction = (action, state) => { + if (action.type === REMOVE_ACTION) { + const { + key, + immediate, + dismissCount + } = action; + let backRouteIndex = state.index; + if (key) { + const backRoute = state.routes.find(route => route.key === key); + backRouteIndex = state.routes.indexOf(backRoute); + } + if (backRouteIndex > 0) { + const newRoutes = [...state.routes]; + if (dismissCount > 1) { + // when dismissing with iOS 14 native header back button, we can pop more than 1 screen at a time + // and the `backRouteIndex` is the index of the previous screen. Since we are starting already + // on the previous screen, we add 1 to start. + newRoutes.splice(backRouteIndex - dismissCount + 1, dismissCount); + } else { + newRoutes.splice(backRouteIndex, 1); + } + return { + ...state, + routes: newRoutes, + index: newRoutes.length - 1, + isTransitioning: immediate !== true + }; + } + } + return superGetStateForAction(action, state); + }; + // Create a navigator with StackView as the view + return (0, _reactNavigation.createNavigator)(StackView, router, stackConfig); +} +var _default = createStackNavigator; +exports.default = _default; +//# sourceMappingURL=createNativeStackNavigator.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/createNativeStackNavigator.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/createNativeStackNavigator.js.map new file mode 100644 index 00000000..af05c3b3 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/createNativeStackNavigator.js.map @@ -0,0 +1 @@ +{"version":3,"names":["REMOVE_ACTION","isAndroid","Platform","OS","didWarn","renderComponentOrThunk","componentOrThunk","props","removeScene","route","dismissCount","navigation","dispatch","type","immediate","key","onAppear","descriptor","options","StackActions","completeTransition","toChildKey","state","onFinishTransitioning","routes","lastRoute","length","renderHeaderConfig","index","navigationConfig","headerMode","backButtonInCustomView","direction","disableBackButtonMenu","headerBackTitle","headerBackTitleStyle","headerBackTitleVisible","headerHideBackButton","headerHideShadow","headerLargeStyle","headerLargeTitle","headerLargeTitleHideShadow","headerLargeTitleStyle","headerShown","headerStyle","headerTintColor","headerTitleStyle","headerTopInsetEnabled","headerTranslucent","hideShadow","largeTitle","largeTitleHideShadow","title","translucent","scene","headerOptions","backTitle","backTitleFontFamily","fontFamily","backTitleFontSize","fontSize","color","topInsetEnabled","hideBackButton","largeTitleBackgroundColor","backgroundColor","largeTitleColor","largeTitleFontFamily","largeTitleFontSize","largeTitleFontWeight","fontWeight","titleColor","titleFontFamily","titleFontSize","titleFontWeight","hasHeader","header","undefined","blurEffect","children","backButtonImage","push","searchBar","headerLeft","headerBackImage","goBack","requestAnimationFrame","headerPressColorAndroid","backButtonTitle","truncatedBackButtonTitle","backTitleVisible","layoutPreset","headerTitle","headerRight","MaybeNestedStack","isHeaderInModal","screenProps","SceneComponent","Screen","React","useContext","ScreenContext","styles","scenes","StyleSheet","absoluteFill","StackView","descriptors","map","getComponent","routeNavigationProp","mode","transparentCard","stackPresentation","cardTransparent","stackAnimation","animationEnabled","console","warn","isHeaderInPush","cardStyle","customAnimationOnSwipe","replaceAnimation","gestureEnabled","nativeBackButtonDismissalEnabled","fullScreenSwipeEnabled","screenOrientation","statusBarAnimation","statusBarColor","statusBarHidden","statusBarStyle","statusBarTranslucent","onWillAppear","onWillDisappear","onDisappear","e","nativeEvent","create","flex","createStackNavigator","routeConfigMap","stackConfig","router","StackRouter","superGetStateForAction","getStateForAction","action","backRouteIndex","backRoute","find","indexOf","newRoutes","splice","isTransitioning","createNavigator"],"sources":["createNativeStackNavigator.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Platform,\n StyleSheet,\n Animated,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native';\nimport {\n ScreenContext,\n ScreenStack,\n ScreenStackHeaderBackButtonImage,\n ScreenStackHeaderCenterView,\n ScreenStackHeaderConfig,\n ScreenStackHeaderConfigProps,\n ScreenStackHeaderLeftView,\n ScreenStackHeaderRightView,\n ScreenStackHeaderSearchBarView,\n SearchBar,\n StackPresentationTypes,\n} from 'react-native-screens';\nimport {\n createNavigator,\n SceneView,\n StackActions,\n StackRouter,\n NavigationRouteConfigMap,\n CreateNavigatorConfig,\n NavigationStackRouterConfig,\n NavigationParams,\n NavigationRoute,\n NavigationDescriptor,\n NavigationState,\n NavigationNavigator,\n NavigationAction,\n NavigationProp,\n NavigationScreenProp,\n} from 'react-navigation';\nimport { NativeStackNavigationOptions as NativeStackNavigationOptionsV5 } from './native-stack/types';\nimport { HeaderBackButton } from 'react-navigation-stack';\nimport {\n StackNavigationHelpers,\n StackNavigationProp,\n Layout,\n} from 'react-navigation-stack/src/vendor/types';\n\nconst REMOVE_ACTION = 'NativeStackNavigator/REMOVE';\n\nconst isAndroid = Platform.OS === 'android';\n\nlet didWarn = isAndroid;\n\nfunction renderComponentOrThunk(componentOrThunk: unknown, props: unknown) {\n if (typeof componentOrThunk === 'function') {\n return componentOrThunk(props);\n }\n return componentOrThunk;\n}\n\ntype NativeStackRemoveNavigationAction = {\n type: typeof REMOVE_ACTION;\n immediate: boolean;\n dismissCount: number;\n key?: string;\n};\n\nexport type NativeStackNavigationProp = StackNavigationProp;\n\nexport type NativeStackNavigationOptions = StackNavigatorOptions &\n NativeStackNavigationOptionsV5 &\n BackButtonProps & {\n onWillAppear?: () => void;\n onAppear?: () => void;\n onWillDisappear?: () => void;\n onDisappear?: () => void;\n // these props differ from the ones used in v5 `native-stack`, and we would like to keep the API consistent between versions\n /** Use `headerHideShadow` to be consistent with v5 `native-stack` */\n hideShadow?: boolean;\n /** Use `headerLargeTitle` to be consistent with v5 `native-stack` */\n largeTitle?: boolean;\n /** Use `headerLargeTitleHideShadow` to be consistent with v5 `native-stack` */\n largeTitleHideShadow?: boolean;\n /** Use `headerTranslucent` to be consistent with v5 `native-stack` */\n translucent?: boolean;\n };\n\n// these are adopted from `stack` navigator\ntype StackNavigatorOptions = {\n /** This is an option from `stackNavigator` and it hides the header when set to `null`. Use `headerShown` instead to be consistent with v5 `native-stack`. */\n header?: React.ComponentType> | null;\n /** This is an option from `stackNavigator` and it controls the stack presentation along with `mode` prop. Use `stackPresentation` instead to be consistent with v5 `native-stack` */\n cardTransparent?: boolean;\n /** This is an option from `stackNavigator` and it sets stack animation to none when `false` passed. Use `stackAnimation: 'none'` instead to be consistent with v5 `native-stack` */\n animationEnabled?: boolean;\n cardStyle?: StyleProp;\n};\n\n// these are the props used for rendering back button taken from `react-navigation-stack`\ntype BackButtonProps = {\n headerBackImage?: (props: { tintColor: string }) => React.ReactNode;\n headerPressColorAndroid?: string;\n headerTintColor?: string;\n backButtonTitle?: string;\n truncatedBackButtonTitle?: string;\n backTitleVisible?: boolean;\n headerBackTitleStyle?: Animated.WithAnimatedValue>;\n layoutPreset?: Layout;\n};\n\ntype NativeStackDescriptor = NavigationDescriptor<\n NavigationParams,\n NativeStackNavigationOptions\n>;\n\ntype NativeStackDescriptorMap = {\n [key: string]: NativeStackDescriptor;\n};\n\n// these are the props used for rendering back button taken from `react-navigation-stack`\ntype NativeStackNavigationConfig = {\n /** This is an option from `stackNavigator` and controls the stack presentation along with `cardTransparent` prop. Use `stackPresentation` instead to be consistent with v5 `native-stack` */\n mode?: 'modal' | 'containedModal';\n /** This is an option from `stackNavigator` and makes the header hide when set to `none`. Use `headerShown` instead to be consistent with v5 `native-stack` */\n headerMode?: 'none';\n /** This is an option from `stackNavigator` and controls the stack presentation along with `mode` prop. Use `stackPresentation` instead to be consistent with v5 `native-stack` */\n transparentCard?: boolean;\n};\n\nfunction removeScene(\n route: NavigationRoute,\n dismissCount: number,\n navigation: StackNavigationHelpers\n) {\n navigation.dispatch({\n // @ts-ignore special navigation action for native stack\n type: REMOVE_ACTION,\n immediate: true,\n key: route.key,\n dismissCount,\n });\n}\n\nfunction onAppear(\n route: NavigationRoute,\n descriptor: NativeStackDescriptor,\n navigation: StackNavigationHelpers\n) {\n descriptor.options?.onAppear?.();\n navigation.dispatch(\n StackActions.completeTransition({\n toChildKey: route.key,\n key: navigation.state.key,\n })\n );\n}\n\nfunction onFinishTransitioning(navigation: StackNavigationHelpers) {\n const { routes } = navigation.state;\n const lastRoute = routes?.length && routes[routes.length - 1];\n\n if (lastRoute) {\n navigation.dispatch(\n StackActions.completeTransition({\n toChildKey: lastRoute.key,\n key: navigation.state.key,\n })\n );\n }\n}\n\nfunction renderHeaderConfig(\n index: number,\n route: NavigationRoute,\n descriptor: NativeStackDescriptor,\n navigationConfig: NativeStackNavigationConfig\n) {\n const { options } = descriptor;\n const { headerMode } = navigationConfig;\n\n const {\n backButtonInCustomView,\n direction,\n disableBackButtonMenu,\n headerBackTitle,\n headerBackTitleStyle,\n headerBackTitleVisible,\n headerHideBackButton,\n headerHideShadow,\n headerLargeStyle,\n headerLargeTitle,\n headerLargeTitleHideShadow,\n headerLargeTitleStyle,\n headerShown,\n headerStyle,\n headerTintColor,\n headerTitleStyle,\n headerTopInsetEnabled = true,\n headerTranslucent,\n hideShadow,\n largeTitle,\n largeTitleHideShadow,\n title,\n translucent,\n } = options;\n\n const scene = {\n index,\n key: route.key,\n route,\n descriptor,\n };\n\n const headerOptions: ScreenStackHeaderConfigProps = {\n backButtonInCustomView,\n backTitle: headerBackTitleVisible === false ? '' : headerBackTitle,\n backTitleFontFamily: headerBackTitleStyle?.fontFamily,\n backTitleFontSize: headerBackTitleStyle?.fontSize,\n color: headerTintColor,\n direction,\n disableBackButtonMenu,\n topInsetEnabled: headerTopInsetEnabled,\n hideBackButton: headerHideBackButton,\n hideShadow: headerHideShadow || hideShadow,\n largeTitle: headerLargeTitle || largeTitle,\n largeTitleBackgroundColor:\n headerLargeStyle?.backgroundColor ||\n // @ts-ignore old implementation, will not be present in TS API, but can be used here\n headerLargeTitleStyle?.backgroundColor,\n largeTitleColor: headerLargeTitleStyle?.color,\n largeTitleFontFamily: headerLargeTitleStyle?.fontFamily,\n largeTitleFontSize: headerLargeTitleStyle?.fontSize,\n largeTitleFontWeight: headerLargeTitleStyle?.fontWeight,\n largeTitleHideShadow: largeTitleHideShadow || headerLargeTitleHideShadow,\n title,\n titleColor: headerTitleStyle?.color || headerTintColor,\n titleFontFamily: headerTitleStyle?.fontFamily,\n titleFontSize: headerTitleStyle?.fontSize,\n titleFontWeight: headerTitleStyle?.fontWeight,\n translucent: headerTranslucent || translucent || false,\n };\n\n const hasHeader =\n headerShown !== false && headerMode !== 'none' && options.header !== null;\n if (!hasHeader) {\n return \n );\n })}\n \n );\n}\n\nconst styles = StyleSheet.create({\n scenes: { flex: 1 },\n});\n\nfunction createStackNavigator(\n routeConfigMap: NavigationRouteConfigMap<\n NativeStackNavigationOptions,\n StackNavigationProp\n >,\n stackConfig: CreateNavigatorConfig<\n NativeStackNavigationConfig,\n NavigationStackRouterConfig,\n NativeStackNavigationOptions,\n StackNavigationProp\n > = {}\n): NavigationNavigator<\n Record,\n NavigationProp\n> {\n const router = StackRouter(routeConfigMap, stackConfig);\n\n // below we override getStateForAction method in order to add handling for\n // a custom native stack navigation action. The action REMOVE that we want to\n // add works in a similar way to POP, but it does not remove all the routes\n // that sit on top of the removed route. For example if we have three routes\n // [a,b,c] and call POP on b, then both b and c will go away. In case we\n // call REMOVE on b, only b will be removed from the stack and the resulting\n // state will be [a, c]\n const superGetStateForAction = router.getStateForAction;\n router.getStateForAction = (\n action: NavigationAction | NativeStackRemoveNavigationAction,\n state\n ) => {\n if (action.type === REMOVE_ACTION) {\n const { key, immediate, dismissCount } = action;\n let backRouteIndex = state.index;\n if (key) {\n const backRoute = state.routes.find(\n (route: NavigationRoute) => route.key === key\n );\n backRouteIndex = state.routes.indexOf(backRoute);\n }\n\n if (backRouteIndex > 0) {\n const newRoutes = [...state.routes];\n if (dismissCount > 1) {\n // when dismissing with iOS 14 native header back button, we can pop more than 1 screen at a time\n // and the `backRouteIndex` is the index of the previous screen. Since we are starting already\n // on the previous screen, we add 1 to start.\n newRoutes.splice(backRouteIndex - dismissCount + 1, dismissCount);\n } else {\n newRoutes.splice(backRouteIndex, 1);\n }\n\n return {\n ...state,\n routes: newRoutes,\n index: newRoutes.length - 1,\n isTransitioning: immediate !== true,\n };\n }\n }\n return superGetStateForAction(action as NavigationAction, state);\n };\n // Create a navigator with StackView as the view\n return createNavigator(StackView, router, stackConfig);\n}\n\nexport default createStackNavigator;\n"],"mappings":";;;;;;AAAA;AACA;AAQA;AAaA;AAkBA;AAA0D;AAAA;AAO1D,MAAMA,aAAa,GAAG,6BA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AAK,CAACM,KAAK;MAChC,IAAIb,GAAG,EAAE;QACP,MAAMqI,SAAS,GAAG9H,KAAK,CAACE,MAAM,CAAC6H,IAAI,CAChC5I,KAAwC,IAAKA,KAAK,CAACM,GAAG,KAAKA,GAAG,CAChE;QACDoI,cAAc,GAAG7H,KAAK,CAACE,MAAM,CAAC8H,OAAO,CAACF,SAAS,CAAC;MAClD;MAEA,IAAID,cAAc,GAAG,CAAC,EAAE;QACtB,MAAMI,SAAS,GAAG,CAAC,GAAGjI,KAAK,CAACE,MAAM,CAAC;QACnC,IAAId,YAAY,GAAG,CAAC,EAAE;UACpB;UACA;UACA;UACA6I,SAAS,CAACC,MAAM,CAACL,cAAc,GAAGzI,YAAY,GAAG,CAAC,EAAEA,YAAY,CAAC;QACnE,CAAC,MAAM;UACL6I,SAAS,CAACC,MAAM,CAACL,cAAc,EAAE,CAAC,CAAC;QACrC;QAEA,OAAO;UACL,GAAG7H,KAAK;UACRE,MAAM,EAAE+H,SAAS;UACjB3H,KAAK,EAAE2H,SAAS,CAAC7H,MAAM,GAAG,CAAC;UAC3B+H,eAAe,EAAE3I,SAAS,KAAK;QACjC,CAAC;MACH;IACF;IACA,OAAOkI,sBAAsB,CAACE,MAAM,EAAsB5H,KAAK,CAAC;EAClE,CAAC;EACD;EACA,OAAO,IAAAoI,gCAAe,EAAChD,SAAS,EAAEoC,MAAM,EAAED,WAAW,CAAC;AACxD;AAAC,eAEcF,oBAAoB;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js new file mode 100644 index 00000000..33932bd2 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * + * @format + */ +/* eslint-disable */ +var _default = (0, _codegenNativeComponent.default)('RNSFullWindowOverlay', {}); +exports.default = _default; +//# sourceMappingURL=FullWindowOverlayNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map new file mode 100644 index 00000000..396747a5 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["codegenNativeComponent"],"sources":["FullWindowOverlayNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent(\n 'RNSFullWindowOverlay',\n {}\n): ComponentType);\n"],"mappings":";;;;;;AAKA;AAA6F;AAL7F;AACA;AACA;AACA;AACA;AAAA,eAWgB,IAAAA,+BAAsB,EACpC,sBAAsB,EACtB,CAAC,CAAC,CACH;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenContainerNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenContainerNativeComponent.js new file mode 100644 index 00000000..7ca4da63 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenContainerNativeComponent.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * + * @format + */ +/* eslint-disable */ +var _default = (0, _codegenNativeComponent.default)('RNSScreenContainer', {}); +exports.default = _default; +//# sourceMappingURL=ScreenContainerNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenContainerNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenContainerNativeComponent.js.map new file mode 100644 index 00000000..cb30bb25 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenContainerNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["codegenNativeComponent"],"sources":["ScreenContainerNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent(\n 'RNSScreenContainer',\n {}\n): ComponentType);\n"],"mappings":";;;;;;AAKA;AAA6F;AAL7F;AACA;AACA;AACA;AACA;AAAA,eAWgB,IAAAA,+BAAsB,EACpC,oBAAoB,EACpB,CAAC,CAAC,CACH;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNativeComponent.js new file mode 100644 index 00000000..a5de9dd2 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNativeComponent.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * + * @format + */ +/* eslint-disable */ +var _default = (0, _codegenNativeComponent.default)('RNSScreen', { + interfaceOnly: true +}); +exports.default = _default; +//# sourceMappingURL=ScreenNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNativeComponent.js.map new file mode 100644 index 00000000..d8f0ad8d --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["codegenNativeComponent","interfaceOnly"],"sources":["ScreenNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\nimport type { ColorValue } from 'react-native/Libraries/StyleSheet/StyleSheet';\nimport type {\n BubblingEventHandler,\n WithDefault,\n Int32,\n} from 'react-native/Libraries/Types/CodegenTypes';\n\ntype ScreenEvent = $ReadOnly<{||}>;\n\ntype ScreenDismissedEvent = $ReadOnly<{|\n dismissCount: Int32,\n|}>;\n\ntype TransitionProgressEvent = $ReadOnly<{|\n progress: Double,\n closing: Int32,\n goingForward: Int32,\n|}>;\n\ntype GestureResponseDistanceType = $ReadOnly<{|\n start: Float,\n end: Float,\n top: Float,\n bottom: Float,\n|}>;\n\ntype StackPresentation =\n | 'push'\n | 'modal'\n | 'transparentModal'\n | 'fullScreenModal'\n | 'formSheet'\n | 'containedModal'\n | 'containedTransparentModal';\n\ntype StackAnimation =\n | 'default'\n | 'flip'\n | 'simple_push'\n | 'none'\n | 'fade'\n | 'slide_from_right'\n | 'slide_from_left'\n | 'slide_from_bottom'\n | 'fade_from_bottom';\n\ntype SwipeDirection = 'vertical' | 'horizontal';\n\ntype ReplaceAnimation = 'pop' | 'push';\n\ntype SheetDetentTypes = 'large' | 'medium' | 'all';\n\nexport type NativeProps = $ReadOnly<{|\n ...ViewProps,\n onAppear?: ?BubblingEventHandler,\n onDisappear?: ?BubblingEventHandler,\n onDismissed?: ?BubblingEventHandler,\n onNativeDismissCancelled?: ?BubblingEventHandler,\n onWillAppear?: ?BubblingEventHandler,\n onWillDisappear?: ?BubblingEventHandler,\n onTransitionProgress?: ?BubblingEventHandler,\n sheetAllowedDetents?: WithDefault,\n sheetLargestUndimmedDetent?: WithDefault,\n sheetGrabberVisible?: WithDefault,\n sheetCornerRadius?: WithDefault,\n sheetExpandsWhenScrolledToEdge?: WithDefault,\n customAnimationOnSwipe?: boolean,\n fullScreenSwipeEnabled?: boolean,\n homeIndicatorHidden?: boolean,\n preventNativeDismiss?: boolean,\n gestureEnabled?: WithDefault,\n statusBarColor?: ColorValue,\n statusBarHidden?: boolean,\n screenOrientation?: string,\n statusBarAnimation?: string,\n statusBarStyle?: string,\n statusBarTranslucent?: boolean,\n gestureResponseDistance?: GestureResponseDistanceType,\n stackPresentation?: WithDefault,\n stackAnimation?: WithDefault,\n transitionDuration?: WithDefault,\n replaceAnimation?: WithDefault,\n swipeDirection?: WithDefault,\n hideKeyboardOnSwipe?: boolean,\n activityState?: WithDefault,\n navigationBarColor?: ColorValue,\n navigationBarHidden?: boolean,\n nativeBackButtonDismissalEnabled?: boolean,\n onHeaderBackButtonClicked?: ?BubblingEventHandler,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent('RNSScreen', {\n interfaceOnly: true,\n}): ComponentType);\n"],"mappings":";;;;;;AAKA;AAA6F;AAL7F;AACA;AACA;AACA;AACA;AAAA,eAiGgB,IAAAA,+BAAsB,EAAc,WAAW,EAAE;EAC/DC,aAAa,EAAE;AACjB,CAAC,CAAC;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js new file mode 100644 index 00000000..1d0ebe44 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * + * @format + */ +/* eslint-disable */ +var _default = (0, _codegenNativeComponent.default)('RNSScreenNavigationContainer', {}); +exports.default = _default; +//# sourceMappingURL=ScreenNavigationContainerNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map new file mode 100644 index 00000000..52cebb97 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["codegenNativeComponent"],"sources":["ScreenNavigationContainerNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent(\n 'RNSScreenNavigationContainer',\n {}\n): ComponentType);\n"],"mappings":";;;;;;AAKA;AAA6F;AAL7F;AACA;AACA;AACA;AACA;AAAA,eAWgB,IAAAA,+BAAsB,EACpC,8BAA8B,EAC9B,CAAC,CAAC,CACH;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js new file mode 100644 index 00000000..41650e56 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * + * @format + */ +/* eslint-disable */ +var _default = (0, _codegenNativeComponent.default)('RNSScreenStackHeaderConfig', {}); +exports.default = _default; +//# sourceMappingURL=ScreenStackHeaderConfigNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map new file mode 100644 index 00000000..1e1a152a --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["codegenNativeComponent"],"sources":["ScreenStackHeaderConfigNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport * as React from 'react';\n\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\nimport type { ColorValue } from 'react-native/Libraries/StyleSheet/StyleSheet';\nimport type {\n Int32,\n WithDefault,\n} from 'react-native/Libraries/Types/CodegenTypes';\n\ntype DirectionType = 'rtl' | 'ltr';\n\nexport type NativeProps = $ReadOnly<{|\n ...ViewProps,\n backgroundColor?: ColorValue,\n backTitle?: string,\n backTitleFontFamily?: string,\n backTitleFontSize?: Int32,\n color?: ColorValue,\n direction?: WithDefault,\n hidden?: boolean,\n hideShadow?: boolean,\n largeTitle?: boolean,\n largeTitleFontFamily?: string,\n largeTitleFontSize?: Int32,\n largeTitleFontWeight?: string,\n largeTitleBackgroundColor?: ColorValue,\n largeTitleHideShadow?: boolean,\n largeTitleColor?: ColorValue,\n translucent?: boolean,\n title?: string,\n titleFontFamily?: string,\n titleFontSize?: Int32,\n titleFontWeight?: string,\n titleColor?: ColorValue,\n disableBackButtonMenu?: boolean,\n hideBackButton?: boolean,\n backButtonInCustomView?: boolean,\n // TODO: implement this props on iOS\n topInsetEnabled?: boolean,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent(\n 'RNSScreenStackHeaderConfig',\n {}\n): ComponentType);\n"],"mappings":";;;;;;AAKA;AAEA;AAA6F;AAAA;AAAA;AAP7F;AACA;AACA;AACA;AACA;AAAA,eA8CgB,IAAAA,+BAAsB,EACpC,4BAA4B,EAC5B,CAAC,CAAC,CACH;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js new file mode 100644 index 00000000..af319fda --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/** + * + * @format + */ +/* eslint-disable */ +var _default = (0, _codegenNativeComponent.default)('RNSScreenStackHeaderSubview', {}); +exports.default = _default; +//# sourceMappingURL=ScreenStackHeaderSubviewNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map new file mode 100644 index 00000000..42d61b25 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["codegenNativeComponent"],"sources":["ScreenStackHeaderSubviewNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport * as React from 'react';\n\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\nimport type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';\n\nexport type HeaderSubviewTypes =\n | 'back'\n | 'right'\n | 'left'\n | 'title'\n | 'center'\n | 'searchBar';\n\nexport type NativeProps = $ReadOnly<{|\n ...ViewProps,\n type?: WithDefault,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent(\n 'RNSScreenStackHeaderSubview',\n {}\n): ComponentType);\n"],"mappings":";;;;;;AAKA;AAEA;AAA6F;AAAA;AAAA;AAP7F;AACA;AACA;AACA;AACA;AAAA,eAuBgB,IAAAA,+BAAsB,EACpC,6BAA6B,EAC7B,CAAC,CAAC,CACH;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackNativeComponent.js new file mode 100644 index 00000000..1c16957b --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackNativeComponent.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * + * @format + */ +/* eslint-disable */ +var _default = (0, _codegenNativeComponent.default)('RNSScreenStack', {}); +exports.default = _default; +//# sourceMappingURL=ScreenStackNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackNativeComponent.js.map new file mode 100644 index 00000000..10f615ef --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/ScreenStackNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["codegenNativeComponent"],"sources":["ScreenStackNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\nimport type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';\n\ntype FinishTransitioningEvent = $ReadOnly<{||}>;\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n onFinishTransitioning?: ?DirectEventHandler,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent(\n 'RNSScreenStack',\n {}\n): ComponentType);\n"],"mappings":";;;;;;AAKA;AAA6F;AAL7F;AACA;AACA;AACA;AACA;AAAA,eAegB,IAAAA,+BAAsB,EACpC,gBAAgB,EAChB,CAAC,CAAC,CACH;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/SearchBarNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/SearchBarNativeComponent.js new file mode 100644 index 00000000..e8cf5467 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/SearchBarNativeComponent.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent")); +var _StyleSheet = require("react-native/Libraries/StyleSheet/StyleSheet"); +var _ReactNativeStyleAttributes = require("react-native/Libraries/Components/View/ReactNativeStyleAttributes"); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * + * @format + */ +/* eslint-disable */ +var _default = (0, _codegenNativeComponent.default)('RNSSearchBar', {}); +exports.default = _default; +//# sourceMappingURL=SearchBarNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/SearchBarNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/SearchBarNativeComponent.js.map new file mode 100644 index 00000000..ea8d395b --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/fabric/SearchBarNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["codegenNativeComponent"],"sources":["SearchBarNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\nimport { ColorValue } from 'react-native/Libraries/StyleSheet/StyleSheet';\nimport type {\n WithDefault,\n BubblingEventHandler,\n} from 'react-native/Libraries/Types/CodegenTypes';\nimport { tintColor } from 'react-native/Libraries/Components/View/ReactNativeStyleAttributes';\n\ntype SearchBarEvent = $ReadOnly<{||}>;\n\ntype SearchButtonPressedEvent = $ReadOnly<{|\n text?: string,\n|}>;\n\ntype ChangeTextEvent = $ReadOnly<{|\n text?: string,\n|}>;\n\ntype AutoCapitalizeType = 'none' | 'words' | 'sentences' | 'characters';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n onFocus?: ?BubblingEventHandler,\n onBlur?: ?BubblingEventHandler,\n onSearchButtonPress?: ?BubblingEventHandler,\n onCancelButtonPress?: ?BubblingEventHandler,\n onChangeText?: ?BubblingEventHandler,\n hideWhenScrolling?: boolean,\n autoCapitalize?: WithDefault,\n placeholder?: string,\n obscureBackground?: boolean,\n hideNavigationBar?: boolean,\n cancelButtonText?: string,\n // TODO: implement these on iOS\n barTintColor?: ColorValue,\n tintColor?: ColorValue,\n textColor?: ColorValue,\n\n // Android only\n disableBackButtonOverride?: boolean,\n // TODO: consider creating enum here\n inputType?: string,\n onClose?: ?BubblingEventHandler,\n onOpen?: ?BubblingEventHandler,\n hintTextColor?: ColorValue,\n headerIconColor?: ColorValue,\n shouldShowHintSearchIcon?: WithDefault,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent(\n 'RNSSearchBar',\n {}\n): ComponentType);\n"],"mappings":";;;;;;AAKA;AAGA;AAKA;AAA8F;AAb9F;AACA;AACA;AACA;AACA;AAAA,eAsDgB,IAAAA,+BAAsB,EACpC,cAAc,EACd,CAAC,CAAC,CACH;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/index.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/index.js new file mode 100644 index 00000000..298bb211 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/index.js @@ -0,0 +1,154 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _exportNames = { + enableScreens: true, + screensEnabled: true, + enableFreeze: true, + NativeScreen: true, + Screen: true, + InnerScreen: true, + ScreenContext: true, + ScreenContainer: true, + NativeScreenContainer: true, + NativeScreenNavigationContainer: true, + ScreenStack: true, + FullWindowOverlay: true, + ScreenStackHeaderBackButtonImage: true, + ScreenStackHeaderRightView: true, + ScreenStackHeaderLeftView: true, + ScreenStackHeaderCenterView: true, + ScreenStackHeaderSearchBarView: true, + ScreenStackHeaderConfig: true, + SearchBar: true, + ScreenStackHeaderSubview: true, + shouldUseActivityState: true, + useTransitionProgress: true, + isSearchBarAvailableForCurrentPlatform: true, + executeNativeBackPress: true +}; +exports.SearchBar = exports.ScreenStackHeaderSubview = exports.ScreenStackHeaderSearchBarView = exports.ScreenStackHeaderRightView = exports.ScreenStackHeaderLeftView = exports.ScreenStackHeaderConfig = exports.ScreenStackHeaderCenterView = exports.ScreenStackHeaderBackButtonImage = exports.ScreenStack = exports.ScreenContext = exports.ScreenContainer = exports.Screen = exports.NativeScreenNavigationContainer = exports.NativeScreenContainer = exports.NativeScreen = exports.InnerScreen = exports.FullWindowOverlay = void 0; +exports.enableFreeze = enableFreeze; +exports.enableScreens = enableScreens; +Object.defineProperty(exports, "executeNativeBackPress", { + enumerable: true, + get: function () { + return _utils.executeNativeBackPress; + } +}); +Object.defineProperty(exports, "isSearchBarAvailableForCurrentPlatform", { + enumerable: true, + get: function () { + return _utils.isSearchBarAvailableForCurrentPlatform; + } +}); +exports.screensEnabled = screensEnabled; +exports.shouldUseActivityState = void 0; +Object.defineProperty(exports, "useTransitionProgress", { + enumerable: true, + get: function () { + return _useTransitionProgress.default; + } +}); +var _react = _interopRequireDefault(require("react")); +var _reactNative = require("react-native"); +var _types = require("./types"); +Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _types[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _types[key]; + } + }); +}); +var _useTransitionProgress = _interopRequireDefault(require("./useTransitionProgress")); +var _utils = require("./utils"); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +let ENABLE_SCREENS = true; +function enableScreens() { + let shouldEnableScreens = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + ENABLE_SCREENS = shouldEnableScreens; +} +function screensEnabled() { + return ENABLE_SCREENS; +} + +// @ts-ignore function stub, freezing logic is located in index.native.tsx +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function enableFreeze() { + let shouldEnableReactFreeze = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; +} // noop + +class NativeScreen extends _react.default.Component { + render() { + let { + active, + activityState, + style, + enabled = ENABLE_SCREENS, + ...rest + } = this.props; + if (enabled) { + if (active !== undefined && activityState === undefined) { + activityState = active !== 0 ? 2 : 0; // change taken from index.native.tsx + } + + return /*#__PURE__*/_react.default.createElement(_reactNative.View + // @ts-expect-error: hidden exists on web, but not in React Native + , _extends({ + hidden: activityState === 0, + style: [style, { + display: activityState !== 0 ? 'flex' : 'none' + }] + }, rest)); + } + return /*#__PURE__*/_react.default.createElement(_reactNative.View, rest); + } +} +exports.NativeScreen = NativeScreen; +const Screen = _reactNative.Animated.createAnimatedComponent(NativeScreen); +exports.Screen = Screen; +const InnerScreen = _reactNative.View; +exports.InnerScreen = InnerScreen; +const ScreenContext = /*#__PURE__*/_react.default.createContext(Screen); +exports.ScreenContext = ScreenContext; +const ScreenContainer = _reactNative.View; +exports.ScreenContainer = ScreenContainer; +const NativeScreenContainer = _reactNative.View; +exports.NativeScreenContainer = NativeScreenContainer; +const NativeScreenNavigationContainer = _reactNative.View; +exports.NativeScreenNavigationContainer = NativeScreenNavigationContainer; +const ScreenStack = _reactNative.View; +exports.ScreenStack = ScreenStack; +const FullWindowOverlay = _reactNative.View; +exports.FullWindowOverlay = FullWindowOverlay; +const ScreenStackHeaderBackButtonImage = props => /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.Image, _extends({ + resizeMode: "center", + fadeDuration: 0 +}, props))); +exports.ScreenStackHeaderBackButtonImage = ScreenStackHeaderBackButtonImage; +const ScreenStackHeaderRightView = props => /*#__PURE__*/_react.default.createElement(_reactNative.View, props); +exports.ScreenStackHeaderRightView = ScreenStackHeaderRightView; +const ScreenStackHeaderLeftView = props => /*#__PURE__*/_react.default.createElement(_reactNative.View, props); +exports.ScreenStackHeaderLeftView = ScreenStackHeaderLeftView; +const ScreenStackHeaderCenterView = props => /*#__PURE__*/_react.default.createElement(_reactNative.View, props); +exports.ScreenStackHeaderCenterView = ScreenStackHeaderCenterView; +const ScreenStackHeaderSearchBarView = props => /*#__PURE__*/_react.default.createElement(_reactNative.View, props); +exports.ScreenStackHeaderSearchBarView = ScreenStackHeaderSearchBarView; +const ScreenStackHeaderConfig = _reactNative.View; + +// @ts-expect-error: search bar props have no common props with View +exports.ScreenStackHeaderConfig = ScreenStackHeaderConfig; +const SearchBar = _reactNative.View; +exports.SearchBar = SearchBar; +const ScreenStackHeaderSubview = _reactNative.View; +exports.ScreenStackHeaderSubview = ScreenStackHeaderSubview; +const shouldUseActivityState = true; +exports.shouldUseActivityState = shouldUseActivityState; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/index.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/index.js.map new file mode 100644 index 00000000..a3bdc831 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["ENABLE_SCREENS","enableScreens","shouldEnableScreens","screensEnabled","enableFreeze","shouldEnableReactFreeze","NativeScreen","React","Component","render","active","activityState","style","enabled","rest","props","undefined","display","Screen","Animated","createAnimatedComponent","InnerScreen","View","ScreenContext","createContext","ScreenContainer","NativeScreenContainer","NativeScreenNavigationContainer","ScreenStack","FullWindowOverlay","ScreenStackHeaderBackButtonImage","ScreenStackHeaderRightView","ScreenStackHeaderLeftView","ScreenStackHeaderCenterView","ScreenStackHeaderSearchBarView","ScreenStackHeaderConfig","SearchBar","ScreenStackHeaderSubview","shouldUseActivityState"],"sources":["index.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Animated, View, ViewProps, ImageProps, Image } from 'react-native';\nimport {\n ScreenProps,\n ScreenContainerProps,\n ScreenStackProps,\n ScreenStackHeaderConfigProps,\n HeaderSubviewTypes,\n SearchBarProps,\n} from './types';\n\nexport * from './types';\nexport { default as useTransitionProgress } from './useTransitionProgress';\nexport {\n isSearchBarAvailableForCurrentPlatform,\n executeNativeBackPress,\n} from './utils';\n\nlet ENABLE_SCREENS = true;\n\nexport function enableScreens(shouldEnableScreens = true): void {\n ENABLE_SCREENS = shouldEnableScreens;\n}\n\nexport function screensEnabled(): boolean {\n return ENABLE_SCREENS;\n}\n\n// @ts-ignore function stub, freezing logic is located in index.native.tsx\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function enableFreeze(shouldEnableReactFreeze = true): void {\n // noop\n}\n\nexport class NativeScreen extends React.Component {\n render(): JSX.Element {\n let {\n active,\n activityState,\n style,\n enabled = ENABLE_SCREENS,\n ...rest\n } = this.props;\n\n if (enabled) {\n if (active !== undefined && activityState === undefined) {\n activityState = active !== 0 ? 2 : 0; // change taken from index.native.tsx\n }\n return (\n \n );\n}\n"],"mappings":";;;;;;AAAA;AAC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ChB,yBAAyB,KAAKa,SAAS,gBACrC,oBAAC,kDAA8B,qBAC7B,oBAAC,6BAAS,EAAKb,yBAAyB,CAAI,CACb,GAC/B,IAAI,CACgB;AAE9B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/views/NativeStackView.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/views/NativeStackView.js new file mode 100644 index 00000000..81f61e93 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/views/NativeStackView.js @@ -0,0 +1,275 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = NativeStackView; +var React = _interopRequireWildcard(require("react")); +var _reactNative = require("react-native"); +var _AppContainer = _interopRequireDefault(require("react-native/Libraries/ReactNative/AppContainer")); +var _warnOnce = _interopRequireDefault(require("warn-once")); +var _reactNativeScreens = require("react-native-screens"); +var _native = require("@react-navigation/native"); +var _reactNativeSafeAreaContext = require("react-native-safe-area-context"); +var _HeaderConfig = _interopRequireDefault(require("./HeaderConfig")); +var _SafeAreaProviderCompat = _interopRequireDefault(require("../utils/SafeAreaProviderCompat")); +var _getDefaultHeaderHeight = _interopRequireDefault(require("../utils/getDefaultHeaderHeight")); +var _HeaderHeightContext = _interopRequireDefault(require("../utils/HeaderHeightContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +const isAndroid = _reactNative.Platform.OS === 'android'; +let Container = _reactNative.View; +if (__DEV__) { + const DebugContainer = props => { + const { + stackPresentation, + ...rest + } = props; + if (_reactNative.Platform.OS === 'ios' && stackPresentation !== 'push') { + return /*#__PURE__*/React.createElement(_AppContainer.default, null, /*#__PURE__*/React.createElement(_reactNative.View, rest)); + } + return /*#__PURE__*/React.createElement(_reactNative.View, rest); + }; + // @ts-ignore Wrong props + Container = DebugContainer; +} +const MaybeNestedStack = _ref => { + let { + options, + route, + stackPresentation, + children + } = _ref; + const { + colors + } = (0, _native.useTheme)(); + const { + headerShown = true, + contentStyle + } = options; + const Screen = React.useContext(_reactNativeScreens.ScreenContext); + const isHeaderInModal = isAndroid ? false : stackPresentation !== 'push' && headerShown === true; + const headerShownPreviousRef = React.useRef(headerShown); + React.useEffect(() => { + (0, _warnOnce.default)(!isAndroid && stackPresentation !== 'push' && headerShownPreviousRef.current !== headerShown, `Dynamically changing 'headerShown' in modals will result in remounting the screen and losing all local state. See options for the screen '${route.name}'.`); + headerShownPreviousRef.current = headerShown; + }, [headerShown, stackPresentation, route.name]); + const content = /*#__PURE__*/React.createElement(Container, { + style: [styles.container, stackPresentation !== 'transparentModal' && stackPresentation !== 'containedTransparentModal' && { + backgroundColor: colors.background + }, contentStyle] + // @ts-ignore Wrong props passed to View + , + stackPresentation: stackPresentation + }, children); + const topInset = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)().top; + const dimensions = (0, _reactNativeSafeAreaContext.useSafeAreaFrame)(); + const headerHeight = (0, _getDefaultHeaderHeight.default)(dimensions, topInset, stackPresentation); + if (isHeaderInModal) { + return /*#__PURE__*/React.createElement(_reactNativeScreens.ScreenStack, { + style: styles.container + }, /*#__PURE__*/React.createElement(Screen, { + enabled: true, + isNativeStack: true, + style: _reactNative.StyleSheet.absoluteFill + }, /*#__PURE__*/React.createElement(_HeaderHeightContext.default.Provider, { + value: headerHeight + }, /*#__PURE__*/React.createElement(_HeaderConfig.default, _extends({}, options, { + route: route + })), content))); + } + return content; +}; +const RouteView = _ref2 => { + let { + descriptors, + route, + index, + navigation, + stateKey + } = _ref2; + const { + options, + render: renderScene + } = descriptors[route.key]; + const { + gestureEnabled, + headerShown, + hideKeyboardOnSwipe, + homeIndicatorHidden, + nativeBackButtonDismissalEnabled = false, + navigationBarColor, + navigationBarHidden, + replaceAnimation = 'pop', + screenOrientation, + statusBarAnimation, + statusBarColor, + statusBarHidden, + statusBarStyle, + statusBarTranslucent, + swipeDirection = 'horizontal', + transitionDuration, + freezeOnBlur + } = options; + let { + customAnimationOnSwipe, + fullScreenSwipeEnabled, + gestureResponseDistance, + stackAnimation, + stackPresentation = 'push' + } = options; + if (swipeDirection === 'vertical') { + // for `vertical` direction to work, we need to set `fullScreenSwipeEnabled` to `true` + // so the screen can be dismissed from any point on screen. + // `customAnimationOnSwipe` needs to be set to `true` so the `stackAnimation` set by user can be used, + // otherwise `simple_push` will be used. + // Also, the default animation for this direction seems to be `slide_from_bottom`. + if (fullScreenSwipeEnabled === undefined) { + fullScreenSwipeEnabled = true; + } + if (customAnimationOnSwipe === undefined) { + customAnimationOnSwipe = true; + } + if (stackAnimation === undefined) { + stackAnimation = 'slide_from_bottom'; + } + } + if (index === 0) { + // first screen should always be treated as `push`, it resolves problems with no header animation + // for navigator with first screen as `modal` and the next as `push` + stackPresentation = 'push'; + } + const isHeaderInPush = isAndroid ? headerShown : stackPresentation === 'push' && headerShown !== false; + const dimensions = (0, _reactNativeSafeAreaContext.useSafeAreaFrame)(); + const topInset = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)().top; + const headerHeight = (0, _getDefaultHeaderHeight.default)(dimensions, topInset, stackPresentation); + const parentHeaderHeight = React.useContext(_HeaderHeightContext.default); + const Screen = React.useContext(_reactNativeScreens.ScreenContext); + return /*#__PURE__*/React.createElement(Screen, { + key: route.key, + enabled: true, + isNativeStack: true, + style: _reactNative.StyleSheet.absoluteFill, + customAnimationOnSwipe: customAnimationOnSwipe, + freezeOnBlur: freezeOnBlur, + fullScreenSwipeEnabled: fullScreenSwipeEnabled, + hideKeyboardOnSwipe: hideKeyboardOnSwipe, + homeIndicatorHidden: homeIndicatorHidden, + gestureEnabled: isAndroid ? false : gestureEnabled, + gestureResponseDistance: gestureResponseDistance, + nativeBackButtonDismissalEnabled: nativeBackButtonDismissalEnabled, + navigationBarColor: navigationBarColor, + navigationBarHidden: navigationBarHidden, + replaceAnimation: replaceAnimation, + screenOrientation: screenOrientation, + stackAnimation: stackAnimation, + stackPresentation: stackPresentation, + statusBarAnimation: statusBarAnimation, + statusBarColor: statusBarColor, + statusBarHidden: statusBarHidden, + statusBarStyle: statusBarStyle, + statusBarTranslucent: statusBarTranslucent, + swipeDirection: swipeDirection, + transitionDuration: transitionDuration, + onHeaderBackButtonClicked: () => { + navigation.dispatch({ + ..._native.StackActions.pop(), + source: route.key, + target: stateKey + }); + }, + onWillAppear: () => { + navigation.emit({ + type: 'transitionStart', + data: { + closing: false + }, + target: route.key + }); + }, + onWillDisappear: () => { + navigation.emit({ + type: 'transitionStart', + data: { + closing: true + }, + target: route.key + }); + }, + onAppear: () => { + navigation.emit({ + type: 'appear', + target: route.key + }); + navigation.emit({ + type: 'transitionEnd', + data: { + closing: false + }, + target: route.key + }); + }, + onDisappear: () => { + navigation.emit({ + type: 'transitionEnd', + data: { + closing: true + }, + target: route.key + }); + }, + onDismissed: e => { + navigation.emit({ + type: 'dismiss', + target: route.key + }); + const dismissCount = e.nativeEvent.dismissCount > 0 ? e.nativeEvent.dismissCount : 1; + navigation.dispatch({ + ..._native.StackActions.pop(dismissCount), + source: route.key, + target: stateKey + }); + } + }, /*#__PURE__*/React.createElement(_HeaderHeightContext.default.Provider, { + value: isHeaderInPush !== false ? headerHeight : parentHeaderHeight !== null && parentHeaderHeight !== void 0 ? parentHeaderHeight : 0 + }, /*#__PURE__*/React.createElement(_HeaderConfig.default, _extends({}, options, { + route: route, + headerShown: isHeaderInPush + })), /*#__PURE__*/React.createElement(MaybeNestedStack, { + options: options, + route: route, + stackPresentation: stackPresentation + }, renderScene()))); +}; +function NativeStackViewInner(_ref3) { + let { + state, + navigation, + descriptors + } = _ref3; + const { + key, + routes + } = state; + return /*#__PURE__*/React.createElement(_reactNativeScreens.ScreenStack, { + style: styles.container + }, routes.map((route, index) => /*#__PURE__*/React.createElement(RouteView, { + key: route.key, + descriptors: descriptors, + route: route, + index: index, + navigation: navigation, + stateKey: key + }))); +} +function NativeStackView(props) { + return /*#__PURE__*/React.createElement(_SafeAreaProviderCompat.default, null, /*#__PURE__*/React.createElement(NativeStackViewInner, props)); +} +const styles = _reactNative.StyleSheet.create({ + container: { + flex: 1 + } +}); +//# sourceMappingURL=NativeStackView.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/views/NativeStackView.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/views/NativeStackView.js.map new file mode 100644 index 00000000..1c2d946e --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/native-stack/views/NativeStackView.js.map @@ -0,0 +1 @@ +{"version":3,"names":["isAndroid","Platform","OS","Container","View","__DEV__","DebugContainer","props","stackPresentation","rest","MaybeNestedStack","options","route","children","colors","useTheme","headerShown","contentStyle","Screen","React","useContext","ScreenContext","isHeaderInModal","headerShownPreviousRef","useRef","useEffect","warnOnce","current","name","content","styles","container","backgroundColor","background","topInset","useSafeAreaInsets","top","dimensions","useSafeAreaFrame","headerHeight","getDefaultHeaderHeight","StyleSheet","absoluteFill","RouteView","descriptors","index","navigation","stateKey","render","renderScene","key","gestureEnabled","hideKeyboardOnSwipe","homeIndicatorHidden","nativeBackButtonDismissalEnabled","navigationBarColor","navigationBarHidden","replaceAnimation","screenOrientation","statusBarAnimation","statusBarColor","statusBarHidden","statusBarStyle","statusBarTranslucent","swipeDirection","transitionDuration","freezeOnBlur","customAnimationOnSwipe","fullScreenSwipeEnabled","gestureResponseDistance","stackAnimation","undefined","isHeaderInPush","parentHeaderHeight","HeaderHeightContext","dispatch","StackActions","pop","source","target","emit","type","data","closing","e","dismissCount","nativeEvent","NativeStackViewInner","state","routes","map","NativeStackView","create","flex"],"sources":["NativeStackView.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Platform, StyleSheet, View, ViewProps } from 'react-native';\n// @ts-ignore Getting private component\nimport AppContainer from 'react-native/Libraries/ReactNative/AppContainer';\nimport warnOnce from 'warn-once';\nimport {\n ScreenStack,\n StackPresentationTypes,\n ScreenContext,\n} from 'react-native-screens';\nimport {\n ParamListBase,\n StackActions,\n StackNavigationState,\n useTheme,\n Route,\n NavigationState,\n PartialState,\n} from '@react-navigation/native';\nimport {\n useSafeAreaFrame,\n useSafeAreaInsets,\n} from 'react-native-safe-area-context';\n\nimport {\n NativeStackDescriptorMap,\n NativeStackNavigationHelpers,\n NativeStackNavigationOptions,\n} from '../types';\nimport HeaderConfig from './HeaderConfig';\nimport SafeAreaProviderCompat from '../utils/SafeAreaProviderCompat';\nimport getDefaultHeaderHeight from '../utils/getDefaultHeaderHeight';\nimport HeaderHeightContext from '../utils/HeaderHeightContext';\n\nconst isAndroid = Platform.OS === 'android';\n\nlet Container = View;\n\nif (__DEV__) {\n const DebugContainer = (\n props: ViewProps & { stackPresentation: StackPresentationTypes }\n ) => {\n const { stackPresentation, ...rest } = props;\n if (Platform.OS === 'ios' && stackPresentation !== 'push') {\n return (\n \n \n \n );\n }\n return ;\n };\n // @ts-ignore Wrong props\n Container = DebugContainer;\n}\n\nconst MaybeNestedStack = ({\n options,\n route,\n stackPresentation,\n children,\n}: {\n options: NativeStackNavigationOptions;\n route: Route;\n stackPresentation: StackPresentationTypes;\n children: React.ReactNode;\n}) => {\n const { colors } = useTheme();\n const { headerShown = true, contentStyle } = options;\n\n const Screen = React.useContext(ScreenContext);\n\n const isHeaderInModal = isAndroid\n ? false\n : stackPresentation !== 'push' && headerShown === true;\n\n const headerShownPreviousRef = React.useRef(headerShown);\n\n React.useEffect(() => {\n warnOnce(\n !isAndroid &&\n stackPresentation !== 'push' &&\n headerShownPreviousRef.current !== headerShown,\n `Dynamically changing 'headerShown' in modals will result in remounting the screen and losing all local state. See options for the screen '${route.name}'.`\n );\n\n headerShownPreviousRef.current = headerShown;\n }, [headerShown, stackPresentation, route.name]);\n\n const content = (\n \n {children}\n \n );\n\n const topInset = useSafeAreaInsets().top;\n const dimensions = useSafeAreaFrame();\n const headerHeight = getDefaultHeaderHeight(\n dimensions,\n topInset,\n stackPresentation\n );\n\n if (isHeaderInModal) {\n return (\n \n \n \n \n {content}\n \n \n \n );\n }\n\n return content;\n};\n\ntype NavigationRoute<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList\n> = Route, ParamList[RouteName]> & {\n state?: NavigationState | PartialState;\n};\n\nconst RouteView = ({\n descriptors,\n route,\n index,\n navigation,\n stateKey,\n}: {\n descriptors: NativeStackDescriptorMap;\n route: NavigationRoute;\n index: number;\n navigation: NativeStackNavigationHelpers;\n stateKey: string;\n}) => {\n const { options, render: renderScene } = descriptors[route.key];\n const {\n gestureEnabled,\n headerShown,\n hideKeyboardOnSwipe,\n homeIndicatorHidden,\n nativeBackButtonDismissalEnabled = false,\n navigationBarColor,\n navigationBarHidden,\n replaceAnimation = 'pop',\n screenOrientation,\n statusBarAnimation,\n statusBarColor,\n statusBarHidden,\n statusBarStyle,\n statusBarTranslucent,\n swipeDirection = 'horizontal',\n transitionDuration,\n freezeOnBlur,\n } = options;\n\n let {\n customAnimationOnSwipe,\n fullScreenSwipeEnabled,\n gestureResponseDistance,\n stackAnimation,\n stackPresentation = 'push',\n } = options;\n\n if (swipeDirection === 'vertical') {\n // for `vertical` direction to work, we need to set `fullScreenSwipeEnabled` to `true`\n // so the screen can be dismissed from any point on screen.\n // `customAnimationOnSwipe` needs to be set to `true` so the `stackAnimation` set by user can be used,\n // otherwise `simple_push` will be used.\n // Also, the default animation for this direction seems to be `slide_from_bottom`.\n if (fullScreenSwipeEnabled === undefined) {\n fullScreenSwipeEnabled = true;\n }\n if (customAnimationOnSwipe === undefined) {\n customAnimationOnSwipe = true;\n }\n if (stackAnimation === undefined) {\n stackAnimation = 'slide_from_bottom';\n }\n }\n\n if (index === 0) {\n // first screen should always be treated as `push`, it resolves problems with no header animation\n // for navigator with first screen as `modal` and the next as `push`\n stackPresentation = 'push';\n }\n\n const isHeaderInPush = isAndroid\n ? headerShown\n : stackPresentation === 'push' && headerShown !== false;\n\n const dimensions = useSafeAreaFrame();\n const topInset = useSafeAreaInsets().top;\n const headerHeight = getDefaultHeaderHeight(\n dimensions,\n topInset,\n stackPresentation\n );\n const parentHeaderHeight = React.useContext(HeaderHeightContext);\n const Screen = React.useContext(ScreenContext);\n\n return (\n {\n navigation.dispatch({\n ...StackActions.pop(),\n source: route.key,\n target: stateKey,\n });\n }}\n onWillAppear={() => {\n navigation.emit({\n type: 'transitionStart',\n data: { closing: false },\n target: route.key,\n });\n }}\n onWillDisappear={() => {\n navigation.emit({\n type: 'transitionStart',\n data: { closing: true },\n target: route.key,\n });\n }}\n onAppear={() => {\n navigation.emit({\n type: 'appear',\n target: route.key,\n });\n navigation.emit({\n type: 'transitionEnd',\n data: { closing: false },\n target: route.key,\n });\n }}\n onDisappear={() => {\n navigation.emit({\n type: 'transitionEnd',\n data: { closing: true },\n target: route.key,\n });\n }}\n onDismissed={(e) => {\n navigation.emit({\n type: 'dismiss',\n target: route.key,\n });\n\n const dismissCount =\n e.nativeEvent.dismissCount > 0 ? e.nativeEvent.dismissCount : 1;\n\n navigation.dispatch({\n ...StackActions.pop(dismissCount),\n source: route.key,\n target: stateKey,\n });\n }}\n >\n \n \n \n {renderScene()}\n \n \n \n );\n};\n\ntype Props = {\n state: StackNavigationState;\n navigation: NativeStackNavigationHelpers;\n descriptors: NativeStackDescriptorMap;\n};\n\nfunction NativeStackViewInner({\n state,\n navigation,\n descriptors,\n}: Props): JSX.Element {\n const { key, routes } = state;\n\n return (\n \n {routes.map((route, index) => (\n \n ))}\n \n );\n}\n\nexport default function NativeStackView(props: Props) {\n return (\n \n \n \n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AACA;AAKA;AASA;AAUA;AACA;AACA;AACA;AAA+D;AAAA;AAAA;AAAA;AAE/D,MAAMA,SAAS,GAAGC,qBAAQ,CAACC,EAAE,KAAK,SAAS;AAE3C,IAAIC,SAAS,GAAGC,iBAAI;AAEpB,IAAIC,OAAO,EAAE;EACX,MAAMC,cAAc,GAClBC,KAAgE,IAC7D;IACH,MAAM;MAAEC,iBAAiB;MAAE,GAAGC;IAAK,CAAC,GAAGF,KAAK;IAC5C,IAAIN,qBAAQ,CAACC,EAAE,KAAK,KAAK,IAAIM,iBAAiB,KAAK,MAAM,EAAE;MACzD,oBACE,oBAAC,qBAAY,qBACX,oBAAC,iBAAI,EAAKC,IAAI,CAAI,CACL;IAEnB;IACA,oBAAO,oBAAC,iBAAI,EAAKA,IAAI,CAAI;EAC3B,CAAC;EACD;EACAN,SAAS,GAAGG,cAAc;AAC5B;AAEA,MAAMI,gBAAgB,GAAG,QAUnB;EAAA,IAVoB;IACxBC,OAAO;IACPC,KAAK;IACLJ,iBAAiB;IACjBK;EAMF,CAAC;EACC,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,gBAAQ,GAAE;EAC7B,MAAM;IAAEC,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AAoB,EAAKA,KAAK,CAAI,CACZ;AAE7B;AAEA,MAAMuB,MAAM,GAAGW,uBAAU,CAACmD,MAAM,CAAC;EAC/B7D,SAAS,EAAE;IACT8D,IAAI,EAAE;EACR;AACF,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js new file mode 100644 index 00000000..f32ff483 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js @@ -0,0 +1,58 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _react = _interopRequireDefault(require("react")); +var _reactNative = require("react-native"); +var _reactNativeScreens = require("react-native-screens"); +var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated")); +var _ReanimatedTransitionProgressContext = _interopRequireDefault(require("./ReanimatedTransitionProgressContext")); +var _global; +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +const AnimatedScreen = _reactNativeReanimated.default.createAnimatedComponent(_reactNativeScreens.InnerScreen); + +// We use prop added to global by reanimated since it seems safer than the one from RN. See: +// https://github.com/software-mansion/react-native-reanimated/blob/3fe8b35b05e82b2f2aefda1fb97799cf81e4b7bb/src/reanimated2/UpdateProps.ts#L46 +// @ts-expect-error nativeFabricUIManager is not yet included in the RN types +const ENABLE_FABRIC = !!((_global = global) !== null && _global !== void 0 && _global._IS_FABRIC); +const ReanimatedNativeStackScreen = /*#__PURE__*/_react.default.forwardRef((props, ref) => { + const { + children, + ...rest + } = props; + const progress = (0, _reactNativeReanimated.useSharedValue)(0); + const closing = (0, _reactNativeReanimated.useSharedValue)(0); + const goingForward = (0, _reactNativeReanimated.useSharedValue)(0); + return /*#__PURE__*/_react.default.createElement(AnimatedScreen + // @ts-ignore some problems with ref and onTransitionProgressReanimated being "fake" prop for parsing of `useEvent` return value + , _extends({ + ref: ref, + onTransitionProgressReanimated: (0, _reactNativeReanimated.useEvent)(event => { + 'worklet'; + + progress.value = event.progress; + closing.value = event.closing; + goingForward.value = event.goingForward; + }, [ + // This should not be necessary, but is not properly managed by `react-native-reanimated` + // @ts-ignore wrong type + _reactNative.Platform.OS === 'android' ? 'onTransitionProgress' : + // for some reason there is a difference in required event name between architectures + ENABLE_FABRIC ? 'onTransitionProgress' : 'topTransitionProgress']) + }, rest), /*#__PURE__*/_react.default.createElement(_ReanimatedTransitionProgressContext.default.Provider, { + value: { + progress: progress, + closing: closing, + goingForward: goingForward + } + }, children)); +}); +ReanimatedNativeStackScreen.displayName = 'ReanimatedNativeStackScreen'; +var _default = ReanimatedNativeStackScreen; +exports.default = _default; +//# sourceMappingURL=ReanimatedNativeStackScreen.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map new file mode 100644 index 00000000..94a17c5e --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map @@ -0,0 +1 @@ +{"version":3,"names":["AnimatedScreen","Animated","createAnimatedComponent","InnerScreen","ENABLE_FABRIC","global","_IS_FABRIC","ReanimatedNativeStackScreen","React","forwardRef","props","ref","children","rest","progress","useSharedValue","closing","goingForward","useEvent","event","value","Platform","OS","displayName"],"sources":["ReanimatedNativeStackScreen.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\nimport {\n InnerScreen,\n ScreenProps,\n TransitionProgressEventType,\n} from 'react-native-screens';\n\n// @ts-ignore file to be used only if `react-native-reanimated` available in the project\nimport Animated, { useEvent, useSharedValue } from 'react-native-reanimated';\nimport ReanimatedTransitionProgressContext from './ReanimatedTransitionProgressContext';\n\nconst AnimatedScreen = Animated.createAnimatedComponent(\n InnerScreen as unknown as React.ComponentClass\n);\n\n// We use prop added to global by reanimated since it seems safer than the one from RN. See:\n// https://github.com/software-mansion/react-native-reanimated/blob/3fe8b35b05e82b2f2aefda1fb97799cf81e4b7bb/src/reanimated2/UpdateProps.ts#L46\n// @ts-expect-error nativeFabricUIManager is not yet included in the RN types\nconst ENABLE_FABRIC = !!global?._IS_FABRIC;\n\nconst ReanimatedNativeStackScreen = React.forwardRef<\n typeof AnimatedScreen,\n ScreenProps\n>((props, ref) => {\n const { children, ...rest } = props;\n\n const progress = useSharedValue(0);\n const closing = useSharedValue(0);\n const goingForward = useSharedValue(0);\n\n return (\n {\n 'worklet';\n progress.value = event.progress;\n closing.value = event.closing;\n goingForward.value = event.goingForward;\n },\n [\n // This should not be necessary, but is not properly managed by `react-native-reanimated`\n // @ts-ignore wrong type\n Platform.OS === 'android'\n ? 'onTransitionProgress'\n : // for some reason there is a difference in required event name between architectures\n ENABLE_FABRIC\n ? 'onTransitionProgress'\n : 'topTransitionProgress',\n ]\n )}\n {...rest}\n >\n \n {children}\n \n \n );\n});\n\nReanimatedNativeStackScreen.displayName = 'ReanimatedNativeStackScreen';\n\nexport default ReanimatedNativeStackScreen;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAOA;AACA;AAAwF;AAAA;AAAA;AAAA;AAAA;AAExF,MAAMA,cAAc,GAAGC,8BAAQ,CAACC,uBAAuB,CACrDC,+BAAW,CACZ;;AAED;AACA;AACA;AACA,MAAMC,aAAa,GAAG,CAAC,aAACC,MAAM,oCAAN,QAAQC,UAAU;AAE1C,MAAMC,2BAA2B,gBAAGC,cAAK,CAACC,UAAU,CAGlD,CAACC,KAAK,EAAEC,GAAG,KAAK;EAChB,MAAM;IAAEC,QAAQ;IAAE,GAAGC;EAAK,CAAC,GAAGH,KAAK;EAEnC,MAAMI,QAAQ,GAAG,IAAAC,qCAAc,EAAC,CAAC,CAAC;EAClC,MAAMC,OAAO,GAAG,IAAAD,qCAAc,EAAC,CAAC,CAAC;EACjC,MAAME,YAAY,GAAG,IAAAF,qCAAc,EAAC,CAAC,CAAC;EAEtC,oBACE,6BAAC;EACC;EAAA;IACA,GAAG,EAAEJ,GAAI;IACT,8BAA8B,EAAE,IAAAO,+BAAQ,EACrCC,KAAkC,IAAK;MACtC,SAAS;;MACTL,QAAQ,CAACM,KAAK,GAAGD,KAAK,CAACL,QAAQ;MAC/BE,OAAO,CAACI,KAAK,GAAGD,KAAK,CAACH,OAAO;MAC7BC,YAAY,CAACG,KAAK,GAAGD,KAAK,CAACF,YAAY;IACzC,CAAC,EACD;IACE;IACA;IACAI,qBAAQ,CAACC,EAAE,KAAK,SAAS,GACrB,sBAAsB;IACtB;IACFlB,aAAa,GACX,sBAAsB,GACtB,uBAAuB,CAC5B;EACD,GACES,IAAI,gBAER,6BAAC,4CAAmC,CAAC,QAAQ;IAC3C,KAAK,EAAE;MACLC,QAAQ,EAAEA,QAAQ;MAClBE,OAAO,EAAEA,OAAO;MAChBC,YAAY,EAAEA;IAChB;EAAE,GAEDL,QAAQ,CACoC,CAChC;AAErB,CAAC,CAAC;AAEFL,2BAA2B,CAACgB,WAAW,GAAG,6BAA6B;AAAC,eAEzDhB,2BAA2B;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreen.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreen.js new file mode 100644 index 00000000..aab95b8e --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreen.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _react = _interopRequireDefault(require("react")); +var _reactNativeScreens = require("react-native-screens"); +var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +const AnimatedScreen = _reactNativeReanimated.default.createAnimatedComponent(_reactNativeScreens.InnerScreen); +const ReanimatedScreen = /*#__PURE__*/_react.default.forwardRef((props, ref) => { + return /*#__PURE__*/_react.default.createElement(AnimatedScreen + // @ts-ignore some problems with ref and onTransitionProgressReanimated being "fake" prop for parsing of `useEvent` return value + , _extends({ + ref: ref + }, props)); +}); +ReanimatedScreen.displayName = 'ReanimatedScreen'; +var _default = ReanimatedScreen; +exports.default = _default; +//# sourceMappingURL=ReanimatedScreen.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreen.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreen.js.map new file mode 100644 index 00000000..9fdfb7b2 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreen.js.map @@ -0,0 +1 @@ +{"version":3,"names":["AnimatedScreen","Animated","createAnimatedComponent","InnerScreen","ReanimatedScreen","React","forwardRef","props","ref","displayName"],"sources":["ReanimatedScreen.tsx"],"sourcesContent":["import React from 'react';\nimport { InnerScreen, ScreenProps } from 'react-native-screens';\n\n// @ts-ignore file to be used only if `react-native-reanimated` available in the project\nimport Animated from 'react-native-reanimated';\n\nconst AnimatedScreen = Animated.createAnimatedComponent(\n InnerScreen as unknown as React.ComponentClass\n);\n\nconst ReanimatedScreen = React.forwardRef(\n (props, ref) => {\n return (\n \n );\n }\n);\n\nReanimatedScreen.displayName = 'ReanimatedScreen';\n\nexport default ReanimatedScreen;\n"],"mappings":";;;;;;AAAA;AACA;AAGA;AAA+C;AAAA;AAE/C,MAAMA,cAAc,GAAGC,8BAAQ,CAACC,uBAAuB,CACrDC,+BAAW,CACZ;AAED,MAAMC,gBAAgB,gBAAGC,cAAK,CAACC,UAAU,CACvC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACd,oBACE,6BAAC;EACC;EAAA;IACA,GAAG,EAAEA;EAAI,GACLD,KAAK,EACT;AAEN,CAAC,CACF;AAEDH,gBAAgB,CAACK,WAAW,GAAG,kBAAkB;AAAC,eAEnCL,gBAAgB;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreenProvider.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreenProvider.js new file mode 100644 index 00000000..2af5ac8f --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreenProvider.js @@ -0,0 +1,45 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = ReanimatedScreenProvider; +var _react = _interopRequireDefault(require("react")); +var _reactNativeScreens = require("react-native-screens"); +var _ReanimatedNativeStackScreen = _interopRequireDefault(require("./ReanimatedNativeStackScreen")); +var _ReanimatedScreen = _interopRequireDefault(require("./ReanimatedScreen")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +class ReanimatedScreenWrapper extends _react.default.Component { + constructor() { + super(...arguments); + _defineProperty(this, "ref", null); + _defineProperty(this, "setRef", ref => { + var _this$props$onCompone, _this$props; + this.ref = ref; + (_this$props$onCompone = (_this$props = this.props).onComponentRef) === null || _this$props$onCompone === void 0 ? void 0 : _this$props$onCompone.call(_this$props, ref); + }); + } + setNativeProps(props) { + var _this$ref; + (_this$ref = this.ref) === null || _this$ref === void 0 ? void 0 : _this$ref.setNativeProps(props); + } + render() { + const ReanimatedScreen = this.props.isNativeStack ? _ReanimatedNativeStackScreen.default : _ReanimatedScreen.default; + return /*#__PURE__*/_react.default.createElement(ReanimatedScreen, _extends({}, this.props, { + // @ts-ignore some problems with ref + ref: this.setRef + })); + } +} +function ReanimatedScreenProvider(props) { + return ( + /*#__PURE__*/ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + _react.default.createElement(_reactNativeScreens.ScreenContext.Provider, { + value: ReanimatedScreenWrapper + }, props.children) + ); +} +//# sourceMappingURL=ReanimatedScreenProvider.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map new file mode 100644 index 00000000..780cd884 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map @@ -0,0 +1 @@ +{"version":3,"names":["ReanimatedScreenWrapper","React","Component","ref","props","onComponentRef","setNativeProps","render","ReanimatedScreen","isNativeStack","ReanimatedNativeStackScreen","AnimatedScreen","setRef","ReanimatedScreenProvider","children"],"sources":["ReanimatedScreenProvider.tsx"],"sourcesContent":["import React, { PropsWithChildren } from 'react';\nimport { View } from 'react-native';\nimport { ScreenProps, ScreenContext } from 'react-native-screens';\nimport ReanimatedNativeStackScreen from './ReanimatedNativeStackScreen';\nimport AnimatedScreen from './ReanimatedScreen';\n\nclass ReanimatedScreenWrapper extends React.Component {\n private ref: React.ElementRef | null = null;\n\n setNativeProps(props: ScreenProps): void {\n this.ref?.setNativeProps(props);\n }\n\n setRef = (ref: React.ElementRef | null): void => {\n this.ref = ref;\n this.props.onComponentRef?.(ref);\n };\n\n render() {\n const ReanimatedScreen = this.props.isNativeStack\n ? ReanimatedNativeStackScreen\n : AnimatedScreen;\n return (\n \n );\n }\n}\n\nexport default function ReanimatedScreenProvider(\n props: PropsWithChildren\n) {\n return (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n \n {props.children}\n \n );\n}\n"],"mappings":";;;;;;AAAA;AAEA;AACA;AACA;AAAgD;AAAA;AAAA;AAEhD,MAAMA,uBAAuB,SAASC,cAAK,CAACC,SAAS,CAAc;EAAA;IAAA;IAAA,6BACb,IAAI;IAAA,gCAM9CC,GAAyC,IAAW;MAAA;MAC5D,IAAI,CAACA,GAAG,GAAGA,GAAG;MACd,4CAAI,CAACC,KAAK,EAACC,cAAc,0DAAzB,wCAA4BF,GAAG,CAAC;IAClC,CAAC;EAAA;EAPDG,cAAc,CAACF,KAAkB,EAAQ;IAAA;IACvC,iBAAI,CAACD,GAAG,8CAAR,UAAUG,cAAc,CAACF,KAAK,CAAC;EACjC;EAOAG,MAAM,GAAG;IACP,MAAMC,gBAAgB,GAAG,IAAI,CAACJ,KAAK,CAACK,aAAa,GAC7CC,oCAA2B,GAC3BC,yBAAc;IAClB,oBACE,6BAAC,gBAAgB,eACX,IAAI,CAACP,KAAK;MACd;MACA,GAAG,EAAE,IAAI,CAACQ;IAAO,GACjB;EAEN;AACF;AAEe,SAASC,wBAAwB,CAC9CT,KAAiC,EACjC;EACA;IAAA;IACE;IACA,6BAAC,iCAAa,CAAC,QAAQ;MAAC,KAAK,EAAEJ;IAA+B,GAC3DI,KAAK,CAACU,QAAQ;EACQ;AAE7B"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js new file mode 100644 index 00000000..64355512 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var React = _interopRequireWildcard(require("react")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +var _default = /*#__PURE__*/React.createContext(undefined); +exports.default = _default; +//# sourceMappingURL=ReanimatedTransitionProgressContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map new file mode 100644 index 00000000..fba574de --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","createContext","undefined"],"sources":["ReanimatedTransitionProgressContext.tsx"],"sourcesContent":["import * as React from 'react';\n// @ts-ignore file to be used only if `react-native-reanimated` available in the project\nimport Animated from 'react-native-reanimated';\n\ntype ReanimatedTransitionProgressContextBody = {\n progress: Animated.SharedValue;\n closing: Animated.SharedValue;\n goingForward: Animated.SharedValue;\n};\n\nexport default React.createContext<\n ReanimatedTransitionProgressContextBody | undefined\n>(undefined);\n"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAAA,4BAUhBA,KAAK,CAACC,aAAa,CAEhCC,SAAS,CAAC;AAAA"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/index.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/index.js new file mode 100644 index 00000000..767086d3 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/index.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "ReanimatedScreenProvider", { + enumerable: true, + get: function () { + return _ReanimatedScreenProvider.default; + } +}); +Object.defineProperty(exports, "useReanimatedTransitionProgress", { + enumerable: true, + get: function () { + return _useReanimatedTransitionProgress.default; + } +}); +var _ReanimatedScreenProvider = _interopRequireDefault(require("./ReanimatedScreenProvider")); +var _useReanimatedTransitionProgress = _interopRequireDefault(require("./useReanimatedTransitionProgress")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/index.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/index.js.map new file mode 100644 index 00000000..08e94388 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export { default as ReanimatedScreenProvider } from './ReanimatedScreenProvider';\nexport { default as useReanimatedTransitionProgress } from './useReanimatedTransitionProgress';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AACA;AAA+F"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/useReanimatedTransitionProgress.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/useReanimatedTransitionProgress.js new file mode 100644 index 00000000..3f95e4cd --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/useReanimatedTransitionProgress.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useReanimatedTransitionProgress; +var React = _interopRequireWildcard(require("react")); +var _ReanimatedTransitionProgressContext = _interopRequireDefault(require("./ReanimatedTransitionProgressContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function useReanimatedTransitionProgress() { + const progress = React.useContext(_ReanimatedTransitionProgressContext.default); + if (progress === undefined) { + throw new Error("Couldn't find values for reanimated transition progress. Are you inside a screen in Native Stack?"); + } + return progress; +} +//# sourceMappingURL=useReanimatedTransitionProgress.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map new file mode 100644 index 00000000..e9d2b506 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useReanimatedTransitionProgress","progress","React","useContext","ReanimatedTransitionProgressContext","undefined","Error"],"sources":["useReanimatedTransitionProgress.tsx"],"sourcesContent":["import * as React from 'react';\nimport ReanimatedTransitionProgressContext from './ReanimatedTransitionProgressContext';\n\nexport default function useReanimatedTransitionProgress() {\n const progress = React.useContext(ReanimatedTransitionProgressContext);\n\n if (progress === undefined) {\n throw new Error(\n \"Couldn't find values for reanimated transition progress. Are you inside a screen in Native Stack?\"\n );\n }\n\n return progress;\n}\n"],"mappings":";;;;;;AAAA;AACA;AAAwF;AAAA;AAAA;AAEzE,SAASA,+BAA+B,GAAG;EACxD,MAAMC,QAAQ,GAAGC,KAAK,CAACC,UAAU,CAACC,4CAAmC,CAAC;EAEtE,IAAIH,QAAQ,KAAKI,SAAS,EAAE;IAC1B,MAAM,IAAIC,KAAK,CACb,mGAAmG,CACpG;EACH;EAEA,OAAOL,QAAQ;AACjB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/types.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/types.js new file mode 100644 index 00000000..239667a3 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/types.js @@ -0,0 +1,6 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/types.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/types.js.map new file mode 100644 index 00000000..0479cbac --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/types.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sources":["types.tsx"],"sourcesContent":["import {\n Animated,\n NativeSyntheticEvent,\n ViewProps,\n View,\n TargetedEvent,\n TextInputFocusEventData,\n} from 'react-native';\n\nexport type StackPresentationTypes =\n | 'push'\n | 'modal'\n | 'transparentModal'\n | 'containedModal'\n | 'containedTransparentModal'\n | 'fullScreenModal'\n | 'formSheet';\nexport type StackAnimationTypes =\n | 'default'\n | 'fade'\n | 'fade_from_bottom'\n | 'flip'\n | 'none'\n | 'simple_push'\n | 'slide_from_bottom'\n | 'slide_from_right'\n | 'slide_from_left';\nexport type BlurEffectTypes =\n | 'extraLight'\n | 'light'\n | 'dark'\n | 'regular'\n | 'prominent'\n | 'systemUltraThinMaterial'\n | 'systemThinMaterial'\n | 'systemMaterial'\n | 'systemThickMaterial'\n | 'systemChromeMaterial'\n | 'systemUltraThinMaterialLight'\n | 'systemThinMaterialLight'\n | 'systemMaterialLight'\n | 'systemThickMaterialLight'\n | 'systemChromeMaterialLight'\n | 'systemUltraThinMaterialDark'\n | 'systemThinMaterialDark'\n | 'systemMaterialDark'\n | 'systemThickMaterialDark'\n | 'systemChromeMaterialDark';\nexport type ScreenReplaceTypes = 'push' | 'pop';\nexport type SwipeDirectionTypes = 'vertical' | 'horizontal';\nexport type ScreenOrientationTypes =\n | 'default'\n | 'all'\n | 'portrait'\n | 'portrait_up'\n | 'portrait_down'\n | 'landscape'\n | 'landscape_left'\n | 'landscape_right';\nexport type HeaderSubviewTypes =\n | 'back'\n | 'right'\n | 'left'\n | 'center'\n | 'searchBar';\n\nexport type TransitionProgressEventType = {\n progress: number;\n closing: number;\n goingForward: number;\n};\n\nexport type GestureResponseDistanceType = {\n start?: number;\n end?: number;\n top?: number;\n bottom?: number;\n};\n\nexport interface ScreenProps extends ViewProps {\n active?: 0 | 1 | Animated.AnimatedInterpolation;\n activityState?: 0 | 1 | 2 | Animated.AnimatedInterpolation;\n children?: React.ReactNode;\n /**\n * Boolean indicating that swipe dismissal should trigger animation provided by `stackAnimation`. Defaults to `false`.\n *\n * @platform ios\n */\n customAnimationOnSwipe?: boolean;\n /**\n * All children screens should have the same value of their \"enabled\" prop as their container.\n */\n enabled?: boolean;\n /**\n * Internal boolean used to not attach events used only by native-stack. It prevents non native-stack navigators from sending transition progress from their Screen components.\n */\n isNativeStack?: boolean;\n /**\n * Whether inactive screens should be suspended from re-rendering. Defaults to `false`.\n * When `enableFreeze()` is run at the top of the application defaults to `true`.\n */\n freezeOnBlur?: boolean;\n /**\n * Boolean indicating whether the swipe gesture should work on whole screen. Swiping with this option results in the same transition animation as `simple_push` by default.\n * It can be changed to other custom animations with `customAnimationOnSwipe` prop, but default iOS swipe animation is not achievable due to usage of custom recognizer.\n * Defaults to `false`.\n *\n * @platform ios\n */\n fullScreenSwipeEnabled?: boolean;\n /**\n * Whether you can use gestures to dismiss this screen. Defaults to `true`.\n *\n * @platform ios\n */\n gestureEnabled?: boolean;\n /**\n * Use it to restrict the distance from the edges of screen in which the gesture should be recognized. To be used alongside `fullScreenSwipeEnabled`.\n *\n * @platform ios\n */\n gestureResponseDistance?: GestureResponseDistanceType;\n /**\n * Whether the home indicator should be hidden on this screen. Defaults to `false`.\n *\n * @platform ios\n */\n homeIndicatorHidden?: boolean;\n /**\n * Whether the keyboard should hide when swiping to the previous screen. Defaults to `false`.\n *\n * @platform ios\n */\n hideKeyboardOnSwipe?: boolean;\n /**\n * Boolean indicating whether, when the Android default back button is clicked, the `pop` action should be performed on the native side or on the JS side to be able to prevent it.\n * Unfortunately the same behavior is not available on iOS since the behavior of native back button cannot be changed there.\n * Defaults to `false`.\n *\n * @platform android\n */\n nativeBackButtonDismissalEnabled?: boolean;\n /**\n * Sets the navigation bar color. Defaults to initial status bar color.\n *\n * @platform android\n */\n navigationBarColor?: string;\n /**\n * Sets the visibility of the navigation bar. Defaults to `false`.\n *\n * @platform android\n */\n navigationBarHidden?: boolean;\n /**\n * A callback that gets called when the current screen appears.\n */\n onAppear?: (e: NativeSyntheticEvent) => void;\n onComponentRef?: (view: unknown) => void;\n /**\n * A callback that gets called when the current screen disappears.\n */\n onDisappear?: (e: NativeSyntheticEvent) => void;\n /**\n * A callback that gets called when the current screen is dismissed by hardware back (on Android) or dismiss gesture (swipe back or down).\n * The callback takes the number of dismissed screens as an argument since iOS 14 native header back button can pop more than 1 screen at a time.\n */\n onDismissed?: (e: NativeSyntheticEvent<{ dismissCount: number }>) => void;\n /**\n * An internal callback that gets called when the native header back button is clicked on Android and `enableNativeBackButtonDismissal` is set to `false`. It dismises the screen using `navigation.pop()`.\n *\n * @platform android\n */\n onHeaderBackButtonClicked?: () => void;\n /**\n * An internal callback called when screen is dismissed by gesture or by native header back button and `preventNativeDismiss` is set to `true`.\n *\n * @platform ios\n */\n onNativeDismissCancelled?: (\n e: NativeSyntheticEvent<{ dismissCount: number }>\n ) => void;\n /**\n * An internal callback called every frame during the transition of screens of `native-stack`, used to feed transition context.\n */\n onTransitionProgress?: (\n e: NativeSyntheticEvent\n ) => void;\n /**\n * A callback that gets called when the current screen will appear. This is called as soon as the transition begins.\n */\n onWillAppear?: (e: NativeSyntheticEvent) => void;\n /**\n * A callback that gets called when the current screen will disappear. This is called as soon as the transition begins.\n */\n onWillDisappear?: (e: NativeSyntheticEvent) => void;\n /**\n * Boolean indicating whether to prevent current screen from being dismissed.\n * Defaults to `false`.\n *\n * @platform ios\n */\n preventNativeDismiss?: boolean;\n ref?: React.Ref;\n /**\n * How should the screen replacing another screen animate. Defaults to `pop`.\n * The following values are currently supported:\n * - \"push\" – the new screen will perform push animation.\n * - \"pop\" – the new screen will perform pop animation.\n */\n replaceAnimation?: ScreenReplaceTypes;\n /**\n * In which orientation should the screen appear.\n * The following values are currently supported:\n * - \"default\" - resolves to \"all\" without \"portrait_down\" on iOS. On Android, this lets the system decide the best orientation.\n * - \"all\" – all orientations are permitted\n * - \"portrait\" – portrait orientations are permitted\n * - \"portrait_up\" – right-side portrait orientation is permitted\n * - \"portrait_down\" – upside-down portrait orientation is permitted\n * - \"landscape\" – landscape orientations are permitted\n * - \"landscape_left\" – landscape-left orientation is permitted\n * - \"landscape_right\" – landscape-right orientation is permitted\n */\n screenOrientation?: ScreenOrientationTypes;\n /**\n * How the screen should appear/disappear when pushed or popped at the top of the stack.\n * The following values are currently supported:\n * - \"default\" – uses a platform default animation\n * - \"fade\" – fades screen in or out\n * - \"fade_from_bottom\" – performs a fade from bottom animation\n * - \"flip\" – flips the screen, requires stackPresentation: \"modal\" (iOS only)\n * - \"simple_push\" – performs a default animation, but without shadow and native header transition (iOS only)\n * - `slide_from_bottom` – performs a slide from bottom animation\n * - \"slide_from_right\" - slide in the new screen from right to left (Android only, resolves to default transition on iOS)\n * - \"slide_from_left\" - slide in the new screen from left to right (Android only, resolves to default transition on iOS)\n * - \"none\" – the screen appears/dissapears without an animation\n */\n stackAnimation?: StackAnimationTypes;\n /**\n * How should the screen be presented.\n * The following values are currently supported:\n * - \"push\" – the new screen will be pushed onto a stack which on iOS means that the default animation will be slide from the side, the animation on Android may vary depending on the OS version and theme.\n * - \"modal\" – the new screen will be presented modally. In addition this allow for a nested stack to be rendered inside such screens.\n * - \"transparentModal\" – the new screen will be presented modally but in addition the second to last screen will remain attached to the stack container such that if the top screen is non opaque the content below can still be seen. If \"modal\" is used instead the below screen will get unmounted as soon as the transition ends.\n * - \"containedModal\" – will use \"UIModalPresentationCurrentContext\" modal style on iOS and will fallback to \"modal\" on Android.\n * - \"containedTransparentModal\" – will use \"UIModalPresentationOverCurrentContext\" modal style on iOS and will fallback to \"transparentModal\" on Android.\n * - \"fullScreenModal\" – will use \"UIModalPresentationFullScreen\" modal style on iOS and will fallback to \"modal\" on Android.\n * - \"formSheet\" – will use \"UIModalPresentationFormSheet\" modal style on iOS and will fallback to \"modal\" on Android.\n */\n stackPresentation?: StackPresentationTypes;\n /**\n * Sets the status bar animation (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS.\n */\n statusBarAnimation?: 'none' | 'fade' | 'slide';\n /**\n * Sets the status bar color (similar to the `StatusBar` component). Defaults to initial status bar color.\n *\n * @platform android\n */\n statusBarColor?: string;\n /**\n * Whether the status bar should be hidden on this screen. Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. Defaults to `false`.\n */\n statusBarHidden?: boolean;\n /**\n * Sets the status bar color (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. Defaults to `auto`.\n */\n statusBarStyle?: 'inverted' | 'auto' | 'light' | 'dark';\n /**\n * Sets the translucency of the status bar. Defaults to `false`.\n *\n * @platform android\n */\n statusBarTranslucent?: boolean;\n /**\n * Sets the direction in which you should swipe to dismiss the screen.\n * When using `vertical` option, options `fullScreenSwipeEnabled: true`, `customAnimationOnSwipe: true` and `stackAnimation: 'slide_from_bottom'` are set by default.\n * The following values are supported:\n * - `vertical` – dismiss screen vertically\n * - `horizontal` – dismiss screen horizontally (default)\n *\n * @platform ios\n */\n swipeDirection?: SwipeDirectionTypes;\n /**\n * Changes the duration (in milliseconds) of `slide_from_bottom`, `fade_from_bottom`, `fade` and `simple_push` transitions on iOS. Defaults to `350`.\n * The duration of `default` and `flip` transitions isn't customizable.\n *\n * @platform ios\n */\n transitionDuration?: number;\n}\n\nexport interface ScreenContainerProps extends ViewProps {\n children?: React.ReactNode;\n /**\n * A prop that gives users an option to switch between using Screens for the navigator (container). All children screens should have the same value of their \"enabled\" prop as their container.\n */\n enabled?: boolean;\n /**\n * A prop to be used in navigators always showing only one screen (providing only `0` or `2` `activityState` values) for better implementation of `ScreenContainer` on iOS.\n */\n hasTwoStates?: boolean;\n}\n\nexport interface ScreenStackProps extends ViewProps {\n children?: React.ReactNode;\n /**\n * A callback that gets called when the current screen finishes its transition.\n */\n onFinishTransitioning?: (e: NativeSyntheticEvent) => void;\n}\n\nexport interface ScreenStackHeaderConfigProps extends ViewProps {\n /**\n * Whether to show the back button with custom left side of the header.\n */\n backButtonInCustomView?: boolean;\n /**\n * Controls the color of the navigation header.\n */\n backgroundColor?: string;\n /**\n * Title to display in the back button.\n * @platform ios.\n */\n backTitle?: string;\n /**\n * Allows for customizing font family to be used for back button title on iOS.\n * @platform ios\n */\n backTitleFontFamily?: string;\n /**\n * Allows for customizing font size to be used for back button title on iOS.\n * @platform ios\n */\n backTitleFontSize?: number;\n /**\n * Blur effect to be applied to the header. Works with backgroundColor's alpha < 1.\n * @platform ios\n */\n blurEffect?: BlurEffectTypes;\n /**\n * Pass HeaderLeft, HeaderRight and HeaderTitle\n */\n children?: React.ReactNode;\n /**\n * Controls the color of items rendered on the header. This includes back icon, back text (iOS only) and title text. If you want the title to have different color use titleColor property.\n */\n color?: string;\n /**\n * Whether the stack should be in rtl or ltr form.\n */\n direction?: 'rtl' | 'ltr';\n /**\n * Boolean indicating whether to show the menu on longPress of iOS >= 14 back button.\n * @platform ios\n */\n disableBackButtonMenu?: boolean;\n /**\n * When set to true the header will be hidden while the parent Screen is on the top of the stack. The default value is false.\n */\n hidden?: boolean;\n /**\n * Boolean indicating whether to hide the back button in header.\n */\n hideBackButton?: boolean;\n /**\n * Boolean indicating whether to hide the elevation shadow or the bottom border on the header.\n */\n hideShadow?: boolean;\n /**\n * Boolean to set native property to prefer large title header (like in iOS setting).\n * For large title to collapse on scroll, the content of the screen should be wrapped in a scrollable view such as `ScrollView` or `FlatList`.\n * If the scrollable area doesn't fill the screen, the large title won't collapse on scroll.\n * Only supported on iOS.\n *\n * @platform ios\n */\n largeTitle?: boolean;\n /**\n * Controls the color of the navigation header when the edge of any scrollable content reaches the matching edge of the navigation bar.\n */\n largeTitleBackgroundColor?: string;\n /**\n * Customize the color to be used for the large title. By default uses the titleColor property.\n * @platform ios\n */\n largeTitleColor?: string;\n /**\n * Customize font family to be used for the large title.\n * @platform ios\n */\n largeTitleFontFamily?: string;\n /**\n * Customize the size of the font to be used for the large title.\n * @platform ios\n */\n largeTitleFontSize?: number;\n /**\n * Customize the weight of the font to be used for the large title.\n * @platform ios\n */\n largeTitleFontWeight?: string;\n /**\n * Boolean that allows for disabling drop shadow under navigation header when the edge of any scrollable content reaches the matching edge of the navigation bar.\n */\n largeTitleHideShadow?: boolean;\n /**\n * Callback which is executed when screen header is attached\n */\n onAttached?: () => void;\n /**\n * Callback which is executed when screen header is detached\n */\n onDetached?: () => void;\n /**\n * String that can be displayed in the header as a fallback for `headerTitle`.\n */\n title?: string;\n /**\n * Allows for setting text color of the title.\n */\n titleColor?: string;\n /**\n * Customize font family to be used for the title.\n */\n titleFontFamily?: string;\n /**\n * Customize the size of the font to be used for the title.\n */\n titleFontSize?: number;\n /**\n * Customize the weight of the font to be used for the title.\n */\n titleFontWeight?: string;\n /**\n * A flag to that lets you opt out of insetting the header. You may want to\n * set this to `false` if you use an opaque status bar. Defaults to `true`.\n * Only supported on Android. Insets are always applied on iOS because the\n * header cannot be opaque.\n *\n * @platform android\n */\n topInsetEnabled?: boolean;\n /**\n * Boolean indicating whether the navigation bar is translucent.\n */\n translucent?: boolean;\n}\n\nexport interface SearchBarProps {\n /**\n * The auto-capitalization behavior\n */\n autoCapitalize?: 'none' | 'words' | 'sentences' | 'characters';\n /**\n * Automatically focuses search bar on mount\n *\n * @platform android\n */\n autoFocus?: boolean;\n /**\n * The search field background color\n */\n barTintColor?: string;\n /**\n * The color for the cursor caret and cancel button text.\n *\n * @platform ios\n */\n tintColor?: string;\n /**\n * The text to be used instead of default `Cancel` button text\n *\n * @platform ios\n */\n cancelButtonText?: string;\n /**\n * Specifies whether the back button should close search bar's text input or not.\n *\n * @platform android\n */\n disableBackButtonOverride?: boolean;\n /**\n * Indicates whether to hide the navigation bar\n *\n * @platform ios\n */\n hideNavigationBar?: boolean;\n /**\n * Indicates whether to hide the search bar when scrolling\n *\n * @platform ios\n */\n hideWhenScrolling?: boolean;\n\n /**\n * Sets type of the input. Defaults to `text`.\n *\n * @platform android\n */\n inputType?: 'text' | 'phone' | 'number' | 'email';\n /**\n * Indicates whether to to obscure the underlying content\n */\n obscureBackground?: boolean;\n /**\n * A callback that gets called when search bar has lost focus\n */\n onBlur?: (e: NativeSyntheticEvent) => void;\n /**\n * A callback that gets called when the cancel button is pressed\n *\n * @platform ios\n */\n onCancelButtonPress?: (e: NativeSyntheticEvent) => void;\n\n /**\n * A callback that gets called when the text changes. It receives the current text value of the search bar.\n */\n onChangeText?: (e: NativeSyntheticEvent) => void;\n\n /**\n * A callback that gets called when search bar is closed\n *\n * @platform android\n */\n onClose?: () => void;\n /**\n * A callback that gets called when search bar has received focus\n */\n onFocus?: (e: NativeSyntheticEvent) => void;\n /**\n * A callback that gets called when search bar is opened\n *\n * @platform android\n */\n onOpen?: () => void;\n /**\n * A callback that gets called when the search button is pressed. It receives the current text value of the search bar.\n */\n onSearchButtonPress?: (\n e: NativeSyntheticEvent\n ) => void;\n /**\n * Text displayed when search field is empty\n */\n placeholder?: string;\n /**\n * The search field text color\n */\n textColor?: string;\n /**\n * The search hint text color\n *\n * @plaform android\n */\n hintTextColor?: string;\n /**\n * The search and close icon color shown in the header\n *\n * @plaform android\n */\n headerIconColor?: string;\n /**\n * Show the search hint icon when search bar is focused\n *\n * @plaform android\n * @default true\n */\n shouldShowHintSearchIcon?: boolean;\n}\n"],"mappings":""} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/useTransitionProgress.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/useTransitionProgress.js new file mode 100644 index 00000000..4edbd662 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/useTransitionProgress.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useTransitionProgress; +var React = _interopRequireWildcard(require("react")); +var _TransitionProgressContext = _interopRequireDefault(require("./TransitionProgressContext")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function useTransitionProgress() { + const progress = React.useContext(_TransitionProgressContext.default); + if (progress === undefined) { + throw new Error("Couldn't find values for transition progress. Are you inside a screen in Native Stack?"); + } + return progress; +} +//# sourceMappingURL=useTransitionProgress.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/useTransitionProgress.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/useTransitionProgress.js.map new file mode 100644 index 00000000..17ae69de --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/useTransitionProgress.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useTransitionProgress","progress","React","useContext","TransitionProgressContext","undefined","Error"],"sources":["useTransitionProgress.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport TransitionProgressContext from './TransitionProgressContext';\n\nexport default function useTransitionProgress() {\n const progress = React.useContext(TransitionProgressContext);\n\n if (progress === undefined) {\n throw new Error(\n \"Couldn't find values for transition progress. Are you inside a screen in Native Stack?\"\n );\n }\n\n return progress;\n}\n"],"mappings":";;;;;;AAAA;AAEA;AAAoE;AAAA;AAAA;AAErD,SAASA,qBAAqB,GAAG;EAC9C,MAAMC,QAAQ,GAAGC,KAAK,CAACC,UAAU,CAACC,kCAAyB,CAAC;EAE5D,IAAIH,QAAQ,KAAKI,SAAS,EAAE;IAC1B,MAAM,IAAIC,KAAK,CACb,wFAAwF,CACzF;EACH;EAEA,OAAOL,QAAQ;AACjB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/utils.js b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/utils.js new file mode 100644 index 00000000..bcf1b754 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/utils.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.executeNativeBackPress = executeNativeBackPress; +exports.isSearchBarAvailableForCurrentPlatform = void 0; +var _reactNative = require("react-native"); +const isSearchBarAvailableForCurrentPlatform = ['ios', 'android'].includes(_reactNative.Platform.OS); +exports.isSearchBarAvailableForCurrentPlatform = isSearchBarAvailableForCurrentPlatform; +function executeNativeBackPress() { + // This function invokes the native back press event + _reactNative.BackHandler.exitApp(); + return true; +} +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/utils.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/utils.js.map new file mode 100644 index 00000000..a34eef69 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/commonjs/utils.js.map @@ -0,0 +1 @@ +{"version":3,"names":["isSearchBarAvailableForCurrentPlatform","includes","Platform","OS","executeNativeBackPress","BackHandler","exitApp"],"sources":["utils.ts"],"sourcesContent":["import { BackHandler, Platform } from 'react-native';\n\nexport const isSearchBarAvailableForCurrentPlatform = [\n 'ios',\n 'android',\n].includes(Platform.OS);\n\nexport function executeNativeBackPress() {\n // This function invokes the native back press event\n BackHandler.exitApp();\n return true;\n}\n"],"mappings":";;;;;;;AAAA;AAEO,MAAMA,sCAAsC,GAAG,CACpD,KAAK,EACL,SAAS,CACV,CAACC,QAAQ,CAACC,qBAAQ,CAACC,EAAE,CAAC;AAAC;AAEjB,SAASC,sBAAsB,GAAG;EACvC;EACAC,wBAAW,CAACC,OAAO,EAAE;EACrB,OAAO,IAAI;AACb"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/TransitionProgressContext.js b/iut-expo-starter/node_modules/react-native-screens/lib/module/TransitionProgressContext.js new file mode 100644 index 00000000..9c791b3c --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/TransitionProgressContext.js @@ -0,0 +1,3 @@ +import * as React from 'react'; +export default /*#__PURE__*/React.createContext(undefined); +//# sourceMappingURL=TransitionProgressContext.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/TransitionProgressContext.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/module/TransitionProgressContext.js.map new file mode 100644 index 00000000..8c07556a --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/TransitionProgressContext.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","createContext","undefined"],"sources":["TransitionProgressContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Animated } from 'react-native';\n\ntype TransitionProgressContextBody = {\n progress: Animated.Value;\n closing: Animated.Value;\n goingForward: Animated.Value;\n};\n\nexport default React.createContext(\n undefined\n);\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAS9B,4BAAeA,KAAK,CAACC,aAAa,CAChCC,SAAS,CACV"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/createNativeStackNavigator.js b/iut-expo-starter/node_modules/react-native-screens/lib/module/createNativeStackNavigator.js new file mode 100644 index 00000000..53b58619 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/createNativeStackNavigator.js @@ -0,0 +1,366 @@ +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +import React from 'react'; +import { Platform, StyleSheet } from 'react-native'; +import { ScreenContext, ScreenStack, ScreenStackHeaderBackButtonImage, ScreenStackHeaderCenterView, ScreenStackHeaderConfig, ScreenStackHeaderLeftView, ScreenStackHeaderRightView, ScreenStackHeaderSearchBarView, SearchBar } from 'react-native-screens'; +import { createNavigator, SceneView, StackActions, StackRouter } from 'react-navigation'; +import { HeaderBackButton } from 'react-navigation-stack'; +const REMOVE_ACTION = 'NativeStackNavigator/REMOVE'; +const isAndroid = Platform.OS === 'android'; +let didWarn = isAndroid; +function renderComponentOrThunk(componentOrThunk, props) { + if (typeof componentOrThunk === 'function') { + return componentOrThunk(props); + } + return componentOrThunk; +} +function removeScene(route, dismissCount, navigation) { + navigation.dispatch({ + // @ts-ignore special navigation action for native stack + type: REMOVE_ACTION, + immediate: true, + key: route.key, + dismissCount + }); +} +function onAppear(route, descriptor, navigation) { + var _descriptor$options, _descriptor$options$o; + (_descriptor$options = descriptor.options) === null || _descriptor$options === void 0 ? void 0 : (_descriptor$options$o = _descriptor$options.onAppear) === null || _descriptor$options$o === void 0 ? void 0 : _descriptor$options$o.call(_descriptor$options); + navigation.dispatch(StackActions.completeTransition({ + toChildKey: route.key, + key: navigation.state.key + })); +} +function onFinishTransitioning(navigation) { + const { + routes + } = navigation.state; + const lastRoute = (routes === null || routes === void 0 ? void 0 : routes.length) && routes[routes.length - 1]; + if (lastRoute) { + navigation.dispatch(StackActions.completeTransition({ + toChildKey: lastRoute.key, + key: navigation.state.key + })); + } +} +function renderHeaderConfig(index, route, descriptor, navigationConfig) { + const { + options + } = descriptor; + const { + headerMode + } = navigationConfig; + const { + backButtonInCustomView, + direction, + disableBackButtonMenu, + headerBackTitle, + headerBackTitleStyle, + headerBackTitleVisible, + headerHideBackButton, + headerHideShadow, + headerLargeStyle, + headerLargeTitle, + headerLargeTitleHideShadow, + headerLargeTitleStyle, + headerShown, + headerStyle, + headerTintColor, + headerTitleStyle, + headerTopInsetEnabled = true, + headerTranslucent, + hideShadow, + largeTitle, + largeTitleHideShadow, + title, + translucent + } = options; + const scene = { + index, + key: route.key, + route, + descriptor + }; + const headerOptions = { + backButtonInCustomView, + backTitle: headerBackTitleVisible === false ? '' : headerBackTitle, + backTitleFontFamily: headerBackTitleStyle === null || headerBackTitleStyle === void 0 ? void 0 : headerBackTitleStyle.fontFamily, + backTitleFontSize: headerBackTitleStyle === null || headerBackTitleStyle === void 0 ? void 0 : headerBackTitleStyle.fontSize, + color: headerTintColor, + direction, + disableBackButtonMenu, + topInsetEnabled: headerTopInsetEnabled, + hideBackButton: headerHideBackButton, + hideShadow: headerHideShadow || hideShadow, + largeTitle: headerLargeTitle || largeTitle, + largeTitleBackgroundColor: (headerLargeStyle === null || headerLargeStyle === void 0 ? void 0 : headerLargeStyle.backgroundColor) || ( // @ts-ignore old implementation, will not be present in TS API, but can be used here + headerLargeTitleStyle === null || headerLargeTitleStyle === void 0 ? void 0 : headerLargeTitleStyle.backgroundColor), + largeTitleColor: headerLargeTitleStyle === null || headerLargeTitleStyle === void 0 ? void 0 : headerLargeTitleStyle.color, + largeTitleFontFamily: headerLargeTitleStyle === null || headerLargeTitleStyle === void 0 ? void 0 : headerLargeTitleStyle.fontFamily, + largeTitleFontSize: headerLargeTitleStyle === null || headerLargeTitleStyle === void 0 ? void 0 : headerLargeTitleStyle.fontSize, + largeTitleFontWeight: headerLargeTitleStyle === null || headerLargeTitleStyle === void 0 ? void 0 : headerLargeTitleStyle.fontWeight, + largeTitleHideShadow: largeTitleHideShadow || headerLargeTitleHideShadow, + title, + titleColor: (headerTitleStyle === null || headerTitleStyle === void 0 ? void 0 : headerTitleStyle.color) || headerTintColor, + titleFontFamily: headerTitleStyle === null || headerTitleStyle === void 0 ? void 0 : headerTitleStyle.fontFamily, + titleFontSize: headerTitleStyle === null || headerTitleStyle === void 0 ? void 0 : headerTitleStyle.fontSize, + titleFontWeight: headerTitleStyle === null || headerTitleStyle === void 0 ? void 0 : headerTitleStyle.fontWeight, + translucent: headerTranslucent || translucent || false + }; + const hasHeader = headerShown !== false && headerMode !== 'none' && options.header !== null; + if (!hasHeader) { + return /*#__PURE__*/React.createElement(ScreenStackHeaderConfig, _extends({}, headerOptions, { + hidden: true + })); + } + if (headerStyle !== undefined) { + headerOptions.backgroundColor = headerStyle.backgroundColor; + headerOptions.blurEffect = headerStyle.blurEffect; + } + const children = []; + if (options.backButtonImage) { + children.push( /*#__PURE__*/React.createElement(ScreenStackHeaderBackButtonImage, { + key: "backImage", + source: options.backButtonImage + })); + } + if (Platform.OS === 'ios' && options.searchBar) { + children.push( /*#__PURE__*/React.createElement(ScreenStackHeaderSearchBarView, null, /*#__PURE__*/React.createElement(SearchBar, options.searchBar))); + } + if (options.headerLeft !== undefined) { + children.push( /*#__PURE__*/React.createElement(ScreenStackHeaderLeftView, { + key: "left" + }, renderComponentOrThunk(options.headerLeft, { + scene + }))); + } else if (options.headerBackImage !== undefined) { + const goBack = () => { + // Go back on next tick because button ripple effect needs to happen on Android + requestAnimationFrame(() => { + descriptor.navigation.goBack(descriptor.key); + }); + }; + children.push( /*#__PURE__*/React.createElement(ScreenStackHeaderLeftView, { + key: "left" + }, /*#__PURE__*/React.createElement(HeaderBackButton, { + onPress: goBack, + pressColorAndroid: options.headerPressColorAndroid, + tintColor: options.headerTintColor, + backImage: options.headerBackImage, + label: options.backButtonTitle, + truncatedLabel: options.truncatedBackButtonTitle, + labelVisible: options.backTitleVisible, + labelStyle: options.headerBackTitleStyle, + titleLayout: options.layoutPreset + // @ts-ignore old props kept for very old version of `react-navigation-stack` + , + title: options.backButtonTitle, + truncatedTitle: options.truncatedBackButtonTitle, + backTitleVisible: options.backTitleVisible, + titleStyle: options.headerBackTitleStyle, + layoutPreset: options.layoutPreset, + scene: scene + }))); + } + if (options.headerTitle) { + if (title === undefined && typeof options.headerTitle === 'string') { + headerOptions.title = options.headerTitle; + } else { + children.push( /*#__PURE__*/React.createElement(ScreenStackHeaderCenterView, { + key: "center" + }, renderComponentOrThunk(options.headerTitle, { + scene + }))); + } + } + if (options.headerRight) { + children.push( /*#__PURE__*/React.createElement(ScreenStackHeaderRightView, { + key: "right" + }, renderComponentOrThunk(options.headerRight, { + scene + }))); + } + if (children.length > 0) { + headerOptions.children = children; + } + return /*#__PURE__*/React.createElement(ScreenStackHeaderConfig, headerOptions); +} +const MaybeNestedStack = _ref => { + let { + isHeaderInModal, + screenProps, + route, + navigation, + SceneComponent, + index, + descriptor, + navigationConfig + } = _ref; + const Screen = React.useContext(ScreenContext); + if (isHeaderInModal) { + return /*#__PURE__*/React.createElement(ScreenStack, { + style: styles.scenes + }, /*#__PURE__*/React.createElement(Screen, { + style: StyleSheet.absoluteFill, + enabled: true, + isNativeStack: true + }, renderHeaderConfig(index, route, descriptor, navigationConfig), /*#__PURE__*/React.createElement(SceneView, { + screenProps: screenProps, + navigation: navigation, + component: SceneComponent + }))); + } + return /*#__PURE__*/React.createElement(SceneView, { + screenProps: screenProps, + navigation: navigation, + component: SceneComponent + }); +}; +function StackView(_ref2) { + let { + navigation, + descriptors, + navigationConfig, + screenProps + } = _ref2; + const { + routes + } = navigation.state; + const Screen = React.useContext(ScreenContext); + return /*#__PURE__*/React.createElement(ScreenStack, { + style: styles.scenes, + onFinishTransitioning: () => onFinishTransitioning(navigation) + }, routes.map((route, index) => { + const descriptor = descriptors[route.key]; + const { + getComponent, + options + } = descriptor; + const routeNavigationProp = descriptor.navigation; + const { + mode, + transparentCard + } = navigationConfig; + const SceneComponent = getComponent(); + let stackPresentation = 'push'; + if (options.stackPresentation) { + stackPresentation = options.stackPresentation; + } else { + // this shouldn't be used because we have a prop for that + if (mode === 'modal' || mode === 'containedModal') { + stackPresentation = mode; + if (transparentCard || options.cardTransparent) { + stackPresentation = mode === 'containedModal' ? 'containedTransparentModal' : 'transparentModal'; + } + } + } + let stackAnimation = options.stackAnimation; + if (options.animationEnabled === false) { + stackAnimation = 'none'; + } + const hasHeader = options.headerShown !== false && (navigationConfig === null || navigationConfig === void 0 ? void 0 : navigationConfig.headerMode) !== 'none' && options.header !== null; + if (!didWarn && stackPresentation !== 'push' && options.headerShown !== undefined) { + didWarn = true; + console.warn('Be aware that changing the visibility of header in modal on iOS will result in resetting the state of the screen.'); + } + const isHeaderInModal = isAndroid ? false : stackPresentation !== 'push' && hasHeader && options.headerShown === true; + const isHeaderInPush = isAndroid ? hasHeader : stackPresentation === 'push' && hasHeader; + return /*#__PURE__*/React.createElement(Screen, { + key: `screen_${route.key}`, + enabled: true, + isNativeStack: true, + style: [StyleSheet.absoluteFill, options.cardStyle], + stackAnimation: stackAnimation, + customAnimationOnSwipe: options.customAnimationOnSwipe, + stackPresentation: stackPresentation, + replaceAnimation: options.replaceAnimation === undefined ? 'pop' : options.replaceAnimation, + pointerEvents: index === navigation.state.routes.length - 1 ? 'auto' : 'none', + gestureEnabled: Platform.OS === 'android' ? false : options.gestureEnabled === undefined ? true : options.gestureEnabled, + nativeBackButtonDismissalEnabled: options.nativeBackButtonDismissalEnabled, + fullScreenSwipeEnabled: options.fullScreenSwipeEnabled, + screenOrientation: options.screenOrientation, + statusBarAnimation: options.statusBarAnimation, + statusBarColor: options.statusBarColor, + statusBarHidden: options.statusBarHidden, + statusBarStyle: options.statusBarStyle, + statusBarTranslucent: options.statusBarTranslucent, + onAppear: () => onAppear(route, descriptor, routeNavigationProp), + onWillAppear: () => { + var _options$onWillAppear; + return options === null || options === void 0 ? void 0 : (_options$onWillAppear = options.onWillAppear) === null || _options$onWillAppear === void 0 ? void 0 : _options$onWillAppear.call(options); + }, + onWillDisappear: () => { + var _options$onWillDisapp; + return options === null || options === void 0 ? void 0 : (_options$onWillDisapp = options.onWillDisappear) === null || _options$onWillDisapp === void 0 ? void 0 : _options$onWillDisapp.call(options); + }, + onDisappear: () => { + var _options$onDisappear; + return options === null || options === void 0 ? void 0 : (_options$onDisappear = options.onDisappear) === null || _options$onDisappear === void 0 ? void 0 : _options$onDisappear.call(options); + }, + onHeaderBackButtonClicked: () => removeScene(route, 1, routeNavigationProp), + onDismissed: e => removeScene(route, e.nativeEvent.dismissCount, routeNavigationProp) + }, isHeaderInPush && renderHeaderConfig(index, route, descriptor, navigationConfig), /*#__PURE__*/React.createElement(MaybeNestedStack, { + isHeaderInModal: isHeaderInModal, + screenProps: screenProps, + route: route, + navigation: routeNavigationProp, + SceneComponent: SceneComponent, + index: index, + descriptor: descriptor, + navigationConfig: navigationConfig + })); + })); +} +const styles = StyleSheet.create({ + scenes: { + flex: 1 + } +}); +function createStackNavigator(routeConfigMap) { + let stackConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + const router = StackRouter(routeConfigMap, stackConfig); + + // below we override getStateForAction method in order to add handling for + // a custom native stack navigation action. The action REMOVE that we want to + // add works in a similar way to POP, but it does not remove all the routes + // that sit on top of the removed route. For example if we have three routes + // [a,b,c] and call POP on b, then both b and c will go away. In case we + // call REMOVE on b, only b will be removed from the stack and the resulting + // state will be [a, c] + const superGetStateForAction = router.getStateForAction; + router.getStateForAction = (action, state) => { + if (action.type === REMOVE_ACTION) { + const { + key, + immediate, + dismissCount + } = action; + let backRouteIndex = state.index; + if (key) { + const backRoute = state.routes.find(route => route.key === key); + backRouteIndex = state.routes.indexOf(backRoute); + } + if (backRouteIndex > 0) { + const newRoutes = [...state.routes]; + if (dismissCount > 1) { + // when dismissing with iOS 14 native header back button, we can pop more than 1 screen at a time + // and the `backRouteIndex` is the index of the previous screen. Since we are starting already + // on the previous screen, we add 1 to start. + newRoutes.splice(backRouteIndex - dismissCount + 1, dismissCount); + } else { + newRoutes.splice(backRouteIndex, 1); + } + return { + ...state, + routes: newRoutes, + index: newRoutes.length - 1, + isTransitioning: immediate !== true + }; + } + } + return superGetStateForAction(action, state); + }; + // Create a navigator with StackView as the view + return createNavigator(StackView, router, stackConfig); +} +export default createStackNavigator; +//# sourceMappingURL=createNativeStackNavigator.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/createNativeStackNavigator.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/module/createNativeStackNavigator.js.map new file mode 100644 index 00000000..2b82cdc6 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/createNativeStackNavigator.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","Platform","StyleSheet","ScreenContext","ScreenStack","ScreenStackHeaderBackButtonImage","ScreenStackHeaderCenterView","ScreenStackHeaderConfig","ScreenStackHeaderLeftView","ScreenStackHeaderRightView","ScreenStackHeaderSearchBarView","SearchBar","createNavigator","SceneView","StackActions","StackRouter","HeaderBackButton","REMOVE_ACTION","isAndroid","OS","didWarn","renderComponentOrThunk","componentOrThunk","props","removeScene","route","dismissCount","navigation","dispatch","type","immediate","key","onAppear","descriptor","options","completeTransition","toChildKey","state","onFinishTransitioning","routes","lastRoute","length","renderHeaderConfig","index","navigationConfig","headerMode","backButtonInCustomView","direction","disableBackButtonMenu","headerBackTitle","headerBackTitleStyle","headerBackTitleVisible","headerHideBackButton","headerHideShadow","headerLargeStyle","headerLargeTitle","headerLargeTitleHideShadow","headerLargeTitleStyle","headerShown","headerStyle","headerTintColor","headerTitleStyle","headerTopInsetEnabled","headerTranslucent","hideShadow","largeTitle","largeTitleHideShadow","title","translucent","scene","headerOptions","backTitle","backTitleFontFamily","fontFamily","backTitleFontSize","fontSize","color","topInsetEnabled","hideBackButton","largeTitleBackgroundColor","backgroundColor","largeTitleColor","largeTitleFontFamily","largeTitleFontSize","largeTitleFontWeight","fontWeight","titleColor","titleFontFamily","titleFontSize","titleFontWeight","hasHeader","header","undefined","blurEffect","children","backButtonImage","push","searchBar","headerLeft","headerBackImage","goBack","requestAnimationFrame","headerPressColorAndroid","backButtonTitle","truncatedBackButtonTitle","backTitleVisible","layoutPreset","headerTitle","headerRight","MaybeNestedStack","isHeaderInModal","screenProps","SceneComponent","Screen","useContext","styles","scenes","absoluteFill","StackView","descriptors","map","getComponent","routeNavigationProp","mode","transparentCard","stackPresentation","cardTransparent","stackAnimation","animationEnabled","console","warn","isHeaderInPush","cardStyle","customAnimationOnSwipe","replaceAnimation","gestureEnabled","nativeBackButtonDismissalEnabled","fullScreenSwipeEnabled","screenOrientation","statusBarAnimation","statusBarColor","statusBarHidden","statusBarStyle","statusBarTranslucent","onWillAppear","onWillDisappear","onDisappear","e","nativeEvent","create","flex","createStackNavigator","routeConfigMap","stackConfig","router","superGetStateForAction","getStateForAction","action","backRouteIndex","backRoute","find","indexOf","newRoutes","splice","isTransitioning"],"sources":["createNativeStackNavigator.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Platform,\n StyleSheet,\n Animated,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native';\nimport {\n ScreenContext,\n ScreenStack,\n ScreenStackHeaderBackButtonImage,\n ScreenStackHeaderCenterView,\n ScreenStackHeaderConfig,\n ScreenStackHeaderConfigProps,\n ScreenStackHeaderLeftView,\n ScreenStackHeaderRightView,\n ScreenStackHeaderSearchBarView,\n SearchBar,\n StackPresentationTypes,\n} from 'react-native-screens';\nimport {\n createNavigator,\n SceneView,\n StackActions,\n StackRouter,\n NavigationRouteConfigMap,\n CreateNavigatorConfig,\n NavigationStackRouterConfig,\n NavigationParams,\n NavigationRoute,\n NavigationDescriptor,\n NavigationState,\n NavigationNavigator,\n NavigationAction,\n NavigationProp,\n NavigationScreenProp,\n} from 'react-navigation';\nimport { NativeStackNavigationOptions as NativeStackNavigationOptionsV5 } from './native-stack/types';\nimport { HeaderBackButton } from 'react-navigation-stack';\nimport {\n StackNavigationHelpers,\n StackNavigationProp,\n Layout,\n} from 'react-navigation-stack/src/vendor/types';\n\nconst REMOVE_ACTION = 'NativeStackNavigator/REMOVE';\n\nconst isAndroid = Platform.OS === 'android';\n\nlet didWarn = isAndroid;\n\nfunction renderComponentOrThunk(componentOrThunk: unknown, props: unknown) {\n if (typeof componentOrThunk === 'function') {\n return componentOrThunk(props);\n }\n return componentOrThunk;\n}\n\ntype NativeStackRemoveNavigationAction = {\n type: typeof REMOVE_ACTION;\n immediate: boolean;\n dismissCount: number;\n key?: string;\n};\n\nexport type NativeStackNavigationProp = StackNavigationProp;\n\nexport type NativeStackNavigationOptions = StackNavigatorOptions &\n NativeStackNavigationOptionsV5 &\n BackButtonProps & {\n onWillAppear?: () => void;\n onAppear?: () => void;\n onWillDisappear?: () => void;\n onDisappear?: () => void;\n // these props differ from the ones used in v5 `native-stack`, and we would like to keep the API consistent between versions\n /** Use `headerHideShadow` to be consistent with v5 `native-stack` */\n hideShadow?: boolean;\n /** Use `headerLargeTitle` to be consistent with v5 `native-stack` */\n largeTitle?: boolean;\n /** Use `headerLargeTitleHideShadow` to be consistent with v5 `native-stack` */\n largeTitleHideShadow?: boolean;\n /** Use `headerTranslucent` to be consistent with v5 `native-stack` */\n translucent?: boolean;\n };\n\n// these are adopted from `stack` navigator\ntype StackNavigatorOptions = {\n /** This is an option from `stackNavigator` and it hides the header when set to `null`. Use `headerShown` instead to be consistent with v5 `native-stack`. */\n header?: React.ComponentType> | null;\n /** This is an option from `stackNavigator` and it controls the stack presentation along with `mode` prop. Use `stackPresentation` instead to be consistent with v5 `native-stack` */\n cardTransparent?: boolean;\n /** This is an option from `stackNavigator` and it sets stack animation to none when `false` passed. Use `stackAnimation: 'none'` instead to be consistent with v5 `native-stack` */\n animationEnabled?: boolean;\n cardStyle?: StyleProp;\n};\n\n// these are the props used for rendering back button taken from `react-navigation-stack`\ntype BackButtonProps = {\n headerBackImage?: (props: { tintColor: string }) => React.ReactNode;\n headerPressColorAndroid?: string;\n headerTintColor?: string;\n backButtonTitle?: string;\n truncatedBackButtonTitle?: string;\n backTitleVisible?: boolean;\n headerBackTitleStyle?: Animated.WithAnimatedValue>;\n layoutPreset?: Layout;\n};\n\ntype NativeStackDescriptor = NavigationDescriptor<\n NavigationParams,\n NativeStackNavigationOptions\n>;\n\ntype NativeStackDescriptorMap = {\n [key: string]: NativeStackDescriptor;\n};\n\n// these are the props used for rendering back button taken from `react-navigation-stack`\ntype NativeStackNavigationConfig = {\n /** This is an option from `stackNavigator` and controls the stack presentation along with `cardTransparent` prop. Use `stackPresentation` instead to be consistent with v5 `native-stack` */\n mode?: 'modal' | 'containedModal';\n /** This is an option from `stackNavigator` and makes the header hide when set to `none`. Use `headerShown` instead to be consistent with v5 `native-stack` */\n headerMode?: 'none';\n /** This is an option from `stackNavigator` and controls the stack presentation along with `mode` prop. Use `stackPresentation` instead to be consistent with v5 `native-stack` */\n transparentCard?: boolean;\n};\n\nfunction removeScene(\n route: NavigationRoute,\n dismissCount: number,\n navigation: StackNavigationHelpers\n) {\n navigation.dispatch({\n // @ts-ignore special navigation action for native stack\n type: REMOVE_ACTION,\n immediate: true,\n key: route.key,\n dismissCount,\n });\n}\n\nfunction onAppear(\n route: NavigationRoute,\n descriptor: NativeStackDescriptor,\n navigation: StackNavigationHelpers\n) {\n descriptor.options?.onAppear?.();\n navigation.dispatch(\n StackActions.completeTransition({\n toChildKey: route.key,\n key: navigation.state.key,\n })\n );\n}\n\nfunction onFinishTransitioning(navigation: StackNavigationHelpers) {\n const { routes } = navigation.state;\n const lastRoute = routes?.length && routes[routes.length - 1];\n\n if (lastRoute) {\n navigation.dispatch(\n StackActions.completeTransition({\n toChildKey: lastRoute.key,\n key: navigation.state.key,\n })\n );\n }\n}\n\nfunction renderHeaderConfig(\n index: number,\n route: NavigationRoute,\n descriptor: NativeStackDescriptor,\n navigationConfig: NativeStackNavigationConfig\n) {\n const { options } = descriptor;\n const { headerMode } = navigationConfig;\n\n const {\n backButtonInCustomView,\n direction,\n disableBackButtonMenu,\n headerBackTitle,\n headerBackTitleStyle,\n headerBackTitleVisible,\n headerHideBackButton,\n headerHideShadow,\n headerLargeStyle,\n headerLargeTitle,\n headerLargeTitleHideShadow,\n headerLargeTitleStyle,\n headerShown,\n headerStyle,\n headerTintColor,\n headerTitleStyle,\n headerTopInsetEnabled = true,\n headerTranslucent,\n hideShadow,\n largeTitle,\n largeTitleHideShadow,\n title,\n translucent,\n } = options;\n\n const scene = {\n index,\n key: route.key,\n route,\n descriptor,\n };\n\n const headerOptions: ScreenStackHeaderConfigProps = {\n backButtonInCustomView,\n backTitle: headerBackTitleVisible === false ? '' : headerBackTitle,\n backTitleFontFamily: headerBackTitleStyle?.fontFamily,\n backTitleFontSize: headerBackTitleStyle?.fontSize,\n color: headerTintColor,\n direction,\n disableBackButtonMenu,\n topInsetEnabled: headerTopInsetEnabled,\n hideBackButton: headerHideBackButton,\n hideShadow: headerHideShadow || hideShadow,\n largeTitle: headerLargeTitle || largeTitle,\n largeTitleBackgroundColor:\n headerLargeStyle?.backgroundColor ||\n // @ts-ignore old implementation, will not be present in TS API, but can be used here\n headerLargeTitleStyle?.backgroundColor,\n largeTitleColor: headerLargeTitleStyle?.color,\n largeTitleFontFamily: headerLargeTitleStyle?.fontFamily,\n largeTitleFontSize: headerLargeTitleStyle?.fontSize,\n largeTitleFontWeight: headerLargeTitleStyle?.fontWeight,\n largeTitleHideShadow: largeTitleHideShadow || headerLargeTitleHideShadow,\n title,\n titleColor: headerTitleStyle?.color || headerTintColor,\n titleFontFamily: headerTitleStyle?.fontFamily,\n titleFontSize: headerTitleStyle?.fontSize,\n titleFontWeight: headerTitleStyle?.fontWeight,\n translucent: headerTranslucent || translucent || false,\n };\n\n const hasHeader =\n headerShown !== false && headerMode !== 'none' && options.header !== null;\n if (!hasHeader) {\n return \n );\n })}\n \n );\n}\n\nconst styles = StyleSheet.create({\n scenes: { flex: 1 },\n});\n\nfunction createStackNavigator(\n routeConfigMap: NavigationRouteConfigMap<\n NativeStackNavigationOptions,\n StackNavigationProp\n >,\n stackConfig: CreateNavigatorConfig<\n NativeStackNavigationConfig,\n NavigationStackRouterConfig,\n NativeStackNavigationOptions,\n StackNavigationProp\n > = {}\n): NavigationNavigator<\n Record,\n NavigationProp\n> {\n const router = StackRouter(routeConfigMap, stackConfig);\n\n // below we override getStateForAction method in order to add handling for\n // a custom native stack navigation action. The action REMOVE that we want to\n // add works in a similar way to POP, but it does not remove all the routes\n // that sit on top of the removed route. For example if we have three routes\n // [a,b,c] and call POP on b, then both b and c will go away. In case we\n // call REMOVE on b, only b will be removed from the stack and the resulting\n // state will be [a, c]\n const superGetStateForAction = router.getStateForAction;\n router.getStateForAction = (\n action: NavigationAction | NativeStackRemoveNavigationAction,\n state\n ) => {\n if (action.type === REMOVE_ACTION) {\n const { key, immediate, dismissCount } = action;\n let backRouteIndex = state.index;\n if (key) {\n const backRoute = state.routes.find(\n (route: NavigationRoute) => route.key === key\n );\n backRouteIndex = state.routes.indexOf(backRoute);\n }\n\n if (backRouteIndex > 0) {\n const newRoutes = [...state.routes];\n if (dismissCount > 1) {\n // when dismissing with iOS 14 native header back button, we can pop more than 1 screen at a time\n // and the `backRouteIndex` is the index of the previous screen. Since we are starting already\n // on the previous screen, we add 1 to start.\n newRoutes.splice(backRouteIndex - dismissCount + 1, dismissCount);\n } else {\n newRoutes.splice(backRouteIndex, 1);\n }\n\n return {\n ...state,\n routes: newRoutes,\n index: newRoutes.length - 1,\n isTransitioning: immediate !== true,\n };\n }\n }\n return superGetStateForAction(action as NavigationAction, state);\n };\n // Create a navigator with StackView as the view\n return createNavigator(StackView, router, stackConfig);\n}\n\nexport default createStackNavigator;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,QAAQ,EACRC,UAAU,QAKL,cAAc;AACrB,SACEC,aAAa,EACbC,WAAW,EACXC,gCAAgC,EAChCC,2BAA2B,EAC3BC,uBAAuB,EAEvBC,yBAAyB,EACzBC,0BAA0B,EAC1BC,8BAA8B,EAC9BC,SAAS,QAEJ,sBAAsB;AAC7B,SACEC,eAAe,EACfC,SAAS,EACTC,YAAY,EACZC,WAAW,QAYN,kBAAkB;AAEzB,SAASC,gBAAgB,QAAQ,wBAAwB;AAOzD,MAAMC,aAAa,GAAG,6BAA6B;AAEnD,MAAMC,SAAS,GAAGjB,QAAQ,CAACkB,EAAE,KAAK,SAAS;AAE3C,IAAIC,OAAO,GAAGF,SAAS;AAEvB,SAASG,sBAAsB,CAACC,gBAAyB,EAAEC,KAAc,EAAE;EACzE,IAAI,OAAOD,gBAAgB,KAAK,UAAU,EAAE;IAC1C,OAAOA,gBAAgB,CAACC,KAAK,CAAC;EAChC;EACA,OAAOD,gBAAgB;AACzB;AAuEA,SAASE,WAAW,CAClBC,KAAwC,EACxCC,YAAoB,EACpBC,UAAkC,EAClC;EACAA,UAAU,CAACC,QAAQ,CAAC;IAClB;IACAC,IAAI,EAAEZ,aAAa;IACnBa,SAAS,EAAE,IAAI;IACfC,GAAG,EAAEN,KAAK,CAACM,GAAG;IACdL;EACF,CAAC,CAAC;AACJ;AAEA,SAASM,QAAQ,CACfP,KAAwC,EACxCQ,UAAiC,EACjCN,UAAkC,EAClC;EAAA;EACA,uBAAAM,UAAU,CAACC,OAAO,iFAAlB,oBAAoBF,QAAQ,0DAA5B,+CAAgC;EAChCL,UAAU,CAACC,QAAQ,CACjBd,YAAY,CAACqB,kBAAkB,CAAC;IAC9BC,UAA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A,OAAO6H,sBAAsB,CAACE,MAAM,EAAsBxH,KAAK,CAAC;EAClE,CAAC;EACD;EACA,OAAOzB,eAAe,CAAC0G,SAAS,EAAEoC,MAAM,EAAED,WAAW,CAAC;AACxD;AAEA,eAAeF,oBAAoB"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/FullWindowOverlayNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/FullWindowOverlayNativeComponent.js new file mode 100644 index 00000000..26ea3bd9 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/FullWindowOverlayNativeComponent.js @@ -0,0 +1,8 @@ +/** + * + * @format + */ +/* eslint-disable */ +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +export default codegenNativeComponent('RNSFullWindowOverlay', {}); +//# sourceMappingURL=FullWindowOverlayNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/FullWindowOverlayNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/FullWindowOverlayNativeComponent.js.map new file mode 100644 index 00000000..df7f477a --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/FullWindowOverlayNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["codegenNativeComponent"],"sources":["FullWindowOverlayNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent(\n 'RNSFullWindowOverlay',\n {}\n): ComponentType);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,sBAAsB,MAAM,yDAAyD;AAU5F,eAAgBA,sBAAsB,CACpC,sBAAsB,EACtB,CAAC,CAAC,CACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenContainerNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenContainerNativeComponent.js new file mode 100644 index 00000000..e5e60cca --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenContainerNativeComponent.js @@ -0,0 +1,8 @@ +/** + * + * @format + */ +/* eslint-disable */ +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +export default codegenNativeComponent('RNSScreenContainer', {}); +//# sourceMappingURL=ScreenContainerNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenContainerNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenContainerNativeComponent.js.map new file mode 100644 index 00000000..aef094f1 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenContainerNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["codegenNativeComponent"],"sources":["ScreenContainerNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent(\n 'RNSScreenContainer',\n {}\n): ComponentType);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,sBAAsB,MAAM,yDAAyD;AAU5F,eAAgBA,sBAAsB,CACpC,oBAAoB,EACpB,CAAC,CAAC,CACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNativeComponent.js new file mode 100644 index 00000000..cdc3bc3a --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNativeComponent.js @@ -0,0 +1,10 @@ +/** + * + * @format + */ +/* eslint-disable */ +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +export default codegenNativeComponent('RNSScreen', { + interfaceOnly: true +}); +//# sourceMappingURL=ScreenNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNativeComponent.js.map new file mode 100644 index 00000000..7ace6dfe --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["codegenNativeComponent","interfaceOnly"],"sources":["ScreenNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\nimport type { ColorValue } from 'react-native/Libraries/StyleSheet/StyleSheet';\nimport type {\n BubblingEventHandler,\n WithDefault,\n Int32,\n} from 'react-native/Libraries/Types/CodegenTypes';\n\ntype ScreenEvent = $ReadOnly<{||}>;\n\ntype ScreenDismissedEvent = $ReadOnly<{|\n dismissCount: Int32,\n|}>;\n\ntype TransitionProgressEvent = $ReadOnly<{|\n progress: Double,\n closing: Int32,\n goingForward: Int32,\n|}>;\n\ntype GestureResponseDistanceType = $ReadOnly<{|\n start: Float,\n end: Float,\n top: Float,\n bottom: Float,\n|}>;\n\ntype StackPresentation =\n | 'push'\n | 'modal'\n | 'transparentModal'\n | 'fullScreenModal'\n | 'formSheet'\n | 'containedModal'\n | 'containedTransparentModal';\n\ntype StackAnimation =\n | 'default'\n | 'flip'\n | 'simple_push'\n | 'none'\n | 'fade'\n | 'slide_from_right'\n | 'slide_from_left'\n | 'slide_from_bottom'\n | 'fade_from_bottom';\n\ntype SwipeDirection = 'vertical' | 'horizontal';\n\ntype ReplaceAnimation = 'pop' | 'push';\n\ntype SheetDetentTypes = 'large' | 'medium' | 'all';\n\nexport type NativeProps = $ReadOnly<{|\n ...ViewProps,\n onAppear?: ?BubblingEventHandler,\n onDisappear?: ?BubblingEventHandler,\n onDismissed?: ?BubblingEventHandler,\n onNativeDismissCancelled?: ?BubblingEventHandler,\n onWillAppear?: ?BubblingEventHandler,\n onWillDisappear?: ?BubblingEventHandler,\n onTransitionProgress?: ?BubblingEventHandler,\n sheetAllowedDetents?: WithDefault,\n sheetLargestUndimmedDetent?: WithDefault,\n sheetGrabberVisible?: WithDefault,\n sheetCornerRadius?: WithDefault,\n sheetExpandsWhenScrolledToEdge?: WithDefault,\n customAnimationOnSwipe?: boolean,\n fullScreenSwipeEnabled?: boolean,\n homeIndicatorHidden?: boolean,\n preventNativeDismiss?: boolean,\n gestureEnabled?: WithDefault,\n statusBarColor?: ColorValue,\n statusBarHidden?: boolean,\n screenOrientation?: string,\n statusBarAnimation?: string,\n statusBarStyle?: string,\n statusBarTranslucent?: boolean,\n gestureResponseDistance?: GestureResponseDistanceType,\n stackPresentation?: WithDefault,\n stackAnimation?: WithDefault,\n transitionDuration?: WithDefault,\n replaceAnimation?: WithDefault,\n swipeDirection?: WithDefault,\n hideKeyboardOnSwipe?: boolean,\n activityState?: WithDefault,\n navigationBarColor?: ColorValue,\n navigationBarHidden?: boolean,\n nativeBackButtonDismissalEnabled?: boolean,\n onHeaderBackButtonClicked?: ?BubblingEventHandler,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent('RNSScreen', {\n interfaceOnly: true,\n}): ComponentType);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,sBAAsB,MAAM,yDAAyD;AAgG5F,eAAgBA,sBAAsB,CAAc,WAAW,EAAE;EAC/DC,aAAa,EAAE;AACjB,CAAC,CAAC"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNavigationContainerNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNavigationContainerNativeComponent.js new file mode 100644 index 00000000..d870039b --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNavigationContainerNativeComponent.js @@ -0,0 +1,8 @@ +/** + * + * @format + */ +/* eslint-disable */ +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +export default codegenNativeComponent('RNSScreenNavigationContainer', {}); +//# sourceMappingURL=ScreenNavigationContainerNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map new file mode 100644 index 00000000..53e436ef --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["codegenNativeComponent"],"sources":["ScreenNavigationContainerNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent(\n 'RNSScreenNavigationContainer',\n {}\n): ComponentType);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,sBAAsB,MAAM,yDAAyD;AAU5F,eAAgBA,sBAAsB,CACpC,8BAA8B,EAC9B,CAAC,CAAC,CACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js new file mode 100644 index 00000000..5b05220b --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js @@ -0,0 +1,9 @@ +/** + * + * @format + */ +/* eslint-disable */ +import * as React from 'react'; +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +export default codegenNativeComponent('RNSScreenStackHeaderConfig', {}); +//# sourceMappingURL=ScreenStackHeaderConfigNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map new file mode 100644 index 00000000..b5d9caae --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","codegenNativeComponent"],"sources":["ScreenStackHeaderConfigNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport * as React from 'react';\n\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\nimport type { ColorValue } from 'react-native/Libraries/StyleSheet/StyleSheet';\nimport type {\n Int32,\n WithDefault,\n} from 'react-native/Libraries/Types/CodegenTypes';\n\ntype DirectionType = 'rtl' | 'ltr';\n\nexport type NativeProps = $ReadOnly<{|\n ...ViewProps,\n backgroundColor?: ColorValue,\n backTitle?: string,\n backTitleFontFamily?: string,\n backTitleFontSize?: Int32,\n color?: ColorValue,\n direction?: WithDefault,\n hidden?: boolean,\n hideShadow?: boolean,\n largeTitle?: boolean,\n largeTitleFontFamily?: string,\n largeTitleFontSize?: Int32,\n largeTitleFontWeight?: string,\n largeTitleBackgroundColor?: ColorValue,\n largeTitleHideShadow?: boolean,\n largeTitleColor?: ColorValue,\n translucent?: boolean,\n title?: string,\n titleFontFamily?: string,\n titleFontSize?: Int32,\n titleFontWeight?: string,\n titleColor?: ColorValue,\n disableBackButtonMenu?: boolean,\n hideBackButton?: boolean,\n backButtonInCustomView?: boolean,\n // TODO: implement this props on iOS\n topInsetEnabled?: boolean,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent(\n 'RNSScreenStackHeaderConfig',\n {}\n): ComponentType);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,sBAAsB,MAAM,yDAAyD;AA2C5F,eAAgBA,sBAAsB,CACpC,4BAA4B,EAC5B,CAAC,CAAC,CACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js new file mode 100644 index 00000000..139db1ef --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js @@ -0,0 +1,9 @@ +/** + * + * @format + */ +/* eslint-disable */ +import * as React from 'react'; +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +export default codegenNativeComponent('RNSScreenStackHeaderSubview', {}); +//# sourceMappingURL=ScreenStackHeaderSubviewNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map new file mode 100644 index 00000000..6bcceba4 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","codegenNativeComponent"],"sources":["ScreenStackHeaderSubviewNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport * as React from 'react';\n\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\nimport type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';\n\nexport type HeaderSubviewTypes =\n | 'back'\n | 'right'\n | 'left'\n | 'title'\n | 'center'\n | 'searchBar';\n\nexport type NativeProps = $ReadOnly<{|\n ...ViewProps,\n type?: WithDefault,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent(\n 'RNSScreenStackHeaderSubview',\n {}\n): ComponentType);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,sBAAsB,MAAM,yDAAyD;AAoB5F,eAAgBA,sBAAsB,CACpC,6BAA6B,EAC7B,CAAC,CAAC,CACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackNativeComponent.js new file mode 100644 index 00000000..bc4da231 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackNativeComponent.js @@ -0,0 +1,8 @@ +/** + * + * @format + */ +/* eslint-disable */ +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +export default codegenNativeComponent('RNSScreenStack', {}); +//# sourceMappingURL=ScreenStackNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackNativeComponent.js.map new file mode 100644 index 00000000..d5dbeb7f --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/ScreenStackNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["codegenNativeComponent"],"sources":["ScreenStackNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\nimport type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';\n\ntype FinishTransitioningEvent = $ReadOnly<{||}>;\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n onFinishTransitioning?: ?DirectEventHandler,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent(\n 'RNSScreenStack',\n {}\n): ComponentType);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,sBAAsB,MAAM,yDAAyD;AAc5F,eAAgBA,sBAAsB,CACpC,gBAAgB,EAChB,CAAC,CAAC,CACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/SearchBarNativeComponent.js b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/SearchBarNativeComponent.js new file mode 100644 index 00000000..4e676678 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/SearchBarNativeComponent.js @@ -0,0 +1,10 @@ +/** + * + * @format + */ +/* eslint-disable */ +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +import { ColorValue } from 'react-native/Libraries/StyleSheet/StyleSheet'; +import { tintColor } from 'react-native/Libraries/Components/View/ReactNativeStyleAttributes'; +export default codegenNativeComponent('RNSSearchBar', {}); +//# sourceMappingURL=SearchBarNativeComponent.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/SearchBarNativeComponent.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/SearchBarNativeComponent.js.map new file mode 100644 index 00000000..1934d020 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/fabric/SearchBarNativeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"names":["codegenNativeComponent","ColorValue","tintColor"],"sources":["SearchBarNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\nimport { ColorValue } from 'react-native/Libraries/StyleSheet/StyleSheet';\nimport type {\n WithDefault,\n BubblingEventHandler,\n} from 'react-native/Libraries/Types/CodegenTypes';\nimport { tintColor } from 'react-native/Libraries/Components/View/ReactNativeStyleAttributes';\n\ntype SearchBarEvent = $ReadOnly<{||}>;\n\ntype SearchButtonPressedEvent = $ReadOnly<{|\n text?: string,\n|}>;\n\ntype ChangeTextEvent = $ReadOnly<{|\n text?: string,\n|}>;\n\ntype AutoCapitalizeType = 'none' | 'words' | 'sentences' | 'characters';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n onFocus?: ?BubblingEventHandler,\n onBlur?: ?BubblingEventHandler,\n onSearchButtonPress?: ?BubblingEventHandler,\n onCancelButtonPress?: ?BubblingEventHandler,\n onChangeText?: ?BubblingEventHandler,\n hideWhenScrolling?: boolean,\n autoCapitalize?: WithDefault,\n placeholder?: string,\n obscureBackground?: boolean,\n hideNavigationBar?: boolean,\n cancelButtonText?: string,\n // TODO: implement these on iOS\n barTintColor?: ColorValue,\n tintColor?: ColorValue,\n textColor?: ColorValue,\n\n // Android only\n disableBackButtonOverride?: boolean,\n // TODO: consider creating enum here\n inputType?: string,\n onClose?: ?BubblingEventHandler,\n onOpen?: ?BubblingEventHandler,\n hintTextColor?: ColorValue,\n headerIconColor?: ColorValue,\n shouldShowHintSearchIcon?: WithDefault,\n|}>;\n\ntype ComponentType = HostComponent;\n\nexport default (codegenNativeComponent(\n 'RNSSearchBar',\n {}\n): ComponentType);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,sBAAsB,MAAM,yDAAyD;AAG5F,SAASC,UAAU,QAAQ,8CAA8C;AAKzE,SAASC,SAAS,QAAQ,mEAAmE;AA6C7F,eAAgBF,sBAAsB,CACpC,cAAc,EACd,CAAC,CAAC,CACH"} \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/index.js b/iut-expo-starter/node_modules/react-native-screens/lib/module/index.js new file mode 100644 index 00000000..f4cb2c73 --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/index.js @@ -0,0 +1,70 @@ +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +import React from 'react'; +import { Animated, View, Image } from 'react-native'; +export * from './types'; +export { default as useTransitionProgress } from './useTransitionProgress'; +export { isSearchBarAvailableForCurrentPlatform, executeNativeBackPress } from './utils'; +let ENABLE_SCREENS = true; +export function enableScreens() { + let shouldEnableScreens = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + ENABLE_SCREENS = shouldEnableScreens; +} +export function screensEnabled() { + return ENABLE_SCREENS; +} + +// @ts-ignore function stub, freezing logic is located in index.native.tsx +// eslint-disable-next-line @typescript-eslint/no-unused-vars +export function enableFreeze() { + let shouldEnableReactFreeze = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; +} // noop + +export class NativeScreen extends React.Component { + render() { + let { + active, + activityState, + style, + enabled = ENABLE_SCREENS, + ...rest + } = this.props; + if (enabled) { + if (active !== undefined && activityState === undefined) { + activityState = active !== 0 ? 2 : 0; // change taken from index.native.tsx + } + + return /*#__PURE__*/React.createElement(View + // @ts-expect-error: hidden exists on web, but not in React Native + , _extends({ + hidden: activityState === 0, + style: [style, { + display: activityState !== 0 ? 'flex' : 'none' + }] + }, rest)); + } + return /*#__PURE__*/React.createElement(View, rest); + } +} +export const Screen = Animated.createAnimatedComponent(NativeScreen); +export const InnerScreen = View; +export const ScreenContext = /*#__PURE__*/React.createContext(Screen); +export const ScreenContainer = View; +export const NativeScreenContainer = View; +export const NativeScreenNavigationContainer = View; +export const ScreenStack = View; +export const FullWindowOverlay = View; +export const ScreenStackHeaderBackButtonImage = props => /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Image, _extends({ + resizeMode: "center", + fadeDuration: 0 +}, props))); +export const ScreenStackHeaderRightView = props => /*#__PURE__*/React.createElement(View, props); +export const ScreenStackHeaderLeftView = props => /*#__PURE__*/React.createElement(View, props); +export const ScreenStackHeaderCenterView = props => /*#__PURE__*/React.createElement(View, props); +export const ScreenStackHeaderSearchBarView = props => /*#__PURE__*/React.createElement(View, props); +export const ScreenStackHeaderConfig = View; + +// @ts-expect-error: search bar props have no common props with View +export const SearchBar = View; +export const ScreenStackHeaderSubview = View; +export const shouldUseActivityState = true; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/iut-expo-starter/node_modules/react-native-screens/lib/module/index.js.map b/iut-expo-starter/node_modules/react-native-screens/lib/module/index.js.map new file mode 100644 index 00000000..7180dc8c --- /dev/null +++ b/iut-expo-starter/node_modules/react-native-screens/lib/module/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["React","Animated","View","Image","default","useTransitionProgress","isSearchBarAvailableForCurrentPlatform","executeNativeBackPress","ENABLE_SCREENS","enableScreens","shouldEnableScreens","screensEnabled","enableFreeze","shouldEnableReactFreeze","NativeScreen","Component","render","active","activityState","style","enabled","rest","props","undefined","display","Screen","createAnimatedComponent","InnerScreen","ScreenContext","createContext","ScreenContainer","NativeScreenContainer","NativeScreenNavigationContainer","ScreenStack","FullWindowOverlay","ScreenStackHeaderBackButtonImage","ScreenStackHeaderRightView","ScreenStackHeaderLeftView","ScreenStackHeaderCenterView","ScreenStackHeaderSearchBarView","ScreenStackHeaderConfig","SearchBar","ScreenStackHeaderSubview","shouldUseActivityState"],"sources":["index.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Animated, View, ViewProps, ImageProps, Image } from 'react-native';\nimport {\n ScreenProps,\n ScreenContainerProps,\n ScreenStackProps,\n ScreenStackHeaderConfigProps,\n HeaderSubviewTypes,\n SearchBarProps,\n} from './types';\n\nexport * from './types';\nexport { default as useTransitionProgress } from './useTransitionProgress';\nexport {\n isSearchBarAvailableForCurrentPlatform,\n executeNativeBackPress,\n} from './utils';\n\nlet ENABLE_SCREENS = true;\n\nexport function enableScreens(shouldEnableScreens = true): void {\n ENABLE_SCREENS = shouldEnableScreens;\n}\n\nexport function screensEnabled(): boolean {\n return ENABLE_SCREENS;\n}\n\n// @ts-ignore function stub, freezing logic is located in index.native.tsx\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function enableFreeze(shouldEnableReactFreeze = true): void {\n // noop\n}\n\nexport class NativeScreen extends React.Component {\n render(): JSX.Element {\n let {\n active,\n activityState,\n style,\n enabled = ENABLE_SCREENS,\n ...rest\n } = this.props;\n\n if (enabled) {\n if (active !== undefined && activityState === undefined) {\n activityState = active !== 0 ? 2 : 0; // change taken from index.native.tsx\n }\n return (\n