react-native-screen-transitions 2.4.2-beta.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.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.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.map +1 -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.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.map +1 -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 +62 -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.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.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.map +1 -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.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.map +1 -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 +57 -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.map +1 -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.map +1 -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.map +1 -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.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 +7 -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 +11 -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-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/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/components/root-transition-aware.tsx +44 -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/transition-styles.tsx +72 -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.blank.js +0 -59
- package/lib/commonjs/components/controllers/screen-lifecycle.blank.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 -120
- 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 -47
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/integrations/blank-stack/components/Header.js +0 -135
- package/lib/commonjs/integrations/blank-stack/components/Header.js.map +0 -1
- package/lib/commonjs/integrations/blank-stack/components/Screens.js +0 -64
- package/lib/commonjs/integrations/blank-stack/components/Screens.js.map +0 -1
- package/lib/commonjs/integrations/blank-stack/components/StackView.js +0 -85
- package/lib/commonjs/integrations/blank-stack/components/StackView.js.map +0 -1
- package/lib/commonjs/integrations/blank-stack/navigators/createBlankStackNavigator.js.map +0 -1
- package/lib/commonjs/integrations/blank-stack/providers/screen-transition-provider.js +0 -12
- package/lib/commonjs/integrations/blank-stack/providers/screen-transition-provider.js.map +0 -1
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js +0 -66
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js.map +0 -1
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js.map +0 -1
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js +0 -208
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js.map +0 -1
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_types.js.map +0 -1
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js.map +0 -1
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js.map +0 -1
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js +0 -15
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js.map +0 -1
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js.map +0 -1
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js.map +0 -1
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/index.js +0 -66
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/index.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/navigators/createNativeStackNavigator.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/providers/screen-transition-provider.js +0 -10
- package/lib/commonjs/integrations/native-stack/providers/screen-transition-provider.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/create-screen-transition-provider.js +0 -38
- package/lib/commonjs/providers/create-screen-transition-provider.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/transition-styles.js +0 -63
- 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/blank-stack.navigator.js +0 -6
- package/lib/commonjs/types/blank-stack.navigator.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/native-stack.navigator.js +0 -6
- package/lib/commonjs/types/native-stack.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.blank.js +0 -53
- package/lib/module/components/controllers/screen-lifecycle.blank.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 -115
- 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 -24
- package/lib/module/index.js.map +0 -1
- package/lib/module/integrations/blank-stack/components/Header.js +0 -131
- package/lib/module/integrations/blank-stack/components/Header.js.map +0 -1
- package/lib/module/integrations/blank-stack/components/Screens.js +0 -58
- package/lib/module/integrations/blank-stack/components/Screens.js.map +0 -1
- package/lib/module/integrations/blank-stack/components/StackView.js +0 -81
- package/lib/module/integrations/blank-stack/components/StackView.js.map +0 -1
- package/lib/module/integrations/blank-stack/navigators/createBlankStackNavigator.js.map +0 -1
- package/lib/module/integrations/blank-stack/providers/screen-transition-provider.js +0 -8
- package/lib/module/integrations/blank-stack/providers/screen-transition-provider.js.map +0 -1
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js +0 -60
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js.map +0 -1
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js.map +0 -1
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js +0 -202
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js.map +0 -1
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_types.js.map +0 -1
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js.map +0 -1
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js.map +0 -1
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js +0 -10
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js.map +0 -1
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js.map +0 -1
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js.map +0 -1
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/index.js +0 -60
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/index.js.map +0 -1
- package/lib/module/integrations/native-stack/navigators/createNativeStackNavigator.js.map +0 -1
- package/lib/module/integrations/native-stack/providers/screen-transition-provider.js +0 -6
- package/lib/module/integrations/native-stack/providers/screen-transition-provider.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/create-screen-transition-provider.js +0 -34
- package/lib/module/providers/create-screen-transition-provider.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/transition-styles.js +0 -58
- 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/blank-stack.navigator.js +0 -4
- package/lib/module/types/blank-stack.navigator.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/native-stack.navigator.js +0 -4
- package/lib/module/types/native-stack.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.blank.d.ts +0 -7
- package/lib/typescript/components/controllers/screen-lifecycle.blank.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 +0 -7
- 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 -1327
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/integrations/blank-stack/components/Header.d.ts +0 -5
- package/lib/typescript/integrations/blank-stack/components/Header.d.ts.map +0 -1
- package/lib/typescript/integrations/blank-stack/components/Screens.d.ts.map +0 -1
- package/lib/typescript/integrations/blank-stack/components/StackView.d.ts.map +0 -1
- package/lib/typescript/integrations/blank-stack/navigators/createBlankStackNavigator.d.ts +0 -16
- package/lib/typescript/integrations/blank-stack/navigators/createBlankStackNavigator.d.ts.map +0 -1
- package/lib/typescript/integrations/blank-stack/providers/screen-transition-provider.d.ts +0 -8
- package/lib/typescript/integrations/blank-stack/providers/screen-transition-provider.d.ts.map +0 -1
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.d.ts.map +0 -1
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.d.ts.map +0 -1
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.d.ts +0 -20
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.d.ts.map +0 -1
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_types.d.ts +0 -22
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_types.d.ts.map +0 -1
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.d.ts +0 -3
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.d.ts.map +0 -1
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.d.ts +0 -4
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.d.ts.map +0 -1
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.d.ts +0 -4
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.d.ts.map +0 -1
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.d.ts.map +0 -1
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.d.ts.map +0 -1
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/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/providers/screen-transition-provider.d.ts +0 -8
- package/lib/typescript/integrations/native-stack/providers/screen-transition-provider.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/create-screen-transition-provider.d.ts +0 -18
- package/lib/typescript/providers/create-screen-transition-provider.d.ts.map +0 -1
- package/lib/typescript/providers/gestures.d.ts.map +0 -1
- package/lib/typescript/providers/keys.d.ts +0 -18
- package/lib/typescript/providers/keys.d.ts.map +0 -1
- package/lib/typescript/providers/transition-styles.d.ts +0 -12
- 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/blank-stack.navigator.d.ts +0 -214
- package/lib/typescript/types/blank-stack.navigator.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/native-stack.navigator.d.ts +0 -691
- package/lib/typescript/types/native-stack.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.blank.ts +0 -62
- package/src/components/controllers/screen-lifecycle.tsx +0 -78
- package/src/components/root-transition-aware.tsx +0 -44
- package/src/constants.ts +0 -108
- package/src/hooks/animation/use-screen-animation.tsx +0 -157
- 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 -45
- package/src/integrations/blank-stack/components/Header.tsx +0 -141
- package/src/integrations/blank-stack/components/Screens.tsx +0 -96
- package/src/integrations/blank-stack/components/StackView.tsx +0 -100
- package/src/integrations/blank-stack/navigators/createBlankStackNavigator.tsx +0 -111
- package/src/integrations/blank-stack/providers/screen-transition-provider.tsx +0 -9
- package/src/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.tsx +0 -62
- package/src/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.tsx +0 -280
- package/src/integrations/blank-stack/utils/with-stack-navigation/_types.ts +0 -35
- package/src/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.ts +0 -15
- package/src/integrations/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.ts +0 -29
- package/src/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.ts +0 -17
- package/src/integrations/blank-stack/utils/with-stack-navigation/index.tsx +0 -80
- package/src/integrations/native-stack/navigators/createNativeStackNavigator.tsx +0 -112
- package/src/integrations/native-stack/providers/screen-transition-provider.tsx +0 -8
- 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/create-screen-transition-provider.tsx +0 -55
- package/src/providers/keys.tsx +0 -50
- package/src/providers/transition-styles.tsx +0 -76
- 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/blank-stack.navigator.ts +0 -266
- package/src/types/core.ts +0 -50
- package/src/types/native-stack.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/blank-stack → blank-stack}/navigators/createBlankStackNavigator.js +0 -0
- /package/lib/commonjs/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_hooks/use-previous.js +0 -0
- /package/lib/commonjs/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_types.js +0 -0
- /package/lib/commonjs/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_utils/are-descriptors-equal.js +0 -0
- /package/lib/commonjs/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js +0 -0
- /package/lib/commonjs/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_utils/have-same-route-keys.js +0 -0
- /package/lib/commonjs/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_utils/routes-are-identical.js +0 -0
- /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/{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/blank-stack → blank-stack}/navigators/createBlankStackNavigator.js +0 -0
- /package/lib/module/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_hooks/use-previous.js +0 -0
- /package/lib/module/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_types.js +0 -0
- /package/lib/module/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_utils/are-descriptors-equal.js +0 -0
- /package/lib/module/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js +0 -0
- /package/lib/module/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_utils/have-same-route-keys.js +0 -0
- /package/lib/module/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_utils/routes-are-identical.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/{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/blank-stack → blank-stack}/components/Screens.d.ts +0 -0
- /package/lib/typescript/{integrations/blank-stack → blank-stack}/components/StackView.d.ts +0 -0
- /package/lib/typescript/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_hooks/use-closing-route-keys.d.ts +0 -0
- /package/lib/typescript/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_hooks/use-previous.d.ts +0 -0
- /package/lib/typescript/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_utils/have-same-route-keys.d.ts +0 -0
- /package/lib/typescript/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_utils/routes-are-identical.d.ts +0 -0
- /package/lib/typescript/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/index.d.ts +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}/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/{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/blank-stack → blank-stack}/utils/with-stack-navigation/_hooks/use-previous.tsx +0 -0
- /package/src/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_utils/have-same-route-keys.ts +0 -0
- /package/src/{integrations/blank-stack → blank-stack}/utils/with-stack-navigation/_utils/routes-are-identical.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/{__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/{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
package/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# react-native-screen-transitions
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
|
5
|
-
|---|---|
|
|
3
|
+
| iOS | Android |
|
|
4
|
+
| --------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
6
5
|
| <video src="https://github.com/user-attachments/assets/c0d17b8f-7268-421c-9051-e242f8ddca76" width="300" height="600" controls></video> | <video src="https://github.com/user-attachments/assets/3f8d5fb1-96d2-4fe3-860d-62f6fb5a687e" width="300" controls></video> |
|
|
7
6
|
|
|
8
7
|
## ✨ Features
|
|
@@ -16,6 +15,7 @@
|
|
|
16
15
|
- 🎭 **Ready-Made Presets** – Instagram, Apple Music, X (Twitter) style transitions included
|
|
17
16
|
|
|
18
17
|
## Installation
|
|
18
|
+
|
|
19
19
|
```bash
|
|
20
20
|
npm install react-native-screen-transitions
|
|
21
21
|
# or
|
|
@@ -25,6 +25,7 @@ bun add react-native-screen-transitions
|
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Peer Dependencies
|
|
28
|
+
|
|
28
29
|
```bash
|
|
29
30
|
npm install react-native-reanimated react-native-gesture-handler \
|
|
30
31
|
@react-navigation/native @react-navigation/native-stack \
|
|
@@ -66,7 +67,7 @@ If you’re using **React Navigation** directly (not Expo Router), the navigator
|
|
|
66
67
|
No extra setup is required—just import and use as usual:
|
|
67
68
|
|
|
68
69
|
```tsx
|
|
69
|
-
import { createNativeStackNavigator } from
|
|
70
|
+
import { createNativeStackNavigator } from "react-native-screen-transitions";
|
|
70
71
|
|
|
71
72
|
const Stack = createNativeStackNavigator();
|
|
72
73
|
|
|
@@ -78,31 +79,30 @@ const Stack = createNativeStackNavigator();
|
|
|
78
79
|
This package ships an **extended native stack** built on top of React Navigation’s native stack.
|
|
79
80
|
All the usual native-stack options are available, plus the following extras:
|
|
80
81
|
|
|
81
|
-
| Option
|
|
82
|
-
|
|
83
|
-
| `enableTransitions`
|
|
84
|
-
| `screenStyleInterpolator` | `ScreenStyleInterpolator`
|
|
85
|
-
| `transitionSpec`
|
|
86
|
-
| `gestureEnabled`
|
|
87
|
-
| `gestureDirection`
|
|
88
|
-
| `gestureVelocityImpact`
|
|
89
|
-
| `gestureResponseDistance` | `number`
|
|
90
|
-
| `gestureDrivesProgress`
|
|
91
|
-
| `gestureActivationArea`
|
|
82
|
+
| Option | Type | Description |
|
|
83
|
+
| ------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------- | --------------------------- | ----- | --- | -------------- | ------------ |
|
|
84
|
+
| `enableTransitions` | `boolean` | Switches the screen to a transparent modal and disables the header so custom transitions can take over. |
|
|
85
|
+
| `screenStyleInterpolator` | `ScreenStyleInterpolator` | Function that returns animated styles based on transition progress. |
|
|
86
|
+
| `transitionSpec` | `TransitionSpec` | Reanimated timing/spring config for open/close animations. |
|
|
87
|
+
| `gestureEnabled` | `boolean` | Whether swipe-to-dismiss is allowed. |
|
|
88
|
+
| `gestureDirection` | `GestureDirection \| GestureDirection[]` | Allowed swipe directions (`vertical`, `horizontal`, etc.). |
|
|
89
|
+
| `gestureVelocityImpact` | `number` | How much the gesture’s velocity affects dismissal. |
|
|
90
|
+
| `gestureResponseDistance` | `number` | Distance from screen where the gesture is recognized. |
|
|
91
|
+
| `gestureDrivesProgress` | `boolean` | Whether the gesture directly drives the transition progress. |
|
|
92
|
+
| `gestureActivationArea` | `GestureActivationArea` | Where a gesture may start. `'edge' | 'screen'`or per-side`{ left | right | top | bottom: 'edge' | 'screen' }`. |
|
|
92
93
|
|
|
93
94
|
### Renamed native options (extended stack)
|
|
94
95
|
|
|
95
96
|
To avoid collisions with the new options above, the built-in React Navigation gesture props are renamed:
|
|
96
97
|
|
|
97
|
-
| React Navigation prop
|
|
98
|
-
|
|
99
|
-
| `gestureDirection`
|
|
100
|
-
| `gestureEnabled`
|
|
98
|
+
| React Navigation prop | Renamed to |
|
|
99
|
+
| ------------------------- | ------------------------------- |
|
|
100
|
+
| `gestureDirection` | `nativeGestureDirection` |
|
|
101
|
+
| `gestureEnabled` | `nativeGestureEnabled` |
|
|
101
102
|
| `gestureResponseDistance` | `nativeGestureResponseDistance` |
|
|
102
103
|
|
|
103
104
|
All other React Navigation native-stack options keep their original names.
|
|
104
105
|
|
|
105
|
-
|
|
106
106
|
## Creating your screen animations
|
|
107
107
|
|
|
108
108
|
### Using presets
|
|
@@ -112,22 +112,20 @@ The incoming screen automatically controls the previous screen.
|
|
|
112
112
|
|
|
113
113
|
```tsx
|
|
114
114
|
<Stack>
|
|
115
|
-
<Stack.Screen
|
|
116
|
-
name="a"
|
|
117
|
-
/>
|
|
115
|
+
<Stack.Screen name="a" />
|
|
118
116
|
<Stack.Screen
|
|
119
117
|
name="b"
|
|
120
118
|
options={{
|
|
121
|
-
...Transition.
|
|
119
|
+
...Transition.Presets.SlideFromTop(),
|
|
122
120
|
}}
|
|
123
121
|
/>
|
|
124
122
|
<Stack.Screen
|
|
125
123
|
name="c"
|
|
126
124
|
options={{
|
|
127
|
-
...Transition.
|
|
125
|
+
...Transition.Presets.SlideFromBottom(),
|
|
128
126
|
}}
|
|
129
127
|
/>
|
|
130
|
-
|
|
128
|
+
</Stack>
|
|
131
129
|
```
|
|
132
130
|
|
|
133
131
|
#### Shared element presets (new)
|
|
@@ -139,7 +137,7 @@ Ready-made presets for common shared-element patterns. These leverage the bounds
|
|
|
139
137
|
<Stack.Screen
|
|
140
138
|
name="post"
|
|
141
139
|
options={{
|
|
142
|
-
...Transition.
|
|
140
|
+
...Transition.Presets.SharedIGImage(),
|
|
143
141
|
}}
|
|
144
142
|
/>
|
|
145
143
|
```
|
|
@@ -151,6 +149,7 @@ Other presets: `SharedAppleMusic()`, `SharedXImage()`.
|
|
|
151
149
|
> **⚠️ Important**: These presets require native code and **will not work in Expo Go**. You must use a development build.
|
|
152
150
|
|
|
153
151
|
**1. Install the dependency**
|
|
152
|
+
|
|
154
153
|
```bash
|
|
155
154
|
# Expo projects
|
|
156
155
|
npx expo install @react-native-masked-view/masked-view
|
|
@@ -161,6 +160,7 @@ cd ios && pod install # iOS only
|
|
|
161
160
|
```
|
|
162
161
|
|
|
163
162
|
**2. Create a development build** (if using Expo)
|
|
163
|
+
|
|
164
164
|
```bash
|
|
165
165
|
npx expo run:ios
|
|
166
166
|
# or
|
|
@@ -168,10 +168,11 @@ npx expo run:android
|
|
|
168
168
|
```
|
|
169
169
|
|
|
170
170
|
**3. Wrap your destination screen**
|
|
171
|
+
|
|
171
172
|
```tsx
|
|
172
173
|
export default function PostScreen() {
|
|
173
174
|
return (
|
|
174
|
-
<Transition.MaskedView style={{ flex: 1, backgroundColor:
|
|
175
|
+
<Transition.MaskedView style={{ flex: 1, backgroundColor: "white" }}>
|
|
175
176
|
{/* screen content, including the destination bound */}
|
|
176
177
|
</Transition.MaskedView>
|
|
177
178
|
);
|
|
@@ -200,16 +201,17 @@ Instead of presets, you can define a custom transition directly on the screen's
|
|
|
200
201
|
- `isActiveTransitioning` – whether the active screen is currently transitioning (either being dragged or animating).
|
|
201
202
|
- `isDismissing` – whether the active screen is in the process of being dismissed/closed.
|
|
202
203
|
|
|
203
|
-
|
|
204
204
|
```tsx
|
|
205
|
-
import { interpolate } from
|
|
205
|
+
import { interpolate } from "react-native-reanimated";
|
|
206
206
|
|
|
207
207
|
<Stack.Screen
|
|
208
208
|
name="b"
|
|
209
209
|
options={{
|
|
210
210
|
enableTransitions: true,
|
|
211
211
|
screenStyleInterpolator: ({
|
|
212
|
-
layouts: {
|
|
212
|
+
layouts: {
|
|
213
|
+
screen: { width },
|
|
214
|
+
},
|
|
213
215
|
progress,
|
|
214
216
|
}) => {
|
|
215
217
|
"worklet";
|
|
@@ -222,11 +224,11 @@ import { interpolate } from 'react-native-reanimated'
|
|
|
222
224
|
};
|
|
223
225
|
},
|
|
224
226
|
transitionSpec: {
|
|
225
|
-
close: Transition.
|
|
226
|
-
open: Transition.
|
|
227
|
+
close: Transition.Specs.DefaultSpec,
|
|
228
|
+
open: Transition.Specs.DefaultSpec,
|
|
227
229
|
},
|
|
228
230
|
}}
|
|
229
|
-
|
|
231
|
+
/>;
|
|
230
232
|
```
|
|
231
233
|
|
|
232
234
|
In this example the incoming screen slides in from the right while the exiting screen slides out to the left.
|
|
@@ -236,16 +238,21 @@ In this example the incoming screen slides in from the right while the exiting s
|
|
|
236
238
|
For per-screen control, import the `useScreenAnimation` hook and compose your own animated styles.
|
|
237
239
|
|
|
238
240
|
```tsx
|
|
239
|
-
import { useScreenAnimation } from
|
|
240
|
-
import Animated, {
|
|
241
|
+
import { useScreenAnimation } from "react-native-screen-transitions";
|
|
242
|
+
import Animated, {
|
|
243
|
+
useAnimatedStyle,
|
|
244
|
+
interpolate,
|
|
245
|
+
} from "react-native-reanimated";
|
|
241
246
|
|
|
242
247
|
export default function BScreen() {
|
|
243
248
|
const props = useScreenAnimation();
|
|
244
249
|
|
|
245
250
|
const animatedStyle = useAnimatedStyle(() => {
|
|
246
|
-
const {
|
|
251
|
+
const {
|
|
252
|
+
current: { progress },
|
|
253
|
+
} = props.value;
|
|
247
254
|
return {
|
|
248
|
-
opacity: progress
|
|
255
|
+
opacity: progress,
|
|
249
256
|
};
|
|
250
257
|
});
|
|
251
258
|
|
|
@@ -263,8 +270,8 @@ You can drag a screen away even when it contains a scroll view.
|
|
|
263
270
|
Just swap the regular scrollable for a transition-aware one:
|
|
264
271
|
|
|
265
272
|
```tsx
|
|
266
|
-
import Transition from
|
|
267
|
-
import { LegendList } from "@legendapp/list"
|
|
273
|
+
import Transition from "react-native-screen-transitions";
|
|
274
|
+
import { LegendList } from "@legendapp/list";
|
|
268
275
|
import { FlashList } from "@shopify/flash-list";
|
|
269
276
|
|
|
270
277
|
// Drop-in replacements
|
|
@@ -272,11 +279,15 @@ const ScrollView = Transition.ScrollView;
|
|
|
272
279
|
const FlatList = Transition.FlatList;
|
|
273
280
|
|
|
274
281
|
// Or wrap any list you like
|
|
275
|
-
const TransitionFlashList =
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
282
|
+
const TransitionFlashList = Transition.createTransitionAwareComponent(
|
|
283
|
+
FlashList,
|
|
284
|
+
{ isScrollable: true }
|
|
285
|
+
);
|
|
286
|
+
|
|
287
|
+
const TransitionLegendList = Transition.createTransitionAwareComponent(
|
|
288
|
+
LegendList,
|
|
289
|
+
{ isScrollable: true }
|
|
290
|
+
);
|
|
280
291
|
```
|
|
281
292
|
|
|
282
293
|
Enable the gesture on the screen:
|
|
@@ -287,7 +298,7 @@ Enable the gesture on the screen:
|
|
|
287
298
|
options={{
|
|
288
299
|
enableTransitions: true,
|
|
289
300
|
gestureEnabled: true,
|
|
290
|
-
gestureDirection:
|
|
301
|
+
gestureDirection: "vertical", // or 'horizontal', ['vertical', 'horizontal'], etc.
|
|
291
302
|
}}
|
|
292
303
|
/>
|
|
293
304
|
```
|
|
@@ -296,11 +307,7 @@ Use it in the screen:
|
|
|
296
307
|
|
|
297
308
|
```tsx
|
|
298
309
|
export default function B() {
|
|
299
|
-
return
|
|
300
|
-
<Transition.ScrollView>
|
|
301
|
-
{/* content */}
|
|
302
|
-
</Transition.ScrollView>
|
|
303
|
-
);
|
|
310
|
+
return <Transition.ScrollView>{/* content */}</Transition.ScrollView>;
|
|
304
311
|
}
|
|
305
312
|
```
|
|
306
313
|
|
|
@@ -332,9 +339,9 @@ Bounds let you animate any component between two screens by measuring its start
|
|
|
332
339
|
|
|
333
340
|
**Current Implementation:** For bounds to be measured, a `Transition.Pressable` must have both an `onPress` handler and a `sharedBoundTag`. When pressed, it triggers measurement. If the `Transition.Pressable` has children with `sharedBoundTag`s, those children are automatically measured and stored as well.
|
|
334
341
|
|
|
335
|
-
|
|
342
|
+
_Note: This measurement trigger mechanism may change in future versions._
|
|
336
343
|
|
|
337
|
-
1
|
|
344
|
+
1. Tag source and destination with pressable triggers
|
|
338
345
|
|
|
339
346
|
```tsx
|
|
340
347
|
// Source screen
|
|
@@ -356,12 +363,12 @@ Bounds let you animate any component between two screens by measuring its start
|
|
|
356
363
|
</Transition.Pressable>
|
|
357
364
|
```
|
|
358
365
|
|
|
359
|
-
2
|
|
366
|
+
2. Children are automatically measured
|
|
360
367
|
|
|
361
368
|
```tsx
|
|
362
369
|
<Transition.Pressable
|
|
363
370
|
sharedBoundTag="card"
|
|
364
|
-
onPress={() => router.push(
|
|
371
|
+
onPress={() => router.push("/detail")}
|
|
365
372
|
>
|
|
366
373
|
{/* These children will be automatically measured when parent is pressed */}
|
|
367
374
|
<Transition.View sharedBoundTag="title">
|
|
@@ -373,26 +380,26 @@ Bounds let you animate any component between two screens by measuring its start
|
|
|
373
380
|
</Transition.Pressable>
|
|
374
381
|
```
|
|
375
382
|
|
|
376
|
-
3
|
|
383
|
+
3. Drive the animation with the object API
|
|
377
384
|
|
|
378
385
|
```tsx
|
|
379
386
|
screenStyleInterpolator: ({ activeBoundId, bounds }) => {
|
|
380
387
|
"worklet";
|
|
381
388
|
|
|
382
389
|
const styles = bounds({
|
|
383
|
-
method: "transform",
|
|
384
|
-
space: "relative",
|
|
385
|
-
scaleMode: "match",
|
|
386
|
-
anchor: "center",
|
|
390
|
+
method: "transform", // "transform" | "size" | "content"
|
|
391
|
+
space: "relative", // "relative" | "absolute"
|
|
392
|
+
scaleMode: "match", // "match" | "none" | "uniform"
|
|
393
|
+
anchor: "center", // see anchors below
|
|
387
394
|
// target: "bound" | "fullscreen" | { x, y, width, height, pageX, pageY }
|
|
388
395
|
// gestures: { x?: number; y?: number }
|
|
389
396
|
});
|
|
390
397
|
|
|
391
398
|
return { [activeBoundId]: styles };
|
|
392
|
-
}
|
|
399
|
+
};
|
|
393
400
|
```
|
|
394
401
|
|
|
395
|
-
3
|
|
402
|
+
3. Raw values when you need them
|
|
396
403
|
|
|
397
404
|
```tsx
|
|
398
405
|
const raw = bounds({ method: "transform", raw: true });
|
|
@@ -402,7 +409,12 @@ const raw = bounds({ method: "transform", raw: true });
|
|
|
402
409
|
Or for size/content methods:
|
|
403
410
|
|
|
404
411
|
```tsx
|
|
405
|
-
const toSize = bounds({
|
|
412
|
+
const toSize = bounds({
|
|
413
|
+
method: "size",
|
|
414
|
+
target: "fullscreen",
|
|
415
|
+
space: "absolute",
|
|
416
|
+
raw: true,
|
|
417
|
+
});
|
|
406
418
|
// { width, height, translateX, translateY }
|
|
407
419
|
|
|
408
420
|
const content = bounds({ method: "content", raw: true });
|
|
@@ -432,7 +444,7 @@ Quick access: `bounds.get()`
|
|
|
432
444
|
Use `bounds.get(id?, phase?)` to retrieve raw measurements and the resolved style for any bound in a given phase (`current`, `next`, `previous`).
|
|
433
445
|
|
|
434
446
|
```tsx
|
|
435
|
-
const { bounds: metrics, styles } = bounds.get(
|
|
447
|
+
const { bounds: metrics, styles } = bounds.get("hero", "current");
|
|
436
448
|
```
|
|
437
449
|
|
|
438
450
|
## Animating individual components with `styleId`
|
|
@@ -442,7 +454,10 @@ Use `styleId` to animate a single view inside a screen.
|
|
|
442
454
|
1. Tag the element:
|
|
443
455
|
|
|
444
456
|
```tsx
|
|
445
|
-
<Transition.View
|
|
457
|
+
<Transition.View
|
|
458
|
+
styleId="fade-box"
|
|
459
|
+
style={{ width: 100, height: 100, backgroundColor: "crimson" }}
|
|
460
|
+
/>
|
|
446
461
|
```
|
|
447
462
|
|
|
448
463
|
2. Drive it from the interpolator:
|
|
@@ -452,9 +467,9 @@ screenStyleInterpolator: ({ progress }) => {
|
|
|
452
467
|
"worklet";
|
|
453
468
|
|
|
454
469
|
return {
|
|
455
|
-
|
|
456
|
-
opacity: interpolate(progress, [0, 1, 2],[0, 1, 0])
|
|
457
|
-
}
|
|
470
|
+
"fade-box": {
|
|
471
|
+
opacity: interpolate(progress, [0, 1, 2], [0, 1, 0]),
|
|
472
|
+
},
|
|
458
473
|
};
|
|
459
474
|
};
|
|
460
475
|
```
|
|
@@ -465,7 +480,6 @@ The red square fades in as the screen opens.
|
|
|
465
480
|
|
|
466
481
|
- **Delayed Touch Events** – There’s a noticeable delay in touch events when the transition is finished. If this affects your app, please hold off on using this package until a fix is available.
|
|
467
482
|
|
|
468
|
-
|
|
469
483
|
## Support and Development
|
|
470
484
|
|
|
471
485
|
This package is provided as-is and is developed in my free time. While I strive to maintain and improve it, please understand that:
|
|
@@ -476,10 +490,10 @@ This package is provided as-is and is developed in my free time. While I strive
|
|
|
476
490
|
I apologize for any inconvenience this may cause. If you encounter issues or have suggestions, please feel free to open an issue on the repository.
|
|
477
491
|
|
|
478
492
|
### Support the project
|
|
493
|
+
|
|
479
494
|
I’ve estimated I downed around 60 cups of coffee while building this.
|
|
480
495
|
If you’d like to fuel the next release, [buy me a coffee](https://buymeacoffee.com/trpfsu)
|
|
481
496
|
|
|
482
|
-
|
|
483
|
-
|
|
484
497
|
## License
|
|
498
|
+
|
|
485
499
|
MIT
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Overlay = void 0;
|
|
7
|
+
var _native = require("@react-navigation/native");
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _reactNative = require("react-native");
|
|
10
|
+
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
11
|
+
var _keys = require("../../shared/providers/keys");
|
|
12
|
+
var _useOverlayAnimation = require("../hooks/use-overlay-animation");
|
|
13
|
+
var _withStackNavigation = require("../utils/with-stack-navigation");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
const getActiveFloatOverlay = (scenes, index) => {
|
|
16
|
+
for (let i = index; i >= 0; i--) {
|
|
17
|
+
const scene = scenes[i];
|
|
18
|
+
const options = scene?.descriptor?.options;
|
|
19
|
+
if (options?.overlayMode === "float" && options?.overlayShown) {
|
|
20
|
+
return {
|
|
21
|
+
scene,
|
|
22
|
+
overlayIndex: i
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
};
|
|
28
|
+
const OverlayHost = ({
|
|
29
|
+
scene,
|
|
30
|
+
isFloating
|
|
31
|
+
}) => {
|
|
32
|
+
const insets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
|
|
33
|
+
const OverlayComponent = scene.descriptor.options.overlay;
|
|
34
|
+
const {
|
|
35
|
+
animation,
|
|
36
|
+
optimisticActiveIndex
|
|
37
|
+
} = (0, _useOverlayAnimation.useOverlayAnimation)();
|
|
38
|
+
if (!OverlayComponent) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
const overlayProps = {
|
|
42
|
+
route: scene.route,
|
|
43
|
+
navigation: scene.descriptor.navigation,
|
|
44
|
+
animation,
|
|
45
|
+
focusedIndex: optimisticActiveIndex,
|
|
46
|
+
insets
|
|
47
|
+
};
|
|
48
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
49
|
+
pointerEvents: "box-none",
|
|
50
|
+
style: [styles.container, isFloating ? styles.floating : null, styles.absolute],
|
|
51
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_native.NavigationContext.Provider, {
|
|
52
|
+
value: scene.descriptor.navigation,
|
|
53
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_native.NavigationRouteContext.Provider, {
|
|
54
|
+
value: scene.route,
|
|
55
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
56
|
+
pointerEvents: "box-none",
|
|
57
|
+
style: styles.overlay,
|
|
58
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(OverlayComponent, {
|
|
59
|
+
...overlayProps
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
const FloatOverlay = () => {
|
|
67
|
+
const {
|
|
68
|
+
scenes,
|
|
69
|
+
focusedIndex
|
|
70
|
+
} = (0, _withStackNavigation.useStackNavigationContext)();
|
|
71
|
+
const activeOverlay = (0, _react.useMemo)(() => getActiveFloatOverlay(scenes, focusedIndex), [scenes, focusedIndex]);
|
|
72
|
+
if (!activeOverlay) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
const {
|
|
76
|
+
scene,
|
|
77
|
+
overlayIndex
|
|
78
|
+
} = activeOverlay;
|
|
79
|
+
const previous = scenes[overlayIndex - 1]?.descriptor;
|
|
80
|
+
const current = scene.descriptor;
|
|
81
|
+
const next = scenes[overlayIndex + 1]?.descriptor;
|
|
82
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_keys.KeysProvider, {
|
|
83
|
+
current: current,
|
|
84
|
+
previous: previous,
|
|
85
|
+
next: next,
|
|
86
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(OverlayHost, {
|
|
87
|
+
scene: scene,
|
|
88
|
+
isFloating: true
|
|
89
|
+
})
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
const ScreenOverlay = () => {
|
|
93
|
+
const {
|
|
94
|
+
focusedIndex
|
|
95
|
+
} = (0, _withStackNavigation.useStackNavigationContext)();
|
|
96
|
+
const {
|
|
97
|
+
current
|
|
98
|
+
} = (0, _keys.useKeys)();
|
|
99
|
+
const options = current.options;
|
|
100
|
+
if (!options.overlayShown || options.overlayMode !== "screen") {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
const scene = {
|
|
104
|
+
descriptor: current,
|
|
105
|
+
route: current.route
|
|
106
|
+
};
|
|
107
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(OverlayHost, {
|
|
108
|
+
scene: scene
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
const Overlay = exports.Overlay = {
|
|
112
|
+
Float: FloatOverlay,
|
|
113
|
+
Screen: ScreenOverlay
|
|
114
|
+
};
|
|
115
|
+
const styles = _reactNative.StyleSheet.create({
|
|
116
|
+
overlay: {
|
|
117
|
+
..._reactNative.StyleSheet.absoluteFillObject,
|
|
118
|
+
zIndex: 1
|
|
119
|
+
},
|
|
120
|
+
container: {
|
|
121
|
+
flex: 1
|
|
122
|
+
},
|
|
123
|
+
absolute: _reactNative.StyleSheet.absoluteFillObject,
|
|
124
|
+
floating: {
|
|
125
|
+
zIndex: 1000
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
//# sourceMappingURL=Overlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_native","require","_react","_reactNative","_reactNativeSafeAreaContext","_keys","_useOverlayAnimation","_withStackNavigation","_jsxRuntime","getActiveFloatOverlay","scenes","index","i","scene","options","descriptor","overlayMode","overlayShown","overlayIndex","OverlayHost","isFloating","insets","useSafeAreaInsets","OverlayComponent","overlay","animation","optimisticActiveIndex","useOverlayAnimation","overlayProps","route","navigation","focusedIndex","jsx","Animated","View","pointerEvents","style","styles","container","floating","absolute","children","NavigationContext","Provider","value","NavigationRouteContext","FloatOverlay","useStackNavigationContext","activeOverlay","useMemo","previous","current","next","KeysProvider","ScreenOverlay","useKeys","Overlay","exports","Float","Screen","StyleSheet","create","absoluteFillObject","zIndex","flex"],"sourceRoot":"../../../../src","sources":["blank-stack/components/Overlay.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Screen = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
9
|
+
var _reactNativeScreens = require("react-native-screens");
|
|
10
|
+
var _animationStore = require("../../shared/stores/animation-store");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
|
+
const EPSILON = 1e-5;
|
|
14
|
+
const STATE_INACTIVE = 0;
|
|
15
|
+
const STATE_TRANSITIONING_OR_BELOW_TOP = 1;
|
|
16
|
+
const STATE_ON_TOP = 2;
|
|
17
|
+
const AnimatedScreen = _reactNativeReanimated.default.createAnimatedComponent(_reactNativeScreens.Screen);
|
|
18
|
+
const Screen = ({
|
|
19
|
+
routeKey,
|
|
20
|
+
index,
|
|
21
|
+
routes,
|
|
22
|
+
isPreloaded,
|
|
23
|
+
activeScreensLimit,
|
|
24
|
+
children,
|
|
25
|
+
freezeOnBlur,
|
|
26
|
+
shouldFreeze
|
|
27
|
+
}) => {
|
|
28
|
+
const sceneProgress = _animationStore.AnimationStore.getAnimation(routeKey, "progress");
|
|
29
|
+
const screenActivity = (0, _reactNativeReanimated.useSharedValue)(1);
|
|
30
|
+
(0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
31
|
+
if (!sceneProgress) {
|
|
32
|
+
screenActivity.value = STATE_TRANSITIONING_OR_BELOW_TOP;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (index < routes.length - activeScreensLimit - 1 || isPreloaded) {
|
|
36
|
+
screenActivity.value = STATE_INACTIVE;
|
|
37
|
+
} else {
|
|
38
|
+
const outputValue = index === routes.length - 1 ? STATE_ON_TOP : index >= routes.length - activeScreensLimit ? STATE_TRANSITIONING_OR_BELOW_TOP : STATE_INACTIVE;
|
|
39
|
+
const v = (0, _reactNativeReanimated.interpolate)(sceneProgress.value, [0, 1 - EPSILON, 1], [1, 1, outputValue], "clamp");
|
|
40
|
+
const next = Math.trunc(v) ?? STATE_TRANSITIONING_OR_BELOW_TOP;
|
|
41
|
+
|
|
42
|
+
// avoid spamming JS thread
|
|
43
|
+
if (next !== screenActivity.value) {
|
|
44
|
+
screenActivity.value = next;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const animatedProps = (0, _reactNativeReanimated.useAnimatedProps)(() => {
|
|
49
|
+
return {
|
|
50
|
+
activityState: screenActivity.value,
|
|
51
|
+
shouldFreeze: screenActivity.value === STATE_INACTIVE && shouldFreeze
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedScreen, {
|
|
55
|
+
enabled: true,
|
|
56
|
+
style: _reactNative.StyleSheet.absoluteFill,
|
|
57
|
+
pointerEvents: "box-none",
|
|
58
|
+
freezeOnBlur: freezeOnBlur,
|
|
59
|
+
animatedProps: animatedProps,
|
|
60
|
+
children: children
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
exports.Screen = Screen;
|
|
64
|
+
//# sourceMappingURL=Screens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativeReanimated","_interopRequireWildcard","_reactNativeScreens","_animationStore","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","EPSILON","STATE_INACTIVE","STATE_TRANSITIONING_OR_BELOW_TOP","STATE_ON_TOP","AnimatedScreen","Animated","createAnimatedComponent","RNSScreen","Screen","routeKey","index","routes","isPreloaded","activeScreensLimit","children","freezeOnBlur","shouldFreeze","sceneProgress","AnimationStore","getAnimation","screenActivity","useSharedValue","useDerivedValue","value","length","outputValue","v","interpolate","next","Math","trunc","animatedProps","useAnimatedProps","activityState","jsx","enabled","style","StyleSheet","absoluteFill","pointerEvents","exports"],"sourceRoot":"../../../../src","sources":["blank-stack/components/Screens.tsx"],"mappings":"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","ignoreList":[]}
|