@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,133 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { codegenNativeComponent } from 'react-native';
|
|
4
|
+
import type { CodegenTypes as CT, ViewProps, ColorValue } from 'react-native';
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
7
|
+
type ScreenEvent = Readonly<{}>;
|
|
8
|
+
|
|
9
|
+
type ScreenDismissedEvent = Readonly<{
|
|
10
|
+
dismissCount: CT.Int32;
|
|
11
|
+
}>;
|
|
12
|
+
|
|
13
|
+
type TransitionProgressEvent = Readonly<{
|
|
14
|
+
progress: CT.Double;
|
|
15
|
+
closing: CT.Int32;
|
|
16
|
+
goingForward: CT.Int32;
|
|
17
|
+
}>;
|
|
18
|
+
|
|
19
|
+
type HeaderHeightChangeEvent = Readonly<{
|
|
20
|
+
headerHeight: CT.Double;
|
|
21
|
+
}>;
|
|
22
|
+
|
|
23
|
+
type SheetDetentChangedEvent = Readonly<{
|
|
24
|
+
index: CT.Int32;
|
|
25
|
+
isStable: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
|
|
28
|
+
type GestureResponseDistanceType = Readonly<{
|
|
29
|
+
start: CT.Float;
|
|
30
|
+
end: CT.Float;
|
|
31
|
+
top: CT.Float;
|
|
32
|
+
bottom: CT.Float;
|
|
33
|
+
}>;
|
|
34
|
+
|
|
35
|
+
type StackPresentation =
|
|
36
|
+
| 'push'
|
|
37
|
+
| 'modal'
|
|
38
|
+
| 'transparentModal'
|
|
39
|
+
| 'fullScreenModal'
|
|
40
|
+
| 'formSheet'
|
|
41
|
+
| 'pageSheet'
|
|
42
|
+
| 'containedModal'
|
|
43
|
+
| 'containedTransparentModal';
|
|
44
|
+
|
|
45
|
+
type StackAnimation =
|
|
46
|
+
| 'default'
|
|
47
|
+
| 'flip'
|
|
48
|
+
| 'simple_push'
|
|
49
|
+
| 'none'
|
|
50
|
+
| 'fade'
|
|
51
|
+
| 'slide_from_right'
|
|
52
|
+
| 'slide_from_left'
|
|
53
|
+
| 'slide_from_bottom'
|
|
54
|
+
| 'fade_from_bottom'
|
|
55
|
+
| 'ios_from_right'
|
|
56
|
+
| 'ios_from_left';
|
|
57
|
+
|
|
58
|
+
type SwipeDirection = 'vertical' | 'horizontal';
|
|
59
|
+
|
|
60
|
+
type ReplaceAnimation = 'pop' | 'push';
|
|
61
|
+
|
|
62
|
+
type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden';
|
|
63
|
+
|
|
64
|
+
type OptionalBoolean = 'undefined' | 'false' | 'true';
|
|
65
|
+
|
|
66
|
+
export interface NativeProps extends ViewProps {
|
|
67
|
+
onAppear?: CT.DirectEventHandler<ScreenEvent> | undefined;
|
|
68
|
+
onDisappear?: CT.DirectEventHandler<ScreenEvent> | undefined;
|
|
69
|
+
onDismissed?: CT.DirectEventHandler<ScreenDismissedEvent> | undefined;
|
|
70
|
+
onNativeDismissCancelled?:
|
|
71
|
+
| CT.DirectEventHandler<ScreenDismissedEvent>
|
|
72
|
+
| undefined;
|
|
73
|
+
onWillAppear?: CT.DirectEventHandler<ScreenEvent> | undefined;
|
|
74
|
+
onWillDisappear?: CT.DirectEventHandler<ScreenEvent> | undefined;
|
|
75
|
+
onHeaderHeightChange?:
|
|
76
|
+
| CT.DirectEventHandler<HeaderHeightChangeEvent>
|
|
77
|
+
| undefined;
|
|
78
|
+
onTransitionProgress?:
|
|
79
|
+
| CT.DirectEventHandler<TransitionProgressEvent>
|
|
80
|
+
| undefined;
|
|
81
|
+
onGestureCancel?: CT.DirectEventHandler<ScreenEvent> | undefined;
|
|
82
|
+
onHeaderBackButtonClicked?: CT.DirectEventHandler<ScreenEvent> | undefined;
|
|
83
|
+
onSheetDetentChanged?:
|
|
84
|
+
| CT.DirectEventHandler<SheetDetentChangedEvent>
|
|
85
|
+
| undefined;
|
|
86
|
+
screenId?: CT.WithDefault<string, ''>;
|
|
87
|
+
sheetAllowedDetents?: number[] | undefined;
|
|
88
|
+
sheetLargestUndimmedDetent?: CT.WithDefault<CT.Int32, -1>;
|
|
89
|
+
sheetGrabberVisible?: CT.WithDefault<boolean, false>;
|
|
90
|
+
sheetCornerRadius?: CT.WithDefault<CT.Float, -1.0>;
|
|
91
|
+
sheetExpandsWhenScrolledToEdge?: CT.WithDefault<boolean, false>;
|
|
92
|
+
sheetInitialDetent?: CT.WithDefault<CT.Int32, 0>;
|
|
93
|
+
sheetElevation?: CT.WithDefault<CT.Int32, 24>;
|
|
94
|
+
sheetShouldOverflowTopInset?: CT.WithDefault<boolean, false>;
|
|
95
|
+
sheetDefaultResizeAnimationEnabled?: CT.WithDefault<boolean, true>;
|
|
96
|
+
customAnimationOnSwipe?: boolean | undefined;
|
|
97
|
+
fullScreenSwipeEnabled?: CT.WithDefault<OptionalBoolean, 'undefined'>;
|
|
98
|
+
fullScreenSwipeShadowEnabled?: CT.WithDefault<boolean, true>;
|
|
99
|
+
homeIndicatorHidden?: boolean | undefined;
|
|
100
|
+
preventNativeDismiss?: boolean | undefined;
|
|
101
|
+
gestureEnabled?: CT.WithDefault<boolean, true>;
|
|
102
|
+
statusBarColor?: ColorValue | undefined;
|
|
103
|
+
statusBarHidden?: boolean | undefined;
|
|
104
|
+
screenOrientation?: string | undefined;
|
|
105
|
+
statusBarAnimation?: string | undefined;
|
|
106
|
+
statusBarStyle?: string | undefined;
|
|
107
|
+
statusBarTranslucent?: boolean | undefined;
|
|
108
|
+
gestureResponseDistance?: GestureResponseDistanceType | undefined;
|
|
109
|
+
stackPresentation?: CT.WithDefault<StackPresentation, 'push'>;
|
|
110
|
+
stackAnimation?: CT.WithDefault<StackAnimation, 'default'>;
|
|
111
|
+
transitionDuration?: CT.WithDefault<CT.Int32, 500>;
|
|
112
|
+
replaceAnimation?: CT.WithDefault<ReplaceAnimation, 'pop'>;
|
|
113
|
+
swipeDirection?: CT.WithDefault<SwipeDirection, 'horizontal'>;
|
|
114
|
+
hideKeyboardOnSwipe?: boolean | undefined;
|
|
115
|
+
activityState?: CT.WithDefault<CT.Float, -1.0>;
|
|
116
|
+
navigationBarColor?: ColorValue | undefined;
|
|
117
|
+
navigationBarTranslucent?: boolean | undefined;
|
|
118
|
+
navigationBarHidden?: boolean | undefined;
|
|
119
|
+
nativeBackButtonDismissalEnabled?: boolean | undefined;
|
|
120
|
+
bottomScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
|
|
121
|
+
leftScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
|
|
122
|
+
rightScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
|
|
123
|
+
topScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
|
|
124
|
+
synchronousShadowStateUpdatesEnabled?: CT.WithDefault<boolean, true>;
|
|
125
|
+
androidResetScreenShadowStateOnOrientationChangeEnabled?: CT.WithDefault<
|
|
126
|
+
boolean,
|
|
127
|
+
true
|
|
128
|
+
>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export default codegenNativeComponent<NativeProps>('RNSScreen', {
|
|
132
|
+
interfaceOnly: true,
|
|
133
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { codegenNativeComponent } from 'react-native';
|
|
4
|
+
import type { ViewProps } from 'react-native';
|
|
5
|
+
|
|
6
|
+
interface NativeProps extends ViewProps {}
|
|
7
|
+
|
|
8
|
+
export default codegenNativeComponent<NativeProps>(
|
|
9
|
+
'RNSScreenNavigationContainer',
|
|
10
|
+
{},
|
|
11
|
+
);
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { codegenNativeComponent } from 'react-native';
|
|
4
|
+
import type { CodegenTypes as CT, ViewProps, ColorValue } from 'react-native';
|
|
5
|
+
|
|
6
|
+
type DirectionType = 'rtl' | 'ltr';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
9
|
+
type OnAttachedEvent = Readonly<{}>;
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
11
|
+
type OnDetachedEvent = Readonly<{}>;
|
|
12
|
+
|
|
13
|
+
type OnPressHeaderBarButtonItemEvent = Readonly<{ buttonId: string }>;
|
|
14
|
+
type OnPressHeaderBarButtonMenuItemEvent = Readonly<{ menuId: string }>;
|
|
15
|
+
|
|
16
|
+
type BackButtonDisplayMode = 'minimal' | 'default' | 'generic';
|
|
17
|
+
|
|
18
|
+
type BlurEffect =
|
|
19
|
+
| 'none'
|
|
20
|
+
| 'extraLight'
|
|
21
|
+
| 'light'
|
|
22
|
+
| 'dark'
|
|
23
|
+
| 'regular'
|
|
24
|
+
| 'prominent'
|
|
25
|
+
| 'systemUltraThinMaterial'
|
|
26
|
+
| 'systemThinMaterial'
|
|
27
|
+
| 'systemMaterial'
|
|
28
|
+
| 'systemThickMaterial'
|
|
29
|
+
| 'systemChromeMaterial'
|
|
30
|
+
| 'systemUltraThinMaterialLight'
|
|
31
|
+
| 'systemThinMaterialLight'
|
|
32
|
+
| 'systemMaterialLight'
|
|
33
|
+
| 'systemThickMaterialLight'
|
|
34
|
+
| 'systemChromeMaterialLight'
|
|
35
|
+
| 'systemUltraThinMaterialDark'
|
|
36
|
+
| 'systemThinMaterialDark'
|
|
37
|
+
| 'systemMaterialDark'
|
|
38
|
+
| 'systemThickMaterialDark'
|
|
39
|
+
| 'systemChromeMaterialDark';
|
|
40
|
+
|
|
41
|
+
type UserInterfaceStyle = 'unspecified' | 'light' | 'dark';
|
|
42
|
+
|
|
43
|
+
export interface NativeProps extends ViewProps {
|
|
44
|
+
onAttached?: CT.DirectEventHandler<OnAttachedEvent> | undefined;
|
|
45
|
+
onDetached?: CT.DirectEventHandler<OnDetachedEvent> | undefined;
|
|
46
|
+
backgroundColor?: ColorValue | undefined;
|
|
47
|
+
backTitle?: string | undefined;
|
|
48
|
+
backTitleFontFamily?: string | undefined;
|
|
49
|
+
backTitleFontSize?: CT.Int32 | undefined;
|
|
50
|
+
backTitleVisible?: CT.WithDefault<boolean, 'true'>;
|
|
51
|
+
color?: ColorValue | undefined;
|
|
52
|
+
direction?: CT.WithDefault<DirectionType, 'ltr'>;
|
|
53
|
+
hidden?: boolean | undefined;
|
|
54
|
+
hideShadow?: boolean | undefined;
|
|
55
|
+
largeTitle?: boolean | undefined;
|
|
56
|
+
largeTitleFontFamily?: string | undefined;
|
|
57
|
+
largeTitleFontSize?: CT.Int32 | undefined;
|
|
58
|
+
largeTitleFontWeight?: string | undefined;
|
|
59
|
+
largeTitleBackgroundColor?: ColorValue | undefined;
|
|
60
|
+
largeTitleHideShadow?: boolean | undefined;
|
|
61
|
+
largeTitleColor?: ColorValue | undefined;
|
|
62
|
+
translucent?: boolean | undefined;
|
|
63
|
+
title?: string | undefined;
|
|
64
|
+
titleFontFamily?: string | undefined;
|
|
65
|
+
titleFontSize?: CT.Int32 | undefined;
|
|
66
|
+
titleFontWeight?: string | undefined;
|
|
67
|
+
titleColor?: ColorValue | undefined;
|
|
68
|
+
disableBackButtonMenu?: boolean | undefined;
|
|
69
|
+
backButtonDisplayMode?: CT.WithDefault<BackButtonDisplayMode, 'default'>;
|
|
70
|
+
hideBackButton?: boolean | undefined;
|
|
71
|
+
backButtonInCustomView?: boolean | undefined;
|
|
72
|
+
blurEffect?: CT.WithDefault<BlurEffect, 'none'>;
|
|
73
|
+
// TODO: implement this props on iOS
|
|
74
|
+
topInsetEnabled?: boolean | undefined;
|
|
75
|
+
headerLeftBarButtonItems?: CT.UnsafeMixed[] | undefined;
|
|
76
|
+
headerRightBarButtonItems?: CT.UnsafeMixed[] | undefined;
|
|
77
|
+
onPressHeaderBarButtonItem?:
|
|
78
|
+
| CT.DirectEventHandler<OnPressHeaderBarButtonItemEvent>
|
|
79
|
+
| undefined;
|
|
80
|
+
onPressHeaderBarButtonMenuItem?:
|
|
81
|
+
| CT.DirectEventHandler<OnPressHeaderBarButtonMenuItemEvent>
|
|
82
|
+
| undefined;
|
|
83
|
+
synchronousShadowStateUpdatesEnabled?: CT.WithDefault<boolean, true>;
|
|
84
|
+
|
|
85
|
+
// Experimental
|
|
86
|
+
userInterfaceStyle?: CT.WithDefault<UserInterfaceStyle, 'unspecified'>;
|
|
87
|
+
consumeTopInset?: boolean | undefined;
|
|
88
|
+
consumeLeftInset?: boolean | undefined;
|
|
89
|
+
consumeRightInset?: boolean | undefined;
|
|
90
|
+
consumeBottomInset?: boolean | undefined;
|
|
91
|
+
legacyTopInsetBehavior?: boolean | undefined;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export default codegenNativeComponent<NativeProps>(
|
|
95
|
+
'RNSScreenStackHeaderConfig',
|
|
96
|
+
{
|
|
97
|
+
interfaceOnly: true,
|
|
98
|
+
},
|
|
99
|
+
);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { codegenNativeComponent } from 'react-native';
|
|
4
|
+
import type { CodegenTypes as CT, ViewProps } from 'react-native';
|
|
5
|
+
|
|
6
|
+
export type HeaderSubviewTypes =
|
|
7
|
+
| 'back'
|
|
8
|
+
| 'right'
|
|
9
|
+
| 'left'
|
|
10
|
+
| 'title'
|
|
11
|
+
| 'center'
|
|
12
|
+
| 'searchBar';
|
|
13
|
+
|
|
14
|
+
export interface NativeProps extends ViewProps {
|
|
15
|
+
type?: CT.WithDefault<HeaderSubviewTypes, 'left'>;
|
|
16
|
+
hidesSharedBackground?: boolean | undefined;
|
|
17
|
+
synchronousShadowStateUpdatesEnabled?: CT.WithDefault<boolean, true>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default codegenNativeComponent<NativeProps>(
|
|
21
|
+
'RNSScreenStackHeaderSubview',
|
|
22
|
+
{
|
|
23
|
+
interfaceOnly: true,
|
|
24
|
+
},
|
|
25
|
+
);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { codegenNativeComponent } from 'react-native';
|
|
4
|
+
import type { CodegenTypes as CT, ViewProps, ColorValue } from 'react-native';
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
7
|
+
type FinishTransitioningEvent = Readonly<{}>;
|
|
8
|
+
|
|
9
|
+
export interface NativeProps extends ViewProps {
|
|
10
|
+
nativeContainerBackgroundColor?: ColorValue | undefined;
|
|
11
|
+
|
|
12
|
+
onFinishTransitioning?:
|
|
13
|
+
| CT.DirectEventHandler<FinishTransitioningEvent>
|
|
14
|
+
| undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default codegenNativeComponent<NativeProps>('RNSScreenStack', {});
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { codegenNativeCommands, codegenNativeComponent } from 'react-native';
|
|
4
|
+
import type {
|
|
5
|
+
CodegenTypes as CT,
|
|
6
|
+
ViewProps,
|
|
7
|
+
ColorValue,
|
|
8
|
+
HostComponent,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
12
|
+
export type SearchBarEvent = Readonly<{}>;
|
|
13
|
+
|
|
14
|
+
export type SearchButtonPressedEvent = Readonly<{
|
|
15
|
+
text?: string | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
|
|
18
|
+
export type ChangeTextEvent = Readonly<{
|
|
19
|
+
text?: string | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
|
|
22
|
+
type SearchBarPlacement =
|
|
23
|
+
| 'automatic'
|
|
24
|
+
| 'inline' // deprecated starting from iOS 26
|
|
25
|
+
| 'stacked'
|
|
26
|
+
| 'integrated'
|
|
27
|
+
| 'integratedButton'
|
|
28
|
+
| 'integratedCentered';
|
|
29
|
+
|
|
30
|
+
type AutoCapitalizeType =
|
|
31
|
+
| 'systemDefault'
|
|
32
|
+
| 'none'
|
|
33
|
+
| 'words'
|
|
34
|
+
| 'sentences'
|
|
35
|
+
| 'characters';
|
|
36
|
+
|
|
37
|
+
type OptionalBoolean = 'undefined' | 'false' | 'true';
|
|
38
|
+
|
|
39
|
+
export interface NativeProps extends ViewProps {
|
|
40
|
+
onSearchFocus?: CT.DirectEventHandler<SearchBarEvent> | null | undefined;
|
|
41
|
+
onSearchBlur?: CT.DirectEventHandler<SearchBarEvent> | null | undefined;
|
|
42
|
+
onSearchButtonPress?:
|
|
43
|
+
| CT.DirectEventHandler<SearchButtonPressedEvent>
|
|
44
|
+
| null
|
|
45
|
+
| undefined;
|
|
46
|
+
onCancelButtonPress?:
|
|
47
|
+
| CT.DirectEventHandler<SearchBarEvent>
|
|
48
|
+
| null
|
|
49
|
+
| undefined;
|
|
50
|
+
onChangeText?: CT.DirectEventHandler<ChangeTextEvent> | null | undefined;
|
|
51
|
+
hideWhenScrolling?: CT.WithDefault<boolean, true>;
|
|
52
|
+
autoCapitalize?: CT.WithDefault<AutoCapitalizeType, 'systemDefault'>;
|
|
53
|
+
placeholder?: string | undefined;
|
|
54
|
+
placement?: CT.WithDefault<SearchBarPlacement, 'automatic'>;
|
|
55
|
+
allowToolbarIntegration?: CT.WithDefault<boolean, true>;
|
|
56
|
+
obscureBackground?: CT.WithDefault<OptionalBoolean, 'undefined'>;
|
|
57
|
+
hideNavigationBar?: CT.WithDefault<OptionalBoolean, 'undefined'>;
|
|
58
|
+
cancelButtonText?: string | undefined;
|
|
59
|
+
// TODO: implement these on iOS
|
|
60
|
+
barTintColor?: ColorValue | undefined;
|
|
61
|
+
tintColor?: ColorValue | undefined;
|
|
62
|
+
textColor?: ColorValue | undefined;
|
|
63
|
+
|
|
64
|
+
// Android only
|
|
65
|
+
autoFocus?: CT.WithDefault<boolean, false>;
|
|
66
|
+
disableBackButtonOverride?: boolean | undefined;
|
|
67
|
+
// TODO: consider creating enum here
|
|
68
|
+
inputType?: string | undefined;
|
|
69
|
+
onClose?: CT.DirectEventHandler<SearchBarEvent> | null | undefined;
|
|
70
|
+
onOpen?: CT.DirectEventHandler<SearchBarEvent> | null | undefined;
|
|
71
|
+
hintTextColor?: ColorValue | undefined;
|
|
72
|
+
headerIconColor?: ColorValue | undefined;
|
|
73
|
+
shouldShowHintSearchIcon?: CT.WithDefault<boolean, true>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
77
|
+
|
|
78
|
+
interface NativeCommands {
|
|
79
|
+
blur: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
80
|
+
focus: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
81
|
+
clearText: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
82
|
+
toggleCancelButton: (
|
|
83
|
+
viewRef: React.ElementRef<ComponentType>,
|
|
84
|
+
flag: boolean,
|
|
85
|
+
) => void;
|
|
86
|
+
setText: (viewRef: React.ElementRef<ComponentType>, text: string) => void;
|
|
87
|
+
cancelSearch: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
91
|
+
supportedCommands: [
|
|
92
|
+
'blur',
|
|
93
|
+
'focus',
|
|
94
|
+
'clearText',
|
|
95
|
+
'toggleCancelButton',
|
|
96
|
+
'setText',
|
|
97
|
+
'cancelSearch',
|
|
98
|
+
],
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
export default codegenNativeComponent<NativeProps>('RNSSearchBar', {});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// copied from https://github.com/software-mansion/react-native-svg/blob/be06e84ec4809a8071f18f9824ffbe61424ee80d/src/fabric/codegenUtils.ts
|
|
2
|
+
|
|
3
|
+
// codegen will generate folly::dynamic in place of this type, but it's not exported by RN
|
|
4
|
+
// since codegen doesn't really follow imports, this way we can trick it into generating the correct type
|
|
5
|
+
// while keeping typescript happy
|
|
6
|
+
export type UnsafeMixed<T> = T;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { CodegenTypes as CT, ViewProps } from 'react-native';
|
|
4
|
+
import { codegenNativeComponent } from 'react-native';
|
|
5
|
+
|
|
6
|
+
type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden';
|
|
7
|
+
|
|
8
|
+
interface NativeProps extends ViewProps {
|
|
9
|
+
leftScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
|
|
10
|
+
topScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
|
|
11
|
+
rightScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
|
|
12
|
+
bottomScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default codegenNativeComponent<NativeProps>('RNSScrollViewMarker');
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { ViewProps } from 'react-native';
|
|
4
|
+
import { codegenNativeComponent } from 'react-native';
|
|
5
|
+
|
|
6
|
+
interface NativeProps extends ViewProps {}
|
|
7
|
+
|
|
8
|
+
export default codegenNativeComponent<NativeProps>(
|
|
9
|
+
'RNSFormSheetContentWrapper',
|
|
10
|
+
);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { CodegenTypes as CT, ColorValue, 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 DetentChangedEvent = Readonly<{
|
|
10
|
+
index: CT.Int32;
|
|
11
|
+
}>;
|
|
12
|
+
|
|
13
|
+
interface NativeProps extends ViewProps {
|
|
14
|
+
// General
|
|
15
|
+
isOpen?: CT.WithDefault<boolean, false>;
|
|
16
|
+
detents?: CT.Double[] | undefined;
|
|
17
|
+
prefersGrabberVisible?: CT.WithDefault<boolean, false>;
|
|
18
|
+
preferredCornerRadius?: CT.WithDefault<CT.Float, -1.0>;
|
|
19
|
+
largestUndimmedDetentIndex?: CT.WithDefault<CT.Int32, -1>;
|
|
20
|
+
initialDetentIndex?: CT.WithDefault<CT.Int32, 0>;
|
|
21
|
+
prefersScrollingExpandsWhenScrolledToEdge?: CT.WithDefault<boolean, true>;
|
|
22
|
+
preventNativeDismiss?: CT.WithDefault<boolean, false>;
|
|
23
|
+
nativeContainerBackgroundColor?: ColorValue | undefined;
|
|
24
|
+
// Events
|
|
25
|
+
onWillAppear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
26
|
+
onDidAppear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
27
|
+
onWillDisappear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
28
|
+
onDidDisappear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
29
|
+
onDismiss?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
30
|
+
onNativeDismiss?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
31
|
+
onNativeDismissPrevented?:
|
|
32
|
+
| CT.DirectEventHandler<GenericEmptyEvent>
|
|
33
|
+
| undefined;
|
|
34
|
+
onDetentChanged?: CT.DirectEventHandler<DetentChangedEvent> | undefined;
|
|
35
|
+
|
|
36
|
+
// Workaround helper that triggers a synchronous event to flush a pending
|
|
37
|
+
// shadow-node state update in the current event beat. Mirrors iOS's
|
|
38
|
+
// `EventQueue::UpdateMode::unstable_Immediate`, which Android does not expose
|
|
39
|
+
// to Java/Kotlin as of now.
|
|
40
|
+
// TODO: Remove when a synchronous state update API is exposed on Android.
|
|
41
|
+
// https://github.com/facebook/react-native/pull/56311
|
|
42
|
+
onSyncFlush?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export default codegenNativeComponent<NativeProps>('RNSFormSheetHost', {
|
|
46
|
+
interfaceOnly: true,
|
|
47
|
+
});
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
CodegenTypes as CT,
|
|
5
|
+
ViewProps,
|
|
6
|
+
HostComponent,
|
|
7
|
+
} from 'react-native';
|
|
8
|
+
import { codegenNativeCommands, codegenNativeComponent } from 'react-native';
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
11
|
+
type GenericEmptyEvent = Readonly<{}>;
|
|
12
|
+
|
|
13
|
+
type DisplayModeWillChangeEvent = {
|
|
14
|
+
currentDisplayMode: string;
|
|
15
|
+
nextDisplayMode: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type SplitViewDisplayModeButtonVisibility = 'always' | 'automatic' | 'never';
|
|
19
|
+
|
|
20
|
+
type SplitViewSplitBehavior = 'automatic' | 'displace' | 'overlay' | 'tile';
|
|
21
|
+
|
|
22
|
+
type SplitViewPrimaryEdge = 'leading' | 'trailing';
|
|
23
|
+
|
|
24
|
+
type SplitViewDisplayMode =
|
|
25
|
+
| 'automatic'
|
|
26
|
+
| 'secondaryOnly'
|
|
27
|
+
| 'oneBesideSecondary'
|
|
28
|
+
| 'oneOverSecondary'
|
|
29
|
+
| 'twoBesideSecondary'
|
|
30
|
+
| 'twoOverSecondary'
|
|
31
|
+
| 'twoDisplaceSecondary';
|
|
32
|
+
|
|
33
|
+
type SplitViewOrientation =
|
|
34
|
+
| 'inherit'
|
|
35
|
+
| 'all'
|
|
36
|
+
| 'allButUpsideDown'
|
|
37
|
+
| 'portrait'
|
|
38
|
+
| 'portraitUp'
|
|
39
|
+
| 'portraitDown'
|
|
40
|
+
| 'landscape'
|
|
41
|
+
| 'landscapeLeft'
|
|
42
|
+
| 'landscapeRight';
|
|
43
|
+
|
|
44
|
+
type SplitViewColorScheme = 'inherit' | 'light' | 'dark';
|
|
45
|
+
|
|
46
|
+
type SplitViewPrimaryBackgroundStyle = 'default' | 'none' | 'sidebar';
|
|
47
|
+
|
|
48
|
+
type SplitViewTopColumnForCollapsing =
|
|
49
|
+
| 'default'
|
|
50
|
+
| 'primary'
|
|
51
|
+
| 'supplementary'
|
|
52
|
+
| 'secondary';
|
|
53
|
+
|
|
54
|
+
interface ColumnMetrics {
|
|
55
|
+
minimumPrimaryColumnWidth?: CT.WithDefault<CT.Float, -1.0>;
|
|
56
|
+
maximumPrimaryColumnWidth?: CT.WithDefault<CT.Float, -1.0>;
|
|
57
|
+
preferredPrimaryColumnWidthOrFraction?: CT.WithDefault<CT.Float, -1.0>;
|
|
58
|
+
minimumSupplementaryColumnWidth?: CT.WithDefault<CT.Float, -1.0>;
|
|
59
|
+
maximumSupplementaryColumnWidth?: CT.WithDefault<CT.Float, -1.0>;
|
|
60
|
+
preferredSupplementaryColumnWidthOrFraction?: CT.WithDefault<CT.Float, -1.0>;
|
|
61
|
+
|
|
62
|
+
// iOS 26 only
|
|
63
|
+
minimumSecondaryColumnWidth?: CT.WithDefault<CT.Float, -1.0>;
|
|
64
|
+
preferredSecondaryColumnWidthOrFraction?: CT.WithDefault<CT.Float, -1.0>;
|
|
65
|
+
minimumInspectorColumnWidth?: CT.WithDefault<CT.Float, -1.0>;
|
|
66
|
+
maximumInspectorColumnWidth?: CT.WithDefault<CT.Float, -1.0>;
|
|
67
|
+
preferredInspectorColumnWidthOrFraction?: CT.WithDefault<CT.Float, -1.0>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
interface NativeProps extends ViewProps {
|
|
71
|
+
// Appearance
|
|
72
|
+
|
|
73
|
+
preferredDisplayMode?: CT.WithDefault<SplitViewDisplayMode, 'automatic'>;
|
|
74
|
+
preferredSplitBehavior?: CT.WithDefault<SplitViewSplitBehavior, 'automatic'>;
|
|
75
|
+
primaryEdge?: CT.WithDefault<SplitViewPrimaryEdge, 'leading'>;
|
|
76
|
+
showSecondaryToggleButton?: CT.WithDefault<boolean, false>;
|
|
77
|
+
displayModeButtonVisibility?: CT.WithDefault<
|
|
78
|
+
SplitViewDisplayModeButtonVisibility,
|
|
79
|
+
'automatic'
|
|
80
|
+
>;
|
|
81
|
+
columnMetrics?: ColumnMetrics | undefined;
|
|
82
|
+
orientation?: CT.WithDefault<SplitViewOrientation, 'inherit'>;
|
|
83
|
+
colorScheme?: CT.WithDefault<SplitViewColorScheme, 'inherit'>;
|
|
84
|
+
primaryBackgroundStyle?: CT.WithDefault<
|
|
85
|
+
SplitViewPrimaryBackgroundStyle,
|
|
86
|
+
'default'
|
|
87
|
+
>;
|
|
88
|
+
|
|
89
|
+
// Behavior
|
|
90
|
+
|
|
91
|
+
topColumnForCollapsing?: CT.WithDefault<
|
|
92
|
+
SplitViewTopColumnForCollapsing,
|
|
93
|
+
'default'
|
|
94
|
+
>;
|
|
95
|
+
|
|
96
|
+
// Interactions
|
|
97
|
+
|
|
98
|
+
presentsWithGesture?: CT.WithDefault<boolean, true>;
|
|
99
|
+
showInspector?: CT.WithDefault<boolean, false>;
|
|
100
|
+
|
|
101
|
+
// Custom events
|
|
102
|
+
|
|
103
|
+
onCollapse?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
104
|
+
onDisplayModeWillChange?:
|
|
105
|
+
| CT.DirectEventHandler<DisplayModeWillChangeEvent>
|
|
106
|
+
| undefined;
|
|
107
|
+
onExpand?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
108
|
+
onInspectorHide?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
112
|
+
|
|
113
|
+
interface NativeCommands {
|
|
114
|
+
showColumn: (
|
|
115
|
+
viewRef: React.ElementRef<ComponentType>,
|
|
116
|
+
column: string,
|
|
117
|
+
) => void;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
121
|
+
supportedCommands: ['showColumn'],
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
export default codegenNativeComponent<NativeProps>('RNSSplitHost', {});
|
|
@@ -0,0 +1,24 @@
|
|
|
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 SplitScreenColumnType = 'column' | 'inspector';
|
|
10
|
+
|
|
11
|
+
interface NativeProps extends ViewProps {
|
|
12
|
+
// Config
|
|
13
|
+
columnType?: CT.WithDefault<SplitScreenColumnType, 'column'>;
|
|
14
|
+
|
|
15
|
+
// Events
|
|
16
|
+
onWillAppear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
17
|
+
onDidAppear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
18
|
+
onWillDisappear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
19
|
+
onDidDisappear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default codegenNativeComponent<NativeProps>('RNSSplitScreen', {
|
|
23
|
+
interfaceOnly: true,
|
|
24
|
+
});
|