@amazon-devices/react-native-screens 2.0.1758683737
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +7 -0
- package/README.md +223 -0
- package/RNScreens.podspec +53 -0
- package/SystemBundles/8f5a820b958535e533acb38dbc0c72c1837721b9db075f4a1740e42b9fee3910.bundle +33668 -0
- package/SystemBundles/8f5a820b958535e533acb38dbc0c72c1837721b9db075f4a1740e42b9fee3910.map +1 -0
- package/SystemModules/amzn__react-native-screens.modules.txt +101 -0
- package/SystemModules/amzn__react-native-screens.private.modules.txt +244 -0
- package/SystemModules/keplerscript-system-bundle-config.json +7 -0
- package/THIRD_PARTY_NOTICES.txt +707 -0
- package/android/build.gradle +133 -0
- package/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt +49 -0
- package/android/src/main/AndroidManifest.xml +5 -0
- package/android/src/main/java/com/swmansion/rnscreens/CustomSearchView.kt +77 -0
- package/android/src/main/java/com/swmansion/rnscreens/CustomToolbar.kt +7 -0
- package/android/src/main/java/com/swmansion/rnscreens/FragmentBackPressOverrider.kt +29 -0
- package/android/src/main/java/com/swmansion/rnscreens/FragmentHolder.kt +7 -0
- package/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt +21 -0
- package/android/src/main/java/com/swmansion/rnscreens/Screen.kt +289 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt +372 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenContainerViewManager.kt +40 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenEventDispatcher.kt +21 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenFragment.kt +331 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenFragmentWrapper.kt +22 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt +336 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt +282 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragmentWrapper.kt +15 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt +398 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt +204 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubview.kt +38 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubviewManager.kt +41 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackViewManager.kt +75 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt +186 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt +296 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreensShadowNode.kt +19 -0
- package/android/src/main/java/com/swmansion/rnscreens/SearchBarManager.kt +133 -0
- package/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt +178 -0
- package/android/src/main/java/com/swmansion/rnscreens/SearchViewFormatter.kt +67 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderAttachedEvent.kt +22 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderBackButtonClickedEvent.kt +22 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderDetachedEvent.kt +22 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderHeightChangeEvent.kt +26 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenAppearEvent.kt +18 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenDisappearEvent.kt +18 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenDismissedEvent.kt +20 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenTransitionProgressEvent.kt +32 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillAppearEvent.kt +18 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillDisappearEvent.kt +18 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarBlurEvent.kt +22 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarChangeTextEvent.kt +28 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarCloseEvent.kt +22 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarFocusEvent.kt +22 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarOpenEvent.kt +22 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarSearchButtonPressEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/StackFinishTransitioningEvent.kt +18 -0
- package/android/src/main/java/com/swmansion/rnscreens/utils/DeviceUtils.kt +12 -0
- package/android/src/main/jni/CMakeLists.txt +72 -0
- package/android/src/main/jni/rnscreens.cpp +16 -0
- package/android/src/main/jni/rnscreens.h +28 -0
- package/android/src/main/res/base/anim/rns_default_enter_in.xml +18 -0
- package/android/src/main/res/base/anim/rns_default_enter_out.xml +19 -0
- package/android/src/main/res/base/anim/rns_default_exit_in.xml +17 -0
- package/android/src/main/res/base/anim/rns_default_exit_out.xml +18 -0
- package/android/src/main/res/base/anim/rns_fade_from_bottom.xml +14 -0
- package/android/src/main/res/base/anim/rns_fade_in.xml +7 -0
- package/android/src/main/res/base/anim/rns_fade_out.xml +7 -0
- package/android/src/main/res/base/anim/rns_fade_to_bottom.xml +15 -0
- package/android/src/main/res/base/anim/rns_no_animation_20.xml +6 -0
- package/android/src/main/res/base/anim/rns_no_animation_250.xml +7 -0
- package/android/src/main/res/base/anim/rns_no_animation_350.xml +6 -0
- package/android/src/main/res/base/anim/rns_no_animation_medium.xml +7 -0
- package/android/src/main/res/base/anim/rns_slide_in_from_bottom.xml +7 -0
- package/android/src/main/res/base/anim/rns_slide_in_from_left.xml +5 -0
- package/android/src/main/res/base/anim/rns_slide_in_from_right.xml +5 -0
- package/android/src/main/res/base/anim/rns_slide_out_to_bottom.xml +7 -0
- package/android/src/main/res/base/anim/rns_slide_out_to_left.xml +5 -0
- package/android/src/main/res/base/anim/rns_slide_out_to_right.xml +5 -0
- package/android/src/main/res/base/anim/rns_standard_accelerate_interpolator.xml +6 -0
- package/android/src/main/res/v33/anim-v33/rns_default_enter_in.xml +38 -0
- package/android/src/main/res/v33/anim-v33/rns_default_enter_out.xml +38 -0
- package/android/src/main/res/v33/anim-v33/rns_default_exit_in.xml +38 -0
- package/android/src/main/res/v33/anim-v33/rns_default_exit_out.xml +38 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerDelegate.java +111 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerInterface.java +44 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerDelegate.java +107 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerInterface.java +42 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderSubviewManagerDelegate.java +31 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderSubviewManagerInterface.java +17 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackManagerDelegate.java +25 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackManagerInterface.java +16 -0
- package/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt +10 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenComponentDescriptor.h +41 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp +9 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.h +30 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.cpp +14 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h +45 -0
- package/ios/RCTImageComponentView+RNSScreenStackHeaderConfig.h +11 -0
- package/ios/RCTImageComponentView+RNSScreenStackHeaderConfig.mm +14 -0
- package/ios/RNSConvert.h +36 -0
- package/ios/RNSConvert.mm +154 -0
- package/ios/RNSEnums.h +71 -0
- package/ios/RNSFullWindowOverlay.h +34 -0
- package/ios/RNSFullWindowOverlay.mm +241 -0
- package/ios/RNSScreen.h +144 -0
- package/ios/RNSScreen.mm +1599 -0
- package/ios/RNSScreenContainer.h +45 -0
- package/ios/RNSScreenContainer.mm +343 -0
- package/ios/RNSScreenNavigationContainer.h +16 -0
- package/ios/RNSScreenNavigationContainer.mm +66 -0
- package/ios/RNSScreenStack.h +37 -0
- package/ios/RNSScreenStack.mm +1111 -0
- package/ios/RNSScreenStackAnimator.h +8 -0
- package/ios/RNSScreenStackAnimator.mm +320 -0
- package/ios/RNSScreenStackHeaderConfig.h +74 -0
- package/ios/RNSScreenStackHeaderConfig.mm +967 -0
- package/ios/RNSScreenStackHeaderSubview.h +44 -0
- package/ios/RNSScreenStackHeaderSubview.mm +147 -0
- package/ios/RNSScreenWindowTraits.h +26 -0
- package/ios/RNSScreenWindowTraits.mm +266 -0
- package/ios/RNSSearchBar.h +43 -0
- package/ios/RNSSearchBar.mm +465 -0
- package/ios/RNScreens.xcodeproj/project.pbxproj +461 -0
- package/ios/UIViewController+RNScreens.h +9 -0
- package/ios/UIViewController+RNScreens.mm +78 -0
- package/ios/UIWindow+RNScreens.h +9 -0
- package/ios/UIWindow+RNScreens.mm +17 -0
- package/ios/events/RNSHeaderHeightChangeEvent.h +8 -0
- package/ios/events/RNSHeaderHeightChangeEvent.mm +44 -0
- package/ios/events/RNSScreenViewEvent.h +12 -0
- package/ios/events/RNSScreenViewEvent.mm +59 -0
- package/ios/utils/RNSUIBarButtonItem.h +5 -0
- package/ios/utils/RNSUIBarButtonItem.mm +22 -0
- package/kepler-compatibility.json +8 -0
- package/kepler-transformed-package-info.json +3 -0
- package/lib/commonjs/TransitionProgressContext.js +11 -0
- package/lib/commonjs/TransitionProgressContext.js.map +1 -0
- package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js +11 -0
- package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map +1 -0
- package/lib/commonjs/fabric/ScreenContainerNativeComponent.js +33 -0
- package/lib/commonjs/fabric/ScreenContainerNativeComponent.js.map +1 -0
- package/lib/commonjs/fabric/ScreenNativeComponent.js +70 -0
- package/lib/commonjs/fabric/ScreenNativeComponent.js.map +1 -0
- package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js +11 -0
- package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -0
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js +31 -0
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -0
- package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js +12 -0
- package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -0
- package/lib/commonjs/fabric/ScreenStackNativeComponent.js +35 -0
- package/lib/commonjs/fabric/ScreenStackNativeComponent.js.map +1 -0
- package/lib/commonjs/fabric/SearchBarNativeComponent.js +19 -0
- package/lib/commonjs/fabric/SearchBarNativeComponent.js.map +1 -0
- package/lib/commonjs/index.js +147 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/index.native.js +407 -0
- package/lib/commonjs/index.native.js.map +1 -0
- package/lib/commonjs/native-stack/index.js +49 -0
- package/lib/commonjs/native-stack/index.js.map +1 -0
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +75 -0
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -0
- package/lib/commonjs/native-stack/types.js +6 -0
- package/lib/commonjs/native-stack/types.js.map +1 -0
- package/lib/commonjs/native-stack/utils/AnimatedHeaderHeightContext.js +12 -0
- package/lib/commonjs/native-stack/utils/AnimatedHeaderHeightContext.js.map +1 -0
- package/lib/commonjs/native-stack/utils/HeaderHeightContext.js +12 -0
- package/lib/commonjs/native-stack/utils/HeaderHeightContext.js.map +1 -0
- package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js +75 -0
- package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js.map +1 -0
- package/lib/commonjs/native-stack/utils/getDefaultHeaderHeight.js +35 -0
- package/lib/commonjs/native-stack/utils/getDefaultHeaderHeight.js.map +1 -0
- package/lib/commonjs/native-stack/utils/useAnimatedHeaderHeight.js +19 -0
- package/lib/commonjs/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -0
- package/lib/commonjs/native-stack/utils/useBackPressSubscription.js +54 -0
- package/lib/commonjs/native-stack/utils/useBackPressSubscription.js.map +1 -0
- package/lib/commonjs/native-stack/utils/useHeaderHeight.js +19 -0
- package/lib/commonjs/native-stack/utils/useHeaderHeight.js.map +1 -0
- package/lib/commonjs/native-stack/views/FontProcessor.js +21 -0
- package/lib/commonjs/native-stack/views/FontProcessor.js.map +1 -0
- package/lib/commonjs/native-stack/views/HeaderConfig.js +141 -0
- package/lib/commonjs/native-stack/views/HeaderConfig.js.map +1 -0
- package/lib/commonjs/native-stack/views/NativeStackView.js +354 -0
- package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -0
- package/lib/commonjs/reanimated/ReanimatedHeaderHeightContext.js +12 -0
- package/lib/commonjs/reanimated/ReanimatedHeaderHeightContext.js.map +1 -0
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js +101 -0
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -0
- package/lib/commonjs/reanimated/ReanimatedScreen.js +22 -0
- package/lib/commonjs/reanimated/ReanimatedScreen.js.map +1 -0
- package/lib/commonjs/reanimated/ReanimatedScreenProvider.js +47 -0
- package/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map +1 -0
- package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js +12 -0
- package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map +1 -0
- package/lib/commonjs/reanimated/index.js +28 -0
- package/lib/commonjs/reanimated/index.js.map +1 -0
- package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js +19 -0
- package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js.map +1 -0
- package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js +19 -0
- package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map +1 -0
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/useTransitionProgress.js +19 -0
- package/lib/commonjs/useTransitionProgress.js.map +1 -0
- package/lib/commonjs/utils.js +21 -0
- package/lib/commonjs/utils.js.map +1 -0
- package/lib/module/TransitionProgressContext.js +3 -0
- package/lib/module/TransitionProgressContext.js.map +1 -0
- package/lib/module/fabric/FullWindowOverlayNativeComponent.js +4 -0
- package/lib/module/fabric/FullWindowOverlayNativeComponent.js.map +1 -0
- package/lib/module/fabric/ScreenContainerNativeComponent.js +25 -0
- package/lib/module/fabric/ScreenContainerNativeComponent.js.map +1 -0
- package/lib/module/fabric/ScreenNativeComponent.js +63 -0
- package/lib/module/fabric/ScreenNativeComponent.js.map +1 -0
- package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js +4 -0
- package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -0
- package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js +23 -0
- package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -0
- package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js +7 -0
- package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -0
- package/lib/module/fabric/ScreenStackNativeComponent.js +28 -0
- package/lib/module/fabric/ScreenStackNativeComponent.js.map +1 -0
- package/lib/module/fabric/SearchBarNativeComponent.js +10 -0
- package/lib/module/fabric/SearchBarNativeComponent.js.map +1 -0
- package/lib/module/index.js +67 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/index.native.js +410 -0
- package/lib/module/index.native.js.map +1 -0
- package/lib/module/native-stack/index.js +22 -0
- package/lib/module/native-stack/index.js.map +1 -0
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js +72 -0
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -0
- package/lib/module/native-stack/types.js +2 -0
- package/lib/module/native-stack/types.js.map +1 -0
- package/lib/module/native-stack/utils/AnimatedHeaderHeightContext.js +4 -0
- package/lib/module/native-stack/utils/AnimatedHeaderHeightContext.js.map +1 -0
- package/lib/module/native-stack/utils/HeaderHeightContext.js +4 -0
- package/lib/module/native-stack/utils/HeaderHeightContext.js.map +1 -0
- package/lib/module/native-stack/utils/SafeAreaProviderCompat.js +68 -0
- package/lib/module/native-stack/utils/SafeAreaProviderCompat.js.map +1 -0
- package/lib/module/native-stack/utils/getDefaultHeaderHeight.js +29 -0
- package/lib/module/native-stack/utils/getDefaultHeaderHeight.js.map +1 -0
- package/lib/module/native-stack/utils/useAnimatedHeaderHeight.js +10 -0
- package/lib/module/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -0
- package/lib/module/native-stack/utils/useBackPressSubscription.js +47 -0
- package/lib/module/native-stack/utils/useBackPressSubscription.js.map +1 -0
- package/lib/module/native-stack/utils/useHeaderHeight.js +10 -0
- package/lib/module/native-stack/utils/useHeaderHeight.js.map +1 -0
- package/lib/module/native-stack/views/FontProcessor.js +13 -0
- package/lib/module/native-stack/views/FontProcessor.js.map +1 -0
- package/lib/module/native-stack/views/HeaderConfig.js +132 -0
- package/lib/module/native-stack/views/HeaderConfig.js.map +1 -0
- package/lib/module/native-stack/views/NativeStackView.js +355 -0
- package/lib/module/native-stack/views/NativeStackView.js.map +1 -0
- package/lib/module/reanimated/ReanimatedHeaderHeightContext.js +5 -0
- package/lib/module/reanimated/ReanimatedHeaderHeightContext.js.map +1 -0
- package/lib/module/reanimated/ReanimatedNativeStackScreen.js +97 -0
- package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -0
- package/lib/module/reanimated/ReanimatedScreen.js +17 -0
- package/lib/module/reanimated/ReanimatedScreen.js.map +1 -0
- package/lib/module/reanimated/ReanimatedScreenProvider.js +40 -0
- package/lib/module/reanimated/ReanimatedScreenProvider.js.map +1 -0
- package/lib/module/reanimated/ReanimatedTransitionProgressContext.js +5 -0
- package/lib/module/reanimated/ReanimatedTransitionProgressContext.js.map +1 -0
- package/lib/module/reanimated/index.js +4 -0
- package/lib/module/reanimated/index.js.map +1 -0
- package/lib/module/reanimated/useReanimatedHeaderHeight.js +10 -0
- package/lib/module/reanimated/useReanimatedHeaderHeight.js.map +1 -0
- package/lib/module/reanimated/useReanimatedTransitionProgress.js +10 -0
- package/lib/module/reanimated/useReanimatedTransitionProgress.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/useTransitionProgress.js +10 -0
- package/lib/module/useTransitionProgress.js.map +1 -0
- package/lib/module/utils.js +14 -0
- package/lib/module/utils.js.map +1 -0
- package/lib/typescript/TransitionProgressContext.d.ts +9 -0
- package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts +7 -0
- package/lib/typescript/fabric/ScreenContainerNativeComponent.d.ts +5 -0
- package/lib/typescript/fabric/ScreenNativeComponent.d.ts +66 -0
- package/lib/typescript/fabric/ScreenNavigationContainerNativeComponent.d.ts +7 -0
- package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts +33 -0
- package/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts +10 -0
- package/lib/typescript/fabric/ScreenStackNativeComponent.d.ts +8 -0
- package/lib/typescript/fabric/SearchBarNativeComponent.d.ts +49 -0
- package/lib/typescript/index.d.ts +33 -0
- package/lib/typescript/index.native.d.ts +2 -0
- package/lib/typescript/native-stack/index.d.ts +19 -0
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +6 -0
- package/lib/typescript/native-stack/types.d.ts +438 -0
- package/lib/typescript/native-stack/utils/AnimatedHeaderHeightContext.d.ts +4 -0
- package/lib/typescript/native-stack/utils/HeaderHeightContext.d.ts +3 -0
- package/lib/typescript/native-stack/utils/SafeAreaProviderCompat.d.ts +11 -0
- package/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts +7 -0
- package/lib/typescript/native-stack/utils/useAnimatedHeaderHeight.d.ts +1 -0
- package/lib/typescript/native-stack/utils/useBackPressSubscription.d.ts +16 -0
- package/lib/typescript/native-stack/utils/useHeaderHeight.d.ts +1 -0
- package/lib/typescript/native-stack/views/FontProcessor.d.ts +1 -0
- package/lib/typescript/native-stack/views/HeaderConfig.d.ts +8 -0
- package/lib/typescript/native-stack/views/NativeStackView.d.ts +10 -0
- package/lib/typescript/reanimated/ReanimatedHeaderHeightContext.d.ts +4 -0
- package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts +5 -0
- package/lib/typescript/reanimated/ReanimatedScreen.d.ts +5 -0
- package/lib/typescript/reanimated/ReanimatedScreenProvider.d.ts +2 -0
- package/lib/typescript/reanimated/ReanimatedTransitionProgressContext.d.ts +9 -0
- package/lib/typescript/reanimated/index.d.ts +3 -0
- package/lib/typescript/reanimated/useReanimatedHeaderHeight.d.ts +3 -0
- package/lib/typescript/reanimated/useReanimatedTransitionProgress.d.ts +11 -0
- package/lib/typescript/types.d.ts +612 -0
- package/lib/typescript/useTransitionProgress.d.ts +5 -0
- package/lib/typescript/utils.d.ts +3 -0
- package/native-stack/README.md +814 -0
- package/native-stack/package.json +6 -0
- package/package.json +1 -0
- package/react-native.config.js +42 -0
- package/reanimated/package.json +6 -0
- package/src/TransitionProgressContext.tsx +12 -0
- package/src/fabric/FullWindowOverlayNativeComponent.ts +7 -0
- package/src/fabric/ScreenContainerNativeComponent.ts +28 -0
- package/src/fabric/ScreenNativeComponent.ts +158 -0
- package/src/fabric/ScreenNavigationContainerNativeComponent.ts +10 -0
- package/src/fabric/ScreenStackHeaderConfigNativeComponent.ts +61 -0
- package/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts +22 -0
- package/src/fabric/ScreenStackNativeComponent.ts +33 -0
- package/src/fabric/SearchBarNativeComponent.ts +79 -0
- package/src/index.native.tsx +599 -0
- package/src/index.tsx +119 -0
- package/src/native-stack/index.tsx +27 -0
- package/src/native-stack/navigators/createNativeStackNavigator.tsx +107 -0
- package/src/native-stack/types.tsx +486 -0
- package/src/native-stack/utils/AnimatedHeaderHeightContext.tsx +8 -0
- package/src/native-stack/utils/HeaderHeightContext.tsx +5 -0
- package/src/native-stack/utils/SafeAreaProviderCompat.tsx +78 -0
- package/src/native-stack/utils/getDefaultHeaderHeight.tsx +41 -0
- package/src/native-stack/utils/useAnimatedHeaderHeight.tsx +15 -0
- package/src/native-stack/utils/useBackPressSubscription.tsx +66 -0
- package/src/native-stack/utils/useHeaderHeight.tsx +15 -0
- package/src/native-stack/views/FontProcessor.tsx +14 -0
- package/src/native-stack/views/HeaderConfig.tsx +187 -0
- package/src/native-stack/views/NativeStackView.tsx +466 -0
- package/src/reanimated/ReanimatedHeaderHeightContext.tsx +7 -0
- package/src/reanimated/ReanimatedNativeStackScreen.tsx +130 -0
- package/src/reanimated/ReanimatedScreen.tsx +25 -0
- package/src/reanimated/ReanimatedScreenProvider.tsx +42 -0
- package/src/reanimated/ReanimatedTransitionProgressContext.tsx +13 -0
- package/src/reanimated/index.tsx +3 -0
- package/src/reanimated/useReanimatedHeaderHeight.tsx +14 -0
- package/src/reanimated/useReanimatedTransitionProgress.tsx +14 -0
- package/src/types.tsx +699 -0
- package/src/useTransitionProgress.tsx +15 -0
- package/src/utils.ts +18 -0
- package/windows/README.md +25 -0
- package/windows/RNScreens/PropertySheet.props +16 -0
- package/windows/RNScreens/RNScreens.cpp +66 -0
- package/windows/RNScreens/RNScreens.def +3 -0
- package/windows/RNScreens/RNScreens.h +41 -0
- package/windows/RNScreens/RNScreens.idl +8 -0
- package/windows/RNScreens/RNScreens.vcxproj +187 -0
- package/windows/RNScreens/RNScreens.vcxproj.filters +52 -0
- package/windows/RNScreens/ReactPackageProvider.cpp +30 -0
- package/windows/RNScreens/ReactPackageProvider.h +17 -0
- package/windows/RNScreens/ReactPackageProvider.idl +9 -0
- package/windows/RNScreens/Screen.cpp +122 -0
- package/windows/RNScreens/Screen.h +64 -0
- package/windows/RNScreens/ScreenContainer.cpp +49 -0
- package/windows/RNScreens/ScreenContainer.h +23 -0
- package/windows/RNScreens/ScreenContainerViewManager.cpp +133 -0
- package/windows/RNScreens/ScreenContainerViewManager.h +78 -0
- package/windows/RNScreens/ScreenStack.cpp +65 -0
- package/windows/RNScreens/ScreenStack.h +23 -0
- package/windows/RNScreens/ScreenStackHeaderConfig.cpp +19 -0
- package/windows/RNScreens/ScreenStackHeaderConfig.h +14 -0
- package/windows/RNScreens/ScreenStackHeaderConfigViewManager.cpp +89 -0
- package/windows/RNScreens/ScreenStackHeaderConfigViewManager.h +62 -0
- package/windows/RNScreens/ScreenStackViewManager.cpp +132 -0
- package/windows/RNScreens/ScreenStackViewManager.h +78 -0
- package/windows/RNScreens/ScreenViewManager.cpp +154 -0
- package/windows/RNScreens/ScreenViewManager.h +78 -0
- package/windows/RNScreens/packages.config +4 -0
- package/windows/RNScreens/pch.cpp +1 -0
- package/windows/RNScreens/pch.h +9 -0
- package/windows/RNScreens62.sln +254 -0
- package/windows/RNScreens63.sln +225 -0
- package/windows/RNScreens65.sln +144 -0
package/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name": "@amazon-devices/react-native-screens", "version": "2.0.1758683737+3.25.0", "description": "Native navigation primitives for your React Native app.", "scripts": {"check-types": "tsc --noEmit", "start": "react-native start", "test:unit": "jest --passWithNoTests", "format-js": "prettier --write --list-different './{src,Example}/**/*.{js,ts,tsx}'", "format-android": "node ./scripts/format-android.js", "format-ios": "find ios/ -iname *.h -o -iname *.m -o -iname *.cpp -o -iname *.mm | xargs clang-format -i", "format": "yarn format-js && yarn format-android && yarn format-ios", "lint-js": "eslint --ext '.js,.ts,.tsx' --fix src", "lint-android": "./android/gradlew -p android spotlessCheck -q", "lint": "yarn lint-js && yarn lint-android", "release": "npm login && release-it", "build:release": "npm run prepare"}, "main": "lib/commonjs/index", "module": "lib/module/index", "react-native": "src/index", "source": "src/index", "types": "lib/typescript/index", "files": ["src/", "common/", "lib/", "native-stack/", "reanimated/", "android/src/main/AndroidManifest.xml", "android/src/main/java/", "android/src/main/jni/", "android/src/main/res", "android/src/fabric/", "android/src/paper/", "android/build.gradle", "ios/", "windows/", "RNScreens.podspec", "react-native.config.js", "README.md", "!**/__tests__", "kepler-compatibility.json", "SystemModules", "SystemBundles", "!android/src/main/java/com/swmansion/rnscreens/LifecycleHelper.kt", "THIRD_PARTY_NOTICES.txt", "kepler-transformed-package-info.json"], "kepler": {"temporary-alias-for-package": {"name": "react-native-screens", "version": "3.25.0"}}, "repository": {"type": "git", "url": "git+https://github.com/software-mansion/react-native-screens.git"}, "author": {"email": "krzys.magiera@gmail.com", "name": "Krzysztof Magiera"}, "license": "See license in LICENSE", "readmeFilename": "README.md", "bugs": {"url": "https://github.com/software-mansion/react-native-screens/issues"}, "homepage": "https://github.com/software-mansion/react-native-screens#readme", "dependencies": {"react-freeze": "^1.0.0", "warn-once": "^0.1.0"}, "peerDependencies": {"react": "*", "react-native": "*"}, "devDependencies": {"@babel/core": "^7.20.0", "@babel/eslint-parser": "7.22.15", "@react-native-community/bob": "^0.17.1", "@types/jest": "^29.3.1", "@types/react": "^18.2.21", "@types/react-native": "0.72.5", "@types/react-test-renderer": "^18.0.0", "@typescript-eslint/eslint-plugin": "^6.5.0", "@typescript-eslint/parser": "^6.5.0", "@react-native-community/cli": "^11.3.6", "@react-native-community/cli-platform-android": "^11.3.6", "@react-native-community/cli-platform-ios": "^11.3.6", "babel-jest": "^29.6.4", "clang-format": "^1.8.0", "eslint": "^8.19.0", "eslint-config-prettier": "^8.10.0", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.28.1", "eslint-plugin-jest": "^27.2.3", "eslint-plugin-n": "^16.0.2", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-native": "^4.0.0", "husky": "^8.0.3", "jest": "^29.3.1", "lint-staged": "^14.0.1", "metro-react-native-babel-preset": "^0.76.8", "prettier": "^2.8.8", "react": "^18.2.0", "react-dom": "18.0.0", "react-native": "0.72.0", "react-native-reanimated": "^2.2.0", "react-test-renderer": "18.0.0", "release-it": "^15.6.0", "typescript": "4.8.4", "@amazon-devices/react-native-kepler": "^2.0.0+rn0.72.0", "@amazon-devices/react-native-safe-area-context": "file:static/amzn-react-native-safe-area-context-2.0.0.tgz", "@amazon-devices/react-navigation__routers": "file:static/amzn-react-navigation__routers-2.0.0.tgz", "@amazon-devices/react-navigation__core": "file:static/amzn-react-navigation__core-2.0.0.tgz", "@amazon-devices/react-navigation__native": "file:static/amzn-react-navigation__native-2.0.0.tgz"}, "resolutions": {"@react-native-community/cli-platform-android": "^11.3.6", "@react-native-community/cli": "^11.3.6", "@react-native-community/cli-platform-ios": "^11.3.6", "@types/react": "^18.2.21"}, "lint-staged": {"{src,Example}/**/*.{js,ts,tsx}": "yarn format-js", "src/**/*.{js,ts,tsx}": "yarn lint-js", "android/**/*.kt": "yarn format-android", "ios/**/*.{h,m,mm,cpp}": "yarn format-ios"}, "@react-native-community/bob": {"source": "src", "output": "lib", "targets": ["commonjs", "module", ["typescript", {"project": "tsconfig.build.json"}]]}, "eslintIgnore": ["node_modules/", "lib/"], "codegenConfig": {"name": "rnscreens", "type": "components", "jsSrcsDir": "./src/fabric", "android": {"javaPackageName": "com.swmansion.rnscreens"}}, "keplerImport": true}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
let supportsCodegenConfig = false;
|
|
2
|
+
try {
|
|
3
|
+
const rnCliAndroidVersion =
|
|
4
|
+
require('@react-native-community/cli-platform-android/package.json').version;
|
|
5
|
+
const [major] = rnCliAndroidVersion.split('.');
|
|
6
|
+
supportsCodegenConfig = major >= 9;
|
|
7
|
+
} catch (e) {
|
|
8
|
+
// ignore
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = {
|
|
12
|
+
dependency: {
|
|
13
|
+
platforms: {
|
|
14
|
+
android: supportsCodegenConfig ? {
|
|
15
|
+
componentDescriptors: [
|
|
16
|
+
"RNSFullWindowOverlayComponentDescriptor",
|
|
17
|
+
"RNSScreenContainerComponentDescriptor",
|
|
18
|
+
"RNSScreenNavigationContainerComponentDescriptor",
|
|
19
|
+
"RNSScreenStackHeaderConfigComponentDescriptor",
|
|
20
|
+
"RNSScreenStackHeaderSubviewComponentDescriptor",
|
|
21
|
+
"RNSScreenStackComponentDescriptor",
|
|
22
|
+
"RNSSearchBarComponentDescriptor",
|
|
23
|
+
'RNSScreenComponentDescriptor'
|
|
24
|
+
],
|
|
25
|
+
cmakeListsPath: "../android/src/main/jni/CMakeLists.txt"
|
|
26
|
+
} : {},
|
|
27
|
+
kepler: {
|
|
28
|
+
autolink: {
|
|
29
|
+
'RNScreensLib': { // The key is the public name of your library
|
|
30
|
+
provider: 'system', // 'application' if provided in the NPM package (and packaged with the app),
|
|
31
|
+
// otherwise 'system' if provided by the OS
|
|
32
|
+
turbomodules: [], // The names of registered Turbo Modules (this is the string used when registering in both JS and C++
|
|
33
|
+
components: ["RNSScreen", "RNSScreenStack", "RNSScreenStackHeaderConfig", "RNSScreenContainer"]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
project: { // These are settings used by your project to configure and build it - these don't affect consumers
|
|
40
|
+
type: "TurboModule"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Animated } from 'react-native';
|
|
3
|
+
|
|
4
|
+
type TransitionProgressContextBody = {
|
|
5
|
+
progress: Animated.Value;
|
|
6
|
+
closing: Animated.Value;
|
|
7
|
+
goingForward: Animated.Value;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default React.createContext<TransitionProgressContextBody | undefined>(
|
|
11
|
+
undefined
|
|
12
|
+
);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
|
+
import type { ViewProps } from 'react-native';
|
|
4
|
+
|
|
5
|
+
interface NativeProps extends ViewProps {}
|
|
6
|
+
|
|
7
|
+
export default codegenNativeComponent<NativeProps>('RNSFullWindowOverlay', {});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.
|
|
5
|
+
*
|
|
6
|
+
* Amazon modifications are indicated by [amznmod_* comments].
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* Changelog:
|
|
11
|
+
* Set up react-native-screens package to build for Kepler
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
16
|
+
import type { ViewProps, HostComponent } from 'react-native';
|
|
17
|
+
|
|
18
|
+
// amznmod_react - register component on Kepler
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import register from '@amazon-devices/react-native-kepler/Libraries/Utilities/registerGeneratedViewConfig';
|
|
21
|
+
|
|
22
|
+
interface NativeProps extends ViewProps {}
|
|
23
|
+
|
|
24
|
+
// amznmod_react - register component on Kepler
|
|
25
|
+
const ContainerComponent = 'RNSScreenContainer'
|
|
26
|
+
|
|
27
|
+
register(ContainerComponent, {uiViewClassName: ContainerComponent});
|
|
28
|
+
export default (ContainerComponent as unknown) as HostComponent<NativeProps>;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.
|
|
5
|
+
*
|
|
6
|
+
* Amazon modifications are indicated by [amznmod_* comments].
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* Changelog:
|
|
11
|
+
* Set up react-native-screens package to build for Kepler
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import type { ViewProps, ColorValue, HostComponent } from 'react-native';
|
|
15
|
+
import type {
|
|
16
|
+
BubblingEventHandler,
|
|
17
|
+
WithDefault,
|
|
18
|
+
Int32,
|
|
19
|
+
Float,
|
|
20
|
+
Double,
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
23
|
+
// amznmod_react - register component on Kepler
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
import register from '@amazon-devices/react-native-kepler/Libraries/Utilities/registerGeneratedViewConfig';
|
|
26
|
+
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
28
|
+
type ScreenEvent = Readonly<{}>;
|
|
29
|
+
|
|
30
|
+
type ScreenDismissedEvent = Readonly<{
|
|
31
|
+
dismissCount: Int32;
|
|
32
|
+
}>;
|
|
33
|
+
|
|
34
|
+
type TransitionProgressEvent = Readonly<{
|
|
35
|
+
progress: Double;
|
|
36
|
+
closing: Int32;
|
|
37
|
+
goingForward: Int32;
|
|
38
|
+
}>;
|
|
39
|
+
|
|
40
|
+
type HeaderHeightChangeEvent = Readonly<{
|
|
41
|
+
headerHeight: Double;
|
|
42
|
+
}>;
|
|
43
|
+
|
|
44
|
+
type GestureResponseDistanceType = Readonly<{
|
|
45
|
+
start: Float;
|
|
46
|
+
end: Float;
|
|
47
|
+
top: Float;
|
|
48
|
+
bottom: Float;
|
|
49
|
+
}>;
|
|
50
|
+
|
|
51
|
+
type StackPresentation =
|
|
52
|
+
| 'push'
|
|
53
|
+
| 'modal'
|
|
54
|
+
| 'transparentModal'
|
|
55
|
+
| 'fullScreenModal'
|
|
56
|
+
| 'formSheet'
|
|
57
|
+
| 'containedModal'
|
|
58
|
+
| 'containedTransparentModal';
|
|
59
|
+
|
|
60
|
+
type StackAnimation =
|
|
61
|
+
| 'default'
|
|
62
|
+
| 'flip'
|
|
63
|
+
| 'simple_push'
|
|
64
|
+
| 'none'
|
|
65
|
+
| 'fade'
|
|
66
|
+
| 'slide_from_right'
|
|
67
|
+
| 'slide_from_left'
|
|
68
|
+
| 'slide_from_bottom'
|
|
69
|
+
| 'fade_from_bottom';
|
|
70
|
+
|
|
71
|
+
type SwipeDirection = 'vertical' | 'horizontal';
|
|
72
|
+
|
|
73
|
+
type ReplaceAnimation = 'pop' | 'push';
|
|
74
|
+
|
|
75
|
+
type SheetDetentTypes = 'large' | 'medium' | 'all';
|
|
76
|
+
|
|
77
|
+
export interface NativeProps extends ViewProps {
|
|
78
|
+
onAppear?: BubblingEventHandler<ScreenEvent>;
|
|
79
|
+
onDisappear?: BubblingEventHandler<ScreenEvent>;
|
|
80
|
+
onDismissed?: BubblingEventHandler<ScreenDismissedEvent>;
|
|
81
|
+
onNativeDismissCancelled?: BubblingEventHandler<ScreenDismissedEvent>;
|
|
82
|
+
onWillAppear?: BubblingEventHandler<ScreenEvent>;
|
|
83
|
+
onWillDisappear?: BubblingEventHandler<ScreenEvent>;
|
|
84
|
+
onHeaderHeightChange?: BubblingEventHandler<HeaderHeightChangeEvent>;
|
|
85
|
+
onTransitionProgress?: BubblingEventHandler<TransitionProgressEvent>;
|
|
86
|
+
onGestureCancel?: BubblingEventHandler<ScreenEvent>;
|
|
87
|
+
sheetAllowedDetents?: WithDefault<SheetDetentTypes, 'large'>;
|
|
88
|
+
sheetLargestUndimmedDetent?: WithDefault<SheetDetentTypes, 'all'>;
|
|
89
|
+
sheetGrabberVisible?: WithDefault<boolean, false>;
|
|
90
|
+
sheetCornerRadius?: WithDefault<Float, -1.0>;
|
|
91
|
+
sheetExpandsWhenScrolledToEdge?: WithDefault<boolean, false>;
|
|
92
|
+
customAnimationOnSwipe?: boolean;
|
|
93
|
+
fullScreenSwipeEnabled?: boolean;
|
|
94
|
+
homeIndicatorHidden?: boolean;
|
|
95
|
+
preventNativeDismiss?: boolean;
|
|
96
|
+
gestureEnabled?: WithDefault<boolean, true>;
|
|
97
|
+
statusBarColor?: ColorValue;
|
|
98
|
+
statusBarHidden?: boolean;
|
|
99
|
+
screenOrientation?: string;
|
|
100
|
+
statusBarAnimation?: string;
|
|
101
|
+
statusBarStyle?: string;
|
|
102
|
+
statusBarTranslucent?: boolean;
|
|
103
|
+
gestureResponseDistance?: GestureResponseDistanceType;
|
|
104
|
+
stackPresentation?: WithDefault<StackPresentation, 'push'>;
|
|
105
|
+
stackAnimation?: WithDefault<StackAnimation, 'default'>;
|
|
106
|
+
transitionDuration?: WithDefault<Int32, 350>;
|
|
107
|
+
replaceAnimation?: WithDefault<ReplaceAnimation, 'pop'>;
|
|
108
|
+
swipeDirection?: WithDefault<SwipeDirection, 'horizontal'>;
|
|
109
|
+
hideKeyboardOnSwipe?: boolean;
|
|
110
|
+
activityState?: 0 | 1 | 2;
|
|
111
|
+
navigationBarColor?: ColorValue;
|
|
112
|
+
navigationBarHidden?: boolean;
|
|
113
|
+
nativeBackButtonDismissalEnabled?: boolean;
|
|
114
|
+
onHeaderBackButtonClicked?: BubblingEventHandler<ScreenEvent>;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// amznmod_react - register component on Kepler
|
|
118
|
+
const ScreenComponent = 'RNSScreen'
|
|
119
|
+
|
|
120
|
+
const viewConfig = {
|
|
121
|
+
activityState: true,
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const bubblingEventTypes = {
|
|
125
|
+
topOnAppear: {
|
|
126
|
+
phasedRegistrationNames: {
|
|
127
|
+
bubbled: 'onAppear',
|
|
128
|
+
captured: 'onAppearCapture'
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
topOnDisappear: {
|
|
132
|
+
phasedRegistrationNames: {
|
|
133
|
+
bubbled: 'onDisappear',
|
|
134
|
+
captured: 'onDisappearCapture'
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
topOnWillAppear: {
|
|
138
|
+
phasedRegistrationNames: {
|
|
139
|
+
bubbled: 'onWillAppear',
|
|
140
|
+
captured: 'onWillAppearCapture'
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
topOnWillDisappear: {
|
|
144
|
+
phasedRegistrationNames: {
|
|
145
|
+
bubbled: 'onWillDisappear',
|
|
146
|
+
captured: 'onWillDisappearCapture'
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
topOnTransitionProgress: {
|
|
150
|
+
phasedRegistrationNames: {
|
|
151
|
+
bubbled: 'onTransitionProgress',
|
|
152
|
+
captured: 'onTransitionProgressCapture'
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
register(ScreenComponent, {uiViewClassName: ScreenComponent, validAttributes: viewConfig, bubblingEventTypes: bubblingEventTypes});
|
|
158
|
+
export default (ScreenComponent as unknown) as HostComponent<NativeProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
|
+
import type { ViewProps } from 'react-native';
|
|
4
|
+
|
|
5
|
+
interface NativeProps extends ViewProps {}
|
|
6
|
+
|
|
7
|
+
export default codegenNativeComponent<NativeProps>(
|
|
8
|
+
'RNSScreenNavigationContainer',
|
|
9
|
+
{}
|
|
10
|
+
);
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.
|
|
5
|
+
*
|
|
6
|
+
* Amazon modifications are indicated by [amznmod_* comments].
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* Changelog:
|
|
11
|
+
* Set up react-native-screens package to build for Kepler
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import type { ViewProps, ColorValue, HostComponent } from 'react-native';
|
|
15
|
+
import type {
|
|
16
|
+
Int32,
|
|
17
|
+
WithDefault,
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
20
|
+
|
|
21
|
+
// amznmod_react - register component on Kepler
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import register from '@amazon-devices/react-native-kepler/Libraries/Utilities/registerGeneratedViewConfig';
|
|
24
|
+
|
|
25
|
+
type DirectionType = 'rtl' | 'ltr';
|
|
26
|
+
|
|
27
|
+
export interface NativeProps extends ViewProps {
|
|
28
|
+
backgroundColor?: ColorValue;
|
|
29
|
+
backTitle?: string;
|
|
30
|
+
backTitleFontFamily?: string;
|
|
31
|
+
backTitleFontSize?: Int32;
|
|
32
|
+
backTitleVisible?: WithDefault<boolean, 'true'>;
|
|
33
|
+
color?: ColorValue;
|
|
34
|
+
direction?: WithDefault<DirectionType, 'ltr'>;
|
|
35
|
+
hidden?: boolean;
|
|
36
|
+
hideShadow?: boolean;
|
|
37
|
+
largeTitle?: boolean;
|
|
38
|
+
largeTitleFontFamily?: string;
|
|
39
|
+
largeTitleFontSize?: Int32;
|
|
40
|
+
largeTitleFontWeight?: string;
|
|
41
|
+
largeTitleBackgroundColor?: ColorValue;
|
|
42
|
+
largeTitleHideShadow?: boolean;
|
|
43
|
+
largeTitleColor?: ColorValue;
|
|
44
|
+
translucent?: boolean;
|
|
45
|
+
title?: string;
|
|
46
|
+
titleFontFamily?: string;
|
|
47
|
+
titleFontSize?: Int32;
|
|
48
|
+
titleFontWeight?: string;
|
|
49
|
+
titleColor?: ColorValue;
|
|
50
|
+
disableBackButtonMenu?: boolean;
|
|
51
|
+
hideBackButton?: boolean;
|
|
52
|
+
backButtonInCustomView?: boolean;
|
|
53
|
+
// TODO: implement this props on iOS
|
|
54
|
+
topInsetEnabled?: boolean;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// amznmod_react - register component on Kepler
|
|
58
|
+
const ScreenStackHeaderConfigComponent = 'RNSScreenStackHeaderConfig'
|
|
59
|
+
|
|
60
|
+
register(ScreenStackHeaderConfigComponent, {uiViewClassName: ScreenStackHeaderConfigComponent});
|
|
61
|
+
export default (ScreenStackHeaderConfigComponent as unknown) as HostComponent<NativeProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
|
+
import type { ViewProps } from 'react-native';
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
6
|
+
|
|
7
|
+
export type HeaderSubviewTypes =
|
|
8
|
+
| 'back'
|
|
9
|
+
| 'right'
|
|
10
|
+
| 'left'
|
|
11
|
+
| 'title'
|
|
12
|
+
| 'center'
|
|
13
|
+
| 'searchBar';
|
|
14
|
+
|
|
15
|
+
export interface NativeProps extends ViewProps {
|
|
16
|
+
type?: WithDefault<HeaderSubviewTypes, 'left'>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default codegenNativeComponent<NativeProps>(
|
|
20
|
+
'RNSScreenStackHeaderSubview',
|
|
21
|
+
{}
|
|
22
|
+
);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.
|
|
5
|
+
*
|
|
6
|
+
* Amazon modifications are indicated by [amznmod_* comments].
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* Changelog:
|
|
11
|
+
* Set up react-native-screens package to build for Kepler
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import type { ViewProps, HostComponent } from 'react-native';
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
|
|
17
|
+
|
|
18
|
+
// amznmod_react - register component on Kepler
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import register from '@amazon-devices/react-native-kepler/Libraries/Utilities/registerGeneratedViewConfig';
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
23
|
+
type FinishTransitioningEvent = Readonly<{}>;
|
|
24
|
+
|
|
25
|
+
interface NativeProps extends ViewProps {
|
|
26
|
+
onFinishTransitioning?: DirectEventHandler<FinishTransitioningEvent>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// amznmod_react - register component on Kepler
|
|
30
|
+
const ScreenStackComponent = 'RNSScreenStack'
|
|
31
|
+
|
|
32
|
+
register(ScreenStackComponent, {uiViewClassName: ScreenStackComponent});
|
|
33
|
+
export default (ScreenStackComponent as unknown) as HostComponent<NativeProps>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-ignore
|
|
3
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
4
|
+
import type { ViewProps, ColorValue, HostComponent } from 'react-native';
|
|
5
|
+
import type {
|
|
6
|
+
WithDefault,
|
|
7
|
+
BubblingEventHandler,
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
12
|
+
|
|
13
|
+
type SearchBarEvent = Readonly<{}>;
|
|
14
|
+
|
|
15
|
+
type SearchButtonPressedEvent = Readonly<{
|
|
16
|
+
text?: string;
|
|
17
|
+
}>;
|
|
18
|
+
|
|
19
|
+
type ChangeTextEvent = Readonly<{
|
|
20
|
+
text?: string;
|
|
21
|
+
}>;
|
|
22
|
+
|
|
23
|
+
type SearchBarPlacement = 'automatic' | 'inline' | 'stacked';
|
|
24
|
+
|
|
25
|
+
type AutoCapitalizeType = 'none' | 'words' | 'sentences' | 'characters';
|
|
26
|
+
|
|
27
|
+
interface NativeProps extends ViewProps {
|
|
28
|
+
onFocus?: BubblingEventHandler<SearchBarEvent> | null;
|
|
29
|
+
onBlur?: BubblingEventHandler<SearchBarEvent> | null;
|
|
30
|
+
onSearchButtonPress?: BubblingEventHandler<SearchButtonPressedEvent> | null;
|
|
31
|
+
onCancelButtonPress?: BubblingEventHandler<SearchBarEvent> | null;
|
|
32
|
+
onChangeText?: BubblingEventHandler<ChangeTextEvent> | null;
|
|
33
|
+
hideWhenScrolling?: boolean;
|
|
34
|
+
autoCapitalize?: WithDefault<AutoCapitalizeType, 'none'>;
|
|
35
|
+
placeholder?: string;
|
|
36
|
+
placement?: WithDefault<SearchBarPlacement, 'stacked'>;
|
|
37
|
+
obscureBackground?: boolean;
|
|
38
|
+
hideNavigationBar?: boolean;
|
|
39
|
+
cancelButtonText?: string;
|
|
40
|
+
// TODO: implement these on iOS
|
|
41
|
+
barTintColor?: ColorValue;
|
|
42
|
+
tintColor?: ColorValue;
|
|
43
|
+
textColor?: ColorValue;
|
|
44
|
+
|
|
45
|
+
// Android only
|
|
46
|
+
disableBackButtonOverride?: boolean;
|
|
47
|
+
// TODO: consider creating enum here
|
|
48
|
+
inputType?: string;
|
|
49
|
+
onClose?: BubblingEventHandler<SearchBarEvent> | null;
|
|
50
|
+
onOpen?: BubblingEventHandler<SearchBarEvent> | null;
|
|
51
|
+
hintTextColor?: ColorValue;
|
|
52
|
+
headerIconColor?: ColorValue;
|
|
53
|
+
shouldShowHintSearchIcon?: WithDefault<boolean, true>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
57
|
+
|
|
58
|
+
interface NativeCommands {
|
|
59
|
+
blur: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
60
|
+
focus: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
61
|
+
clearText: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
62
|
+
toggleCancelButton: (
|
|
63
|
+
viewRef: React.ElementRef<ComponentType>,
|
|
64
|
+
flag: boolean
|
|
65
|
+
) => void;
|
|
66
|
+
setText: (viewRef: React.ElementRef<ComponentType>, text: string) => void;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
70
|
+
supportedCommands: [
|
|
71
|
+
'blur',
|
|
72
|
+
'focus',
|
|
73
|
+
'clearText',
|
|
74
|
+
'toggleCancelButton',
|
|
75
|
+
'setText',
|
|
76
|
+
],
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export default codegenNativeComponent<NativeProps>('RNSSearchBar', {});
|