@apexnative/navigation 1.0.0-alpha.0 → 1.0.0-alpha.10
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/ApexNavigation.podspec +2 -1
- package/CHANGELOG.md +128 -0
- package/README.md +147 -51
- package/android/CLAUDE.md +78 -25
- package/android/CORE.md +49 -25
- package/android/RECIPES.md +13 -6
- package/android/consumer-rules.pro +6 -0
- package/android/src/main/java/dev/apexnative/navigation/NavigationActivity.kt +85 -10
- package/android/src/main/java/dev/apexnative/navigation/NavigationApplication.kt +34 -13
- package/android/src/main/java/dev/apexnative/navigation/layout/LayoutChecks.kt +5 -1
- package/android/src/main/java/dev/apexnative/navigation/layout/LayoutNode.kt +6 -2
- package/android/src/main/java/dev/apexnative/navigation/nativescreen/NativeScreenContext.kt +2 -2
- package/android/src/main/java/dev/apexnative/navigation/options/AnimationsOptions.kt +2 -2
- package/android/src/main/java/dev/apexnative/navigation/options/BottomTabOptions.kt +1 -1
- package/android/src/main/java/dev/apexnative/navigation/options/BottomTabsOptions.kt +13 -8
- package/android/src/main/java/dev/apexnative/navigation/options/ButtonMenuOptions.kt +2 -2
- package/android/src/main/java/dev/apexnative/navigation/options/ButtonOptions.kt +3 -3
- package/android/src/main/java/dev/apexnative/navigation/options/HardwareBackButtonOptions.kt +9 -1
- package/android/src/main/java/dev/apexnative/navigation/options/LargeTitleOptions.kt +1 -1
- package/android/src/main/java/dev/apexnative/navigation/options/LayoutAnimation.kt +1 -1
- package/android/src/main/java/dev/apexnative/navigation/options/OptionKey.kt +18 -0
- package/android/src/main/java/dev/apexnative/navigation/options/OptionPaths.kt +91 -0
- package/android/src/main/java/dev/apexnative/navigation/options/OptionsCache.kt +8 -4
- package/android/src/main/java/dev/apexnative/navigation/options/SheetOptions.kt +7 -4
- package/android/src/main/java/dev/apexnative/navigation/options/SideMenuOptions.kt +6 -1
- package/android/src/main/java/dev/apexnative/navigation/options/StackAnimationOptions.kt +40 -2
- package/android/src/main/java/dev/apexnative/navigation/options/StatusBarOptions.kt +7 -3
- package/android/src/main/java/dev/apexnative/navigation/options/TitleOptions.kt +2 -2
- package/android/src/main/java/dev/apexnative/navigation/options/TopBarAppearanceOptions.kt +1 -1
- package/android/src/main/java/dev/apexnative/navigation/options/TopBarOptions.kt +16 -7
- package/android/src/main/java/dev/apexnative/navigation/options/UserChoices.kt +159 -0
- package/android/src/main/java/dev/apexnative/navigation/react/CommandAnswer.kt +29 -36
- package/android/src/main/java/dev/apexnative/navigation/react/CommandContract.kt +59 -0
- package/android/src/main/java/dev/apexnative/navigation/react/ContentHeights.kt +95 -0
- package/android/src/main/java/dev/apexnative/navigation/react/ContentMounts.kt +66 -0
- package/android/src/main/java/dev/apexnative/navigation/react/ErrorTexts.kt +75 -60
- package/android/src/main/java/dev/apexnative/navigation/react/Hinge.kt +35 -23
- package/android/src/main/java/dev/apexnative/navigation/react/NavigationTurboModule.kt +12 -7
- package/android/src/main/java/dev/apexnative/navigation/react/OptionsCommands.kt +42 -4
- package/android/src/main/java/dev/apexnative/navigation/react/PendingCalls.kt +48 -0
- package/android/src/main/java/dev/apexnative/navigation/react/ReactView.kt +54 -20
- package/android/src/main/java/dev/apexnative/navigation/react/ReloadCoordinator.kt +7 -6
- package/android/src/main/java/dev/apexnative/navigation/react/ScreenEnvironment.kt +177 -0
- package/android/src/main/java/dev/apexnative/navigation/react/ScreenRegions.kt +19 -50
- package/android/src/main/java/dev/apexnative/navigation/react/ScrollEvents.kt +49 -128
- package/android/src/main/java/dev/apexnative/navigation/react/events/AppearanceDispatcher.kt +50 -81
- package/android/src/main/java/dev/apexnative/navigation/react/events/EventContract.kt +226 -0
- package/android/src/main/java/dev/apexnative/navigation/react/events/EventEmitter.kt +135 -94
- package/android/src/main/java/dev/apexnative/navigation/react/events/NavigationState.kt +154 -0
- package/android/src/main/java/dev/apexnative/navigation/react/events/ScreenAppearance.kt +0 -6
- package/android/src/main/java/dev/apexnative/navigation/safearea/SafeAreaView.kt +12 -10
- package/android/src/main/java/dev/apexnative/navigation/slots/SlotContainers.kt +10 -7
- package/android/src/main/java/dev/apexnative/navigation/slots/SlotScreenView.kt +39 -19
- package/android/src/main/java/dev/apexnative/navigation/slots/SlotView.kt +16 -4
- package/android/src/main/java/dev/apexnative/navigation/slots/SlotViews.kt +40 -0
- package/android/src/main/java/dev/apexnative/navigation/utils/ImageKey.kt +66 -0
- package/android/src/main/java/dev/apexnative/navigation/utils/ImageLoader.kt +7 -89
- package/android/src/main/java/dev/apexnative/navigation/utils/ImageRequests.kt +76 -0
- package/android/src/main/java/dev/apexnative/navigation/utils/MaterialTheme.kt +5 -6
- package/android/src/main/java/dev/apexnative/navigation/utils/OptionImages.kt +262 -0
- package/android/src/main/java/dev/apexnative/navigation/utils/SystemAnimations.kt +36 -0
- package/android/src/main/java/dev/apexnative/navigation/utils/UiUtils.kt +3 -3
- package/android/src/main/java/dev/apexnative/navigation/utils/ViewController.kt +3 -1
- package/android/src/main/java/dev/apexnative/navigation/utils/ViewExtensions.kt +0 -13
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/arrangement/ArrangementController.kt +10 -7
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/arrangement/SecondaryScreenPresenter.kt +13 -5
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/bottomtabs/AppliedTabCalls.kt +49 -0
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/bottomtabs/BottomTabsCollapseBehavior.kt +5 -3
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/bottomtabs/BottomTabsController.kt +108 -34
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/bottomtabs/BottomTabsPresenter.kt +25 -24
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/bottomtabs/CustomTabRowGeometry.kt +22 -0
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/bottomtabs/TabItems.kt +3 -3
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/bottomtabs/TabsRoom.kt +0 -5
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/component/ComponentPresenter.kt +28 -7
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/component/ComponentViewController.kt +12 -9
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/component/ContentReadiness.kt +2 -2
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/component/RenderWait.kt +27 -7
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/component/ScreenFrame.kt +1 -1
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/component/ScreenReadiness.kt +103 -56
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/component/ScreenSafeArea.kt +29 -11
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/externalcomponent/ExternalComponentViewController.kt +2 -6
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/modal/ModalAnimations.kt +22 -24
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/modal/ModalCoordinator.kt +109 -21
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/modal/ModalRecord.kt +21 -6
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/modal/ModalSheet.kt +476 -73
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/modal/ModalViews.kt +57 -25
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/modal/SheetBack.kt +42 -0
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/modal/SheetStops.kt +83 -0
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/navigator/BackCallbackCheck.kt +50 -0
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/navigator/BackCallbackState.kt +49 -14
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/navigator/Navigator.kt +71 -12
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/navigator/RootCoordinator.kt +37 -11
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/overlay/OverlayCoordinator.kt +10 -8
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/parent/Capabilities.kt +11 -4
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/parent/ContainerBackground.kt +3 -3
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/parent/ParentController.kt +6 -6
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/sidemenu/SideMenuController.kt +42 -9
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/sidemenu/SideMenuMotion.kt +19 -8
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/sidemenu/SideMenuPresenter.kt +16 -7
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/sidemenu/SideMenuRules.kt +43 -4
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/splitview/SplitPanes.kt +23 -0
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/splitview/SplitViewController.kt +77 -17
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/BackPreview.kt +315 -0
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/PreparedFrame.kt +3 -3
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/StackCommands.kt +30 -20
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/StackController.kt +216 -18
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/StackDisplay.kt +26 -1
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/StackQueue.kt +149 -41
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/StackTransitions.kt +26 -8
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/StackViews.kt +115 -6
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/fab/FabMotion.kt +142 -0
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/fab/FabPresenter.kt +222 -48
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/search/ScreenSearch.kt +3 -5
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/search/StackSearchPresenter.kt +30 -34
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/topbar/BarComponents.kt +5 -51
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/topbar/BarRowTransition.kt +3 -2
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/topbar/ButtonPlaces.kt +11 -5
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/topbar/MenuChecks.kt +13 -56
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/topbar/TopBarPresenter.kt +219 -54
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/topbar/TopBarVisibility.kt +9 -2
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/viewcontroller/ScrollEventListener.kt +6 -9
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/viewcontroller/ViewController.kt +75 -21
- package/android/src/main/java/dev/apexnative/navigation/views/animations/AnimationLayer.kt +73 -0
- package/android/src/main/java/dev/apexnative/navigation/views/animations/Curves.kt +29 -11
- package/android/src/main/java/dev/apexnative/navigation/views/animations/ValueInterpolation.kt +14 -0
- package/android/src/main/java/dev/apexnative/navigation/views/bottomtabs/BottomTabs.kt +9 -7
- package/android/src/main/java/dev/apexnative/navigation/views/bottomtabs/BottomTabsLayout.kt +61 -2
- package/android/src/main/java/dev/apexnative/navigation/views/bottomtabs/CustomBottomTabItemView.kt +0 -5
- package/android/src/main/java/dev/apexnative/navigation/views/bottomtabs/CustomTabRow.kt +72 -10
- package/android/src/main/java/dev/apexnative/navigation/views/element/ElementStep.kt +31 -0
- package/android/src/main/java/dev/apexnative/navigation/views/element/ElementTransitions.kt +143 -135
- package/android/src/main/java/dev/apexnative/navigation/views/element/TargetsWait.kt +13 -5
- package/android/src/main/java/dev/apexnative/navigation/views/element/TransitionLayer.kt +37 -112
- package/android/src/main/java/dev/apexnative/navigation/views/element/TransitionTargets.kt +9 -6
- package/android/src/main/java/dev/apexnative/navigation/views/element/TransitionViews.kt +100 -0
- package/android/src/main/java/dev/apexnative/navigation/views/element/animators/ElementPictures.kt +112 -4
- package/android/src/main/java/dev/apexnative/navigation/views/element/animators/FlightGeometry.kt +346 -36
- package/android/src/main/java/dev/apexnative/navigation/views/element/animators/ImageMorph.kt +199 -0
- package/android/src/main/java/dev/apexnative/navigation/views/element/animators/SharedAnimatorFactory.kt +56 -41
- package/android/src/main/java/dev/apexnative/navigation/views/element/animators/TextMorph.kt +176 -0
- package/android/src/main/java/dev/apexnative/navigation/views/element/animators/ViewMorph.kt +108 -0
- package/android/src/main/java/dev/apexnative/navigation/views/sidemenu/SideMenuView.kt +12 -3
- package/android/src/main/java/dev/apexnative/navigation/views/stack/ScreenEdge.kt +45 -0
- package/android/src/main/java/dev/apexnative/navigation/views/stack/StackLayout.kt +140 -1
- package/android/src/main/java/dev/apexnative/navigation/views/stack/fab/Fab.kt +14 -10
- package/android/src/main/java/dev/apexnative/navigation/views/stack/fab/FabCopy.kt +85 -0
- package/android/src/main/java/dev/apexnative/navigation/views/stack/fab/FabMenu.kt +13 -0
- package/android/src/main/java/dev/apexnative/navigation/views/stack/topbar/TitleBar.kt +5 -17
- package/android/src/main/java/dev/apexnative/navigation/views/stack/topbar/TopBar.kt +73 -34
- package/android/src/main/java/dev/apexnative/navigation/views/stack/topbar/titlebar/BarButtonComponentCell.kt +6 -6
- package/android/src/main/java/dev/apexnative/navigation/views/stack/topbar/titlebar/BarButtonView.kt +113 -0
- package/android/src/main/java/dev/apexnative/navigation/views/stack/topbar/titlebar/BarMenu.kt +219 -0
- package/android/src/main/java/dev/apexnative/navigation/views/stack/topbar/titlebar/ButtonBar.kt +125 -178
- package/android/src/main/java/dev/apexnative/navigation/views/stack/topbar/titlebar/ButtonMenus.kt +34 -64
- package/android/src/main/java/dev/apexnative/navigation/views/stack/topbar/titlebar/ButtonRow.kt +216 -0
- package/android/src/main/jni/ANNContentHeights.cpp +82 -0
- package/android/src/main/res/drawable/apex_navigation_ic_arrow_right.xml +14 -0
- package/android/src/main/res/layout/apex_navigation_menu_header.xml +19 -0
- package/android/src/main/res/layout/apex_navigation_menu_item.xml +68 -0
- package/android/src/main/res/values/styles.xml +1 -1
- package/android/src/main/res/values-night/styles.xml +1 -1
- package/cli/app.js +1 -1
- package/cli/doctor/checks/app.js +77 -14
- package/cli/doctor/checks/splash.js +4 -22
- package/cli/migrate/native.js +18 -0
- package/cli/project.js +10 -2
- package/cli/setup/index.js +18 -0
- package/cli/setup/source.js +2 -1
- package/cli/setup/steps/appDelegate.js +66 -11
- package/cli/setup/steps/mainApplication.js +134 -19
- package/cli/setup/steps/metro.js +46 -0
- package/cli/setup/steps/sceneDelegate.js +108 -0
- package/cli/splash/index.js +3 -1
- package/cli/upgrade/changelog.js +2 -2
- package/docs-md/architecture/native-screens.md +4 -0
- package/docs-md/architecture/theme-and-context.md +131 -12
- package/docs-md/architecture/transitions.md +58 -12
- package/docs-md/containers/modals.md +8 -4
- package/docs-md/containers/overlays.md +3 -1
- package/docs-md/containers/side-menu.md +19 -2
- package/docs-md/containers/tabs.md +5 -1
- package/docs-md/flows/bottom-sheets.md +4 -2
- package/docs-md/flows/forms-in-a-modal.md +1 -1
- package/docs-md/fundamentals/screens-and-props.md +9 -1
- package/docs-md/fundamentals/starting-the-app.md +1 -1
- package/docs-md/guides/cli.md +4 -3
- package/docs-md/guides/deep-links.md +15 -33
- package/docs-md/help/glossary.md +4 -4
- package/docs-md/help/troubleshooting.md +44 -6
- package/docs-md/index.json +57 -1
- package/docs-md/migration/from-expo-router.md +1 -1
- package/docs-md/migration/from-react-native-navigation.md +9 -3
- package/docs-md/migration/from-react-navigation.md +2 -2
- package/docs-md/screen-ui/back-and-gestures.md +46 -2
- package/docs-md/screen-ui/bar-buttons.md +5 -5
- package/docs-md/screen-ui/search.md +1 -1
- package/docs-md/screen-ui/system-ui.md +17 -12
- package/docs-md/screen-ui/toolbar-and-fab.md +4 -2
- package/docs-md/screen-ui/top-bar.md +8 -4
- package/docs-md/start/installation.md +21 -3
- package/ios/Animations/ANNFrameDriver.h +55 -15
- package/ios/Animations/ANNFrameDriver.mm +216 -60
- package/ios/Animations/ANNTransitionAnimator.h +26 -5
- package/ios/Animations/ANNTransitionAnimator.mm +61 -13
- package/ios/Animations/ANNTransitionPlan.h +2 -2
- package/ios/Animations/ANNTransitionPlan.mm +10 -0
- package/ios/Animations/ANNTransitionWait.mm +6 -7
- package/ios/Animations/Elements/ANNElementFinder.h +57 -0
- package/ios/Animations/Elements/ANNElementFinder.mm +174 -2
- package/ios/Animations/Elements/ANNElementTransition.h +10 -8
- package/ios/Animations/Elements/ANNElementTransition.mm +19 -21
- package/ios/Animations/Elements/ANNSharedElementFlight.h +16 -11
- package/ios/Animations/Elements/ANNSharedElementFlight.mm +308 -69
- package/ios/Animations/Interpolators/ANNInterpolate.h +2 -30
- package/ios/Animations/Interpolators/ANNTransformParts.h +48 -0
- package/ios/Animations/Interpolators/ANNTransformParts.mm +507 -0
- package/ios/Animations/Interpolators/ANNViewTracks.h +9 -6
- package/ios/Animations/Interpolators/ANNViewTracks.mm +100 -30
- package/ios/CLAUDE.md +60 -24
- package/ios/CORE.md +44 -34
- package/ios/Contract/ANNCommandAnswer.h +13 -5
- package/ios/Contract/ANNCommandAnswer.mm +40 -32
- package/ios/Contract/ANNCommandContract.h +15 -0
- package/ios/Contract/ANNCommandContract.mm +78 -0
- package/ios/Contract/ANNCommandRunner.h +10 -9
- package/ios/Contract/ANNCommandRunner.mm +22 -28
- package/ios/Contract/ANNErrorTexts.h +6 -2
- package/ios/Contract/ANNErrorTexts.mm +18 -10
- package/ios/Contract/ANNLayoutNode.h +3 -3
- package/ios/Contract/ANNLayoutReader.h +3 -3
- package/ios/Core/ANNAppDelegate.mm +0 -2
- package/ios/Core/ANNAppearanceDispatcher.h +5 -4
- package/ios/Core/ANNAppearanceDispatcher.mm +12 -1
- package/ios/Core/ANNDeepLinkQueue.h +22 -2
- package/ios/Core/ANNDeepLinkQueue.mm +121 -14
- package/ios/Core/ANNErrorHandler.h +9 -4
- package/ios/Core/ANNErrorHandler.mm +20 -2
- package/ios/Core/ANNEventContract.h +246 -0
- package/ios/Core/ANNEventContract.mm +225 -0
- package/ios/Core/ANNEventEmitter.h +6 -2
- package/ios/Core/ANNEventEmitter.mm +117 -80
- package/ios/Core/ANNHinge.h +6 -0
- package/ios/Core/ANNHinge.mm +15 -4
- package/ios/Core/ANNJavaScriptCalls.h +33 -0
- package/ios/Core/ANNJavaScriptCalls.mm +52 -0
- package/ios/Core/ANNLayoutProtocol.h +5 -5
- package/ios/Core/ANNNavigationState.h +7 -5
- package/ios/Core/ANNNavigationState.mm +8 -7
- package/ios/Core/ANNNodeHelper.h +32 -12
- package/ios/Core/ANNNodeHelper.mm +100 -3
- package/ios/Core/ANNParking.h +5 -4
- package/ios/Core/ANNReloadCoordinator.mm +5 -12
- package/ios/Core/ANNRenderWait.h +20 -6
- package/ios/Core/ANNRenderWait.mm +143 -56
- package/ios/Core/ANNSceneDelegate.mm +25 -15
- package/ios/Core/ANNSystemUI.h +3 -2
- package/ios/Core/ANNSystemUI.mm +7 -0
- package/ios/Core/ANNUtils.h +7 -0
- package/ios/Core/ANNUtils.mm +10 -0
- package/ios/Core/ApexNavigation+Internal.h +1 -1
- package/ios/Core/ApexNavigation.mm +7 -6
- package/ios/Core/UIViewController+LayoutProtocol.h +9 -2
- package/ios/Core/UIViewController+LayoutProtocol.mm +8 -0
- package/ios/Layouts/Arrangement/ANNArrangementState.h +2 -17
- package/ios/Layouts/Arrangement/ANNArrangementState.mm +0 -38
- package/ios/Layouts/Arrangement/ANNArrangementViewController.mm +10 -8
- package/ios/Layouts/Modal/ANNModalCoordinator.h +1 -1
- package/ios/Layouts/Modal/ANNModalCoordinator.mm +57 -16
- package/ios/Layouts/Modal/ANNModalPresentation.h +8 -5
- package/ios/Layouts/Modal/ANNModalPresentation.mm +12 -12
- package/ios/Layouts/Modal/ANNSheetPresenter.mm +83 -1
- package/ios/Layouts/Overlay/ANNOverlayCoordinator.mm +2 -8
- package/ios/Layouts/Root/ANNRootCoordinator.mm +58 -19
- package/ios/Layouts/Root/ANNSplashViewController.h +5 -3
- package/ios/Layouts/Root/ANNSplashViewController.mm +147 -0
- package/ios/Layouts/Screen/ANNComponentPresenter.h +11 -3
- package/ios/Layouts/Screen/ANNComponentPresenter.mm +34 -6
- package/ios/Layouts/Screen/ANNComponentViewController.h +15 -13
- package/ios/Layouts/Screen/ANNComponentViewController.mm +130 -75
- package/ios/Layouts/Screen/ANNNativeScreenContext.mm +7 -5
- package/ios/Layouts/Screen/ANNPreviewInteraction.h +7 -4
- package/ios/Layouts/Screen/ANNPreviewInteraction.mm +72 -10
- package/ios/Layouts/Screen/ANNScreenEnvironment.h +63 -0
- package/ios/Layouts/Screen/ANNScreenEnvironment.mm +181 -0
- package/ios/Layouts/Screen/ANNScreenPlace.h +53 -0
- package/ios/Layouts/Screen/ANNScreenPlace.mm +205 -0
- package/ios/Layouts/Screen/ANNScreenRegions.h +3 -18
- package/ios/Layouts/Screen/ANNScreenRegions.mm +9 -44
- package/ios/Layouts/Screen/ANNScreenSafeArea.h +4 -9
- package/ios/Layouts/Screen/ANNScreenSafeArea.mm +14 -16
- package/ios/Layouts/Screen/ANNScreenSettling.h +32 -0
- package/ios/Layouts/Screen/ANNScreenSettling.mm +137 -0
- package/ios/Layouts/SideMenu/ANNSideMenuTypes.h +8 -0
- package/ios/Layouts/SideMenu/ANNSideMenuViewController.mm +83 -14
- package/ios/Layouts/SplitView/ANNSplitViewCommands.h +3 -2
- package/ios/Layouts/SplitView/ANNSplitViewCommands.mm +105 -39
- package/ios/Layouts/SplitView/ANNSplitViewController.mm +7 -8
- package/ios/Layouts/Stack/ANNPreviewPush.h +7 -6
- package/ios/Layouts/Stack/ANNPreviewPush.mm +142 -27
- package/ios/Layouts/Stack/ANNStackAnimatingDelegate.h +11 -2
- package/ios/Layouts/Stack/ANNStackAnimatingDelegate.mm +14 -7
- package/ios/Layouts/Stack/ANNStackCommands.mm +1 -0
- package/ios/Layouts/Stack/ANNStackController.h +8 -0
- package/ios/Layouts/Stack/ANNStackController.mm +184 -16
- package/ios/Layouts/Stack/ANNStackQueue.h +5 -2
- package/ios/Layouts/Stack/ANNStackQueue.mm +56 -43
- package/ios/Layouts/Stack/ANNSwipePopInteraction.h +26 -0
- package/ios/Layouts/Stack/ANNSwipePopInteraction.mm +185 -0
- package/ios/Layouts/Stack/InteractivePopGestureDelegate.mm +28 -4
- package/ios/Layouts/Stack/UINavigationController+ANNCommands.h +4 -2
- package/ios/Layouts/Stack/UINavigationController+ANNCommands.mm +2 -3
- package/ios/Layouts/Tabs/ANNBottomTabItemBuilder.h +4 -0
- package/ios/Layouts/Tabs/ANNBottomTabItemBuilder.mm +11 -0
- package/ios/Layouts/Tabs/ANNBottomTabsAccessoryView.h +12 -1
- package/ios/Layouts/Tabs/ANNBottomTabsAccessoryView.mm +23 -0
- package/ios/Layouts/Tabs/ANNBottomTabsController.h +3 -0
- package/ios/Layouts/Tabs/ANNBottomTabsController.mm +237 -57
- package/ios/Layouts/Tabs/ANNBottomTabsCustomRow.mm +8 -3
- package/ios/Layouts/Tabs/ANNBottomTabsPresenter.h +6 -2
- package/ios/Layouts/Tabs/ANNBottomTabsPresenter.mm +232 -43
- package/ios/Layouts/Tabs/ANNTabsDesign.h +6 -5
- package/ios/Layouts/Tabs/ANNTabsDesign.mm +9 -1
- package/ios/Layouts/Tabs/UITabBar+utils.h +5 -5
- package/ios/Layouts/Tabs/UITabBar+utils.mm +32 -13
- package/ios/Options/ANNAnimationOptions.h +2 -1
- package/ios/Options/ANNAnimationOptions.mm +1 -1
- package/ios/Options/ANNBottomTabsOptions.h +2 -0
- package/ios/Options/ANNBottomTabsOptions.mm +1 -0
- package/ios/Options/ANNOptions.h +25 -0
- package/ios/Options/ANNOptions.mm +157 -1
- package/ios/Options/ANNOptionsCache.h +7 -6
- package/ios/Options/ANNOptionsReader.mm +108 -0
- package/ios/Options/ANNSearchBarOptions.h +4 -3
- package/ios/Options/ANNSheetOptions.h +4 -1
- package/ios/Options/ANNSideMenuOptions.h +2 -0
- package/ios/Options/ANNSideMenuOptions.mm +2 -0
- package/ios/Options/ANNStackPopAnimationOptions.h +13 -0
- package/ios/Options/ANNStackPopAnimationOptions.mm +11 -0
- package/ios/Options/ANNUserChoice.h +57 -0
- package/ios/Options/ANNUserChoice.mm +44 -0
- package/ios/Options/Params/ANNImageSource.h +61 -0
- package/ios/Options/Params/ANNImageSource.mm +101 -0
- package/ios/Options/Params/ANNOptionImages.h +37 -0
- package/ios/Options/Params/ANNOptionImages.mm +284 -0
- package/ios/Options/Params/ANNParam.h +15 -0
- package/ios/Options/Params/ANNParam.mm +61 -0
- package/ios/Options/Params/Color.h +3 -0
- package/ios/Options/Params/Color.mm +21 -0
- package/ios/Options/Params/ColorParser.h +4 -3
- package/ios/Options/Params/ColorParser.mm +22 -4
- package/ios/Options/Params/Image.h +15 -2
- package/ios/Options/Params/Image.mm +35 -2
- package/ios/Options/Params/ImageParser.h +5 -5
- package/ios/Options/Params/ImageParser.mm +28 -46
- package/ios/Public/ApexNavigation/ANNSceneDelegate.h +3 -0
- package/ios/Public/ApexNavigation/ApexNavigation.h +1 -1
- package/ios/RECIPES.md +13 -6
- package/ios/React/ANNReactView.mm +6 -25
- package/ios/React/ANNSafeAreaViewComponentView.mm +28 -17
- package/ios/React/ANNSurfaceHostingView.h +14 -0
- package/ios/React/ANNSurfaceHostingView.mm +144 -1
- package/ios/React/Slots/ANNSlotComponentView.mm +24 -17
- package/ios/React/Slots/ANNSlotContainers.h +14 -6
- package/ios/React/Slots/ANNSlotContainers.mm +75 -2
- package/ios/React/Slots/ANNSlotHost.mm +1 -3
- package/ios/React/Slots/ANNSlotScreenView.mm +8 -2
- package/ios/TopBar/ANNBackButtonPresenter.mm +6 -5
- package/ios/TopBar/ANNBarAppearance.h +2 -1
- package/ios/TopBar/ANNBarAppearance.mm +111 -30
- package/ios/TopBar/ANNBarBackgroundComponent.mm +16 -0
- package/ios/TopBar/ANNBarButtonComponentView.h +4 -4
- package/ios/TopBar/ANNBarButtonComponentView.mm +1 -1
- package/ios/TopBar/ANNBarButtons.h +14 -8
- package/ios/TopBar/ANNBarButtons.mm +397 -80
- package/ios/TopBar/ANNIconButtonImage.h +1 -0
- package/ios/TopBar/ANNIconButtonImage.mm +34 -1
- package/ios/TopBar/ANNLargeTitlePresenter.h +13 -0
- package/ios/TopBar/ANNLargeTitlePresenter.mm +50 -7
- package/ios/TopBar/ANNMainList.h +3 -0
- package/ios/TopBar/ANNMainList.mm +4 -0
- package/ios/TopBar/ANNScrollEdgeEffects.h +22 -6
- package/ios/TopBar/ANNScrollEdgeEffects.mm +123 -16
- package/ios/TopBar/ANNSearchPresenter.mm +172 -21
- package/ios/TopBar/ANNSearchResultsViewController.mm +29 -6
- package/ios/TopBar/ANNTopBarPresenter.h +8 -2
- package/ios/TopBar/ANNTopBarPresenter.mm +155 -33
- package/ios/TurboModules/ANNTurboEventEmitter.mm +4 -35
- package/ios/TurboModules/ANNTurboModule.mm +104 -33
- package/ios/cpp/react/renderer/components/ApexNavigationSpec/ANNSlotState.cpp +20 -0
- package/ios/cpp/react/renderer/components/ApexNavigationSpec/ANNSlotState.h +5 -14
- package/lib/module/ARCHITECTURE.md +40 -27
- package/lib/module/adapters/NativeANNTurboModule.js.map +1 -1
- package/lib/module/api/app/AppRegistry.js +14 -2
- package/lib/module/api/app/AppRegistry.js.map +1 -1
- package/lib/module/api/app/createNavigation.js +190 -66
- package/lib/module/api/app/createNavigation.js.map +1 -1
- package/lib/module/api/commands/commands.js +54 -6
- package/lib/module/api/commands/commands.js.map +1 -1
- package/lib/module/api/events/navigationEvents.js +6 -2
- package/lib/module/api/events/navigationEvents.js.map +1 -1
- package/lib/module/api/hooks/useNavigation.js +8 -3
- package/lib/module/api/hooks/useNavigation.js.map +1 -1
- package/lib/module/api/hooks/useSafeAreaInsets.js +4 -3
- package/lib/module/api/hooks/useSafeAreaInsets.js.map +1 -1
- package/lib/module/api/linking/dispatchedLinks.js +23 -0
- package/lib/module/api/linking/dispatchedLinks.js.map +1 -0
- package/lib/module/api/linking/linking.js +11 -0
- package/lib/module/api/linking/linking.js.map +1 -1
- package/lib/module/api/navigation.js.map +1 -1
- package/lib/module/api/options/OptionsChain.js +2 -2
- package/lib/module/api/screens/defineScreen.js +45 -3
- package/lib/module/api/screens/defineScreen.js.map +1 -1
- package/lib/module/api/screens/nativeScreens.js +31 -6
- package/lib/module/api/screens/nativeScreens.js.map +1 -1
- package/lib/module/api/screens/registerScreens.js +193 -35
- package/lib/module/api/screens/registerScreens.js.map +1 -1
- package/lib/module/api/theme/theme.js +5 -0
- package/lib/module/api/theme/theme.js.map +1 -1
- package/lib/module/engine/commands.js +51 -9
- package/lib/module/engine/commands.js.map +1 -1
- package/lib/module/engine/layout.js +20 -11
- package/lib/module/engine/layout.js.map +1 -1
- package/lib/module/engine/nativeScreens.js +9 -0
- package/lib/module/engine/nativeScreens.js.map +1 -1
- package/lib/module/engine/options.js +49 -15
- package/lib/module/engine/options.js.map +1 -1
- package/lib/module/engine/optionsChange.js +102 -0
- package/lib/module/engine/optionsChange.js.map +1 -0
- package/lib/module/engine/places.js +52 -7
- package/lib/module/engine/places.js.map +1 -1
- package/lib/module/engine/props.js +30 -1
- package/lib/module/engine/props.js.map +1 -1
- package/lib/module/engine/refresh.js +85 -0
- package/lib/module/engine/refresh.js.map +1 -0
- package/lib/module/engine/rememberedOptions.js +61 -1
- package/lib/module/engine/rememberedOptions.js.map +1 -1
- package/lib/module/engine/screens.js +77 -16
- package/lib/module/engine/screens.js.map +1 -1
- package/lib/module/interfaces/contract/commands.json +101 -0
- package/lib/module/interfaces/contract/errors.json +275 -0
- package/lib/typescript/adapters/NativeANNTurboModule.d.ts +12 -2
- package/lib/typescript/adapters/NativeANNTurboModule.d.ts.map +1 -1
- package/lib/typescript/api/app/AppRegistry.d.ts.map +1 -1
- package/lib/typescript/api/app/createNavigation.d.ts +8 -3
- package/lib/typescript/api/app/createNavigation.d.ts.map +1 -1
- package/lib/typescript/api/commands/commands.d.ts.map +1 -1
- package/lib/typescript/api/commands/presentation.d.ts +4 -3
- package/lib/typescript/api/commands/presentation.d.ts.map +1 -1
- package/lib/typescript/api/events/navigationEvents.d.ts +3 -3
- package/lib/typescript/api/events/navigationEvents.d.ts.map +1 -1
- package/lib/typescript/api/hooks/useNavigation.d.ts +1 -1
- package/lib/typescript/api/hooks/useNavigation.d.ts.map +1 -1
- package/lib/typescript/api/hooks/useSafeAreaInsets.d.ts +4 -3
- package/lib/typescript/api/hooks/useSafeAreaInsets.d.ts.map +1 -1
- package/lib/typescript/api/index.d.ts +1 -1
- package/lib/typescript/api/index.d.ts.map +1 -1
- package/lib/typescript/api/linking/dispatchedLinks.d.ts +7 -0
- package/lib/typescript/api/linking/dispatchedLinks.d.ts.map +1 -0
- package/lib/typescript/api/linking/linking.d.ts +8 -0
- package/lib/typescript/api/linking/linking.d.ts.map +1 -1
- package/lib/typescript/api/navigation.d.ts +4 -1
- package/lib/typescript/api/navigation.d.ts.map +1 -1
- package/lib/typescript/api/options/OptionsChain.d.ts +2 -2
- package/lib/typescript/api/screens/defineScreen.d.ts +23 -4
- package/lib/typescript/api/screens/defineScreen.d.ts.map +1 -1
- package/lib/typescript/api/screens/nativeScreens.d.ts +8 -1
- package/lib/typescript/api/screens/nativeScreens.d.ts.map +1 -1
- package/lib/typescript/api/screens/registerScreens.d.ts.map +1 -1
- package/lib/typescript/api/theme/theme.d.ts +2 -0
- package/lib/typescript/api/theme/theme.d.ts.map +1 -1
- package/lib/typescript/engine/commands.d.ts +5 -0
- package/lib/typescript/engine/commands.d.ts.map +1 -1
- package/lib/typescript/engine/layout.d.ts.map +1 -1
- package/lib/typescript/engine/nativeScreens.d.ts +5 -0
- package/lib/typescript/engine/nativeScreens.d.ts.map +1 -1
- package/lib/typescript/engine/options.d.ts +5 -2
- package/lib/typescript/engine/options.d.ts.map +1 -1
- package/lib/typescript/engine/optionsChange.d.ts +28 -0
- package/lib/typescript/engine/optionsChange.d.ts.map +1 -0
- package/lib/typescript/engine/places.d.ts +7 -2
- package/lib/typescript/engine/places.d.ts.map +1 -1
- package/lib/typescript/engine/props.d.ts +8 -1
- package/lib/typescript/engine/props.d.ts.map +1 -1
- package/lib/typescript/engine/refresh.d.ts +35 -0
- package/lib/typescript/engine/refresh.d.ts.map +1 -0
- package/lib/typescript/engine/rememberedOptions.d.ts +13 -0
- package/lib/typescript/engine/rememberedOptions.d.ts.map +1 -1
- package/lib/typescript/engine/screens.d.ts +27 -6
- package/lib/typescript/engine/screens.d.ts.map +1 -1
- package/lib/typescript/interfaces/ComponentEvents.d.ts +4 -4
- package/lib/typescript/interfaces/ComponentEvents.d.ts.map +1 -1
- package/lib/typescript/interfaces/Events.d.ts +28 -10
- package/lib/typescript/interfaces/Events.d.ts.map +1 -1
- package/lib/typescript/interfaces/Options.d.ts +1 -1
- package/lib/typescript/interfaces/Options.d.ts.map +1 -1
- package/lib/typescript/interfaces/options/animations.d.ts +80 -22
- package/lib/typescript/interfaces/options/animations.d.ts.map +1 -1
- package/lib/typescript/interfaces/options/bottomTabs.d.ts +21 -7
- package/lib/typescript/interfaces/options/bottomTabs.d.ts.map +1 -1
- package/lib/typescript/interfaces/options/buttons.d.ts +23 -15
- package/lib/typescript/interfaces/options/buttons.d.ts.map +1 -1
- package/lib/typescript/interfaces/options/modals.d.ts +34 -26
- package/lib/typescript/interfaces/options/modals.d.ts.map +1 -1
- package/lib/typescript/interfaces/options/sideMenu.d.ts +23 -6
- package/lib/typescript/interfaces/options/sideMenu.d.ts.map +1 -1
- package/lib/typescript/interfaces/options/stack.d.ts +17 -3
- package/lib/typescript/interfaces/options/stack.d.ts.map +1 -1
- package/lib/typescript/interfaces/options/system.d.ts +18 -11
- package/lib/typescript/interfaces/options/system.d.ts.map +1 -1
- package/lib/typescript/interfaces/options/toolbar.d.ts +2 -2
- package/lib/typescript/interfaces/options/topBar.d.ts +68 -38
- package/lib/typescript/interfaces/options/topBar.d.ts.map +1 -1
- package/metro/acceptPlugin.js +57 -0
- package/metro/babelTransformer.js +45 -0
- package/metro/index.js +36 -0
- package/package.json +4 -25
- package/src/ARCHITECTURE.md +40 -27
- package/src/adapters/NativeANNTurboModule.ts +12 -2
- package/src/api/app/AppRegistry.ts +16 -2
- package/src/api/app/createNavigation.ts +203 -69
- package/src/api/commands/commands.ts +48 -7
- package/src/api/commands/presentation.ts +4 -3
- package/src/api/events/navigationEvents.ts +10 -4
- package/src/api/hooks/useNavigation.ts +9 -4
- package/src/api/hooks/useSafeAreaInsets.ts +4 -3
- package/src/api/index.ts +1 -0
- package/src/api/linking/dispatchedLinks.ts +18 -0
- package/src/api/linking/linking.ts +22 -1
- package/src/api/navigation.ts +4 -1
- package/src/api/options/OptionsChain.ts +2 -2
- package/src/api/screens/defineScreen.ts +49 -5
- package/src/api/screens/nativeScreens.ts +40 -4
- package/src/api/screens/registerScreens.tsx +185 -42
- package/src/api/theme/theme.ts +5 -0
- package/src/engine/commands.ts +70 -13
- package/src/engine/layout.ts +27 -11
- package/src/engine/nativeScreens.ts +10 -1
- package/src/engine/options.ts +45 -19
- package/src/engine/optionsChange.ts +107 -0
- package/src/engine/places.ts +65 -7
- package/src/engine/props.ts +30 -1
- package/src/engine/refresh.ts +97 -0
- package/src/engine/rememberedOptions.ts +74 -1
- package/src/engine/screens.tsx +76 -21
- package/src/interfaces/ComponentEvents.ts +4 -4
- package/src/interfaces/Events.ts +29 -10
- package/src/interfaces/Options.ts +1 -0
- package/src/interfaces/contract/commands.json +101 -0
- package/src/interfaces/contract/errors.json +275 -0
- package/src/interfaces/options/animations.ts +81 -22
- package/src/interfaces/options/bottomTabs.ts +21 -7
- package/src/interfaces/options/buttons.ts +23 -15
- package/src/interfaces/options/modals.ts +34 -26
- package/src/interfaces/options/sideMenu.ts +24 -6
- package/src/interfaces/options/stack.ts +17 -3
- package/src/interfaces/options/system.ts +18 -11
- package/src/interfaces/options/toolbar.ts +2 -2
- package/src/interfaces/options/topBar.ts +68 -38
- package/android/src/main/java/dev/apexnative/navigation/react/ArrangementStates.kt +0 -41
- package/android/src/main/java/dev/apexnative/navigation/react/ScreenInsets.kt +0 -69
- package/android/src/main/java/dev/apexnative/navigation/react/events/NavigationStateReporter.kt +0 -62
- package/android/src/main/java/dev/apexnative/navigation/react/events/StateHold.kt +0 -62
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/bottomtabs/CustomTabRowPlacer.kt +0 -223
- package/android/src/main/java/dev/apexnative/navigation/views/element/ElementStub.kt +0 -31
- package/android/src/main/java/dev/apexnative/navigation/views/element/animators/ImageMatrixAnimator.kt +0 -138
- package/android/src/main/java/dev/apexnative/navigation/views/element/animators/PlainViewAnimator.kt +0 -88
- package/android/src/main/java/dev/apexnative/navigation/views/element/animators/PropertyAnimatorCreator.kt +0 -33
- package/android/src/main/java/dev/apexnative/navigation/views/element/animators/ReactImageAnimator.kt +0 -66
- package/android/src/main/java/dev/apexnative/navigation/views/element/animators/TextChangeAnimator.kt +0 -179
- package/android/src/main/java/dev/apexnative/navigation/views/element/animators/ViewChangeAnimator.kt +0 -139
- package/ios/Layouts/Screen/ANNScreenInsets.h +0 -30
- package/ios/Layouts/Screen/ANNScreenInsets.mm +0 -68
- package/ios/Layouts/Tabs/ANNTabsPreloadWindow.h +0 -27
- package/ios/Layouts/Tabs/ANNTabsPreloadWindow.mm +0 -55
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Every text the native side rejects a command with, or logs for a command without a promise: one sentence per case, the values in single quotes, {name} for a parameter. scripts/contract.mjs makes ios/Contract/ANNErrorTexts.{h,mm} and android/.../react/ErrorTexts.kt from it; `platforms` limits a text to one platform.",
|
|
3
|
+
"groups": [
|
|
4
|
+
{
|
|
5
|
+
"title": "Where the screen is",
|
|
6
|
+
"texts": [
|
|
7
|
+
{
|
|
8
|
+
"name": "screenNotShown",
|
|
9
|
+
"params": ["componentId"],
|
|
10
|
+
"text": "the screen '{componentId}' is not shown"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "notInStack",
|
|
14
|
+
"params": ["componentId"],
|
|
15
|
+
"text": "the screen '{componentId}' is not in a stack"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "firstScreenOfStack",
|
|
19
|
+
"params": ["componentId"],
|
|
20
|
+
"text": "the screen '{componentId}' is the first screen of its stack"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "notInThisStack",
|
|
24
|
+
"params": ["componentId"],
|
|
25
|
+
"text": "the screen '{componentId}' is not in this stack"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "notInModal",
|
|
29
|
+
"params": ["componentId"],
|
|
30
|
+
"text": "the screen '{componentId}' is not in a modal"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "notInOverlay",
|
|
34
|
+
"params": ["componentId"],
|
|
35
|
+
"text": "the screen '{componentId}' is not in an overlay"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "notInSplitView",
|
|
39
|
+
"params": ["componentId"],
|
|
40
|
+
"text": "the screen '{componentId}' is not in a split view"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "neitherSplitViewNorStack",
|
|
44
|
+
"params": ["componentId"],
|
|
45
|
+
"text": "the screen '{componentId}' is neither in a split view nor in a stack"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "noSuchColumn",
|
|
49
|
+
"params": ["componentId", "column"],
|
|
50
|
+
"text": "the split view of the screen '{componentId}' has no '{column}' column"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "columnIsStack",
|
|
54
|
+
"params": ["componentId", "column"],
|
|
55
|
+
"text": "the '{column}' column of the split view of the screen '{componentId}' is a stack: it takes a screen, not a stack"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "columnNotStack",
|
|
59
|
+
"params": ["componentId", "column"],
|
|
60
|
+
"text": "the '{column}' column of the split view of the screen '{componentId}' is not a stack"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "noScreensForStack",
|
|
64
|
+
"params": ["componentId"],
|
|
65
|
+
"text": "there are no screens to put in the stack of the screen '{componentId}'"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "alreadyShown",
|
|
69
|
+
"params": ["componentId"],
|
|
70
|
+
"text": "the screen '{componentId}' shows already: an id goes to one screen"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"title": "Root, modals, the app",
|
|
76
|
+
"texts": [
|
|
77
|
+
{
|
|
78
|
+
"name": "setRootReplaced",
|
|
79
|
+
"params": ["rootId"],
|
|
80
|
+
"text": "setRoot was replaced by a newer setRoot before the root '{rootId}' finished showing"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "rootDestroyed",
|
|
84
|
+
"params": ["rootId"],
|
|
85
|
+
"text": "the root '{rootId}' was destroyed before it showed"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "modalWithoutRoot",
|
|
89
|
+
"params": ["componentId"],
|
|
90
|
+
"text": "the modal '{componentId}' can't be dismissed: there is no root under it"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "nowhereToShow",
|
|
94
|
+
"params": [],
|
|
95
|
+
"text": "the navigation has nowhere to show screens: the app has no activity or window"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"title": "Native screens",
|
|
101
|
+
"texts": [
|
|
102
|
+
{
|
|
103
|
+
"name": "nativeScreenNotRegistered",
|
|
104
|
+
"params": ["name"],
|
|
105
|
+
"text": "no native screen is registered as '{name}'"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "nativeScreenNotCreated",
|
|
109
|
+
"params": ["name"],
|
|
110
|
+
"text": "the native screen '{name}' could not be created: its creator returned nothing"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "nativeCallReloaded",
|
|
114
|
+
"params": ["name", "componentId"],
|
|
115
|
+
"text": "JavaScript reloaded before the call '{name}' of the screen '{componentId}' was answered",
|
|
116
|
+
"doc": "The error of a call of a native screen whose JavaScript reloaded before it answered."
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "nativeCallNotRunning",
|
|
120
|
+
"params": ["name", "componentId"],
|
|
121
|
+
"text": "the navigation is not running: the call '{name}' of the screen '{componentId}' can't be answered",
|
|
122
|
+
"doc": "The error of a call of a native screen while no JavaScript can answer it."
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"title": "The layout",
|
|
128
|
+
"texts": [
|
|
129
|
+
{
|
|
130
|
+
"name": "unknownNodeType",
|
|
131
|
+
"params": ["type"],
|
|
132
|
+
"text": "the layout has a node of unknown type '{type}'"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "nodeWithoutId",
|
|
136
|
+
"params": ["type"],
|
|
137
|
+
"text": "the layout has a node of type '{type}' without an id"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "sideMenuChild",
|
|
141
|
+
"params": ["menuId", "type"],
|
|
142
|
+
"text": "the side menu '{menuId}' has a child of type '{type}': it takes SideMenuLeft, SideMenuCenter and SideMenuRight"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"name": "stackTakesScreens",
|
|
146
|
+
"params": ["stackId", "type"],
|
|
147
|
+
"text": "the stack '{stackId}' takes screens, not a '{type}'"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "emptyStack",
|
|
151
|
+
"params": ["stackId"],
|
|
152
|
+
"text": "the stack '{stackId}' has no screens"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "emptyTabs",
|
|
156
|
+
"params": ["tabsId"],
|
|
157
|
+
"text": "the tabs '{tabsId}' have no tabs"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "tooManyTabs",
|
|
161
|
+
"params": [
|
|
162
|
+
"tabsId",
|
|
163
|
+
{
|
|
164
|
+
"name": "count",
|
|
165
|
+
"type": "int"
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"text": "the tabs '{tabsId}' have {count} tabs: Android shows at most 5",
|
|
169
|
+
"doc": "Only Android checks it: its tab bar shows at most 5 tabs."
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "splitViewColumns",
|
|
173
|
+
"params": ["splitViewId"],
|
|
174
|
+
"text": "the split view '{splitViewId}' needs its primary and its secondary column"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "pairUnsupported",
|
|
178
|
+
"params": ["pairId"],
|
|
179
|
+
"text": "the pair '{pairId}' needs iOS 27.1 and an app built with its SDK",
|
|
180
|
+
"doc": "Only iOS checks it: Android has pairs on every version."
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "pairNeedsTwoScreens",
|
|
184
|
+
"params": ["pairId"],
|
|
185
|
+
"text": "the pair '{pairId}' needs two screens: its primary and its secondary"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "nodeWithoutName",
|
|
189
|
+
"params": ["type", "nodeId"],
|
|
190
|
+
"text": "the layout has a node '{nodeId}' of type '{type}' without a name"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "rootMissing",
|
|
194
|
+
"params": [],
|
|
195
|
+
"text": "the layout of setRoot has no root"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "tabsInTabs",
|
|
199
|
+
"params": ["tabsId"],
|
|
200
|
+
"text": "the tabs '{tabsId}' have a tab of type 'BottomTabs': tabs don't go inside tabs"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "sideMenuSides",
|
|
204
|
+
"params": ["menuId"],
|
|
205
|
+
"text": "the side menu '{menuId}' takes one SideMenuCenter and at most one SideMenuLeft and one SideMenuRight"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "sideChildCount",
|
|
209
|
+
"params": ["sideId", "menuId"],
|
|
210
|
+
"text": "the side '{sideId}' of the side menu '{menuId}' needs exactly one child"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"name": "sideMenuInSide",
|
|
214
|
+
"params": ["menuId"],
|
|
215
|
+
"text": "the side menu '{menuId}' has a side menu in a side: a side menu doesn't go inside a side menu"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"name": "sideOutsideMenu",
|
|
219
|
+
"params": ["nodeId", "type"],
|
|
220
|
+
"text": "the layout has a node '{nodeId}' of type '{type}' outside a side menu"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "splitViewInColumn",
|
|
224
|
+
"params": ["splitViewId"],
|
|
225
|
+
"text": "the split view '{splitViewId}' has a column of type 'SplitView': a split view doesn't go inside a split view"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"name": "idGivenTwice",
|
|
229
|
+
"params": ["nodeId"],
|
|
230
|
+
"text": "the layout gives the id '{nodeId}' to two nodes"
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"title": "Options, previews, any other failure",
|
|
236
|
+
"texts": [
|
|
237
|
+
{
|
|
238
|
+
"name": "unreadableOption",
|
|
239
|
+
"params": ["path", "componentId"],
|
|
240
|
+
"text": "the option '{path}' of the screen '{componentId}' has a value the navigation can't read"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"name": "unreadableDefaultOption",
|
|
244
|
+
"params": ["path"],
|
|
245
|
+
"text": "the option '{path}' of the default options has a value the navigation can't read",
|
|
246
|
+
"doc": "An unreadable value of `setDefaultOptions`: the default options belong to no screen."
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"name": "previewGone",
|
|
250
|
+
"params": ["previewId"],
|
|
251
|
+
"text": "the preview '{previewId}' went without being opened"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "couldNot",
|
|
255
|
+
"params": ["what", "reason"],
|
|
256
|
+
"text": "could not {what}: {reason}",
|
|
257
|
+
"doc": "Any other failure: what could not be done and why, `could not <what>: <reason>`."
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"name": "notDoneYet",
|
|
261
|
+
"params": ["method"],
|
|
262
|
+
"text": "could not run '{method}': the native core doesn't do it yet",
|
|
263
|
+
"doc": "A command whose part of the native core is not written yet."
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"name": "notAnswered",
|
|
267
|
+
"params": ["method"],
|
|
268
|
+
"text": "could not run '{method}': the native core let it go without an answer",
|
|
269
|
+
"doc": "A command that nothing in the native core answered: what took it let it go, or nothing took it.",
|
|
270
|
+
"platforms": ["ios"]
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
}
|
|
@@ -254,13 +254,16 @@ export type ElementAnimation = AppearingElementAnimation | DisappearingElementAn
|
|
|
254
254
|
/**
|
|
255
255
|
* An animation of one view of a screen that moves together with the transition, with or without a counterpart on the
|
|
256
256
|
* other screen. The view is found by its `nativeID`, first on the screen that goes, then on the one that comes; one
|
|
257
|
-
* that is not found is skipped while the rest plays. The transition waits until it is found.
|
|
258
|
-
* the
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
257
|
+
* that is not found is skipped while the rest plays. The transition waits until it is found. An element that fails on
|
|
258
|
+
* the way (an error in its animation) is skipped too, with a warning in the log: it shows and hides with its screen,
|
|
259
|
+
* and the transition and its command go on. Without an animation of the screens of its own, the screen that comes fades
|
|
260
|
+
* in (or the one that goes fades out) in 300 ms around the elements. When the transition ends or is cancelled, the
|
|
261
|
+
* element gets its own values back. The element's own `transform` counts: a property that doesn't animate keeps the
|
|
262
|
+
* element's value, and a missing end is that value (a turn read from −180° to 180°, as React Native draws it). `x`
|
|
263
|
+
* and `y` are the position in the parent of the element on both platforms. As on a side of a screen, don't set `x`
|
|
264
|
+
* with `translationX` or `y` with `translationY` on one element: the translation plays and the position doesn't.
|
|
265
|
+
* The element plays where it is, in its screen: it moves with its screen, its parents clip it, and the views drawn
|
|
266
|
+
* after it in its screen stay over it.
|
|
264
267
|
*/
|
|
265
268
|
export interface ElementTransition {
|
|
266
269
|
/** The `nativeID` of the view to animate. */
|
|
@@ -288,12 +291,23 @@ export interface ElementTransition {
|
|
|
288
291
|
}
|
|
289
292
|
|
|
290
293
|
/**
|
|
291
|
-
* A view that flies from the screen that goes to the screen that comes, changing its place, size, corners and look
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
* the
|
|
295
|
-
*
|
|
296
|
-
*
|
|
294
|
+
* A view that flies from the screen that goes to the screen that comes, changing its place, size, corners and look on
|
|
295
|
+
* the way. A pair whose view is not found on either screen is skipped while the rest plays, and the transition waits
|
|
296
|
+
* until the views are found. A pair that fails on the way (an error in its start or its flight) is skipped too, with a
|
|
297
|
+
* warning in the log: its views show and hide with their screens, and the transition and its command go on. So is a
|
|
298
|
+
* pair with a view without a size, or one whose picture can't be taken. Without an animation of the screens of its
|
|
299
|
+
* own, the screen that comes fades in (or the one that goes fades out) in 300 ms around the pair. What flies is a copy:
|
|
300
|
+
* pictures of the two views taken as the transition starts, while the views stay hidden in their places; what changes
|
|
301
|
+
* in them meanwhile shows when they are back. A view its parents cut (`overflow: hidden`, a scroll view, the edge of
|
|
302
|
+
* its screen) shows only the part they leave visible, and that part goes to the one of the other view on the way.
|
|
303
|
+
* Text keeps its proportions, flies whole and changes its picture within a quarter of the flight. A view turned or
|
|
304
|
+
* scaled by its own `transform` or by a parent's flies from where it shows, and its angle goes to the other view's
|
|
305
|
+
* along the shorter arc. The angle is the one React Native draws, from −180° to 180°:
|
|
306
|
+
* `rotate: '270deg'` turns back a quarter, and no pair spins a full turn. (Android) An image without a background or a
|
|
307
|
+
* border flies as the image of the view that comes, from the part and place the fit (`resizeMode`) shows in one view
|
|
308
|
+
* to those in the other, and an animated image plays on; images of other proportions fly as pictures. An image that
|
|
309
|
+
* doesn't load within a second drops out of the transition. A skew and a tilt (`skewX`, `rotateX`, …) don't fly: the
|
|
310
|
+
* view flies without them and has them again at the end.
|
|
297
311
|
*/
|
|
298
312
|
export interface SharedElementTransition {
|
|
299
313
|
/** The `nativeID` of the view on the screen that goes. */
|
|
@@ -350,22 +364,28 @@ export interface StackAnimationOptions {
|
|
|
350
364
|
enabled?: boolean;
|
|
351
365
|
/**
|
|
352
366
|
* Whether to wait for the new top screen to be drawn before the transition. Without it, the transition waits for the
|
|
353
|
-
*
|
|
354
|
-
*
|
|
367
|
+
* first mount of the new top's content, half a second at most, with the platform's transition as with an animation
|
|
368
|
+
* of its own; on a push the options the screen sets as it renders for the first time (`useScreenOptions`, such as
|
|
369
|
+
* its title) are in its bar from the first frame. `true` waits as long as it takes, `false` starts at once, the
|
|
370
|
+
* content drawing as it comes ((Android) a push with `appProvider` still renders the screen first). (iOS) The
|
|
371
|
+
* components of the bar are waited for too, each to its own limit.
|
|
355
372
|
*/
|
|
356
373
|
waitForRender?: boolean;
|
|
357
374
|
/**
|
|
358
375
|
* The animation of the screens: `enter` for the screen that comes (on a pop, the one that was below), `exit` for the
|
|
359
376
|
* one that goes. A property with a `from` or a `to` makes it an animation of its own, which replaces the platform's
|
|
360
|
-
* transition; the side left out stays still.
|
|
361
|
-
*
|
|
377
|
+
* transition; the side left out stays still. With one of its own, (Android) the top bar goes with its screen: the
|
|
378
|
+
* bar of the screen that goes leaves with it, and the bar of the screen that comes moves, scales and fades with it;
|
|
379
|
+
* (iOS) UIKit keeps the bar in place and changes its title and buttons at once. (Android) The tab bar doesn't travel
|
|
380
|
+
* with the screens. (Android) When the transition has elements, a push plays only `enter` and a
|
|
362
381
|
* pop only `exit`, and only when that side is a single `alpha`; any other side is not played, and the screen fades in
|
|
363
382
|
* or out in 300 ms around the elements instead. iOS plays the sides as they are set.
|
|
364
383
|
*/
|
|
365
384
|
content?: EnterExitAnimationOptions;
|
|
366
385
|
/**
|
|
367
386
|
* (Android) The animation of the top bar when it shows or hides because the screens differ in `topBar.visible`.
|
|
368
|
-
* Without it, the bar slides up by its height and back in 300 ms
|
|
387
|
+
* Without it, the bar slides up by its height and back in 300 ms; with a `content` of its own it shows or hides
|
|
388
|
+
* with its screen. iOS animates the bar with UIKit.
|
|
369
389
|
*/
|
|
370
390
|
topBar?: EnterExitAnimationOptions<TopBarAnimationOptions>;
|
|
371
391
|
/**
|
|
@@ -395,6 +415,33 @@ export interface StackPushAnimationOptions extends StackAnimationOptions {
|
|
|
395
415
|
zoom?: ZoomTransitionOptions;
|
|
396
416
|
}
|
|
397
417
|
|
|
418
|
+
/**
|
|
419
|
+
* The animation of a pop, read from the screen that goes. As {@link StackAnimationOptions}, with the swipe back of iOS
|
|
420
|
+
* and the preview of the back gesture on Android.
|
|
421
|
+
*/
|
|
422
|
+
export interface StackPopAnimationOptions extends StackAnimationOptions {
|
|
423
|
+
/**
|
|
424
|
+
* (iOS) Whether the swipe back plays this pop under the finger. Without it, the swipe back plays UIKit's slide, and
|
|
425
|
+
* the pop's own animation plays only for the back button and `pop`. With `true`, the swipe from the edge plays the
|
|
426
|
+
* pop's own animation as far as the finger has gone across the screen: the user can stop halfway, and letting go
|
|
427
|
+
* finishes the pop or puts the screen back, the rest playing faster after a quick flick. It applies only when the pop
|
|
428
|
+
* has an animation of its own (`content`, `elementTransitions`, `sharedElementTransitions`). The top bar shows the
|
|
429
|
+
* screen under from the start of the swipe, as UIKit does in a transition of its own, and comes back when the swipe
|
|
430
|
+
* is given up. On iOS 26 the swipe from the content stays off for a screen with an own pop.
|
|
431
|
+
* Android ignores it: a pop with an animation of its own plays when the back gesture ends.
|
|
432
|
+
* @default false
|
|
433
|
+
*/
|
|
434
|
+
interactive?: boolean;
|
|
435
|
+
/**
|
|
436
|
+
* (Android 14+) Whether the back gesture on a pushed screen previews its pop as the user swipes: the screen shrinks
|
|
437
|
+
* and follows the finger, the screen under it shows behind. `false` pops the screen when the gesture is released,
|
|
438
|
+
* as on Android 13 and older; back still pops it. iOS ignores it: its swipe back is UIKit's, or the pop's own
|
|
439
|
+
* animation with `interactive`.
|
|
440
|
+
* @default true
|
|
441
|
+
*/
|
|
442
|
+
preview?: boolean;
|
|
443
|
+
}
|
|
444
|
+
|
|
398
445
|
/**
|
|
399
446
|
* The animation of `setStackRoot`, read from the new top screen. As {@link StackAnimationOptions}: without an animation
|
|
400
447
|
* of its own, iOS plays the push animation of the new top screen or UIKit's transition, and Android plays a fade
|
|
@@ -416,8 +463,10 @@ export interface SetStackRootAnimationOptions extends StackAnimationOptions {
|
|
|
416
463
|
* screen under it. The screen under a modal takes part (iOS) only under a modal that covers the full screen.
|
|
417
464
|
*
|
|
418
465
|
* A sheet keeps the system's sheet motion on both platforms: (iOS) a modal shown as `'pageSheet'`, `'formSheet'` or
|
|
419
|
-
* without a style, (Android)
|
|
420
|
-
* don't apply to it.
|
|
466
|
+
* without a style, (Android) the Material bottom sheet of `'pageSheet'`, `'formSheet'`, `'popover'`, or of
|
|
467
|
+
* `modal.sheet` without a style. The sides `enter` and `exit` and the lists of elements set here don't apply to it.
|
|
468
|
+
* Without them a modal over the whole screen comes up from the bottom: on iOS by UIKit's `modalTransitionStyle`, on
|
|
469
|
+
* Android with the system's motion of a window over another, 300 ms up and 250 ms down, without a fade.
|
|
421
470
|
*
|
|
422
471
|
* (Android) When the modal has elements, `enter` of a show and `exit` of a dismiss play only when that side is a single
|
|
423
472
|
* `alpha`; any other side is not played, and the modal fades in or out in 300 ms around the elements instead.
|
|
@@ -443,6 +492,12 @@ export interface ModalAnimationOptions extends EnterExitAnimationOptions {
|
|
|
443
492
|
* options of the command. A change by `mergeOptions` is for the next command and animates nothing itself. A theme
|
|
444
493
|
* switch or a rotation does not change an animation. Without a key, the transition is the platform's own.
|
|
445
494
|
*
|
|
495
|
+
* The system's setting to reduce motion is respected, with no option to turn that off. (iOS) With Reduce Motion on, a
|
|
496
|
+
* transition of these keys is a fade of the same length: the screen that comes fades in (a push, `setStackRoot`, a
|
|
497
|
+
* modal's show, `setRoot`), the screen that goes fades out (a pop, a dismissal); no element moves. (Android) With
|
|
498
|
+
* Remove animations on (or the animator duration scale at 0), the transitions end at once, no element moves and none
|
|
499
|
+
* is waited for, a side menu opens and closes without its slide, and a sheet shows and closes without it.
|
|
500
|
+
*
|
|
446
501
|
* ```ts
|
|
447
502
|
* const options: Options = {
|
|
448
503
|
* animations: {
|
|
@@ -456,8 +511,12 @@ export interface ModalAnimationOptions extends EnterExitAnimationOptions {
|
|
|
456
511
|
export interface AnimationOptions {
|
|
457
512
|
/** The push of a screen, read from the screen that comes. */
|
|
458
513
|
push?: StackPushAnimationOptions;
|
|
459
|
-
/**
|
|
460
|
-
|
|
514
|
+
/**
|
|
515
|
+
* The pop of a screen, also `popTo` and `popToRoot`, read from the screen that goes. The swipe back of iOS is
|
|
516
|
+
* UIKit's, or the pop's own animation under the finger (`interactive`); the back gesture of Android previews the pop
|
|
517
|
+
* (`preview`).
|
|
518
|
+
*/
|
|
519
|
+
pop?: StackPopAnimationOptions;
|
|
461
520
|
/** The replacing of the screens of a stack, read from the new top screen. */
|
|
462
521
|
setStackRoot?: SetStackRootAnimationOptions;
|
|
463
522
|
/**
|
|
@@ -73,8 +73,10 @@ export interface OptionsBottomTabsAccessoryComponent {
|
|
|
73
73
|
/**
|
|
74
74
|
* (iOS 26+) The accessory above the tab bar, like the mini player of a music app. The system sizes it (48 points high)
|
|
75
75
|
* and the component fills that size. It is placed above the bar, or beside the bar when the bar is minimized; on an
|
|
76
|
-
* iPad with the bar at the top it sits at the bottom over the full width, always above the bar.
|
|
77
|
-
*
|
|
76
|
+
* iPad with the bar at the top it sits at the bottom over the full width, always above the bar. A hidden accessory
|
|
77
|
+
* (`visible: false`, or no name) keeps its React root and its state, and shows again with them. When another accessory
|
|
78
|
+
* (another `componentId`) shows, the replaced one stops once it has left the window and its state is gone. The last
|
|
79
|
+
* accessory stops together with the tabs. Android has no accessory.
|
|
78
80
|
*/
|
|
79
81
|
export interface OptionsBottomTabsAccessory {
|
|
80
82
|
/**
|
|
@@ -155,6 +157,16 @@ export interface OptionsBottomTabs {
|
|
|
155
157
|
* @default true
|
|
156
158
|
*/
|
|
157
159
|
animate?: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* How the content changes when another tab is selected on screen, by a press, by back or from code. `'platform'`
|
|
162
|
+
* does what the platform does: on Android the tab that goes fades out and the new one fades in and grows (Material's
|
|
163
|
+
* fade through, 300 ms), on iOS the content changes at once. `'none'` changes it at once on both platforms. The
|
|
164
|
+
* appear events of a switch and `ANN.BottomTabSelected` come at its end, so with `'none'` right away. The tab that is
|
|
165
|
+
* selected decides: the value of the screen it shows, over its own, the tabs' and the default options. A
|
|
166
|
+
* `mergeOptions` applies from the next switch. Off screen the content always changes at once.
|
|
167
|
+
* @default 'platform'
|
|
168
|
+
*/
|
|
169
|
+
switchAnimation?: 'platform' | 'none';
|
|
158
170
|
/**
|
|
159
171
|
* The tab to select, as an index from 0. It selects once, when the options arrive, at creation (the first tab to
|
|
160
172
|
* show) or in `mergeOptions`; it is not kept. An index out of range selects nothing (or the first tab at creation)
|
|
@@ -187,9 +199,10 @@ export interface OptionsBottomTabs {
|
|
|
187
199
|
*/
|
|
188
200
|
drawBehind?: boolean;
|
|
189
201
|
/**
|
|
190
|
-
* The background color of the bar; `null` gives the default one. On Android the default is the surface color
|
|
191
|
-
* Material 3 theme. Before iOS 26
|
|
192
|
-
*
|
|
202
|
+
* The background color of the bar; `null` gives the default one. On Android the default is the surface container color
|
|
203
|
+
* (`colorSurfaceContainer`) of the Material 3 theme. Before iOS 26, and in the compatibility mode (`UIDesignRequiresCompatibility` in Info.plist: iOS 26, and iOS 27
|
|
204
|
+
* only for an app built with an SDK before iOS 27), the bar is opaque with the color, or system opaque without it,
|
|
205
|
+
* and a transparent color makes it transparent. On iOS 26 and later with glass the color is ignored
|
|
193
206
|
* with one warning, since the system has no color for glass, while a transparent color gives a transparent bar. The
|
|
194
207
|
* theme color `bar` is its default option.
|
|
195
208
|
*/
|
|
@@ -198,7 +211,8 @@ export interface OptionsBottomTabs {
|
|
|
198
211
|
* When the screens of the tabs are created: `'together'` creates and draws every tab at the start, and the tabs are
|
|
199
212
|
* ready when all of them are; `'afterInitialTab'` creates the selected tab first and the others right after it;
|
|
200
213
|
* `'onSwitchToTab'` creates a tab the first time it is selected. The screens of tabs not yet selected get no appear
|
|
201
|
-
* events in any mode.
|
|
214
|
+
* events in any mode. On iOS a text input's `autoFocus` in a tab drawn before it is selected does nothing: focus it in
|
|
215
|
+
* `useScreenAppear`. It applies when the tabs are created; `mergeOptions` does not change it.
|
|
202
216
|
* @default 'together'
|
|
203
217
|
*/
|
|
204
218
|
tabsAttachMode?: 'together' | 'afterInitialTab' | 'onSwitchToTab';
|
|
@@ -396,7 +410,7 @@ export interface OptionsBottomTab {
|
|
|
396
410
|
selectedFontSize?: number;
|
|
397
411
|
/**
|
|
398
412
|
* (iOS) The insets of the icon. Each side is independent. They apply before iOS 26 only; iOS 26 and the compatibility
|
|
399
|
-
* mode ignore them, and so does a system role before iOS 18.
|
|
413
|
+
* mode (see `backgroundColor`) ignore them, and so does a system role before iOS 18.
|
|
400
414
|
*/
|
|
401
415
|
iconInsets?: IconInsets;
|
|
402
416
|
/**
|
|
@@ -60,7 +60,7 @@ export interface IconInsets {
|
|
|
60
60
|
* a color the other fields are ignored.
|
|
61
61
|
*
|
|
62
62
|
* On iOS the icon is drawn onto the shape and the button becomes a button of its own (the back button keeps its
|
|
63
|
-
* history menu), without the glass capsule
|
|
63
|
+
* history menu), without the glass capsule (glass design, iOS 26+) by default. On Android the icon sits on the shape, mirrored in a
|
|
64
64
|
* right-to-left layout. Layers merge differently: on iOS an object merges field by field like any other, on Android
|
|
65
65
|
* an `iconBackground` that has a `color` replaces the earlier one as a whole.
|
|
66
66
|
*/
|
|
@@ -138,8 +138,10 @@ export type OptionsTopBarButtonMenuElement =
|
|
|
138
138
|
/**
|
|
139
139
|
* A menu of the top bar: the menu of a button, the overflow menu, the menu of the title. A list of `items` sent with
|
|
140
140
|
* `mergeOptions` replaces the earlier list as a whole, and `items: []` removes the menu; `title` and
|
|
141
|
-
* `singleSelection` merge field by field (iOS). What the user picks in a `singleSelection` menu
|
|
142
|
-
*
|
|
141
|
+
* `singleSelection` merge field by field (iOS). What the user picks in a `singleSelection` menu stays with the screen,
|
|
142
|
+
* through it showing again, a `mergeOptions` that sends the same items again and `setDefaultOptions`; a `mergeOptions`
|
|
143
|
+
* into the screen that changes the checks of that menu's level, or takes the item away, replaces it. A merge into the
|
|
144
|
+
* stack or the tabs around the screen doesn't.
|
|
143
145
|
*/
|
|
144
146
|
export interface OptionsTopBarButtonMenu {
|
|
145
147
|
/** The title above the items. (iOS) Android doesn't show it. */
|
|
@@ -157,7 +159,7 @@ export interface OptionsTopBarButtonMenu {
|
|
|
157
159
|
* A button of the top bar (`leftButtons`, `rightButtons`, `centerButtons`) or of the toolbar (`toolbar.buttons`). The
|
|
158
160
|
* kinds are picked by the fields that are set. On iOS, the first that fits wins: a `component`, then an icon with text
|
|
159
161
|
* and `showText`, then an icon with `iconBackground` or `iconInsets`, then an SF Symbol, an image `icon`, a `text`,
|
|
160
|
-
* a `systemItem`; a button with none of them is not shown. On Android a button is a
|
|
162
|
+
* a `systemItem`; a button with none of them is not shown. On Android a button is a button of the bar's row: text, icon
|
|
161
163
|
* or a component. Lists of buttons are replaced as a whole and take nothing from the lists of lower layers.
|
|
162
164
|
*
|
|
163
165
|
* Text, icon, color and similar fields are the same in all four places; where a place or a side differs, the field
|
|
@@ -187,7 +189,7 @@ export interface OptionsTopBarButton {
|
|
|
187
189
|
*/
|
|
188
190
|
icon?: ImageResource;
|
|
189
191
|
/**
|
|
190
|
-
* (iOS) The space around the image of `icon`; the button becomes a button of its own, without a capsule
|
|
192
|
+
* (iOS) The space around the image of `icon`; the button becomes a button of its own, without a capsule with the glass design (iOS 26+, see `UIDesignRequiresCompatibility`).
|
|
191
193
|
*/
|
|
192
194
|
iconInsets?: IconInsets;
|
|
193
195
|
/**
|
|
@@ -202,7 +204,7 @@ export interface OptionsTopBarButton {
|
|
|
202
204
|
systemItem?: SystemItemIcon;
|
|
203
205
|
/**
|
|
204
206
|
* The text of the button. A button with an icon keeps it as a label for the overflow menu, the customization panel
|
|
205
|
-
* and VoiceOver (iOS) or
|
|
207
|
+
* and VoiceOver (iOS), or for TalkBack, the tooltip of a long press and the overflow menu (Android).
|
|
206
208
|
*/
|
|
207
209
|
text?: string;
|
|
208
210
|
/** The text a screen reader says for the button. */
|
|
@@ -236,14 +238,14 @@ export interface OptionsTopBarButton {
|
|
|
236
238
|
disabledColor?: Color;
|
|
237
239
|
/**
|
|
238
240
|
* A shape behind the icon. It works with an `icon` image and a `color` of the shape; on iOS the button becomes a
|
|
239
|
-
* button of its own without menu, toggle or style, and without a capsule
|
|
241
|
+
* button of its own without menu, toggle or style, and without a capsule with the glass design by default. The color of a whole
|
|
240
242
|
* side is `leftButtonBackgroundColor` / `rightButtonBackgroundColor`.
|
|
241
243
|
*/
|
|
242
244
|
iconBackground?: IconBackgroundOptions;
|
|
243
245
|
/**
|
|
244
|
-
* (iOS) `'plain'` or `'prominent'`, the main action of the bar (Done, Send).
|
|
246
|
+
* (iOS) `'plain'` or `'prominent'`, the main action of the bar (Done, Send). With the glass design (iOS 26+, see `UIDesignRequiresCompatibility`) a prominent button is a
|
|
245
247
|
* capsule in the button's tint with bold text or icon on it (the tint is `color`, the bar's tint without it);
|
|
246
|
-
*
|
|
248
|
+
* without it, it is the system's done style with bold text. Not for component buttons, buttons with
|
|
247
249
|
* `iconBackground`, and `showText` buttons.
|
|
248
250
|
* @default 'plain'
|
|
249
251
|
*/
|
|
@@ -255,7 +257,7 @@ export interface OptionsTopBarButton {
|
|
|
255
257
|
*/
|
|
256
258
|
testID?: string;
|
|
257
259
|
/**
|
|
258
|
-
* (iOS 26
|
|
260
|
+
* (iOS 26+, glass design) Whether the button has no glass capsule under it; neighbors keep theirs. By default `true` for
|
|
259
261
|
* component buttons and for icon buttons with a background or insets, `false` for the rest. In a `group` of several
|
|
260
262
|
* buttons the capsule is shared and this has no effect. A change by `mergeOptions` builds the buttons anew.
|
|
261
263
|
*/
|
|
@@ -268,8 +270,8 @@ export interface OptionsTopBarButton {
|
|
|
268
270
|
*/
|
|
269
271
|
showText?: boolean;
|
|
270
272
|
/**
|
|
271
|
-
* (iOS 26
|
|
272
|
-
* own.
|
|
273
|
+
* (iOS 26+, glass design) Buttons next to each other with the same group share one capsule; a button without a group has its
|
|
274
|
+
* own. Without the glass design it does nothing, on iOS 15 there are no groups. A side that has a group of several buttons
|
|
273
275
|
* doesn't animate button changes. The toolbar has no groups: only icons share a capsule there. For center buttons
|
|
274
276
|
* the group is a section of the overflow menu, and its name is the id the customization is saved under.
|
|
275
277
|
*/
|
|
@@ -285,8 +287,10 @@ export interface OptionsTopBarButton {
|
|
|
285
287
|
badgeTextColor?: Color;
|
|
286
288
|
/**
|
|
287
289
|
* (iOS) Whether the button is a toggle: every press flips `selected` and sends a press with the new state. The state
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
+
* stays with the screen under the button's id, through it showing again, a `mergeOptions` that sends the same
|
|
291
|
+
* buttons again and `setDefaultOptions`; a `mergeOptions` into the screen that changes `selected` replaces it (a merge
|
|
292
|
+
* into the stack around it doesn't). A button set again
|
|
293
|
+
* without `selected` takes the state of the button with the same id. Not for component buttons,
|
|
290
294
|
* buttons with `iconBackground`, and `showText` buttons.
|
|
291
295
|
*/
|
|
292
296
|
toggle?: boolean;
|
|
@@ -351,7 +355,11 @@ export interface OptionsTopBarButton {
|
|
|
351
355
|
* replaces it.
|
|
352
356
|
*/
|
|
353
357
|
export interface OptionsTopBarButtonComponent {
|
|
354
|
-
/**
|
|
358
|
+
/**
|
|
359
|
+
* The id of the component. Without it, the library gives one made of the screen, the component's place in the
|
|
360
|
+
* options and its `name`: it stays the same for every `mergeOptions` of the screen, so the mounted component stays
|
|
361
|
+
* and only its props change. The same `name` and `id` mean the same component.
|
|
362
|
+
*/
|
|
355
363
|
id?: string;
|
|
356
364
|
/** The name of the registered component. */
|
|
357
365
|
name: string;
|