react-native-screen-transitions 2.4.2 → 3.0.0-beta.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/README.md +85 -71
- package/lib/commonjs/blank-stack/components/Overlay.js +128 -0
- package/lib/commonjs/blank-stack/components/Overlay.js.map +1 -0
- package/lib/commonjs/blank-stack/components/Screens.js +64 -0
- package/lib/commonjs/blank-stack/components/Screens.js.map +1 -0
- package/lib/commonjs/blank-stack/components/StackView.js +87 -0
- package/lib/commonjs/blank-stack/components/StackView.js.map +1 -0
- package/lib/commonjs/blank-stack/hooks/use-overlay-animation.js +77 -0
- package/lib/commonjs/blank-stack/hooks/use-overlay-animation.js.map +1 -0
- package/lib/commonjs/blank-stack/index.js +13 -0
- package/lib/commonjs/blank-stack/index.js.map +1 -0
- package/lib/commonjs/blank-stack/navigators/createBlankStackNavigator.js +68 -0
- package/lib/commonjs/blank-stack/navigators/createBlankStackNavigator.js.map +1 -0
- package/lib/commonjs/blank-stack/types.js +6 -0
- package/lib/commonjs/blank-stack/types.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js +72 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js +16 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js +196 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_types.js +6 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_types.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js +15 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js +23 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js +25 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js +14 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js +13 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/index.js +66 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/index.js.map +1 -0
- package/lib/commonjs/native-stack/index.js +13 -0
- package/lib/commonjs/native-stack/index.js.map +1 -0
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -0
- package/lib/commonjs/native-stack/types.js +6 -0
- package/lib/commonjs/native-stack/types.js.map +1 -0
- package/lib/commonjs/native-stack/utils/debounce.js.map +1 -0
- package/lib/commonjs/native-stack/utils/getModalRoutesKeys.js.map +1 -0
- package/lib/commonjs/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -0
- package/lib/commonjs/native-stack/utils/useDismissedRouteError.js.map +1 -0
- package/lib/commonjs/native-stack/utils/useInvalidPreventRemoveError.js.map +1 -0
- package/lib/commonjs/native-stack/views/FontProcessor.js.map +1 -0
- package/lib/commonjs/native-stack/views/FontProcessor.native.js.map +1 -0
- package/lib/commonjs/native-stack/views/FooterComponent.js.map +1 -0
- package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -0
- package/lib/commonjs/native-stack/views/NativeStackView.native.js +493 -0
- package/lib/commonjs/native-stack/views/NativeStackView.native.js.map +1 -0
- package/lib/commonjs/native-stack/views/useHeaderConfigProps.js.map +1 -0
- package/lib/commonjs/shared/components/controllers/screen-lifecycle.js +128 -0
- package/lib/commonjs/shared/components/controllers/screen-lifecycle.js.map +1 -0
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -0
- package/lib/commonjs/shared/components/integrations/masked-view.js.map +1 -0
- package/lib/commonjs/shared/components/root-transition-aware.js.map +1 -0
- package/lib/commonjs/shared/configs/index.js +22 -0
- package/lib/commonjs/shared/configs/index.js.map +1 -0
- package/lib/commonjs/shared/configs/presets.js.map +1 -0
- package/lib/commonjs/shared/configs/specs.js.map +1 -0
- package/lib/commonjs/shared/constants.js.map +1 -0
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js.map +1 -0
- package/lib/commonjs/shared/hooks/animation/use-screen-animation.js +118 -0
- package/lib/commonjs/shared/hooks/animation/use-screen-animation.js.map +1 -0
- package/lib/commonjs/shared/hooks/bounds/use-bound-registry.js +131 -0
- package/lib/commonjs/shared/hooks/bounds/use-bound-registry.js.map +1 -0
- package/lib/commonjs/shared/hooks/gestures/use-build-gestures.js +236 -0
- package/lib/commonjs/shared/hooks/gestures/use-build-gestures.js.map +1 -0
- package/lib/commonjs/shared/hooks/gestures/use-parent-gesture-registry.js.map +1 -0
- package/lib/commonjs/shared/hooks/gestures/use-scroll-registry.js.map +1 -0
- package/lib/commonjs/shared/hooks/use-shared-value-state.js +25 -0
- package/lib/commonjs/shared/hooks/use-shared-value-state.js.map +1 -0
- package/lib/commonjs/shared/hooks/use-stable-callback-value.js.map +1 -0
- package/lib/commonjs/shared/hooks/use-stable-callback.js.map +1 -0
- package/lib/commonjs/shared/index.js +33 -0
- package/lib/commonjs/shared/index.js.map +1 -0
- package/lib/commonjs/shared/providers/gestures.js.map +1 -0
- package/lib/commonjs/shared/providers/keys.js +34 -0
- package/lib/commonjs/shared/providers/keys.js.map +1 -0
- package/lib/commonjs/shared/providers/screen-transition-provider.js +34 -0
- package/lib/commonjs/shared/providers/screen-transition-provider.js.map +1 -0
- package/lib/commonjs/shared/providers/transition-styles.js.map +1 -0
- package/lib/commonjs/shared/providers/utils/create-provider.js +39 -0
- package/lib/commonjs/shared/providers/utils/create-provider.js.map +1 -0
- package/lib/commonjs/shared/stores/animation-store.js +39 -0
- package/lib/commonjs/shared/stores/animation-store.js.map +1 -0
- package/lib/commonjs/shared/stores/bound-store/_utils.js.map +1 -0
- package/lib/commonjs/shared/stores/bound-store/index.js +116 -0
- package/lib/commonjs/shared/stores/bound-store/index.js.map +1 -0
- package/lib/commonjs/shared/stores/gesture-store.js +39 -0
- package/lib/commonjs/shared/stores/gesture-store.js.map +1 -0
- package/lib/commonjs/shared/stores/navigator-dismiss-state.js.map +1 -0
- package/lib/commonjs/shared/stores/utils/reset-stores-for-screen.js +19 -0
- package/lib/commonjs/shared/stores/utils/reset-stores-for-screen.js.map +1 -0
- package/lib/commonjs/shared/types/animation.js.map +1 -0
- package/lib/commonjs/shared/types/bounds.js.map +1 -0
- package/lib/commonjs/shared/types/core.js.map +1 -0
- package/lib/commonjs/shared/types/gesture.js.map +1 -0
- package/lib/commonjs/shared/types/utils.js.map +1 -0
- package/lib/commonjs/shared/utils/animation/animate.js.map +1 -0
- package/lib/commonjs/shared/utils/animation/derivations.js +39 -0
- package/lib/commonjs/shared/utils/animation/derivations.js.map +1 -0
- package/lib/commonjs/shared/utils/animation/start-screen-transition.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_types/builder.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_types/geometry.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_types/get-bounds.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_utils/flatten-styles.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_utils/geometry.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_utils/get-bounds.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_utils/is-bounds-equal.js +19 -0
- package/lib/commonjs/shared/utils/bounds/_utils/is-bounds-equal.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_utils/style-composers.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_utils/styles.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/constants.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -0
- package/lib/commonjs/shared/utils/gesture/apply-offset-rules.js.map +1 -0
- package/lib/commonjs/shared/utils/gesture/check-gesture-activation.js.map +1 -0
- package/lib/commonjs/shared/utils/gesture/determine-dismissal.js.map +1 -0
- package/lib/commonjs/shared/utils/gesture/map-gesture-to-progress.js.map +1 -0
- package/lib/commonjs/shared/utils/gesture/reset-gesture-values.js.map +1 -0
- package/lib/commonjs/shared/utils/gesture/velocity.js.map +1 -0
- package/lib/commonjs/shared/utils/reanimated/version.js.map +1 -0
- package/lib/module/blank-stack/components/Overlay.js +124 -0
- package/lib/module/blank-stack/components/Overlay.js.map +1 -0
- package/lib/module/blank-stack/components/Screens.js +58 -0
- package/lib/module/blank-stack/components/Screens.js.map +1 -0
- package/lib/module/blank-stack/components/StackView.js +83 -0
- package/lib/module/blank-stack/components/StackView.js.map +1 -0
- package/lib/module/blank-stack/hooks/use-overlay-animation.js +73 -0
- package/lib/module/blank-stack/hooks/use-overlay-animation.js.map +1 -0
- package/lib/module/blank-stack/index.js +4 -0
- package/lib/module/blank-stack/index.js.map +1 -0
- package/lib/module/blank-stack/navigators/createBlankStackNavigator.js +63 -0
- package/lib/module/blank-stack/navigators/createBlankStackNavigator.js.map +1 -0
- package/lib/module/blank-stack/types.js +4 -0
- package/lib/module/blank-stack/types.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js +66 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js +11 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js +190 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_types.js +4 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_types.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js +10 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js +19 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js +20 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js +9 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js +8 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/index.js +60 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/index.js.map +1 -0
- package/lib/module/native-stack/index.js +4 -0
- package/lib/module/native-stack/index.js.map +1 -0
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -0
- package/lib/module/native-stack/types.js +4 -0
- package/lib/module/native-stack/types.js.map +1 -0
- package/lib/module/native-stack/utils/debounce.js.map +1 -0
- package/lib/module/native-stack/utils/getModalRoutesKeys.js.map +1 -0
- package/lib/module/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -0
- package/lib/module/native-stack/utils/useDismissedRouteError.js.map +1 -0
- package/lib/module/native-stack/utils/useInvalidPreventRemoveError.js.map +1 -0
- package/lib/module/native-stack/views/FontProcessor.js.map +1 -0
- package/lib/module/native-stack/views/FontProcessor.native.js.map +1 -0
- package/lib/module/native-stack/views/FooterComponent.js.map +1 -0
- package/lib/module/native-stack/views/NativeStackView.js.map +1 -0
- package/lib/module/native-stack/views/NativeStackView.native.js +488 -0
- package/lib/module/native-stack/views/NativeStackView.native.js.map +1 -0
- package/lib/module/native-stack/views/useHeaderConfigProps.js.map +1 -0
- package/lib/module/shared/components/controllers/screen-lifecycle.js +122 -0
- package/lib/module/shared/components/controllers/screen-lifecycle.js.map +1 -0
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -0
- package/lib/module/shared/components/integrations/masked-view.js.map +1 -0
- package/lib/module/shared/components/root-transition-aware.js.map +1 -0
- package/lib/module/shared/configs/index.js +18 -0
- package/lib/module/shared/configs/index.js.map +1 -0
- package/lib/module/shared/configs/presets.js.map +1 -0
- package/lib/module/shared/configs/specs.js.map +1 -0
- package/lib/module/shared/constants.js.map +1 -0
- package/lib/module/shared/hooks/animation/use-associated-style.js.map +1 -0
- package/lib/module/shared/hooks/animation/use-screen-animation.js +113 -0
- package/lib/module/shared/hooks/animation/use-screen-animation.js.map +1 -0
- package/lib/module/shared/hooks/bounds/use-bound-registry.js +125 -0
- package/lib/module/shared/hooks/bounds/use-bound-registry.js.map +1 -0
- package/lib/module/shared/hooks/gestures/use-build-gestures.js +230 -0
- package/lib/module/shared/hooks/gestures/use-build-gestures.js.map +1 -0
- package/lib/module/shared/hooks/gestures/use-parent-gesture-registry.js.map +1 -0
- package/lib/module/shared/hooks/gestures/use-scroll-registry.js.map +1 -0
- package/lib/module/shared/hooks/use-shared-value-state.js +22 -0
- package/lib/module/shared/hooks/use-shared-value-state.js.map +1 -0
- package/lib/module/shared/hooks/use-stable-callback-value.js.map +1 -0
- package/lib/module/shared/hooks/use-stable-callback.js.map +1 -0
- package/lib/module/shared/index.js +22 -0
- package/lib/module/shared/index.js.map +1 -0
- package/lib/module/shared/providers/gestures.js.map +1 -0
- package/lib/module/shared/providers/keys.js +29 -0
- package/lib/module/shared/providers/keys.js.map +1 -0
- package/lib/module/shared/providers/screen-transition-provider.js +30 -0
- package/lib/module/shared/providers/screen-transition-provider.js.map +1 -0
- package/lib/module/shared/providers/transition-styles.js.map +1 -0
- package/lib/module/shared/providers/utils/create-provider.js +33 -0
- package/lib/module/shared/providers/utils/create-provider.js.map +1 -0
- package/lib/module/shared/stores/animation-store.js +33 -0
- package/lib/module/shared/stores/animation-store.js.map +1 -0
- package/lib/module/shared/stores/bound-store/_utils.js.map +1 -0
- package/lib/module/shared/stores/bound-store/index.js +112 -0
- package/lib/module/shared/stores/bound-store/index.js.map +1 -0
- package/lib/module/shared/stores/gesture-store.js +35 -0
- package/lib/module/shared/stores/gesture-store.js.map +1 -0
- package/lib/module/shared/stores/navigator-dismiss-state.js.map +1 -0
- package/lib/module/shared/stores/utils/reset-stores-for-screen.js +15 -0
- package/lib/module/shared/stores/utils/reset-stores-for-screen.js.map +1 -0
- package/lib/module/shared/types/animation.js.map +1 -0
- package/lib/module/shared/types/bounds.js.map +1 -0
- package/lib/module/shared/types/core.js.map +1 -0
- package/lib/module/shared/types/gesture.js.map +1 -0
- package/lib/module/shared/types/utils.js.map +1 -0
- package/lib/module/shared/utils/animation/animate.js.map +1 -0
- package/lib/module/shared/utils/animation/derivations.js +34 -0
- package/lib/module/shared/utils/animation/derivations.js.map +1 -0
- package/lib/module/shared/utils/animation/start-screen-transition.js.map +1 -0
- package/lib/module/shared/utils/bounds/_types/builder.js.map +1 -0
- package/lib/module/shared/utils/bounds/_types/geometry.js.map +1 -0
- package/lib/module/shared/utils/bounds/_types/get-bounds.js.map +1 -0
- package/lib/module/shared/utils/bounds/_utils/flatten-styles.js.map +1 -0
- package/lib/module/shared/utils/bounds/_utils/geometry.js.map +1 -0
- package/lib/module/shared/utils/bounds/_utils/get-bounds.js.map +1 -0
- package/lib/module/shared/utils/bounds/_utils/is-bounds-equal.js +14 -0
- package/lib/module/shared/utils/bounds/_utils/is-bounds-equal.js.map +1 -0
- package/lib/module/shared/utils/bounds/_utils/style-composers.js.map +1 -0
- package/lib/module/shared/utils/bounds/_utils/styles.js.map +1 -0
- package/lib/module/shared/utils/bounds/constants.js.map +1 -0
- package/lib/module/shared/utils/bounds/index.js.map +1 -0
- package/lib/module/shared/utils/gesture/apply-offset-rules.js.map +1 -0
- package/lib/module/shared/utils/gesture/check-gesture-activation.js.map +1 -0
- package/lib/module/shared/utils/gesture/determine-dismissal.js.map +1 -0
- package/lib/module/shared/utils/gesture/map-gesture-to-progress.js.map +1 -0
- package/lib/module/shared/utils/gesture/reset-gesture-values.js.map +1 -0
- package/lib/module/shared/utils/gesture/velocity.js.map +1 -0
- package/lib/module/shared/utils/reanimated/version.js.map +1 -0
- package/lib/typescript/blank-stack/components/Overlay.d.ts +5 -0
- package/lib/typescript/blank-stack/components/Overlay.d.ts.map +1 -0
- package/lib/typescript/blank-stack/components/Screens.d.ts +15 -0
- package/lib/typescript/blank-stack/components/Screens.d.ts.map +1 -0
- package/lib/typescript/blank-stack/components/StackView.d.ts +2 -0
- package/lib/typescript/blank-stack/components/StackView.d.ts.map +1 -0
- package/lib/typescript/blank-stack/hooks/use-overlay-animation.d.ts +12 -0
- package/lib/typescript/blank-stack/hooks/use-overlay-animation.d.ts.map +1 -0
- package/lib/typescript/blank-stack/index.d.ts +3 -0
- package/lib/typescript/blank-stack/index.d.ts.map +1 -0
- package/lib/typescript/blank-stack/navigators/createBlankStackNavigator.d.ts +16 -0
- package/lib/typescript/blank-stack/navigators/createBlankStackNavigator.d.ts.map +1 -0
- package/lib/typescript/blank-stack/types.d.ts +213 -0
- package/lib/typescript/blank-stack/types.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.d.ts +8 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_hooks/use-previous.d.ts +2 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_hooks/use-previous.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.d.ts +20 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_types.d.ts +22 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_types.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.d.ts +3 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.d.ts +4 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.d.ts +4 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.d.ts +3 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.d.ts +3 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/index.d.ts +6 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/index.d.ts.map +1 -0
- package/lib/typescript/native-stack/index.d.ts +3 -0
- package/lib/typescript/native-stack/index.d.ts.map +1 -0
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +16 -0
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -0
- package/lib/typescript/native-stack/types.d.ts +651 -0
- package/lib/typescript/native-stack/types.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/debounce.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/getModalRoutesKeys.d.ts +4 -0
- package/lib/typescript/native-stack/utils/getModalRoutesKeys.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/useAnimatedHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/useDismissedRouteError.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/useInvalidPreventRemoveError.d.ts +3 -0
- package/lib/typescript/native-stack/utils/useInvalidPreventRemoveError.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/FontProcessor.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/FontProcessor.native.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/FooterComponent.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/NativeStackView.d.ts +11 -0
- package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/NativeStackView.native.d.ts +11 -0
- package/lib/typescript/native-stack/views/NativeStackView.native.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/useHeaderConfigProps.d.ts +44 -0
- package/lib/typescript/native-stack/views/useHeaderConfigProps.d.ts.map +1 -0
- package/lib/typescript/shared/components/controllers/screen-lifecycle.d.ts +12 -0
- package/lib/typescript/shared/components/controllers/screen-lifecycle.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -0
- package/lib/typescript/shared/components/integrations/masked-view.d.ts.map +1 -0
- package/lib/typescript/shared/components/root-transition-aware.d.ts.map +1 -0
- package/lib/typescript/shared/configs/index.d.ts +16 -0
- package/lib/typescript/shared/configs/index.d.ts.map +1 -0
- package/lib/typescript/shared/configs/presets.d.ts +12 -0
- package/lib/typescript/shared/configs/presets.d.ts.map +1 -0
- package/lib/typescript/shared/configs/specs.d.ts.map +1 -0
- package/lib/typescript/shared/constants.d.ts +57 -0
- package/lib/typescript/shared/constants.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/animation/use-screen-animation.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/bounds/use-bound-registry.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/gestures/use-build-gestures.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/gestures/use-parent-gesture-registry.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/gestures/use-scroll-registry.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/use-shared-value-state.d.ts +7 -0
- package/lib/typescript/shared/hooks/use-shared-value-state.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/use-stable-callback-value.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/use-stable-callback.d.ts.map +1 -0
- package/lib/typescript/shared/index.d.ts +1323 -0
- package/lib/typescript/shared/index.d.ts.map +1 -0
- package/lib/typescript/shared/providers/gestures.d.ts.map +1 -0
- package/lib/typescript/shared/providers/keys.d.ts +18 -0
- package/lib/typescript/shared/providers/keys.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen-transition-provider.d.ts +14 -0
- package/lib/typescript/shared/providers/screen-transition-provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/transition-styles.d.ts.map +1 -0
- package/lib/typescript/shared/providers/utils/create-provider.d.ts +32 -0
- package/lib/typescript/shared/providers/utils/create-provider.d.ts.map +1 -0
- package/lib/typescript/shared/stores/animation-store.d.ts +17 -0
- package/lib/typescript/shared/stores/animation-store.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bound-store/_utils.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bound-store/index.d.ts +22 -0
- package/lib/typescript/shared/stores/bound-store/index.d.ts.map +1 -0
- package/lib/typescript/shared/stores/gesture-store.d.ts +23 -0
- package/lib/typescript/shared/stores/gesture-store.d.ts.map +1 -0
- package/lib/typescript/shared/stores/navigator-dismiss-state.d.ts.map +1 -0
- package/lib/typescript/shared/stores/utils/reset-stores-for-screen.d.ts +6 -0
- package/lib/typescript/shared/stores/utils/reset-stores-for-screen.d.ts.map +1 -0
- package/lib/typescript/shared/types/animation.d.ts +78 -0
- package/lib/typescript/shared/types/animation.d.ts.map +1 -0
- package/lib/typescript/shared/types/bounds.d.ts.map +1 -0
- package/lib/typescript/shared/types/core.d.ts +91 -0
- package/lib/typescript/shared/types/core.d.ts.map +1 -0
- package/lib/typescript/shared/types/gesture.d.ts.map +1 -0
- package/lib/typescript/shared/types/utils.d.ts.map +1 -0
- package/lib/typescript/shared/utils/animation/animate.d.ts.map +1 -0
- package/lib/typescript/shared/utils/animation/derivations.d.ts.map +1 -0
- package/lib/typescript/shared/utils/animation/start-screen-transition.d.ts +13 -0
- package/lib/typescript/shared/utils/animation/start-screen-transition.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_types/builder.d.ts +118 -0
- package/lib/typescript/shared/utils/bounds/_types/builder.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_types/geometry.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_types/get-bounds.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_utils/flatten-styles.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_utils/geometry.d.ts +27 -0
- package/lib/typescript/shared/utils/bounds/_utils/geometry.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_utils/get-bounds.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_utils/is-bounds-equal.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_utils/style-composers.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_utils/styles.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/constants.d.ts +7 -0
- package/lib/typescript/shared/utils/bounds/constants.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/index.d.ts +13 -0
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -0
- package/lib/typescript/shared/utils/gesture/apply-offset-rules.d.ts +38 -0
- package/lib/typescript/shared/utils/gesture/apply-offset-rules.d.ts.map +1 -0
- package/lib/typescript/shared/utils/gesture/check-gesture-activation.d.ts +38 -0
- package/lib/typescript/shared/utils/gesture/check-gesture-activation.d.ts.map +1 -0
- package/lib/typescript/shared/utils/gesture/determine-dismissal.d.ts.map +1 -0
- package/lib/typescript/shared/utils/gesture/map-gesture-to-progress.d.ts.map +1 -0
- package/lib/typescript/shared/utils/gesture/reset-gesture-values.d.ts +16 -0
- package/lib/typescript/shared/utils/gesture/reset-gesture-values.d.ts.map +1 -0
- package/lib/typescript/shared/utils/gesture/velocity.d.ts +25 -0
- package/lib/typescript/shared/utils/gesture/velocity.d.ts.map +1 -0
- package/lib/typescript/shared/utils/reanimated/version.d.ts.map +1 -0
- package/package.json +37 -5
- package/src/blank-stack/components/Overlay.tsx +134 -0
- package/src/blank-stack/components/Screens.tsx +96 -0
- package/src/blank-stack/components/StackView.tsx +102 -0
- package/src/blank-stack/hooks/use-overlay-animation.tsx +101 -0
- package/src/blank-stack/index.ts +10 -0
- package/src/blank-stack/navigators/createBlankStackNavigator.tsx +111 -0
- package/src/blank-stack/types.ts +267 -0
- package/src/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.tsx +71 -0
- package/src/blank-stack/utils/with-stack-navigation/_hooks/use-previous.tsx +11 -0
- package/src/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.tsx +267 -0
- package/src/blank-stack/utils/with-stack-navigation/_types.ts +35 -0
- package/src/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.ts +15 -0
- package/src/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.ts +29 -0
- package/src/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.ts +24 -0
- package/src/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.ts +12 -0
- package/src/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.ts +11 -0
- package/src/blank-stack/utils/with-stack-navigation/index.tsx +80 -0
- package/src/native-stack/index.ts +12 -0
- package/src/native-stack/navigators/createNativeStackNavigator.tsx +112 -0
- package/src/native-stack/types.ts +711 -0
- package/src/native-stack/utils/getModalRoutesKeys.ts +21 -0
- package/src/native-stack/utils/useInvalidPreventRemoveError.tsx +31 -0
- package/src/native-stack/views/NativeStackView.native.tsx +655 -0
- package/src/native-stack/views/NativeStackView.tsx +214 -0
- package/src/native-stack/views/useHeaderConfigProps.tsx +295 -0
- package/src/shared/__tests__/gesture.velocity.test.ts +139 -0
- package/src/shared/components/controllers/screen-lifecycle.tsx +139 -0
- package/src/shared/configs/index.ts +26 -0
- package/src/shared/configs/presets.ts +628 -0
- package/src/shared/constants.ts +108 -0
- package/src/shared/hooks/animation/use-screen-animation.tsx +150 -0
- package/src/shared/hooks/bounds/use-bound-registry.tsx +153 -0
- package/src/shared/hooks/gestures/use-build-gestures.tsx +324 -0
- package/src/shared/hooks/use-shared-value-state.ts +28 -0
- package/src/shared/index.ts +21 -0
- package/src/shared/providers/keys.tsx +57 -0
- package/src/shared/providers/screen-transition-provider.tsx +41 -0
- package/src/shared/providers/utils/create-provider.ts +64 -0
- package/src/shared/stores/animation-store.ts +45 -0
- package/src/shared/stores/bound-store/index.ts +125 -0
- package/src/shared/stores/gesture-store.ts +60 -0
- package/src/shared/stores/utils/reset-stores-for-screen.ts +13 -0
- package/src/shared/types/animation.ts +90 -0
- package/src/shared/types/core.ts +97 -0
- package/src/shared/utils/animation/derivations.ts +40 -0
- package/src/shared/utils/animation/start-screen-transition.ts +61 -0
- package/src/shared/utils/bounds/_types/builder.ts +151 -0
- package/src/shared/utils/bounds/_utils/geometry.ts +166 -0
- package/src/shared/utils/bounds/_utils/is-bounds-equal.ts +24 -0
- package/src/shared/utils/bounds/constants.ts +40 -0
- package/src/shared/utils/bounds/index.ts +218 -0
- package/src/shared/utils/gesture/apply-offset-rules.ts +312 -0
- package/src/shared/utils/gesture/check-gesture-activation.ts +310 -0
- package/src/shared/utils/gesture/reset-gesture-values.ts +67 -0
- package/src/shared/utils/gesture/velocity.ts +143 -0
- package/lib/commonjs/__configs__/index.js +0 -22
- package/lib/commonjs/__configs__/index.js.map +0 -1
- package/lib/commonjs/__configs__/presets.js.map +0 -1
- package/lib/commonjs/__configs__/specs.js.map +0 -1
- package/lib/commonjs/components/controllers/screen-lifecycle.js +0 -71
- package/lib/commonjs/components/controllers/screen-lifecycle.js.map +0 -1
- package/lib/commonjs/components/create-transition-aware-component.js.map +0 -1
- package/lib/commonjs/components/integrations/masked-view.js.map +0 -1
- package/lib/commonjs/components/root-transition-aware.js.map +0 -1
- package/lib/commonjs/constants.js.map +0 -1
- package/lib/commonjs/hooks/animation/use-associated-style.js.map +0 -1
- package/lib/commonjs/hooks/animation/use-screen-animation.js +0 -118
- package/lib/commonjs/hooks/animation/use-screen-animation.js.map +0 -1
- package/lib/commonjs/hooks/bounds/use-bound-registry.js +0 -131
- package/lib/commonjs/hooks/bounds/use-bound-registry.js.map +0 -1
- package/lib/commonjs/hooks/gestures/use-build-gestures.js +0 -236
- package/lib/commonjs/hooks/gestures/use-build-gestures.js.map +0 -1
- package/lib/commonjs/hooks/gestures/use-parent-gesture-registry.js.map +0 -1
- package/lib/commonjs/hooks/gestures/use-scroll-registry.js.map +0 -1
- package/lib/commonjs/hooks/use-stable-callback-value.js.map +0 -1
- package/lib/commonjs/hooks/use-stable-callback.js.map +0 -1
- package/lib/commonjs/index.js +0 -40
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/navigators/createNativeStackNavigator.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/utils/debounce.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/utils/getModalRoutesKeys.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/utils/useAnimatedHeaderHeight.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/utils/useDismissedRouteError.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/utils/useInvalidPreventRemoveError.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/views/FontProcessor.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/views/FontProcessor.native.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/views/FooterComponent.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/views/NativeStackView.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/views/NativeStackView.native.js +0 -488
- package/lib/commonjs/integrations/native-stack/views/NativeStackView.native.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/views/useHeaderConfigProps.js.map +0 -1
- package/lib/commonjs/providers/gestures.js.map +0 -1
- package/lib/commonjs/providers/keys.js +0 -35
- package/lib/commonjs/providers/keys.js.map +0 -1
- package/lib/commonjs/providers/screen-transition-provider.js +0 -34
- package/lib/commonjs/providers/screen-transition-provider.js.map +0 -1
- package/lib/commonjs/providers/transition-styles.js.map +0 -1
- package/lib/commonjs/stores/animations.js +0 -39
- package/lib/commonjs/stores/animations.js.map +0 -1
- package/lib/commonjs/stores/bounds/_utils.js.map +0 -1
- package/lib/commonjs/stores/bounds/index.js +0 -116
- package/lib/commonjs/stores/bounds/index.js.map +0 -1
- package/lib/commonjs/stores/gestures.js +0 -39
- package/lib/commonjs/stores/gestures.js.map +0 -1
- package/lib/commonjs/stores/navigator-dismiss-state.js.map +0 -1
- package/lib/commonjs/stores/utils/reset-stores-for-screen.js +0 -19
- package/lib/commonjs/stores/utils/reset-stores-for-screen.js.map +0 -1
- package/lib/commonjs/types/animation.js.map +0 -1
- package/lib/commonjs/types/bounds.js.map +0 -1
- package/lib/commonjs/types/core.js.map +0 -1
- package/lib/commonjs/types/gesture.js.map +0 -1
- package/lib/commonjs/types/navigator.js +0 -6
- package/lib/commonjs/types/navigator.js.map +0 -1
- package/lib/commonjs/types/utils.js.map +0 -1
- package/lib/commonjs/utils/animation/animate.js.map +0 -1
- package/lib/commonjs/utils/animation/derivations.js +0 -39
- package/lib/commonjs/utils/animation/derivations.js.map +0 -1
- package/lib/commonjs/utils/animation/start-screen-transition.js.map +0 -1
- package/lib/commonjs/utils/bounds/_types/builder.js.map +0 -1
- package/lib/commonjs/utils/bounds/_types/geometry.js.map +0 -1
- package/lib/commonjs/utils/bounds/_types/get-bounds.js.map +0 -1
- package/lib/commonjs/utils/bounds/_utils/flatten-styles.js.map +0 -1
- package/lib/commonjs/utils/bounds/_utils/geometry.js.map +0 -1
- package/lib/commonjs/utils/bounds/_utils/get-bounds.js.map +0 -1
- package/lib/commonjs/utils/bounds/_utils/is-bounds-equal.js +0 -19
- package/lib/commonjs/utils/bounds/_utils/is-bounds-equal.js.map +0 -1
- package/lib/commonjs/utils/bounds/_utils/style-composers.js.map +0 -1
- package/lib/commonjs/utils/bounds/_utils/styles.js.map +0 -1
- package/lib/commonjs/utils/bounds/constants.js.map +0 -1
- package/lib/commonjs/utils/bounds/index.js.map +0 -1
- package/lib/commonjs/utils/gesture/apply-offset-rules.js.map +0 -1
- package/lib/commonjs/utils/gesture/check-gesture-activation.js.map +0 -1
- package/lib/commonjs/utils/gesture/determine-dismissal.js.map +0 -1
- package/lib/commonjs/utils/gesture/map-gesture-to-progress.js.map +0 -1
- package/lib/commonjs/utils/gesture/reset-gesture-values.js.map +0 -1
- package/lib/commonjs/utils/gesture/velocity.js.map +0 -1
- package/lib/commonjs/utils/reanimated/version.js.map +0 -1
- package/lib/module/__configs__/index.js +0 -18
- package/lib/module/__configs__/index.js.map +0 -1
- package/lib/module/__configs__/presets.js.map +0 -1
- package/lib/module/__configs__/specs.js.map +0 -1
- package/lib/module/components/controllers/screen-lifecycle.js +0 -65
- package/lib/module/components/controllers/screen-lifecycle.js.map +0 -1
- package/lib/module/components/create-transition-aware-component.js.map +0 -1
- package/lib/module/components/integrations/masked-view.js.map +0 -1
- package/lib/module/components/root-transition-aware.js.map +0 -1
- package/lib/module/constants.js.map +0 -1
- package/lib/module/hooks/animation/use-associated-style.js.map +0 -1
- package/lib/module/hooks/animation/use-screen-animation.js +0 -113
- package/lib/module/hooks/animation/use-screen-animation.js.map +0 -1
- package/lib/module/hooks/bounds/use-bound-registry.js +0 -125
- package/lib/module/hooks/bounds/use-bound-registry.js.map +0 -1
- package/lib/module/hooks/gestures/use-build-gestures.js +0 -230
- package/lib/module/hooks/gestures/use-build-gestures.js.map +0 -1
- package/lib/module/hooks/gestures/use-parent-gesture-registry.js.map +0 -1
- package/lib/module/hooks/gestures/use-scroll-registry.js.map +0 -1
- package/lib/module/hooks/use-stable-callback-value.js.map +0 -1
- package/lib/module/hooks/use-stable-callback.js.map +0 -1
- package/lib/module/index.js +0 -23
- package/lib/module/index.js.map +0 -1
- package/lib/module/integrations/native-stack/navigators/createNativeStackNavigator.js.map +0 -1
- package/lib/module/integrations/native-stack/utils/debounce.js.map +0 -1
- package/lib/module/integrations/native-stack/utils/getModalRoutesKeys.js.map +0 -1
- package/lib/module/integrations/native-stack/utils/useAnimatedHeaderHeight.js.map +0 -1
- package/lib/module/integrations/native-stack/utils/useDismissedRouteError.js.map +0 -1
- package/lib/module/integrations/native-stack/utils/useInvalidPreventRemoveError.js.map +0 -1
- package/lib/module/integrations/native-stack/views/FontProcessor.js.map +0 -1
- package/lib/module/integrations/native-stack/views/FontProcessor.native.js.map +0 -1
- package/lib/module/integrations/native-stack/views/FooterComponent.js.map +0 -1
- package/lib/module/integrations/native-stack/views/NativeStackView.js.map +0 -1
- package/lib/module/integrations/native-stack/views/NativeStackView.native.js +0 -483
- package/lib/module/integrations/native-stack/views/NativeStackView.native.js.map +0 -1
- package/lib/module/integrations/native-stack/views/useHeaderConfigProps.js.map +0 -1
- package/lib/module/providers/gestures.js.map +0 -1
- package/lib/module/providers/keys.js +0 -29
- package/lib/module/providers/keys.js.map +0 -1
- package/lib/module/providers/screen-transition-provider.js +0 -30
- package/lib/module/providers/screen-transition-provider.js.map +0 -1
- package/lib/module/providers/transition-styles.js.map +0 -1
- package/lib/module/stores/animations.js +0 -33
- package/lib/module/stores/animations.js.map +0 -1
- package/lib/module/stores/bounds/_utils.js.map +0 -1
- package/lib/module/stores/bounds/index.js +0 -112
- package/lib/module/stores/bounds/index.js.map +0 -1
- package/lib/module/stores/gestures.js +0 -35
- package/lib/module/stores/gestures.js.map +0 -1
- package/lib/module/stores/navigator-dismiss-state.js.map +0 -1
- package/lib/module/stores/utils/reset-stores-for-screen.js +0 -15
- package/lib/module/stores/utils/reset-stores-for-screen.js.map +0 -1
- package/lib/module/types/animation.js.map +0 -1
- package/lib/module/types/bounds.js.map +0 -1
- package/lib/module/types/core.js.map +0 -1
- package/lib/module/types/gesture.js.map +0 -1
- package/lib/module/types/navigator.js +0 -4
- package/lib/module/types/navigator.js.map +0 -1
- package/lib/module/types/utils.js.map +0 -1
- package/lib/module/utils/animation/animate.js.map +0 -1
- package/lib/module/utils/animation/derivations.js +0 -34
- package/lib/module/utils/animation/derivations.js.map +0 -1
- package/lib/module/utils/animation/start-screen-transition.js.map +0 -1
- package/lib/module/utils/bounds/_types/builder.js.map +0 -1
- package/lib/module/utils/bounds/_types/geometry.js.map +0 -1
- package/lib/module/utils/bounds/_types/get-bounds.js.map +0 -1
- package/lib/module/utils/bounds/_utils/flatten-styles.js.map +0 -1
- package/lib/module/utils/bounds/_utils/geometry.js.map +0 -1
- package/lib/module/utils/bounds/_utils/get-bounds.js.map +0 -1
- package/lib/module/utils/bounds/_utils/is-bounds-equal.js +0 -14
- package/lib/module/utils/bounds/_utils/is-bounds-equal.js.map +0 -1
- package/lib/module/utils/bounds/_utils/style-composers.js.map +0 -1
- package/lib/module/utils/bounds/_utils/styles.js.map +0 -1
- package/lib/module/utils/bounds/constants.js.map +0 -1
- package/lib/module/utils/bounds/index.js.map +0 -1
- package/lib/module/utils/gesture/apply-offset-rules.js.map +0 -1
- package/lib/module/utils/gesture/check-gesture-activation.js.map +0 -1
- package/lib/module/utils/gesture/determine-dismissal.js.map +0 -1
- package/lib/module/utils/gesture/map-gesture-to-progress.js.map +0 -1
- package/lib/module/utils/gesture/reset-gesture-values.js.map +0 -1
- package/lib/module/utils/gesture/velocity.js.map +0 -1
- package/lib/module/utils/reanimated/version.js.map +0 -1
- package/lib/typescript/__configs__/index.d.ts +0 -16
- package/lib/typescript/__configs__/index.d.ts.map +0 -1
- package/lib/typescript/__configs__/presets.d.ts +0 -12
- package/lib/typescript/__configs__/presets.d.ts.map +0 -1
- package/lib/typescript/__configs__/specs.d.ts.map +0 -1
- package/lib/typescript/components/controllers/screen-lifecycle.d.ts +0 -6
- package/lib/typescript/components/controllers/screen-lifecycle.d.ts.map +0 -1
- package/lib/typescript/components/create-transition-aware-component.d.ts.map +0 -1
- package/lib/typescript/components/integrations/masked-view.d.ts.map +0 -1
- package/lib/typescript/components/root-transition-aware.d.ts.map +0 -1
- package/lib/typescript/constants.d.ts +0 -57
- package/lib/typescript/constants.d.ts.map +0 -1
- package/lib/typescript/hooks/animation/use-associated-style.d.ts.map +0 -1
- package/lib/typescript/hooks/animation/use-screen-animation.d.ts.map +0 -1
- package/lib/typescript/hooks/bounds/use-bound-registry.d.ts.map +0 -1
- package/lib/typescript/hooks/gestures/use-build-gestures.d.ts.map +0 -1
- package/lib/typescript/hooks/gestures/use-parent-gesture-registry.d.ts.map +0 -1
- package/lib/typescript/hooks/gestures/use-scroll-registry.d.ts.map +0 -1
- package/lib/typescript/hooks/use-stable-callback-value.d.ts.map +0 -1
- package/lib/typescript/hooks/use-stable-callback.d.ts.map +0 -1
- package/lib/typescript/index.d.ts +0 -1325
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/navigators/createNativeStackNavigator.d.ts +0 -16
- package/lib/typescript/integrations/native-stack/navigators/createNativeStackNavigator.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/utils/debounce.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/utils/getModalRoutesKeys.d.ts +0 -4
- package/lib/typescript/integrations/native-stack/utils/getModalRoutesKeys.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/utils/useAnimatedHeaderHeight.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/utils/useDismissedRouteError.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/utils/useInvalidPreventRemoveError.d.ts +0 -3
- package/lib/typescript/integrations/native-stack/utils/useInvalidPreventRemoveError.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/views/FontProcessor.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/views/FontProcessor.native.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/views/FooterComponent.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/views/NativeStackView.d.ts +0 -11
- package/lib/typescript/integrations/native-stack/views/NativeStackView.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/views/NativeStackView.native.d.ts +0 -11
- package/lib/typescript/integrations/native-stack/views/NativeStackView.native.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/views/useHeaderConfigProps.d.ts +0 -44
- package/lib/typescript/integrations/native-stack/views/useHeaderConfigProps.d.ts.map +0 -1
- package/lib/typescript/providers/gestures.d.ts.map +0 -1
- package/lib/typescript/providers/keys.d.ts +0 -16
- package/lib/typescript/providers/keys.d.ts.map +0 -1
- package/lib/typescript/providers/screen-transition-provider.d.ts +0 -11
- package/lib/typescript/providers/screen-transition-provider.d.ts.map +0 -1
- package/lib/typescript/providers/transition-styles.d.ts.map +0 -1
- package/lib/typescript/stores/animations.d.ts +0 -17
- package/lib/typescript/stores/animations.d.ts.map +0 -1
- package/lib/typescript/stores/bounds/_utils.d.ts.map +0 -1
- package/lib/typescript/stores/bounds/index.d.ts +0 -22
- package/lib/typescript/stores/bounds/index.d.ts.map +0 -1
- package/lib/typescript/stores/gestures.d.ts +0 -23
- package/lib/typescript/stores/gestures.d.ts.map +0 -1
- package/lib/typescript/stores/navigator-dismiss-state.d.ts.map +0 -1
- package/lib/typescript/stores/utils/reset-stores-for-screen.d.ts +0 -6
- package/lib/typescript/stores/utils/reset-stores-for-screen.d.ts.map +0 -1
- package/lib/typescript/types/animation.d.ts +0 -70
- package/lib/typescript/types/animation.d.ts.map +0 -1
- package/lib/typescript/types/bounds.d.ts.map +0 -1
- package/lib/typescript/types/core.d.ts +0 -47
- package/lib/typescript/types/core.d.ts.map +0 -1
- package/lib/typescript/types/gesture.d.ts.map +0 -1
- package/lib/typescript/types/navigator.d.ts +0 -691
- package/lib/typescript/types/navigator.d.ts.map +0 -1
- package/lib/typescript/types/utils.d.ts.map +0 -1
- package/lib/typescript/utils/animation/animate.d.ts.map +0 -1
- package/lib/typescript/utils/animation/derivations.d.ts.map +0 -1
- package/lib/typescript/utils/animation/start-screen-transition.d.ts +0 -13
- package/lib/typescript/utils/animation/start-screen-transition.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_types/builder.d.ts +0 -118
- package/lib/typescript/utils/bounds/_types/builder.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_types/geometry.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_types/get-bounds.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_utils/flatten-styles.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_utils/geometry.d.ts +0 -27
- package/lib/typescript/utils/bounds/_utils/geometry.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_utils/get-bounds.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_utils/is-bounds-equal.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_utils/style-composers.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_utils/styles.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/constants.d.ts +0 -7
- package/lib/typescript/utils/bounds/constants.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/index.d.ts +0 -13
- package/lib/typescript/utils/bounds/index.d.ts.map +0 -1
- package/lib/typescript/utils/gesture/apply-offset-rules.d.ts +0 -38
- package/lib/typescript/utils/gesture/apply-offset-rules.d.ts.map +0 -1
- package/lib/typescript/utils/gesture/check-gesture-activation.d.ts +0 -38
- package/lib/typescript/utils/gesture/check-gesture-activation.d.ts.map +0 -1
- package/lib/typescript/utils/gesture/determine-dismissal.d.ts.map +0 -1
- package/lib/typescript/utils/gesture/map-gesture-to-progress.d.ts.map +0 -1
- package/lib/typescript/utils/gesture/reset-gesture-values.d.ts +0 -16
- package/lib/typescript/utils/gesture/reset-gesture-values.d.ts.map +0 -1
- package/lib/typescript/utils/gesture/velocity.d.ts +0 -25
- package/lib/typescript/utils/gesture/velocity.d.ts.map +0 -1
- package/lib/typescript/utils/reanimated/version.d.ts.map +0 -1
- package/src/__configs__/index.ts +0 -26
- package/src/__configs__/presets.ts +0 -628
- package/src/__tests__/gesture.velocity.test.ts +0 -138
- package/src/components/controllers/screen-lifecycle.tsx +0 -78
- package/src/constants.ts +0 -108
- package/src/hooks/animation/use-screen-animation.tsx +0 -151
- package/src/hooks/bounds/use-bound-registry.tsx +0 -159
- package/src/hooks/gestures/use-build-gestures.tsx +0 -324
- package/src/index.ts +0 -34
- package/src/integrations/native-stack/navigators/createNativeStackNavigator.tsx +0 -112
- package/src/integrations/native-stack/utils/getModalRoutesKeys.ts +0 -21
- package/src/integrations/native-stack/utils/useInvalidPreventRemoveError.tsx +0 -31
- package/src/integrations/native-stack/views/NativeStackView.native.tsx +0 -650
- package/src/integrations/native-stack/views/NativeStackView.tsx +0 -214
- package/src/integrations/native-stack/views/useHeaderConfigProps.tsx +0 -295
- package/src/providers/keys.tsx +0 -38
- package/src/providers/screen-transition-provider.tsx +0 -33
- package/src/stores/animations.ts +0 -45
- package/src/stores/bounds/index.ts +0 -125
- package/src/stores/gestures.ts +0 -60
- package/src/stores/utils/reset-stores-for-screen.ts +0 -13
- package/src/types/animation.ts +0 -81
- package/src/types/core.ts +0 -50
- package/src/types/navigator.ts +0 -753
- package/src/utils/animation/derivations.ts +0 -40
- package/src/utils/animation/start-screen-transition.ts +0 -61
- package/src/utils/bounds/_types/builder.ts +0 -151
- package/src/utils/bounds/_utils/geometry.ts +0 -166
- package/src/utils/bounds/_utils/is-bounds-equal.ts +0 -24
- package/src/utils/bounds/constants.ts +0 -40
- package/src/utils/bounds/index.ts +0 -219
- package/src/utils/gesture/apply-offset-rules.ts +0 -312
- package/src/utils/gesture/check-gesture-activation.ts +0 -310
- package/src/utils/gesture/reset-gesture-values.ts +0 -67
- package/src/utils/gesture/velocity.ts +0 -143
- /package/lib/commonjs/{integrations/native-stack → native-stack}/navigators/createNativeStackNavigator.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/utils/debounce.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/utils/getModalRoutesKeys.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/utils/useAnimatedHeaderHeight.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/utils/useDismissedRouteError.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/utils/useInvalidPreventRemoveError.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/views/FontProcessor.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/views/FontProcessor.native.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/views/FooterComponent.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/views/NativeStackView.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/views/useHeaderConfigProps.js +0 -0
- /package/lib/commonjs/{components → shared/components}/create-transition-aware-component.js +0 -0
- /package/lib/commonjs/{components → shared/components}/integrations/masked-view.js +0 -0
- /package/lib/commonjs/{components → shared/components}/root-transition-aware.js +0 -0
- /package/lib/commonjs/{__configs__ → shared/configs}/presets.js +0 -0
- /package/lib/commonjs/{__configs__ → shared/configs}/specs.js +0 -0
- /package/lib/commonjs/{constants.js → shared/constants.js} +0 -0
- /package/lib/commonjs/{hooks → shared/hooks}/animation/use-associated-style.js +0 -0
- /package/lib/commonjs/{hooks → shared/hooks}/gestures/use-parent-gesture-registry.js +0 -0
- /package/lib/commonjs/{hooks → shared/hooks}/gestures/use-scroll-registry.js +0 -0
- /package/lib/commonjs/{hooks → shared/hooks}/use-stable-callback-value.js +0 -0
- /package/lib/commonjs/{hooks → shared/hooks}/use-stable-callback.js +0 -0
- /package/lib/commonjs/{providers → shared/providers}/gestures.js +0 -0
- /package/lib/commonjs/{providers → shared/providers}/transition-styles.js +0 -0
- /package/lib/commonjs/{stores/bounds → shared/stores/bound-store}/_utils.js +0 -0
- /package/lib/commonjs/{stores → shared/stores}/navigator-dismiss-state.js +0 -0
- /package/lib/commonjs/{types → shared/types}/animation.js +0 -0
- /package/lib/commonjs/{types → shared/types}/bounds.js +0 -0
- /package/lib/commonjs/{types → shared/types}/core.js +0 -0
- /package/lib/commonjs/{types → shared/types}/gesture.js +0 -0
- /package/lib/commonjs/{types → shared/types}/utils.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/animation/animate.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/animation/start-screen-transition.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_types/builder.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_types/geometry.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_types/get-bounds.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_utils/flatten-styles.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_utils/geometry.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_utils/get-bounds.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_utils/style-composers.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_utils/styles.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/constants.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/index.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/gesture/apply-offset-rules.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/gesture/check-gesture-activation.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/gesture/determine-dismissal.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/gesture/map-gesture-to-progress.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/gesture/reset-gesture-values.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/gesture/velocity.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/reanimated/version.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/navigators/createNativeStackNavigator.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/utils/debounce.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/utils/getModalRoutesKeys.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/utils/useAnimatedHeaderHeight.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/utils/useDismissedRouteError.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/utils/useInvalidPreventRemoveError.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/views/FontProcessor.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/views/FontProcessor.native.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/views/FooterComponent.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/views/NativeStackView.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/views/useHeaderConfigProps.js +0 -0
- /package/lib/module/{components → shared/components}/create-transition-aware-component.js +0 -0
- /package/lib/module/{components → shared/components}/integrations/masked-view.js +0 -0
- /package/lib/module/{components → shared/components}/root-transition-aware.js +0 -0
- /package/lib/module/{__configs__ → shared/configs}/presets.js +0 -0
- /package/lib/module/{__configs__ → shared/configs}/specs.js +0 -0
- /package/lib/module/{constants.js → shared/constants.js} +0 -0
- /package/lib/module/{hooks → shared/hooks}/animation/use-associated-style.js +0 -0
- /package/lib/module/{hooks → shared/hooks}/gestures/use-parent-gesture-registry.js +0 -0
- /package/lib/module/{hooks → shared/hooks}/gestures/use-scroll-registry.js +0 -0
- /package/lib/module/{hooks → shared/hooks}/use-stable-callback-value.js +0 -0
- /package/lib/module/{hooks → shared/hooks}/use-stable-callback.js +0 -0
- /package/lib/module/{providers → shared/providers}/gestures.js +0 -0
- /package/lib/module/{providers → shared/providers}/transition-styles.js +0 -0
- /package/lib/module/{stores/bounds → shared/stores/bound-store}/_utils.js +0 -0
- /package/lib/module/{stores → shared/stores}/navigator-dismiss-state.js +0 -0
- /package/lib/module/{types → shared/types}/animation.js +0 -0
- /package/lib/module/{types → shared/types}/bounds.js +0 -0
- /package/lib/module/{types → shared/types}/core.js +0 -0
- /package/lib/module/{types → shared/types}/gesture.js +0 -0
- /package/lib/module/{types → shared/types}/utils.js +0 -0
- /package/lib/module/{utils → shared/utils}/animation/animate.js +0 -0
- /package/lib/module/{utils → shared/utils}/animation/start-screen-transition.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_types/builder.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_types/geometry.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_types/get-bounds.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_utils/flatten-styles.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_utils/geometry.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_utils/get-bounds.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_utils/style-composers.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_utils/styles.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/constants.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/index.js +0 -0
- /package/lib/module/{utils → shared/utils}/gesture/apply-offset-rules.js +0 -0
- /package/lib/module/{utils → shared/utils}/gesture/check-gesture-activation.js +0 -0
- /package/lib/module/{utils → shared/utils}/gesture/determine-dismissal.js +0 -0
- /package/lib/module/{utils → shared/utils}/gesture/map-gesture-to-progress.js +0 -0
- /package/lib/module/{utils → shared/utils}/gesture/reset-gesture-values.js +0 -0
- /package/lib/module/{utils → shared/utils}/gesture/velocity.js +0 -0
- /package/lib/module/{utils → shared/utils}/reanimated/version.js +0 -0
- /package/lib/typescript/{integrations/native-stack → native-stack}/utils/debounce.d.ts +0 -0
- /package/lib/typescript/{integrations/native-stack → native-stack}/utils/useAnimatedHeaderHeight.d.ts +0 -0
- /package/lib/typescript/{integrations/native-stack → native-stack}/utils/useDismissedRouteError.d.ts +0 -0
- /package/lib/typescript/{integrations/native-stack → native-stack}/views/FontProcessor.d.ts +0 -0
- /package/lib/typescript/{integrations/native-stack → native-stack}/views/FontProcessor.native.d.ts +0 -0
- /package/lib/typescript/{integrations/native-stack → native-stack}/views/FooterComponent.d.ts +0 -0
- /package/lib/typescript/{components → shared/components}/create-transition-aware-component.d.ts +0 -0
- /package/lib/typescript/{components → shared/components}/integrations/masked-view.d.ts +0 -0
- /package/lib/typescript/{components → shared/components}/root-transition-aware.d.ts +0 -0
- /package/lib/typescript/{__configs__ → shared/configs}/specs.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/animation/use-associated-style.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/animation/use-screen-animation.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/bounds/use-bound-registry.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/gestures/use-build-gestures.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/gestures/use-parent-gesture-registry.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/gestures/use-scroll-registry.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/use-stable-callback-value.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/use-stable-callback.d.ts +0 -0
- /package/lib/typescript/{providers → shared/providers}/gestures.d.ts +0 -0
- /package/lib/typescript/{providers → shared/providers}/transition-styles.d.ts +0 -0
- /package/lib/typescript/{stores/bounds → shared/stores/bound-store}/_utils.d.ts +0 -0
- /package/lib/typescript/{stores → shared/stores}/navigator-dismiss-state.d.ts +0 -0
- /package/lib/typescript/{types → shared/types}/bounds.d.ts +0 -0
- /package/lib/typescript/{types → shared/types}/gesture.d.ts +0 -0
- /package/lib/typescript/{types → shared/types}/utils.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/animation/animate.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/animation/derivations.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/bounds/_types/geometry.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/bounds/_types/get-bounds.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/bounds/_utils/flatten-styles.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/bounds/_utils/get-bounds.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/bounds/_utils/is-bounds-equal.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/bounds/_utils/style-composers.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/bounds/_utils/styles.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/gesture/determine-dismissal.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/gesture/map-gesture-to-progress.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/reanimated/version.d.ts +0 -0
- /package/src/{integrations/native-stack → native-stack}/utils/debounce.tsx +0 -0
- /package/src/{integrations/native-stack → native-stack}/utils/useAnimatedHeaderHeight.tsx +0 -0
- /package/src/{integrations/native-stack → native-stack}/utils/useDismissedRouteError.tsx +0 -0
- /package/src/{integrations/native-stack → native-stack}/views/FontProcessor.native.tsx +0 -0
- /package/src/{integrations/native-stack → native-stack}/views/FontProcessor.tsx +0 -0
- /package/src/{integrations/native-stack → native-stack}/views/FooterComponent.tsx +0 -0
- /package/src/{__tests__ → shared/__tests__}/bounds.store.test.ts +0 -0
- /package/src/{__tests__ → shared/__tests__}/determine-dismissal.test.ts +0 -0
- /package/src/{__tests__ → shared/__tests__}/geometry.test.ts +0 -0
- /package/src/{components → shared/components}/create-transition-aware-component.tsx +0 -0
- /package/src/{components → shared/components}/integrations/masked-view.tsx +0 -0
- /package/src/{components → shared/components}/root-transition-aware.tsx +0 -0
- /package/src/{__configs__ → shared/configs}/specs.ts +0 -0
- /package/src/{hooks → shared/hooks}/animation/use-associated-style.tsx +0 -0
- /package/src/{hooks → shared/hooks}/gestures/use-parent-gesture-registry.tsx +0 -0
- /package/src/{hooks → shared/hooks}/gestures/use-scroll-registry.tsx +0 -0
- /package/src/{hooks → shared/hooks}/use-stable-callback-value.tsx +0 -0
- /package/src/{hooks → shared/hooks}/use-stable-callback.tsx +0 -0
- /package/src/{providers → shared/providers}/gestures.tsx +0 -0
- /package/src/{providers → shared/providers}/transition-styles.tsx +0 -0
- /package/src/{stores/bounds → shared/stores/bound-store}/_utils.ts +0 -0
- /package/src/{stores → shared/stores}/navigator-dismiss-state.ts +0 -0
- /package/src/{types → shared/types}/bounds.ts +0 -0
- /package/src/{types → shared/types}/gesture.ts +0 -0
- /package/src/{types → shared/types}/utils.ts +0 -0
- /package/src/{utils → shared/utils}/animation/animate.ts +0 -0
- /package/src/{utils → shared/utils}/bounds/_types/geometry.ts +0 -0
- /package/src/{utils → shared/utils}/bounds/_types/get-bounds.ts +0 -0
- /package/src/{utils → shared/utils}/bounds/_utils/flatten-styles.ts +0 -0
- /package/src/{utils → shared/utils}/bounds/_utils/get-bounds.ts +0 -0
- /package/src/{utils → shared/utils}/bounds/_utils/style-composers.ts +0 -0
- /package/src/{utils → shared/utils}/bounds/_utils/styles.ts +0 -0
- /package/src/{utils → shared/utils}/gesture/determine-dismissal.ts +0 -0
- /package/src/{utils → shared/utils}/gesture/map-gesture-to-progress.ts +0 -0
- /package/src/{utils → shared/utils}/reanimated/version.ts +0 -0
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { type Route, StackActions } from "@react-navigation/native";
|
|
2
|
+
import { useLayoutEffect, useState } from "react";
|
|
3
|
+
import useStableCallback from "../../../../shared/hooks/use-stable-callback";
|
|
4
|
+
import type { BlankStackDescriptorMap } from "../../../types";
|
|
5
|
+
import type { StackNavigationContextProps } from "../_types";
|
|
6
|
+
import { areDescriptorsEqual } from "../_utils/are-descriptors-equal";
|
|
7
|
+
import { composeDescriptors } from "../_utils/compose-descriptors";
|
|
8
|
+
import { haveSameRouteKeys } from "../_utils/have-same-route-keys";
|
|
9
|
+
import { routesAreIdentical } from "../_utils/routes-are-identical";
|
|
10
|
+
import { useClosingRouteKeys } from "./use-closing-route-keys";
|
|
11
|
+
import { usePrevious } from "./use-previous";
|
|
12
|
+
|
|
13
|
+
type SyncRoutesWithRemovedParams = {
|
|
14
|
+
prevRoutes: Route<string>[];
|
|
15
|
+
prevDescriptors: BlankStackDescriptorMap;
|
|
16
|
+
nextRoutes: Route<string>[];
|
|
17
|
+
nextDescriptors: BlankStackDescriptorMap;
|
|
18
|
+
closingRouteKeys: ReturnType<typeof useClosingRouteKeys>;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Aligns current routes with the latest route data while preserving references
|
|
23
|
+
* when possible for performance optimization
|
|
24
|
+
*/
|
|
25
|
+
const alignRoutesWithLatest = (
|
|
26
|
+
currentRoutes: Route<string>[],
|
|
27
|
+
currentDescriptors: BlankStackDescriptorMap,
|
|
28
|
+
nextRoutes: Route<string>[],
|
|
29
|
+
nextDescriptors: BlankStackDescriptorMap,
|
|
30
|
+
) => {
|
|
31
|
+
// Early return for empty current routes
|
|
32
|
+
if (currentRoutes.length === 0) {
|
|
33
|
+
return {
|
|
34
|
+
routes: nextRoutes,
|
|
35
|
+
descriptors: composeDescriptors(
|
|
36
|
+
nextRoutes,
|
|
37
|
+
nextDescriptors,
|
|
38
|
+
currentDescriptors,
|
|
39
|
+
),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Create lookup map for efficient route finding
|
|
44
|
+
const nextRouteLookup = new Map<string, Route<string>>();
|
|
45
|
+
for (const route of nextRoutes) {
|
|
46
|
+
nextRouteLookup.set(route.key, route);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Track if any changes occurred
|
|
50
|
+
let didChange = currentRoutes.length !== nextRoutes.length;
|
|
51
|
+
|
|
52
|
+
// Align routes, updating references where needed
|
|
53
|
+
const alignedRoutes = currentRoutes.map((route) => {
|
|
54
|
+
const nextRoute = nextRouteLookup.get(route.key);
|
|
55
|
+
|
|
56
|
+
if (!nextRoute) {
|
|
57
|
+
return route; // Keep current route if not in next
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (nextRoute !== route) {
|
|
61
|
+
didChange = true;
|
|
62
|
+
return nextRoute; // Update to new route reference
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return route; // Keep current route reference
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// Only create new array if changes occurred
|
|
69
|
+
const routesResult = didChange ? alignedRoutes : currentRoutes;
|
|
70
|
+
|
|
71
|
+
return {
|
|
72
|
+
routes: routesResult,
|
|
73
|
+
descriptors: composeDescriptors(
|
|
74
|
+
routesResult,
|
|
75
|
+
nextDescriptors,
|
|
76
|
+
currentDescriptors,
|
|
77
|
+
),
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Synchronizes routes while handling removed routes that may still be animating out.
|
|
83
|
+
* This manages the complex logic of keeping closing routes visible during transitions.
|
|
84
|
+
*/
|
|
85
|
+
const syncRoutesWithRemoved = ({
|
|
86
|
+
prevRoutes,
|
|
87
|
+
prevDescriptors,
|
|
88
|
+
nextRoutes,
|
|
89
|
+
nextDescriptors,
|
|
90
|
+
closingRouteKeys,
|
|
91
|
+
}: SyncRoutesWithRemovedParams) => {
|
|
92
|
+
if (nextRoutes.length === 0) {
|
|
93
|
+
closingRouteKeys.clear();
|
|
94
|
+
return {
|
|
95
|
+
routes: nextRoutes,
|
|
96
|
+
descriptors: {},
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Start with next routes, will mutate if needed
|
|
101
|
+
const derivedRoutes: Route<string>[] = nextRoutes.slice();
|
|
102
|
+
|
|
103
|
+
// Get focused (last) routes for comparison
|
|
104
|
+
const previousFocusedRoute = prevRoutes[prevRoutes.length - 1];
|
|
105
|
+
const nextFocusedRoute = nextRoutes[nextRoutes.length - 1];
|
|
106
|
+
|
|
107
|
+
// Handle focus changes between routes
|
|
108
|
+
if (
|
|
109
|
+
previousFocusedRoute &&
|
|
110
|
+
nextFocusedRoute &&
|
|
111
|
+
previousFocusedRoute.key !== nextFocusedRoute.key
|
|
112
|
+
) {
|
|
113
|
+
const nextRouteWasPresent = prevRoutes.some(
|
|
114
|
+
(route) => route.key === nextFocusedRoute.key,
|
|
115
|
+
);
|
|
116
|
+
const previousRouteStillPresent = nextRoutes.some(
|
|
117
|
+
(route) => route.key === previousFocusedRoute.key,
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
if (nextRouteWasPresent && !previousRouteStillPresent) {
|
|
121
|
+
// Previous route was removed, mark as closing
|
|
122
|
+
closingRouteKeys.add(previousFocusedRoute.key);
|
|
123
|
+
|
|
124
|
+
derivedRoutes.push(previousFocusedRoute);
|
|
125
|
+
} else {
|
|
126
|
+
// Next route is now active, not closing
|
|
127
|
+
closingRouteKeys.remove(nextFocusedRoute.key);
|
|
128
|
+
|
|
129
|
+
if (!previousRouteStillPresent) {
|
|
130
|
+
// Previous route needs to be inserted for transition
|
|
131
|
+
closingRouteKeys.remove(previousFocusedRoute.key);
|
|
132
|
+
|
|
133
|
+
const insertIndex = Math.max(derivedRoutes.length - 1, 0);
|
|
134
|
+
derivedRoutes.splice(insertIndex, 0, previousFocusedRoute);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
} else if (nextFocusedRoute) {
|
|
138
|
+
// Same focused route, ensure it's not marked as closing
|
|
139
|
+
closingRouteKeys.remove(nextFocusedRoute.key);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Clean up closing keys that are no longer in the route list
|
|
143
|
+
const activeKeys = new Set(derivedRoutes.map((route) => route.key));
|
|
144
|
+
for (const key of Array.from(closingRouteKeys.ref.current)) {
|
|
145
|
+
if (!activeKeys.has(key)) {
|
|
146
|
+
closingRouteKeys.remove(key);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return {
|
|
151
|
+
routes: derivedRoutes,
|
|
152
|
+
descriptors: composeDescriptors(
|
|
153
|
+
derivedRoutes,
|
|
154
|
+
nextDescriptors,
|
|
155
|
+
prevDescriptors,
|
|
156
|
+
),
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export const useStackNavigationState = (props: StackNavigationContextProps) => {
|
|
161
|
+
const previousRoutes = usePrevious(props.state.routes) ?? [];
|
|
162
|
+
const closingRouteKeys = useClosingRouteKeys();
|
|
163
|
+
|
|
164
|
+
const [localState, setLocalState] = useState(() => ({
|
|
165
|
+
routes: props.state.routes,
|
|
166
|
+
descriptors: props.descriptors,
|
|
167
|
+
}));
|
|
168
|
+
|
|
169
|
+
useLayoutEffect(() => {
|
|
170
|
+
const nextRoutesSnapshot = props.state.routes;
|
|
171
|
+
const previousRoutesSnapshot = previousRoutes;
|
|
172
|
+
|
|
173
|
+
setLocalState((current) => {
|
|
174
|
+
const routeKeysUnchanged = haveSameRouteKeys(
|
|
175
|
+
previousRoutesSnapshot,
|
|
176
|
+
nextRoutesSnapshot,
|
|
177
|
+
);
|
|
178
|
+
|
|
179
|
+
let derivedRoutes: Route<string>[];
|
|
180
|
+
let derivedDescriptors: BlankStackDescriptorMap;
|
|
181
|
+
|
|
182
|
+
if (routeKeysUnchanged) {
|
|
183
|
+
const result = alignRoutesWithLatest(
|
|
184
|
+
current.routes,
|
|
185
|
+
current.descriptors,
|
|
186
|
+
nextRoutesSnapshot,
|
|
187
|
+
props.descriptors,
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
derivedRoutes = result.routes;
|
|
191
|
+
derivedDescriptors = result.descriptors;
|
|
192
|
+
} else {
|
|
193
|
+
const fallbackRoutes =
|
|
194
|
+
previousRoutesSnapshot.length > 0
|
|
195
|
+
? previousRoutesSnapshot
|
|
196
|
+
: current.routes;
|
|
197
|
+
|
|
198
|
+
const result = syncRoutesWithRemoved({
|
|
199
|
+
prevRoutes: fallbackRoutes,
|
|
200
|
+
prevDescriptors: current.descriptors,
|
|
201
|
+
nextRoutes: nextRoutesSnapshot,
|
|
202
|
+
nextDescriptors: props.descriptors,
|
|
203
|
+
closingRouteKeys,
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
derivedRoutes = result.routes;
|
|
207
|
+
derivedDescriptors = result.descriptors;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const routesChanged = !routesAreIdentical(current.routes, derivedRoutes);
|
|
211
|
+
const descriptorsChanged = !areDescriptorsEqual(
|
|
212
|
+
current.descriptors,
|
|
213
|
+
derivedDescriptors,
|
|
214
|
+
);
|
|
215
|
+
|
|
216
|
+
if (!routesChanged && !descriptorsChanged) {
|
|
217
|
+
return current;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
return {
|
|
221
|
+
routes: routesChanged ? derivedRoutes : current.routes,
|
|
222
|
+
descriptors: descriptorsChanged
|
|
223
|
+
? derivedDescriptors
|
|
224
|
+
: current.descriptors,
|
|
225
|
+
};
|
|
226
|
+
});
|
|
227
|
+
}, [props.state.routes, props.descriptors, previousRoutes, closingRouteKeys]);
|
|
228
|
+
|
|
229
|
+
const handleCloseRoute = useStableCallback(
|
|
230
|
+
({ route }: { route: Route<string> }) => {
|
|
231
|
+
if (props.state.routes.some((r) => r.key === route.key)) {
|
|
232
|
+
props.navigation.dispatch({
|
|
233
|
+
...StackActions.pop(),
|
|
234
|
+
source: route.key,
|
|
235
|
+
target: props.state.key,
|
|
236
|
+
});
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
closingRouteKeys.remove(route.key);
|
|
241
|
+
|
|
242
|
+
setLocalState((current) => {
|
|
243
|
+
if (!current.routes.some((candidate) => candidate.key === route.key)) {
|
|
244
|
+
return current;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
const nextRoutes = current.routes.filter(
|
|
248
|
+
(candidate) => candidate.key !== route.key,
|
|
249
|
+
);
|
|
250
|
+
|
|
251
|
+
const nextDescriptors = { ...current.descriptors };
|
|
252
|
+
delete nextDescriptors[route.key];
|
|
253
|
+
|
|
254
|
+
return {
|
|
255
|
+
routes: nextRoutes,
|
|
256
|
+
descriptors: nextDescriptors,
|
|
257
|
+
};
|
|
258
|
+
});
|
|
259
|
+
},
|
|
260
|
+
);
|
|
261
|
+
|
|
262
|
+
return {
|
|
263
|
+
state: localState,
|
|
264
|
+
handleCloseRoute,
|
|
265
|
+
closingRouteKeys,
|
|
266
|
+
};
|
|
267
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
NavigationRoute,
|
|
3
|
+
ParamListBase,
|
|
4
|
+
Route,
|
|
5
|
+
RouteProp,
|
|
6
|
+
StackNavigationState,
|
|
7
|
+
} from "@react-navigation/native";
|
|
8
|
+
import type { SharedValue } from "react-native-reanimated";
|
|
9
|
+
import type {
|
|
10
|
+
BlankStackDescriptor,
|
|
11
|
+
BlankStackDescriptorMap,
|
|
12
|
+
BlankStackNavigationHelpers,
|
|
13
|
+
BlankStackScene,
|
|
14
|
+
} from "../../types";
|
|
15
|
+
|
|
16
|
+
export interface StackNavigationContextValue {
|
|
17
|
+
routes: NavigationRoute<ParamListBase, string>[];
|
|
18
|
+
descriptors: BlankStackDescriptorMap;
|
|
19
|
+
scenes: BlankStackScene[];
|
|
20
|
+
activeScreensLimit: number;
|
|
21
|
+
closingRouteKeysShared: SharedValue<string[]>;
|
|
22
|
+
handleCloseRoute: (payload: { route: Route<string> }) => void;
|
|
23
|
+
shouldShowFloatOverlay: boolean;
|
|
24
|
+
focusedIndex: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface StackNavigationContextProps {
|
|
28
|
+
state: StackNavigationState<ParamListBase>;
|
|
29
|
+
navigation: BlankStackNavigationHelpers;
|
|
30
|
+
descriptors: BlankStackDescriptorMap;
|
|
31
|
+
describe: (
|
|
32
|
+
route: RouteProp<ParamListBase>,
|
|
33
|
+
placeholder: boolean,
|
|
34
|
+
) => BlankStackDescriptor;
|
|
35
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BlankStackDescriptorMap } from "../../../types";
|
|
2
|
+
|
|
3
|
+
export const areDescriptorsEqual = (
|
|
4
|
+
a: BlankStackDescriptorMap,
|
|
5
|
+
b: BlankStackDescriptorMap,
|
|
6
|
+
): boolean => {
|
|
7
|
+
if (a === b) return true;
|
|
8
|
+
|
|
9
|
+
const aKeys = Object.keys(a);
|
|
10
|
+
const bKeys = Object.keys(b);
|
|
11
|
+
|
|
12
|
+
if (aKeys.length !== bKeys.length) return false;
|
|
13
|
+
|
|
14
|
+
return aKeys.every((key) => a[key] === b[key]);
|
|
15
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { NavigationRoute, ParamListBase } from "@react-navigation/native";
|
|
2
|
+
import type { BlankStackDescriptorMap } from "../../../types";
|
|
3
|
+
|
|
4
|
+
export function calculateActiveScreensLimit(
|
|
5
|
+
routes: NavigationRoute<ParamListBase, string>[],
|
|
6
|
+
descriptors: BlankStackDescriptorMap,
|
|
7
|
+
): number {
|
|
8
|
+
if (routes.length === 0) {
|
|
9
|
+
return 1;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let limit = 1;
|
|
13
|
+
|
|
14
|
+
for (let i = routes.length - 1; i >= 0; i--) {
|
|
15
|
+
const route = routes[i];
|
|
16
|
+
|
|
17
|
+
const shouldKeepPrevious =
|
|
18
|
+
descriptors?.[route.key]?.options?.detachPreviousScreen !== true;
|
|
19
|
+
|
|
20
|
+
if (shouldKeepPrevious) {
|
|
21
|
+
limit++;
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return Math.min(limit, routes.length);
|
|
29
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Route } from "@react-navigation/native";
|
|
2
|
+
import type { BlankStackDescriptorMap } from "../../../types";
|
|
3
|
+
|
|
4
|
+
export const composeDescriptors = (
|
|
5
|
+
routes: Route<string>[],
|
|
6
|
+
nextDescriptors: BlankStackDescriptorMap,
|
|
7
|
+
currentDescriptors: BlankStackDescriptorMap,
|
|
8
|
+
): BlankStackDescriptorMap => {
|
|
9
|
+
const composed: BlankStackDescriptorMap = {};
|
|
10
|
+
|
|
11
|
+
for (const route of routes) {
|
|
12
|
+
const adjusted =
|
|
13
|
+
nextDescriptors[route.key] ?? currentDescriptors[route.key];
|
|
14
|
+
|
|
15
|
+
// useScreenAnimation depends on this, however with blank-stack, this should be enabled by default
|
|
16
|
+
const withEnableTransitions = {
|
|
17
|
+
...adjusted,
|
|
18
|
+
options: { ...adjusted.options, enableTransitions: true },
|
|
19
|
+
};
|
|
20
|
+
composed[route.key] = withEnableTransitions;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return composed;
|
|
24
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Route } from "@react-navigation/native";
|
|
2
|
+
|
|
3
|
+
export const haveSameRouteKeys = (
|
|
4
|
+
previous: Route<string>[],
|
|
5
|
+
next: Route<string>[],
|
|
6
|
+
): boolean => {
|
|
7
|
+
if (previous.length !== next.length) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return previous.every((route, index) => route?.key === next[index]?.key);
|
|
12
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Route } from "@react-navigation/native";
|
|
2
|
+
|
|
3
|
+
export const routesAreIdentical = (
|
|
4
|
+
a: Route<string>[],
|
|
5
|
+
b: Route<string>[],
|
|
6
|
+
): boolean => {
|
|
7
|
+
if (a === b) return true;
|
|
8
|
+
if (a.length !== b.length) return false;
|
|
9
|
+
|
|
10
|
+
return a.every((route, index) => route === b[index]);
|
|
11
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type ComponentType, createContext, useContext, useMemo } from "react";
|
|
2
|
+
import type { BlankStackScene } from "../../types";
|
|
3
|
+
import { useStackNavigationState } from "./_hooks/use-stack-navigation-state";
|
|
4
|
+
import type {
|
|
5
|
+
StackNavigationContextProps,
|
|
6
|
+
StackNavigationContextValue,
|
|
7
|
+
} from "./_types";
|
|
8
|
+
import { calculateActiveScreensLimit } from "./_utils/calculate-active-screens-limit";
|
|
9
|
+
|
|
10
|
+
export const StackNavigationContext =
|
|
11
|
+
createContext<StackNavigationContextValue | null>(null);
|
|
12
|
+
|
|
13
|
+
export function withStackNavigationProvider(
|
|
14
|
+
Component: ComponentType<StackNavigationContextValue>,
|
|
15
|
+
) {
|
|
16
|
+
return function StackNavigationWrapper(props: StackNavigationContextProps) {
|
|
17
|
+
const { state, handleCloseRoute, closingRouteKeys } =
|
|
18
|
+
useStackNavigationState(props);
|
|
19
|
+
|
|
20
|
+
const scenes = useMemo(() => {
|
|
21
|
+
return state.routes.reduce((acc, route) => {
|
|
22
|
+
acc.push({
|
|
23
|
+
route,
|
|
24
|
+
descriptor: state.descriptors[route.key],
|
|
25
|
+
});
|
|
26
|
+
return acc;
|
|
27
|
+
}, [] as BlankStackScene[]);
|
|
28
|
+
}, [state.routes, state.descriptors]);
|
|
29
|
+
|
|
30
|
+
const activeScreensLimit = useMemo(() => {
|
|
31
|
+
return calculateActiveScreensLimit(state.routes, state.descriptors);
|
|
32
|
+
}, [state.routes, state.descriptors]);
|
|
33
|
+
|
|
34
|
+
const shouldShowFloatOverlay = useMemo(() => {
|
|
35
|
+
return state.routes.some((route) => {
|
|
36
|
+
const options = state.descriptors[route.key]?.options;
|
|
37
|
+
return options?.overlayMode === "float" && options?.overlayShown;
|
|
38
|
+
});
|
|
39
|
+
}, [state.routes, state.descriptors]);
|
|
40
|
+
|
|
41
|
+
const contextValue = useMemo<StackNavigationContextValue>(() => {
|
|
42
|
+
return {
|
|
43
|
+
routes: state.routes,
|
|
44
|
+
focusedIndex: props.state.index,
|
|
45
|
+
descriptors: state.descriptors,
|
|
46
|
+
closingRouteKeysShared: closingRouteKeys.shared,
|
|
47
|
+
activeScreensLimit,
|
|
48
|
+
handleCloseRoute,
|
|
49
|
+
scenes,
|
|
50
|
+
shouldShowFloatOverlay,
|
|
51
|
+
};
|
|
52
|
+
}, [
|
|
53
|
+
state,
|
|
54
|
+
scenes,
|
|
55
|
+
activeScreensLimit,
|
|
56
|
+
closingRouteKeys,
|
|
57
|
+
handleCloseRoute,
|
|
58
|
+
props.state.index,
|
|
59
|
+
shouldShowFloatOverlay,
|
|
60
|
+
]);
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<StackNavigationContext.Provider value={contextValue}>
|
|
64
|
+
<Component {...contextValue} />
|
|
65
|
+
</StackNavigationContext.Provider>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const useStackNavigationContext = () => {
|
|
71
|
+
const context = useContext(StackNavigationContext);
|
|
72
|
+
|
|
73
|
+
if (!context) {
|
|
74
|
+
throw new Error(
|
|
75
|
+
"StackNavigationContext.Provider is missing in the component tree.",
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return context;
|
|
80
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { createNativeStackNavigator } from "./navigators/createNativeStackNavigator";
|
|
2
|
+
export type {
|
|
3
|
+
NativeStackHeaderLeftProps,
|
|
4
|
+
NativeStackHeaderProps,
|
|
5
|
+
NativeStackHeaderRightProps,
|
|
6
|
+
NativeStackNavigationEventMap,
|
|
7
|
+
NativeStackNavigationOptions,
|
|
8
|
+
NativeStackNavigationProp,
|
|
9
|
+
NativeStackNavigatorProps,
|
|
10
|
+
NativeStackOptionsArgs,
|
|
11
|
+
NativeStackScreenProps,
|
|
12
|
+
} from "./types";
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createNavigatorFactory,
|
|
3
|
+
type EventArg,
|
|
4
|
+
type NavigatorTypeBagBase,
|
|
5
|
+
type ParamListBase,
|
|
6
|
+
type StackActionHelpers,
|
|
7
|
+
StackActions,
|
|
8
|
+
type StackNavigationState,
|
|
9
|
+
StackRouter,
|
|
10
|
+
type StackRouterOptions,
|
|
11
|
+
type StaticConfig,
|
|
12
|
+
type TypedNavigator,
|
|
13
|
+
useNavigationBuilder,
|
|
14
|
+
} from "@react-navigation/native";
|
|
15
|
+
import * as React from "react";
|
|
16
|
+
|
|
17
|
+
import type {
|
|
18
|
+
NativeStackNavigationEventMap,
|
|
19
|
+
NativeStackNavigationOptions,
|
|
20
|
+
NativeStackNavigationProp,
|
|
21
|
+
NativeStackNavigatorProps,
|
|
22
|
+
} from "../types";
|
|
23
|
+
import { NativeStackView } from "../views/NativeStackView";
|
|
24
|
+
|
|
25
|
+
function NativeStackNavigator({
|
|
26
|
+
id,
|
|
27
|
+
initialRouteName,
|
|
28
|
+
children,
|
|
29
|
+
layout,
|
|
30
|
+
screenListeners,
|
|
31
|
+
screenOptions,
|
|
32
|
+
screenLayout,
|
|
33
|
+
...rest
|
|
34
|
+
}: NativeStackNavigatorProps) {
|
|
35
|
+
const { state, describe, descriptors, navigation, NavigationContent } =
|
|
36
|
+
useNavigationBuilder<
|
|
37
|
+
StackNavigationState<ParamListBase>,
|
|
38
|
+
StackRouterOptions,
|
|
39
|
+
StackActionHelpers<ParamListBase>,
|
|
40
|
+
NativeStackNavigationOptions,
|
|
41
|
+
NativeStackNavigationEventMap
|
|
42
|
+
>(StackRouter, {
|
|
43
|
+
id,
|
|
44
|
+
initialRouteName,
|
|
45
|
+
children,
|
|
46
|
+
layout,
|
|
47
|
+
screenListeners,
|
|
48
|
+
screenOptions,
|
|
49
|
+
screenLayout,
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
React.useEffect(
|
|
53
|
+
() =>
|
|
54
|
+
// @ts-expect-error: there may not be a tab navigator in parent
|
|
55
|
+
navigation?.addListener?.("tabPress", (e: any) => {
|
|
56
|
+
const isFocused = navigation.isFocused();
|
|
57
|
+
|
|
58
|
+
// Run the operation in the next frame so we're sure all listeners have been run
|
|
59
|
+
// This is necessary to know if preventDefault() has been called
|
|
60
|
+
requestAnimationFrame(() => {
|
|
61
|
+
if (
|
|
62
|
+
state.index > 0 &&
|
|
63
|
+
isFocused &&
|
|
64
|
+
!(e as EventArg<"tabPress", true>).defaultPrevented
|
|
65
|
+
) {
|
|
66
|
+
// When user taps on already focused tab and we're inside the tab,
|
|
67
|
+
// reset the stack to replicate native behaviour
|
|
68
|
+
navigation.dispatch({
|
|
69
|
+
...StackActions.popToTop(),
|
|
70
|
+
target: state.key,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}),
|
|
75
|
+
[navigation, state.index, state.key],
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<NavigationContent>
|
|
80
|
+
<NativeStackView
|
|
81
|
+
{...rest}
|
|
82
|
+
state={state}
|
|
83
|
+
navigation={navigation}
|
|
84
|
+
descriptors={descriptors}
|
|
85
|
+
describe={describe}
|
|
86
|
+
/>
|
|
87
|
+
</NavigationContent>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function createNativeStackNavigator<
|
|
92
|
+
const ParamList extends ParamListBase,
|
|
93
|
+
const NavigatorID extends string | undefined = undefined,
|
|
94
|
+
const TypeBag extends NavigatorTypeBagBase = {
|
|
95
|
+
ParamList: ParamList;
|
|
96
|
+
NavigatorID: NavigatorID;
|
|
97
|
+
State: StackNavigationState<ParamList>;
|
|
98
|
+
ScreenOptions: NativeStackNavigationOptions;
|
|
99
|
+
EventMap: NativeStackNavigationEventMap;
|
|
100
|
+
NavigationList: {
|
|
101
|
+
[RouteName in keyof ParamList]: NativeStackNavigationProp<
|
|
102
|
+
ParamList,
|
|
103
|
+
RouteName,
|
|
104
|
+
NavigatorID
|
|
105
|
+
>;
|
|
106
|
+
};
|
|
107
|
+
Navigator: typeof NativeStackNavigator;
|
|
108
|
+
},
|
|
109
|
+
const Config extends StaticConfig<TypeBag> = StaticConfig<TypeBag>,
|
|
110
|
+
>(config?: Config): TypedNavigator<TypeBag, Config> {
|
|
111
|
+
return createNavigatorFactory(NativeStackNavigator)(config);
|
|
112
|
+
}
|