@symbiote-native/navigation 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/build/angular/drawer/index.d.ts +76 -0
- package/build/angular/drawer/index.js +508 -0
- package/build/angular/drawer-screen.directive.d.ts +14 -0
- package/build/angular/drawer-screen.directive.js +87 -0
- package/build/angular/index.d.ts +23 -0
- package/build/angular/index.js +22 -0
- package/build/angular/injectors/index.d.ts +13 -0
- package/build/angular/injectors/index.js +8 -0
- package/build/angular/injectors/inject-drawer-navigation.d.ts +4 -0
- package/build/angular/injectors/inject-drawer-navigation.js +12 -0
- package/build/angular/injectors/inject-focus-effect.d.ts +2 -0
- package/build/angular/injectors/inject-focus-effect.js +29 -0
- package/build/angular/injectors/inject-is-focused.d.ts +2 -0
- package/build/angular/injectors/inject-is-focused.js +20 -0
- package/build/angular/injectors/inject-navigation-state.d.ts +3 -0
- package/build/angular/injectors/inject-navigation-state.js +35 -0
- package/build/angular/injectors/inject-navigation.d.ts +7 -0
- package/build/angular/injectors/inject-navigation.js +16 -0
- package/build/angular/injectors/inject-route.d.ts +3 -0
- package/build/angular/injectors/inject-route.js +20 -0
- package/build/angular/injectors/inject-stack-navigation.d.ts +4 -0
- package/build/angular/injectors/inject-stack-navigation.js +15 -0
- package/build/angular/injectors/inject-tab-navigation.d.ts +4 -0
- package/build/angular/injectors/inject-tab-navigation.js +11 -0
- package/build/angular/linking.d.ts +3 -0
- package/build/angular/linking.js +43 -0
- package/build/angular/navigation-context.service.d.ts +13 -0
- package/build/angular/navigation-context.service.js +105 -0
- package/build/angular/navigation-scope.directive.d.ts +10 -0
- package/build/angular/navigation-scope.directive.js +90 -0
- package/build/angular/screen.directive.d.ts +22 -0
- package/build/angular/screen.directive.js +90 -0
- package/build/angular/search-bar-ref.directive.d.ts +10 -0
- package/build/angular/search-bar-ref.directive.js +88 -0
- package/build/angular/stack/index.d.ts +55 -0
- package/build/angular/stack/index.js +386 -0
- package/build/angular/tab-screen.directive.d.ts +14 -0
- package/build/angular/tab-screen.directive.js +87 -0
- package/build/angular/tabs/index.d.ts +42 -0
- package/build/angular/tabs/index.js +263 -0
- package/build/core/constants.d.ts +27 -0
- package/build/core/constants.js +61 -0
- package/build/core/drawer-options/index.d.ts +64 -0
- package/build/core/drawer-options/index.js +200 -0
- package/build/core/drawer-router-state/index.d.ts +21 -0
- package/build/core/drawer-router-state/index.js +40 -0
- package/build/core/guards.d.ts +2 -0
- package/build/core/guards.js +22 -0
- package/build/core/header-bar-buttons.d.ts +9 -0
- package/build/core/header-bar-buttons.js +163 -0
- package/build/core/index.d.ts +29 -0
- package/build/core/index.js +32 -0
- package/build/core/linking-config/index.d.ts +13 -0
- package/build/core/linking-config/index.js +171 -0
- package/build/core/navigation-events/index.d.ts +16 -0
- package/build/core/navigation-events/index.js +57 -0
- package/build/core/navigator-handles/index.d.ts +30 -0
- package/build/core/navigator-handles/index.js +15 -0
- package/build/core/navigator-props.d.ts +216 -0
- package/build/core/navigator-props.js +7 -0
- package/build/core/navigator-state/index.d.ts +36 -0
- package/build/core/navigator-state/index.js +81 -0
- package/build/core/render-drawer.d.ts +13 -0
- package/build/core/render-drawer.js +88 -0
- package/build/core/render-stack.d.ts +35 -0
- package/build/core/render-stack.js +294 -0
- package/build/core/render-tabs.d.ts +20 -0
- package/build/core/render-tabs.js +97 -0
- package/build/core/screen-options.d.ts +4 -0
- package/build/core/screen-options.js +133 -0
- package/build/core/search-bar-commands.d.ts +10 -0
- package/build/core/search-bar-commands.js +42 -0
- package/build/core/state-persistence/index.d.ts +3 -0
- package/build/core/state-persistence/index.js +23 -0
- package/build/core/tab-options.d.ts +13 -0
- package/build/core/tab-options.js +10 -0
- package/build/core/tab-router-state/index.d.ts +19 -0
- package/build/core/tab-router-state/index.js +51 -0
- package/build/react/collect-registry.d.ts +4 -0
- package/build/react/collect-registry.js +15 -0
- package/build/react/drawer/index.d.ts +29 -0
- package/build/react/drawer/index.js +277 -0
- package/build/react/drawer-screen.d.ts +14 -0
- package/build/react/drawer-screen.js +8 -0
- package/build/react/hooks/index.d.ts +12 -0
- package/build/react/hooks/index.js +8 -0
- package/build/react/hooks/use-drawer-navigation.d.ts +4 -0
- package/build/react/hooks/use-drawer-navigation.js +12 -0
- package/build/react/hooks/use-focus-effect.d.ts +2 -0
- package/build/react/hooks/use-focus-effect.js +29 -0
- package/build/react/hooks/use-is-focused.d.ts +1 -0
- package/build/react/hooks/use-is-focused.js +22 -0
- package/build/react/hooks/use-navigation-state/index.d.ts +2 -0
- package/build/react/hooks/use-navigation-state/index.js +39 -0
- package/build/react/hooks/use-navigation.d.ts +7 -0
- package/build/react/hooks/use-navigation.js +16 -0
- package/build/react/hooks/use-route.d.ts +2 -0
- package/build/react/hooks/use-route.js +8 -0
- package/build/react/hooks/use-stack-navigation.d.ts +4 -0
- package/build/react/hooks/use-stack-navigation.js +14 -0
- package/build/react/hooks/use-tab-navigation.d.ts +4 -0
- package/build/react/hooks/use-tab-navigation.js +12 -0
- package/build/react/index.d.ts +24 -0
- package/build/react/index.js +21 -0
- package/build/react/linking.d.ts +3 -0
- package/build/react/linking.js +47 -0
- package/build/react/navigation-context.d.ts +10 -0
- package/build/react/navigation-context.js +22 -0
- package/build/react/screen.d.ts +22 -0
- package/build/react/screen.js +7 -0
- package/build/react/stack/index.d.ts +13 -0
- package/build/react/stack/index.js +202 -0
- package/build/react/tab-screen.d.ts +15 -0
- package/build/react/tab-screen.js +8 -0
- package/build/react/tabs/index.d.ts +12 -0
- package/build/react/tabs/index.js +116 -0
- package/build/register.d.ts +7 -0
- package/build/register.js +58 -0
- package/build/vue/composables/index.d.ts +12 -0
- package/build/vue/composables/index.js +8 -0
- package/build/vue/composables/use-drawer-navigation.d.ts +5 -0
- package/build/vue/composables/use-drawer-navigation.js +15 -0
- package/build/vue/composables/use-focus-effect.d.ts +1 -0
- package/build/vue/composables/use-focus-effect.js +31 -0
- package/build/vue/composables/use-is-focused.d.ts +2 -0
- package/build/vue/composables/use-is-focused.js +28 -0
- package/build/vue/composables/use-navigation-state.d.ts +3 -0
- package/build/vue/composables/use-navigation-state.js +29 -0
- package/build/vue/composables/use-navigation.d.ts +8 -0
- package/build/vue/composables/use-navigation.js +13 -0
- package/build/vue/composables/use-route.d.ts +3 -0
- package/build/vue/composables/use-route.js +9 -0
- package/build/vue/composables/use-stack-navigation.d.ts +5 -0
- package/build/vue/composables/use-stack-navigation.js +18 -0
- package/build/vue/composables/use-tab-navigation.d.ts +5 -0
- package/build/vue/composables/use-tab-navigation.js +15 -0
- package/build/vue/drawer/index.d.ts +19 -0
- package/build/vue/drawer/index.js +390 -0
- package/build/vue/drawer-screen.d.ts +14 -0
- package/build/vue/drawer-screen.js +12 -0
- package/build/vue/index.d.ts +21 -0
- package/build/vue/index.js +19 -0
- package/build/vue/linking.d.ts +3 -0
- package/build/vue/linking.js +57 -0
- package/build/vue/navigation-context.d.ts +16 -0
- package/build/vue/navigation-context.js +65 -0
- package/build/vue/screen.d.ts +21 -0
- package/build/vue/screen.js +12 -0
- package/build/vue/stack/index.d.ts +9 -0
- package/build/vue/stack/index.js +279 -0
- package/build/vue/tab-screen.d.ts +14 -0
- package/build/vue/tab-screen.js +11 -0
- package/build/vue/tabs/index.d.ts +10 -0
- package/build/vue/tabs/index.js +209 -0
- package/build-ngc/angular/drawer/index.d.ts +79 -0
- package/build-ngc/angular/drawer/index.js +479 -0
- package/build-ngc/angular/drawer/index.js.map +1 -0
- package/build-ngc/angular/drawer-screen.directive.d.ts +17 -0
- package/build-ngc/angular/drawer-screen.directive.js +32 -0
- package/build-ngc/angular/drawer-screen.directive.js.map +1 -0
- package/build-ngc/angular/drawer.d.ts +79 -0
- package/build-ngc/angular/drawer.js +475 -0
- package/build-ngc/angular/drawer.js.map +1 -0
- package/build-ngc/angular/index.d.ts +23 -0
- package/build-ngc/angular/index.js +23 -0
- package/build-ngc/angular/index.js.map +1 -0
- package/build-ngc/angular/injectors/index.d.ts +13 -0
- package/build-ngc/angular/injectors/index.js +9 -0
- package/build-ngc/angular/injectors/index.js.map +1 -0
- package/build-ngc/angular/injectors/inject-drawer-navigation.d.ts +4 -0
- package/build-ngc/angular/injectors/inject-drawer-navigation.js +13 -0
- package/build-ngc/angular/injectors/inject-drawer-navigation.js.map +1 -0
- package/build-ngc/angular/injectors/inject-focus-effect.d.ts +2 -0
- package/build-ngc/angular/injectors/inject-focus-effect.js +30 -0
- package/build-ngc/angular/injectors/inject-focus-effect.js.map +1 -0
- package/build-ngc/angular/injectors/inject-is-focused.d.ts +2 -0
- package/build-ngc/angular/injectors/inject-is-focused.js +22 -0
- package/build-ngc/angular/injectors/inject-is-focused.js.map +1 -0
- package/build-ngc/angular/injectors/inject-navigation-state.d.ts +3 -0
- package/build-ngc/angular/injectors/inject-navigation-state.js +37 -0
- package/build-ngc/angular/injectors/inject-navigation-state.js.map +1 -0
- package/build-ngc/angular/injectors/inject-navigation.d.ts +7 -0
- package/build-ngc/angular/injectors/inject-navigation.js +17 -0
- package/build-ngc/angular/injectors/inject-navigation.js.map +1 -0
- package/build-ngc/angular/injectors/inject-route.d.ts +3 -0
- package/build-ngc/angular/injectors/inject-route.js +21 -0
- package/build-ngc/angular/injectors/inject-route.js.map +1 -0
- package/build-ngc/angular/injectors/inject-stack-navigation.d.ts +4 -0
- package/build-ngc/angular/injectors/inject-stack-navigation.js +16 -0
- package/build-ngc/angular/injectors/inject-stack-navigation.js.map +1 -0
- package/build-ngc/angular/injectors/inject-tab-navigation.d.ts +4 -0
- package/build-ngc/angular/injectors/inject-tab-navigation.js +12 -0
- package/build-ngc/angular/injectors/inject-tab-navigation.js.map +1 -0
- package/build-ngc/angular/linking.d.ts +3 -0
- package/build-ngc/angular/linking.js +44 -0
- package/build-ngc/angular/linking.js.map +1 -0
- package/build-ngc/angular/navigation-context.service.d.ts +16 -0
- package/build-ngc/angular/navigation-context.service.js +63 -0
- package/build-ngc/angular/navigation-context.service.js.map +1 -0
- package/build-ngc/angular/navigation-scope.directive.d.ts +13 -0
- package/build-ngc/angular/navigation-scope.directive.js +42 -0
- package/build-ngc/angular/navigation-scope.directive.js.map +1 -0
- package/build-ngc/angular/screen.directive.d.ts +25 -0
- package/build-ngc/angular/screen.directive.js +35 -0
- package/build-ngc/angular/screen.directive.js.map +1 -0
- package/build-ngc/angular/search-bar-ref.directive.d.ts +13 -0
- package/build-ngc/angular/search-bar-ref.directive.js +44 -0
- package/build-ngc/angular/search-bar-ref.directive.js.map +1 -0
- package/build-ngc/angular/stack/index.d.ts +58 -0
- package/build-ngc/angular/stack/index.js +406 -0
- package/build-ngc/angular/stack/index.js.map +1 -0
- package/build-ngc/angular/stack.d.ts +58 -0
- package/build-ngc/angular/stack.js +402 -0
- package/build-ngc/angular/stack.js.map +1 -0
- package/build-ngc/angular/tab-screen.directive.d.ts +17 -0
- package/build-ngc/angular/tab-screen.directive.js +32 -0
- package/build-ngc/angular/tab-screen.directive.js.map +1 -0
- package/build-ngc/angular/tabs/index.d.ts +45 -0
- package/build-ngc/angular/tabs/index.js +231 -0
- package/build-ngc/angular/tabs/index.js.map +1 -0
- package/build-ngc/angular/tabs.d.ts +45 -0
- package/build-ngc/angular/tabs.js +231 -0
- package/build-ngc/angular/tabs.js.map +1 -0
- package/build-ngc/core/constants.d.ts +27 -0
- package/build-ngc/core/constants.js +62 -0
- package/build-ngc/core/constants.js.map +1 -0
- package/build-ngc/core/drawer-options/index.d.ts +64 -0
- package/build-ngc/core/drawer-options/index.js +201 -0
- package/build-ngc/core/drawer-options/index.js.map +1 -0
- package/build-ngc/core/drawer-options.d.ts +64 -0
- package/build-ngc/core/drawer-options.js +201 -0
- package/build-ngc/core/drawer-options.js.map +1 -0
- package/build-ngc/core/drawer-router-state/index.d.ts +21 -0
- package/build-ngc/core/drawer-router-state/index.js +41 -0
- package/build-ngc/core/drawer-router-state/index.js.map +1 -0
- package/build-ngc/core/drawer-router-state.d.ts +21 -0
- package/build-ngc/core/drawer-router-state.js +41 -0
- package/build-ngc/core/drawer-router-state.js.map +1 -0
- package/build-ngc/core/guards.d.ts +2 -0
- package/build-ngc/core/guards.js +23 -0
- package/build-ngc/core/guards.js.map +1 -0
- package/build-ngc/core/header-bar-buttons.d.ts +9 -0
- package/build-ngc/core/header-bar-buttons.js +164 -0
- package/build-ngc/core/header-bar-buttons.js.map +1 -0
- package/build-ngc/core/href.d.ts +16 -0
- package/build-ngc/core/href.js +55 -0
- package/build-ngc/core/href.js.map +1 -0
- package/build-ngc/core/index.d.ts +29 -0
- package/build-ngc/core/index.js +33 -0
- package/build-ngc/core/index.js.map +1 -0
- package/build-ngc/core/linking-config/index.d.ts +13 -0
- package/build-ngc/core/linking-config/index.js +172 -0
- package/build-ngc/core/linking-config/index.js.map +1 -0
- package/build-ngc/core/linking-config.d.ts +13 -0
- package/build-ngc/core/linking-config.js +172 -0
- package/build-ngc/core/linking-config.js.map +1 -0
- package/build-ngc/core/navigation-events/index.d.ts +16 -0
- package/build-ngc/core/navigation-events/index.js +58 -0
- package/build-ngc/core/navigation-events/index.js.map +1 -0
- package/build-ngc/core/navigation-events.d.ts +16 -0
- package/build-ngc/core/navigation-events.js +58 -0
- package/build-ngc/core/navigation-events.js.map +1 -0
- package/build-ngc/core/navigator-handles/index.d.ts +30 -0
- package/build-ngc/core/navigator-handles/index.js +16 -0
- package/build-ngc/core/navigator-handles/index.js.map +1 -0
- package/build-ngc/core/navigator-handles.d.ts +30 -0
- package/build-ngc/core/navigator-handles.js +16 -0
- package/build-ngc/core/navigator-handles.js.map +1 -0
- package/build-ngc/core/navigator-props.d.ts +216 -0
- package/build-ngc/core/navigator-props.js +8 -0
- package/build-ngc/core/navigator-props.js.map +1 -0
- package/build-ngc/core/navigator-state/index.d.ts +36 -0
- package/build-ngc/core/navigator-state/index.js +82 -0
- package/build-ngc/core/navigator-state/index.js.map +1 -0
- package/build-ngc/core/navigator-state.d.ts +36 -0
- package/build-ngc/core/navigator-state.js +82 -0
- package/build-ngc/core/navigator-state.js.map +1 -0
- package/build-ngc/core/render-drawer.d.ts +13 -0
- package/build-ngc/core/render-drawer.js +89 -0
- package/build-ngc/core/render-drawer.js.map +1 -0
- package/build-ngc/core/render-stack.d.ts +35 -0
- package/build-ngc/core/render-stack.js +295 -0
- package/build-ngc/core/render-stack.js.map +1 -0
- package/build-ngc/core/render-tabs.d.ts +20 -0
- package/build-ngc/core/render-tabs.js +98 -0
- package/build-ngc/core/render-tabs.js.map +1 -0
- package/build-ngc/core/screen-options.d.ts +4 -0
- package/build-ngc/core/screen-options.js +134 -0
- package/build-ngc/core/screen-options.js.map +1 -0
- package/build-ngc/core/search-bar-commands.d.ts +10 -0
- package/build-ngc/core/search-bar-commands.js +43 -0
- package/build-ngc/core/search-bar-commands.js.map +1 -0
- package/build-ngc/core/search-params.d.ts +9 -0
- package/build-ngc/core/search-params.js +60 -0
- package/build-ngc/core/search-params.js.map +1 -0
- package/build-ngc/core/state-persistence/index.d.ts +3 -0
- package/build-ngc/core/state-persistence/index.js +24 -0
- package/build-ngc/core/state-persistence/index.js.map +1 -0
- package/build-ngc/core/state-persistence.d.ts +3 -0
- package/build-ngc/core/state-persistence.js +24 -0
- package/build-ngc/core/state-persistence.js.map +1 -0
- package/build-ngc/core/tab-options.d.ts +13 -0
- package/build-ngc/core/tab-options.js +11 -0
- package/build-ngc/core/tab-options.js.map +1 -0
- package/build-ngc/core/tab-router-state/index.d.ts +19 -0
- package/build-ngc/core/tab-router-state/index.js +52 -0
- package/build-ngc/core/tab-router-state/index.js.map +1 -0
- package/build-ngc/core/tab-router-state.d.ts +19 -0
- package/build-ngc/core/tab-router-state.js +52 -0
- package/build-ngc/core/tab-router-state.js.map +1 -0
- package/build-ngc/register.d.ts +7 -0
- package/build-ngc/register.js +59 -0
- package/build-ngc/register.js.map +1 -0
- package/codegen-specs/FullWindowOverlayNativeComponent.ts +13 -0
- package/codegen-specs/ModalScreenNativeComponent.ts +129 -0
- package/codegen-specs/NativeScreensModule.ts +8 -0
- package/codegen-specs/NativeScreensModule.web.ts +1 -0
- package/codegen-specs/ScreenContainerNativeComponent.ts +8 -0
- package/codegen-specs/ScreenContentWrapperNativeComponent.ts +9 -0
- package/codegen-specs/ScreenFooterNativeComponent.ts +6 -0
- package/codegen-specs/ScreenNativeComponent.ts +133 -0
- package/codegen-specs/ScreenNavigationContainerNativeComponent.ts +11 -0
- package/codegen-specs/ScreenStackHeaderConfigNativeComponent.ts +99 -0
- package/codegen-specs/ScreenStackHeaderSubviewNativeComponent.ts +25 -0
- package/codegen-specs/ScreenStackNativeComponent.ts +17 -0
- package/codegen-specs/SearchBarNativeComponent.ts +101 -0
- package/codegen-specs/codegenUtils.ts +6 -0
- package/codegen-specs/gamma/ScrollViewMarkerNativeComponent.ts +15 -0
- package/codegen-specs/gamma/modals/form-sheet/FormSheetContentWrapperNativeComponent.ts +10 -0
- package/codegen-specs/gamma/modals/form-sheet/FormSheetHostNativeComponent.ts +47 -0
- package/codegen-specs/gamma/split/SplitHostNativeComponent.ts +124 -0
- package/codegen-specs/gamma/split/SplitScreenNativeComponent.ts +24 -0
- package/codegen-specs/gamma/stack/StackHeaderConfigAndroidNativeComponent.ts +144 -0
- package/codegen-specs/gamma/stack/StackHeaderConfigIOSNativeComponent.ts +34 -0
- package/codegen-specs/gamma/stack/StackHeaderItemIOSNativeComponent.ts +47 -0
- package/codegen-specs/gamma/stack/StackHeaderItemSpacerIOSNativeComponent.ts +20 -0
- package/codegen-specs/gamma/stack/StackHeaderSubviewAndroidNativeComponent.ts +27 -0
- package/codegen-specs/gamma/stack/StackHostNativeComponent.ts +8 -0
- package/codegen-specs/gamma/stack/StackScreenNativeComponent.ts +42 -0
- package/codegen-specs/safe-area/SafeAreaViewNativeComponent.ts +24 -0
- package/codegen-specs/tabs/TabsBottomAccessoryContentNativeComponent.ts +15 -0
- package/codegen-specs/tabs/TabsBottomAccessoryNativeComponent.ts +19 -0
- package/codegen-specs/tabs/TabsHostAndroidNativeComponent.ts +69 -0
- package/codegen-specs/tabs/TabsHostIOSNativeComponent.ts +92 -0
- package/codegen-specs/tabs/TabsScreenAndroidNativeComponent.ts +112 -0
- package/codegen-specs/tabs/TabsScreenIOSNativeComponent.ts +171 -0
- package/package.json +201 -0
- package/react-native.config.cjs +58 -0
- package/src/angular/drawer/drawer.test.ts +299 -0
- package/src/angular/drawer/index.ts +546 -0
- package/src/angular/drawer-screen.directive.ts +28 -0
- package/src/angular/index.ts +63 -0
- package/src/angular/injectors/index.ts +13 -0
- package/src/angular/injectors/inject-drawer-navigation.ts +21 -0
- package/src/angular/injectors/inject-focus-effect.ts +37 -0
- package/src/angular/injectors/inject-is-focused.ts +28 -0
- package/src/angular/injectors/inject-navigation-state.ts +46 -0
- package/src/angular/injectors/inject-navigation.ts +26 -0
- package/src/angular/injectors/inject-route.ts +25 -0
- package/src/angular/injectors/inject-stack-navigation.ts +24 -0
- package/src/angular/injectors/inject-tab-navigation.ts +20 -0
- package/src/angular/injectors/injectors.test.ts +247 -0
- package/src/angular/injectors/use-typed-navigation.test.ts +229 -0
- package/src/angular/linking.ts +55 -0
- package/src/angular/navigation-context.service.ts +68 -0
- package/src/angular/navigation-scope.directive.ts +31 -0
- package/src/angular/nested-navigation.test.ts +189 -0
- package/src/angular/screen.directive.ts +48 -0
- package/src/angular/search-bar-ref.directive.ts +38 -0
- package/src/angular/stack/index.ts +401 -0
- package/src/angular/stack/stack.test.ts +419 -0
- package/src/angular/tab-screen.directive.ts +26 -0
- package/src/angular/tabs/index.ts +254 -0
- package/src/angular/tabs/tabs.test.ts +249 -0
- package/src/core/constants.ts +68 -0
- package/src/core/drawer-options/drawer-options.test.ts +415 -0
- package/src/core/drawer-options/index.ts +331 -0
- package/src/core/drawer-router-state/drawer-router-state.test.ts +116 -0
- package/src/core/drawer-router-state/index.ts +71 -0
- package/src/core/guards.ts +23 -0
- package/src/core/header-bar-buttons.ts +212 -0
- package/src/core/index.ts +170 -0
- package/src/core/linking-config/index.ts +209 -0
- package/src/core/linking-config/linking-config.test.ts +109 -0
- package/src/core/navigation-events/index.ts +94 -0
- package/src/core/navigation-events/navigation-events.test.ts +56 -0
- package/src/core/navigator-handles/index.ts +63 -0
- package/src/core/navigator-handles/navigator-handles.test.ts +46 -0
- package/src/core/navigator-props.ts +323 -0
- package/src/core/navigator-state/index.ts +112 -0
- package/src/core/navigator-state/navigator-state.test.ts +80 -0
- package/src/core/render-drawer.ts +123 -0
- package/src/core/render-stack.ts +414 -0
- package/src/core/render-tabs.ts +138 -0
- package/src/core/screen-options.ts +181 -0
- package/src/core/search-bar-commands.ts +57 -0
- package/src/core/state-persistence/index.ts +30 -0
- package/src/core/state-persistence/state-persistence.test.ts +42 -0
- package/src/core/tab-options.ts +25 -0
- package/src/core/tab-router-state/index.ts +75 -0
- package/src/core/tab-router-state/tab-router-state.test.ts +34 -0
- package/src/globals.d.ts +4 -0
- package/src/react/collect-registry.ts +19 -0
- package/src/react/drawer/drawer.test.tsx +472 -0
- package/src/react/drawer/index.ts +451 -0
- package/src/react/drawer-screen.ts +29 -0
- package/src/react/hooks/hooks.test.tsx +199 -0
- package/src/react/hooks/index.ts +12 -0
- package/src/react/hooks/use-drawer-navigation.ts +21 -0
- package/src/react/hooks/use-focus-effect.ts +36 -0
- package/src/react/hooks/use-is-focused.ts +26 -0
- package/src/react/hooks/use-navigation-state/index.ts +47 -0
- package/src/react/hooks/use-navigation-state/use-navigation-state.test.ts +85 -0
- package/src/react/hooks/use-navigation.ts +36 -0
- package/src/react/hooks/use-route.ts +11 -0
- package/src/react/hooks/use-stack-navigation.ts +23 -0
- package/src/react/hooks/use-tab-navigation.ts +21 -0
- package/src/react/hooks/use-typed-navigation.test.tsx +187 -0
- package/src/react/index.ts +52 -0
- package/src/react/linking.ts +59 -0
- package/src/react/navigation-context.ts +40 -0
- package/src/react/nested-navigation.test.tsx +145 -0
- package/src/react/screen.ts +44 -0
- package/src/react/stack/index.ts +323 -0
- package/src/react/stack/stack.test.tsx +514 -0
- package/src/react/tab-screen.ts +30 -0
- package/src/react/tabs/index.ts +204 -0
- package/src/react/tabs/tabs.test.tsx +256 -0
- package/src/register.ts +59 -0
- package/src/vue/composables/composables.test.ts +221 -0
- package/src/vue/composables/index.ts +12 -0
- package/src/vue/composables/use-drawer-navigation.ts +25 -0
- package/src/vue/composables/use-focus-effect.ts +37 -0
- package/src/vue/composables/use-is-focused.ts +34 -0
- package/src/vue/composables/use-navigation-state.ts +38 -0
- package/src/vue/composables/use-navigation.ts +30 -0
- package/src/vue/composables/use-route.ts +13 -0
- package/src/vue/composables/use-stack-navigation.ts +28 -0
- package/src/vue/composables/use-tab-navigation.ts +25 -0
- package/src/vue/composables/use-typed-navigation.test.ts +205 -0
- package/src/vue/drawer/drawer.test.ts +451 -0
- package/src/vue/drawer/index.ts +550 -0
- package/src/vue/drawer-screen.ts +32 -0
- package/src/vue/index.ts +70 -0
- package/src/vue/linking.ts +69 -0
- package/src/vue/navigation-context.ts +87 -0
- package/src/vue/nested-navigation.test.ts +155 -0
- package/src/vue/screen.ts +52 -0
- package/src/vue/stack/index.ts +376 -0
- package/src/vue/stack/stack.test.ts +501 -0
- package/src/vue/tab-screen.ts +29 -0
- package/src/vue/tabs/index.ts +302 -0
- package/src/vue/tabs/tabs.test.ts +278 -0
- package/symbiote-navigation.podspec +84 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
ColorValue,
|
|
5
|
+
CodegenTypes as CT,
|
|
6
|
+
HostComponent,
|
|
7
|
+
ImageSource,
|
|
8
|
+
ProcessedColorValue,
|
|
9
|
+
ViewProps,
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
import { codegenNativeCommands, codegenNativeComponent } from 'react-native';
|
|
12
|
+
import type { UnsafeMixed } from '../../codegenUtils';
|
|
13
|
+
|
|
14
|
+
type StackHeaderTypeAndroid = 'small' | 'medium' | 'large';
|
|
15
|
+
|
|
16
|
+
export type StackHeaderToolbarMenuItemPressEventAndroid = Readonly<{
|
|
17
|
+
id: string;
|
|
18
|
+
}>;
|
|
19
|
+
|
|
20
|
+
export type StackHeaderToolbarMenuGroupSelectionChangeEventAndroid = Readonly<{
|
|
21
|
+
groupId: string;
|
|
22
|
+
selectedIds: string[];
|
|
23
|
+
}>;
|
|
24
|
+
|
|
25
|
+
type StackHeaderToolbarMenuItemShowAsActionAndroid =
|
|
26
|
+
| 'always'
|
|
27
|
+
| 'alwaysWithText'
|
|
28
|
+
| 'ifRoom'
|
|
29
|
+
| 'ifRoomWithText'
|
|
30
|
+
| 'never';
|
|
31
|
+
|
|
32
|
+
type StackHeaderToolbarMenuItemTypeAndroid = 'action' | 'toggle' | 'automatic';
|
|
33
|
+
|
|
34
|
+
export interface StackHeaderToolbarMenuItemBaseAndroid {
|
|
35
|
+
id: string;
|
|
36
|
+
title?: string | undefined;
|
|
37
|
+
titleCondensed?: string | undefined;
|
|
38
|
+
tooltipText?: string | undefined;
|
|
39
|
+
hidden?: CT.WithDefault<boolean, false>;
|
|
40
|
+
disabled?: CT.WithDefault<boolean, false>;
|
|
41
|
+
showAsAction?: CT.WithDefault<
|
|
42
|
+
StackHeaderToolbarMenuItemShowAsActionAndroid,
|
|
43
|
+
'never'
|
|
44
|
+
>;
|
|
45
|
+
drawableIconResourceName?: string | null | undefined;
|
|
46
|
+
imageIconResource?: ImageSource | null | undefined;
|
|
47
|
+
iconTintColorNormal?: ProcessedColorValue | null | undefined;
|
|
48
|
+
iconTintColorPressed?: ProcessedColorValue | null | undefined;
|
|
49
|
+
iconTintColorFocused?: ProcessedColorValue | null | undefined;
|
|
50
|
+
iconTintColorDisabled?: ProcessedColorValue | null | undefined;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
type StackHeaderToolbarMenuItemAndroid =
|
|
54
|
+
StackHeaderToolbarMenuItemBaseAndroid & {
|
|
55
|
+
type: 'menuItem';
|
|
56
|
+
groupId?: string | undefined;
|
|
57
|
+
itemType?: CT.WithDefault<
|
|
58
|
+
StackHeaderToolbarMenuItemTypeAndroid,
|
|
59
|
+
'automatic'
|
|
60
|
+
>;
|
|
61
|
+
initialToggleState?: CT.WithDefault<boolean, false>;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
type StackHeaderToolbarMenuGroupAndroid = {
|
|
65
|
+
groupId: string;
|
|
66
|
+
singleSelection?: CT.WithDefault<boolean, false>;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export type StackHeaderToolbarMenuBaseAndroid = {
|
|
70
|
+
groups?: StackHeaderToolbarMenuGroupAndroid[] | undefined;
|
|
71
|
+
children?: StackHeaderToolbarMenuElementAndroid[] | undefined;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
type StackHeaderToolbarMenuAndroid = StackHeaderToolbarMenuItemBaseAndroid &
|
|
75
|
+
StackHeaderToolbarMenuBaseAndroid & {
|
|
76
|
+
type: 'menu';
|
|
77
|
+
menuTitle?: string | undefined;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export type StackHeaderToolbarMenuElementAndroid =
|
|
81
|
+
| StackHeaderToolbarMenuItemAndroid
|
|
82
|
+
| StackHeaderToolbarMenuAndroid;
|
|
83
|
+
|
|
84
|
+
export interface NativeProps extends ViewProps {
|
|
85
|
+
title?: string | undefined;
|
|
86
|
+
hidden?: CT.WithDefault<boolean, false>;
|
|
87
|
+
transparent?: CT.WithDefault<boolean, false>;
|
|
88
|
+
backButtonHidden?: CT.WithDefault<boolean, false>;
|
|
89
|
+
|
|
90
|
+
// Android-specific props
|
|
91
|
+
type?: CT.WithDefault<StackHeaderTypeAndroid, 'small'>;
|
|
92
|
+
|
|
93
|
+
backButtonTintColorNormal?: ColorValue | undefined;
|
|
94
|
+
backButtonTintColorPressed?: ColorValue | undefined;
|
|
95
|
+
backButtonTintColorFocused?: ColorValue | undefined;
|
|
96
|
+
backButtonDrawableIconResourceName?: string | undefined;
|
|
97
|
+
backButtonImageIconResource?: ImageSource | undefined;
|
|
98
|
+
|
|
99
|
+
scrollFlagScroll?: CT.WithDefault<boolean, false>;
|
|
100
|
+
scrollFlagEnterAlways?: CT.WithDefault<boolean, false>;
|
|
101
|
+
scrollFlagEnterAlwaysCollapsed?: CT.WithDefault<boolean, false>;
|
|
102
|
+
scrollFlagExitUntilCollapsed?: CT.WithDefault<boolean, false>;
|
|
103
|
+
scrollFlagSnap?: CT.WithDefault<boolean, false>;
|
|
104
|
+
|
|
105
|
+
toolbarMenu?: UnsafeMixed<StackHeaderToolbarMenuBaseAndroid> | undefined;
|
|
106
|
+
toolbarMenuGroupDividerEnabled?: CT.WithDefault<boolean, false>;
|
|
107
|
+
onToolbarMenuItemPress?:
|
|
108
|
+
| CT.DirectEventHandler<StackHeaderToolbarMenuItemPressEventAndroid>
|
|
109
|
+
| undefined;
|
|
110
|
+
onToolbarMenuGroupSelectionChange?:
|
|
111
|
+
| CT.DirectEventHandler<StackHeaderToolbarMenuGroupSelectionChangeEventAndroid>
|
|
112
|
+
| undefined;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
116
|
+
|
|
117
|
+
export type StackHeaderToolbarMenuElementOptionsAndroid = Partial<
|
|
118
|
+
Omit<StackHeaderToolbarMenuItemBaseAndroid, 'id'>
|
|
119
|
+
> & {
|
|
120
|
+
checked?: boolean | undefined;
|
|
121
|
+
menuTitle?: string | undefined;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export interface NativeCommands {
|
|
125
|
+
setToolbarMenuElementOptions: (
|
|
126
|
+
viewRef: React.ComponentRef<ComponentType>,
|
|
127
|
+
id: string,
|
|
128
|
+
// We use the array here only due to codegen limitation. We're using only
|
|
129
|
+
// the first index of the array.
|
|
130
|
+
options: StackHeaderToolbarMenuElementOptionsAndroid[],
|
|
131
|
+
) => void;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
135
|
+
supportedCommands: ['setToolbarMenuElementOptions'],
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
export default codegenNativeComponent<NativeProps>(
|
|
139
|
+
'RNSStackHeaderConfigAndroid',
|
|
140
|
+
{
|
|
141
|
+
interfaceOnly: true,
|
|
142
|
+
excludedPlatforms: ['iOS'],
|
|
143
|
+
},
|
|
144
|
+
);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { CodegenTypes as CT, ViewProps } from 'react-native';
|
|
4
|
+
import { codegenNativeComponent } from 'react-native';
|
|
5
|
+
|
|
6
|
+
export type MenuItemPressEvent = Readonly<{ menuItemId: string }>;
|
|
7
|
+
|
|
8
|
+
export type MenuSelectionChangeEvent = Readonly<{
|
|
9
|
+
menuId: string;
|
|
10
|
+
selectedMenuItemIds: string[];
|
|
11
|
+
}>;
|
|
12
|
+
|
|
13
|
+
export interface NativeProps extends ViewProps {
|
|
14
|
+
title?: string | undefined;
|
|
15
|
+
subtitle?: string | undefined;
|
|
16
|
+
hidden?: CT.WithDefault<boolean, false>;
|
|
17
|
+
transparent?: CT.WithDefault<boolean, false>;
|
|
18
|
+
backButtonHidden?: CT.WithDefault<boolean, false>;
|
|
19
|
+
|
|
20
|
+
// iOS-specific props
|
|
21
|
+
largeTitle?: string | undefined;
|
|
22
|
+
largeSubtitle?: string | undefined;
|
|
23
|
+
largeTitleEnabled?: CT.WithDefault<boolean, false>;
|
|
24
|
+
|
|
25
|
+
onMenuItemPress?: CT.DirectEventHandler<MenuItemPressEvent> | undefined;
|
|
26
|
+
onMenuSelectionChange?:
|
|
27
|
+
| CT.DirectEventHandler<MenuSelectionChangeEvent>
|
|
28
|
+
| undefined;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default codegenNativeComponent<NativeProps>('RNSStackHeaderConfigIOS', {
|
|
32
|
+
interfaceOnly: true,
|
|
33
|
+
excludedPlatforms: ['android'],
|
|
34
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { CodegenTypes as CT, ViewProps } from 'react-native';
|
|
4
|
+
import { codegenNativeComponent } from 'react-native';
|
|
5
|
+
import { UnsafeMixed } from '../../codegenUtils';
|
|
6
|
+
|
|
7
|
+
export type Placement =
|
|
8
|
+
| 'leading'
|
|
9
|
+
| 'trailing'
|
|
10
|
+
| 'title'
|
|
11
|
+
| 'subtitle'
|
|
12
|
+
| 'largeSubtitle';
|
|
13
|
+
|
|
14
|
+
export type StackHeaderMenuItemIOS = {
|
|
15
|
+
id: string;
|
|
16
|
+
type: 'menuItem';
|
|
17
|
+
title?: string | undefined;
|
|
18
|
+
keepsMenuPresented?: boolean | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type StackHeaderMenuIOS = {
|
|
22
|
+
id: string;
|
|
23
|
+
type: 'menu';
|
|
24
|
+
title?: string | undefined;
|
|
25
|
+
children: StackHeaderMenuElementIOS[];
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type StackHeaderMenuElementIOS =
|
|
29
|
+
| StackHeaderMenuItemIOS
|
|
30
|
+
| StackHeaderMenuIOS;
|
|
31
|
+
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
33
|
+
export type HeaderItemPressEvent = Readonly<{}>;
|
|
34
|
+
|
|
35
|
+
export interface NativeProps extends ViewProps {
|
|
36
|
+
placement?: CT.WithDefault<Placement, 'trailing'>;
|
|
37
|
+
itemId?: string | undefined;
|
|
38
|
+
title?: string | undefined;
|
|
39
|
+
menu?: UnsafeMixed<StackHeaderMenuIOS> | undefined;
|
|
40
|
+
respondsToOnPress?: CT.WithDefault<boolean, false>;
|
|
41
|
+
onHeaderItemPress?: CT.DirectEventHandler<HeaderItemPressEvent> | undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default codegenNativeComponent<NativeProps>('RNSStackHeaderItemIOS', {
|
|
45
|
+
interfaceOnly: true,
|
|
46
|
+
excludedPlatforms: ['android'],
|
|
47
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { CodegenTypes as CT, ViewProps } from 'react-native';
|
|
4
|
+
import { codegenNativeComponent } from 'react-native';
|
|
5
|
+
|
|
6
|
+
type SpacerSize = 'fixed' | 'flexible';
|
|
7
|
+
type Placement = 'leading' | 'trailing';
|
|
8
|
+
|
|
9
|
+
export interface NativeProps extends ViewProps {
|
|
10
|
+
placement?: CT.WithDefault<Placement, 'trailing'>;
|
|
11
|
+
sizing?: CT.WithDefault<SpacerSize, 'flexible'>;
|
|
12
|
+
width?: CT.Float | undefined;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default codegenNativeComponent<NativeProps>(
|
|
16
|
+
'RNSStackHeaderItemSpacerIOS',
|
|
17
|
+
{
|
|
18
|
+
excludedPlatforms: ['android'],
|
|
19
|
+
},
|
|
20
|
+
);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { CodegenTypes as CT, ViewProps } from 'react-native';
|
|
4
|
+
import { codegenNativeComponent } from 'react-native';
|
|
5
|
+
|
|
6
|
+
type StackHeaderSubviewTypeAndroid =
|
|
7
|
+
| 'background'
|
|
8
|
+
| 'leading'
|
|
9
|
+
| 'center'
|
|
10
|
+
| 'trailing';
|
|
11
|
+
type StackHeaderSubviewBackgroundCollapseModeAndroid = 'off' | 'parallax';
|
|
12
|
+
|
|
13
|
+
export interface NativeProps extends ViewProps {
|
|
14
|
+
type?: CT.WithDefault<StackHeaderSubviewTypeAndroid, 'leading'>;
|
|
15
|
+
collapseMode?: CT.WithDefault<
|
|
16
|
+
StackHeaderSubviewBackgroundCollapseModeAndroid,
|
|
17
|
+
'off'
|
|
18
|
+
>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default codegenNativeComponent<NativeProps>(
|
|
22
|
+
'RNSStackHeaderSubviewAndroid',
|
|
23
|
+
{
|
|
24
|
+
interfaceOnly: true,
|
|
25
|
+
excludedPlatforms: ['iOS'],
|
|
26
|
+
},
|
|
27
|
+
);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { CodegenTypes as CT, ViewProps } from 'react-native';
|
|
4
|
+
import { codegenNativeComponent } from 'react-native';
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
7
|
+
type GenericEmptyEvent = Readonly<{}>;
|
|
8
|
+
|
|
9
|
+
type OnDismissEventPayload = Readonly<{
|
|
10
|
+
isNativeDismiss: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
|
|
13
|
+
type ActivityMode = 'detached' | 'attached';
|
|
14
|
+
|
|
15
|
+
export interface NativeProps extends ViewProps {
|
|
16
|
+
// Control
|
|
17
|
+
|
|
18
|
+
// Codegen does not currently support non-optional enum.
|
|
19
|
+
activityMode?: CT.WithDefault<ActivityMode, 'detached'>;
|
|
20
|
+
screenKey: string;
|
|
21
|
+
|
|
22
|
+
// Events
|
|
23
|
+
|
|
24
|
+
onWillAppear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
25
|
+
onDidAppear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
26
|
+
onWillDisappear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
27
|
+
onDidDisappear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
28
|
+
|
|
29
|
+
onDismiss?: CT.DirectEventHandler<OnDismissEventPayload> | undefined;
|
|
30
|
+
|
|
31
|
+
onNativeDismissPrevented?:
|
|
32
|
+
| CT.DirectEventHandler<GenericEmptyEvent>
|
|
33
|
+
| undefined;
|
|
34
|
+
|
|
35
|
+
// Configuration
|
|
36
|
+
|
|
37
|
+
preventNativeDismiss?: CT.WithDefault<boolean, false>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default codegenNativeComponent<NativeProps>('RNSStackScreen', {
|
|
41
|
+
interfaceOnly: true,
|
|
42
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Implementation adapted from `react-native-safe-area-context`:
|
|
2
|
+
// https://github.com/AppAndFlow/react-native-safe-area-context/blob/v5.6.1/src/specs/NativeSafeAreaView.ts
|
|
3
|
+
|
|
4
|
+
import { codegenNativeComponent } from 'react-native';
|
|
5
|
+
import type { CodegenTypes as CT, ViewProps } from 'react-native';
|
|
6
|
+
|
|
7
|
+
type InsetType = 'all' | 'system' | 'interface';
|
|
8
|
+
|
|
9
|
+
export interface NativeProps extends ViewProps {
|
|
10
|
+
edges?:
|
|
11
|
+
| Readonly<{
|
|
12
|
+
top: boolean;
|
|
13
|
+
right: boolean;
|
|
14
|
+
bottom: boolean;
|
|
15
|
+
left: boolean;
|
|
16
|
+
}>
|
|
17
|
+
| undefined;
|
|
18
|
+
// Android-only
|
|
19
|
+
insetType?: CT.WithDefault<InsetType, 'all'>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default codegenNativeComponent<NativeProps>('RNSSafeAreaView', {
|
|
23
|
+
interfaceOnly: true,
|
|
24
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { codegenNativeComponent } from 'react-native';
|
|
4
|
+
import type { CodegenTypes as CT, ViewProps } from 'react-native';
|
|
5
|
+
|
|
6
|
+
type BottomAccessoryEnvironment = 'regular' | 'inline';
|
|
7
|
+
|
|
8
|
+
export interface NativeProps extends ViewProps {
|
|
9
|
+
environment?: CT.WithDefault<BottomAccessoryEnvironment, 'regular'>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default codegenNativeComponent<NativeProps>(
|
|
13
|
+
'RNSTabsBottomAccessoryContent',
|
|
14
|
+
{},
|
|
15
|
+
);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { codegenNativeComponent } from 'react-native';
|
|
4
|
+
import type { CodegenTypes as CT, ViewProps } from 'react-native';
|
|
5
|
+
|
|
6
|
+
type EnvironmentChangeEvent = {
|
|
7
|
+
environment: 'regular' | 'inline';
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export interface NativeProps extends ViewProps {
|
|
11
|
+
onEnvironmentChange?:
|
|
12
|
+
| CT.DirectEventHandler<EnvironmentChangeEvent>
|
|
13
|
+
| undefined;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default codegenNativeComponent<NativeProps>('RNSTabsBottomAccessory', {
|
|
17
|
+
interfaceOnly: true,
|
|
18
|
+
excludedPlatforms: ['android'],
|
|
19
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { codegenNativeComponent } from 'react-native';
|
|
4
|
+
import type { CodegenTypes as CT, ColorValue, ViewProps } from 'react-native';
|
|
5
|
+
|
|
6
|
+
// #region General helpers
|
|
7
|
+
|
|
8
|
+
type TabSelectedEvent = {
|
|
9
|
+
selectedScreenKey: string;
|
|
10
|
+
provenance: CT.Int32;
|
|
11
|
+
isRepeated: boolean;
|
|
12
|
+
hasTriggeredSpecialEffect: boolean;
|
|
13
|
+
actionOrigin: 'user' | 'programmatic-js' | 'programmatic-native' | 'implicit';
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
type NavigationStateRequest = {
|
|
17
|
+
selectedScreenKey: string;
|
|
18
|
+
baseProvenance: CT.Int32;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
type TabSelectionRejectedEvent = Readonly<{
|
|
22
|
+
selectedScreenKey: string;
|
|
23
|
+
provenance: CT.Int32;
|
|
24
|
+
rejectedScreenKey: string;
|
|
25
|
+
rejectedBaseProvenance: CT.Int32;
|
|
26
|
+
rejectionReason: 'stale' | 'repeated';
|
|
27
|
+
}>;
|
|
28
|
+
|
|
29
|
+
type TabSelectionPreventedEvent = Readonly<{
|
|
30
|
+
selectedScreenKey: string;
|
|
31
|
+
provenance: CT.Int32;
|
|
32
|
+
preventedScreenKey: string;
|
|
33
|
+
}>;
|
|
34
|
+
|
|
35
|
+
type TabsHostColorScheme = 'inherit' | 'light' | 'dark';
|
|
36
|
+
|
|
37
|
+
// #endregion General helpers
|
|
38
|
+
|
|
39
|
+
// #region Android-specific helpers
|
|
40
|
+
// No helpers specified so far, but marking the place where these should land.
|
|
41
|
+
// #endregion Android-specific helpers
|
|
42
|
+
|
|
43
|
+
export interface NativeProps extends ViewProps {
|
|
44
|
+
// Control
|
|
45
|
+
navStateRequest: NavigationStateRequest;
|
|
46
|
+
rejectStaleNavStateUpdates?: CT.WithDefault<boolean, false>;
|
|
47
|
+
|
|
48
|
+
// Events
|
|
49
|
+
onTabSelected?: CT.DirectEventHandler<TabSelectedEvent> | undefined;
|
|
50
|
+
onTabSelectionRejected?:
|
|
51
|
+
| CT.DirectEventHandler<TabSelectionRejectedEvent>
|
|
52
|
+
| undefined;
|
|
53
|
+
onTabSelectionPrevented?:
|
|
54
|
+
| CT.DirectEventHandler<TabSelectionPreventedEvent>
|
|
55
|
+
| undefined;
|
|
56
|
+
|
|
57
|
+
// General
|
|
58
|
+
tabBarHidden?: CT.WithDefault<boolean, false>;
|
|
59
|
+
nativeContainerBackgroundColor?: ColorValue | undefined;
|
|
60
|
+
colorScheme?: CT.WithDefault<TabsHostColorScheme, 'inherit'>;
|
|
61
|
+
|
|
62
|
+
// Android-specific props
|
|
63
|
+
tabBarRespectsIMEInsets?: CT.WithDefault<boolean, false>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export default codegenNativeComponent<NativeProps>('RNSTabsHostAndroid', {
|
|
67
|
+
interfaceOnly: true,
|
|
68
|
+
excludedPlatforms: ['iOS'],
|
|
69
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { codegenNativeComponent } from 'react-native';
|
|
4
|
+
import type { CodegenTypes as CT, ColorValue, ViewProps } from 'react-native';
|
|
5
|
+
|
|
6
|
+
// #region General helpers
|
|
7
|
+
|
|
8
|
+
type TabSelectedEvent = Readonly<{
|
|
9
|
+
selectedScreenKey: string;
|
|
10
|
+
provenance: CT.Int32;
|
|
11
|
+
isRepeated: boolean;
|
|
12
|
+
hasTriggeredSpecialEffect: boolean;
|
|
13
|
+
actionOrigin: 'user' | 'programmatic-js' | 'programmatic-native' | 'implicit';
|
|
14
|
+
}>;
|
|
15
|
+
|
|
16
|
+
type NavigationStateRequest = Readonly<{
|
|
17
|
+
selectedScreenKey: string;
|
|
18
|
+
baseProvenance: CT.Int32;
|
|
19
|
+
}>;
|
|
20
|
+
|
|
21
|
+
type TabSelectionRejectedEvent = Readonly<{
|
|
22
|
+
selectedScreenKey: string;
|
|
23
|
+
provenance: CT.Int32;
|
|
24
|
+
rejectedScreenKey: string;
|
|
25
|
+
rejectedBaseProvenance: CT.Int32;
|
|
26
|
+
rejectionReason: 'stale' | 'repeated';
|
|
27
|
+
}>;
|
|
28
|
+
|
|
29
|
+
type TabSelectionPreventedEvent = Readonly<{
|
|
30
|
+
selectedScreenKey: string;
|
|
31
|
+
provenance: CT.Int32;
|
|
32
|
+
preventedScreenKey: string;
|
|
33
|
+
}>;
|
|
34
|
+
|
|
35
|
+
type MoreTabSelectedEvent = Readonly<{
|
|
36
|
+
selectedScreenKey: string;
|
|
37
|
+
provenance: CT.Int32;
|
|
38
|
+
}>;
|
|
39
|
+
|
|
40
|
+
type TabsHostColorScheme = 'inherit' | 'light' | 'dark';
|
|
41
|
+
|
|
42
|
+
type LayoutDirection = 'inherit' | 'ltr' | 'rtl';
|
|
43
|
+
|
|
44
|
+
// #endregion General helpers
|
|
45
|
+
|
|
46
|
+
// #region iOS-specific helpers
|
|
47
|
+
|
|
48
|
+
type TabBarMinimizeBehavior =
|
|
49
|
+
| 'automatic'
|
|
50
|
+
| 'never'
|
|
51
|
+
| 'onScrollDown'
|
|
52
|
+
| 'onScrollUp';
|
|
53
|
+
|
|
54
|
+
type TabBarControllerMode = 'automatic' | 'tabBar' | 'tabSidebar';
|
|
55
|
+
|
|
56
|
+
// #endregion iOS-specific helpers
|
|
57
|
+
|
|
58
|
+
export interface NativeProps extends ViewProps {
|
|
59
|
+
// Control
|
|
60
|
+
navStateRequest: NavigationStateRequest;
|
|
61
|
+
rejectStaleNavStateUpdates?: CT.WithDefault<boolean, false>;
|
|
62
|
+
|
|
63
|
+
// Events
|
|
64
|
+
onTabSelected?: CT.DirectEventHandler<TabSelectedEvent> | undefined;
|
|
65
|
+
onTabSelectionRejected?:
|
|
66
|
+
| CT.DirectEventHandler<TabSelectionRejectedEvent>
|
|
67
|
+
| undefined;
|
|
68
|
+
onTabSelectionPrevented?:
|
|
69
|
+
| CT.DirectEventHandler<TabSelectionPreventedEvent>
|
|
70
|
+
| undefined;
|
|
71
|
+
onMoreTabSelected?: CT.DirectEventHandler<MoreTabSelectedEvent> | undefined;
|
|
72
|
+
|
|
73
|
+
// General
|
|
74
|
+
tabBarHidden?: CT.WithDefault<boolean, false>;
|
|
75
|
+
nativeContainerBackgroundColor?: ColorValue | undefined;
|
|
76
|
+
colorScheme?: CT.WithDefault<TabsHostColorScheme, 'inherit'>;
|
|
77
|
+
|
|
78
|
+
// We can't use `direction` name for this prop as it's also used by
|
|
79
|
+
// direction style View prop.
|
|
80
|
+
layoutDirection?: CT.WithDefault<LayoutDirection, 'inherit'>;
|
|
81
|
+
|
|
82
|
+
// iOS-specific props
|
|
83
|
+
tabBarTintColor?: ColorValue | undefined;
|
|
84
|
+
tabBarMinimizeBehavior?: CT.WithDefault<TabBarMinimizeBehavior, 'automatic'>;
|
|
85
|
+
tabBarControllerMode?: CT.WithDefault<TabBarControllerMode, 'automatic'>;
|
|
86
|
+
bottomAccessoryHidden?: CT.WithDefault<boolean, false>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export default codegenNativeComponent<NativeProps>('RNSTabsHostIOS', {
|
|
90
|
+
interfaceOnly: true,
|
|
91
|
+
excludedPlatforms: ['android'],
|
|
92
|
+
});
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { codegenNativeComponent } from 'react-native';
|
|
4
|
+
import type {
|
|
5
|
+
CodegenTypes as CT,
|
|
6
|
+
ImageSource,
|
|
7
|
+
ProcessedColorValue,
|
|
8
|
+
ViewProps,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
|
|
11
|
+
// #region General helpers
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
14
|
+
type GenericEmptyEvent = Readonly<{}>;
|
|
15
|
+
|
|
16
|
+
// #endregion General helpers
|
|
17
|
+
|
|
18
|
+
// #region Android-specific helpers
|
|
19
|
+
|
|
20
|
+
type TabBarItemLabelVisibilityMode =
|
|
21
|
+
| 'auto'
|
|
22
|
+
| 'selected'
|
|
23
|
+
| 'labeled'
|
|
24
|
+
| 'unlabeled';
|
|
25
|
+
|
|
26
|
+
export type ItemStateAppearance = {
|
|
27
|
+
tabBarItemTitleFontColor?: ProcessedColorValue | null | undefined;
|
|
28
|
+
tabBarItemIconColor?: ProcessedColorValue | null | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type Appearance = {
|
|
32
|
+
// TabBar - Appearance
|
|
33
|
+
tabBarBackgroundColor?: ProcessedColorValue | null | undefined;
|
|
34
|
+
|
|
35
|
+
// TabBarItem - Ripple
|
|
36
|
+
tabBarItemRippleColor?: ProcessedColorValue | null | undefined;
|
|
37
|
+
|
|
38
|
+
// TabBarItem - Label layout
|
|
39
|
+
tabBarItemLabelVisibilityMode?: CT.WithDefault<
|
|
40
|
+
TabBarItemLabelVisibilityMode,
|
|
41
|
+
'auto'
|
|
42
|
+
>;
|
|
43
|
+
|
|
44
|
+
// TabBarItem - State-dependent appearance
|
|
45
|
+
normal?: ItemStateAppearance | undefined;
|
|
46
|
+
selected?: ItemStateAppearance | undefined;
|
|
47
|
+
focused?: ItemStateAppearance | undefined;
|
|
48
|
+
disabled?: ItemStateAppearance | undefined;
|
|
49
|
+
|
|
50
|
+
// TabBarItem - Active Indicator
|
|
51
|
+
tabBarItemActiveIndicatorColor?: ProcessedColorValue | null | undefined;
|
|
52
|
+
tabBarItemActiveIndicatorEnabled?: CT.WithDefault<boolean, true>;
|
|
53
|
+
|
|
54
|
+
// TabBarItem - Label
|
|
55
|
+
tabBarItemTitleFontFamily?: string | undefined;
|
|
56
|
+
tabBarItemTitleSmallLabelFontSize?: CT.Float | undefined;
|
|
57
|
+
tabBarItemTitleLargeLabelFontSize?: CT.Float | undefined;
|
|
58
|
+
tabBarItemTitleFontWeight?: string | undefined;
|
|
59
|
+
tabBarItemTitleFontStyle?: string | undefined;
|
|
60
|
+
|
|
61
|
+
// TabBarItem - Badge
|
|
62
|
+
tabBarItemBadgeBackgroundColor?: ProcessedColorValue | null | undefined;
|
|
63
|
+
tabBarItemBadgeTextColor?: ProcessedColorValue | null | undefined;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// #endregion Android-specific helpers
|
|
67
|
+
|
|
68
|
+
export interface NativeProps extends ViewProps {
|
|
69
|
+
// Events
|
|
70
|
+
onWillAppear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
71
|
+
onDidAppear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
72
|
+
onWillDisappear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
73
|
+
onDidDisappear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
74
|
+
|
|
75
|
+
// Control
|
|
76
|
+
screenKey: string;
|
|
77
|
+
preventNativeSelection?: CT.WithDefault<boolean, false>;
|
|
78
|
+
|
|
79
|
+
// General
|
|
80
|
+
title?: string | undefined | null;
|
|
81
|
+
badgeValue?: string | undefined;
|
|
82
|
+
|
|
83
|
+
// Accessibility
|
|
84
|
+
tabBarItemTestID?: string | undefined;
|
|
85
|
+
tabBarItemAccessibilityLabel?: string | undefined;
|
|
86
|
+
|
|
87
|
+
// Effects
|
|
88
|
+
specialEffects?:
|
|
89
|
+
| {
|
|
90
|
+
repeatedTabSelection?:
|
|
91
|
+
| {
|
|
92
|
+
popToRoot?: CT.WithDefault<boolean, true>;
|
|
93
|
+
scrollToTop?: CT.WithDefault<boolean, true>;
|
|
94
|
+
}
|
|
95
|
+
| undefined;
|
|
96
|
+
}
|
|
97
|
+
| undefined;
|
|
98
|
+
|
|
99
|
+
// Android-specific props
|
|
100
|
+
// Image handling
|
|
101
|
+
drawableIconResourceName?: string | undefined;
|
|
102
|
+
imageIconResource?: ImageSource | undefined;
|
|
103
|
+
selectedDrawableIconResourceName?: string | undefined;
|
|
104
|
+
selectedImageIconResource?: ImageSource | undefined;
|
|
105
|
+
|
|
106
|
+
// Appearance
|
|
107
|
+
standardAppearance?: Appearance | undefined;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export default codegenNativeComponent<NativeProps>('RNSTabsScreenAndroid', {
|
|
111
|
+
excludedPlatforms: ['iOS'],
|
|
112
|
+
});
|