react-native-screen-transitions 2.4.2 → 3.0.0-beta.1
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 +140 -0
- package/lib/commonjs/blank-stack/components/Overlay.js.map +1 -0
- package/lib/commonjs/blank-stack/components/Screens.js +64 -0
- package/lib/commonjs/blank-stack/components/Screens.js.map +1 -0
- package/lib/commonjs/blank-stack/components/StackView.js +87 -0
- package/lib/commonjs/blank-stack/components/StackView.js.map +1 -0
- package/lib/commonjs/blank-stack/hooks/use-overlay-animation.js +77 -0
- package/lib/commonjs/blank-stack/hooks/use-overlay-animation.js.map +1 -0
- package/lib/commonjs/blank-stack/index.js +13 -0
- package/lib/commonjs/blank-stack/index.js.map +1 -0
- package/lib/commonjs/blank-stack/navigators/createBlankStackNavigator.js +68 -0
- package/lib/commonjs/blank-stack/navigators/createBlankStackNavigator.js.map +1 -0
- package/lib/commonjs/blank-stack/types.js +6 -0
- package/lib/commonjs/blank-stack/types.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js +72 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js +16 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js +196 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_types.js +6 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_types.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js +15 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js +23 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js +25 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js +14 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js +13 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js.map +1 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/index.js +66 -0
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/index.js.map +1 -0
- package/lib/commonjs/native-stack/index.js +13 -0
- package/lib/commonjs/native-stack/index.js.map +1 -0
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -0
- package/lib/commonjs/native-stack/types.js +6 -0
- package/lib/commonjs/native-stack/types.js.map +1 -0
- package/lib/commonjs/native-stack/utils/debounce.js.map +1 -0
- package/lib/commonjs/native-stack/utils/getModalRoutesKeys.js.map +1 -0
- package/lib/commonjs/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -0
- package/lib/commonjs/native-stack/utils/useDismissedRouteError.js.map +1 -0
- package/lib/commonjs/native-stack/utils/useInvalidPreventRemoveError.js.map +1 -0
- package/lib/commonjs/native-stack/views/FontProcessor.js.map +1 -0
- package/lib/commonjs/native-stack/views/FontProcessor.native.js.map +1 -0
- package/lib/commonjs/native-stack/views/FooterComponent.js.map +1 -0
- package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -0
- package/lib/commonjs/native-stack/views/NativeStackView.native.js +493 -0
- package/lib/commonjs/native-stack/views/NativeStackView.native.js.map +1 -0
- package/lib/commonjs/native-stack/views/useHeaderConfigProps.js.map +1 -0
- package/lib/commonjs/shared/components/controllers/screen-lifecycle.js +128 -0
- package/lib/commonjs/shared/components/controllers/screen-lifecycle.js.map +1 -0
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -0
- package/lib/commonjs/shared/components/integrations/masked-view.js.map +1 -0
- package/lib/commonjs/shared/components/root-transition-aware.js.map +1 -0
- package/lib/commonjs/shared/configs/index.js +22 -0
- package/lib/commonjs/shared/configs/index.js.map +1 -0
- package/lib/commonjs/shared/configs/presets.js.map +1 -0
- package/lib/commonjs/shared/configs/specs.js.map +1 -0
- package/lib/commonjs/shared/constants.js.map +1 -0
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js.map +1 -0
- package/lib/commonjs/shared/hooks/animation/use-screen-animation.js +118 -0
- package/lib/commonjs/shared/hooks/animation/use-screen-animation.js.map +1 -0
- package/lib/commonjs/shared/hooks/bounds/use-bound-registry.js +131 -0
- package/lib/commonjs/shared/hooks/bounds/use-bound-registry.js.map +1 -0
- package/lib/commonjs/shared/hooks/gestures/use-build-gestures.js +236 -0
- package/lib/commonjs/shared/hooks/gestures/use-build-gestures.js.map +1 -0
- package/lib/commonjs/shared/hooks/gestures/use-parent-gesture-registry.js.map +1 -0
- package/lib/commonjs/shared/hooks/gestures/use-scroll-registry.js.map +1 -0
- package/lib/commonjs/shared/hooks/use-shared-value-state.js +25 -0
- package/lib/commonjs/shared/hooks/use-shared-value-state.js.map +1 -0
- package/lib/commonjs/shared/hooks/use-stable-callback-value.js.map +1 -0
- package/lib/commonjs/shared/hooks/use-stable-callback.js.map +1 -0
- package/lib/commonjs/shared/index.js +33 -0
- package/lib/commonjs/shared/index.js.map +1 -0
- package/lib/commonjs/shared/providers/gestures.js.map +1 -0
- package/lib/commonjs/shared/providers/keys.js +34 -0
- package/lib/commonjs/shared/providers/keys.js.map +1 -0
- package/lib/commonjs/shared/providers/screen-transition-provider.js +34 -0
- package/lib/commonjs/shared/providers/screen-transition-provider.js.map +1 -0
- package/lib/commonjs/shared/providers/transition-styles.js.map +1 -0
- package/lib/commonjs/shared/providers/utils/create-provider.js +39 -0
- package/lib/commonjs/shared/providers/utils/create-provider.js.map +1 -0
- package/lib/commonjs/shared/stores/animation-store.js +39 -0
- package/lib/commonjs/shared/stores/animation-store.js.map +1 -0
- package/lib/commonjs/shared/stores/bound-store/_utils.js.map +1 -0
- package/lib/commonjs/shared/stores/bound-store/index.js +116 -0
- package/lib/commonjs/shared/stores/bound-store/index.js.map +1 -0
- package/lib/commonjs/shared/stores/gesture-store.js +39 -0
- package/lib/commonjs/shared/stores/gesture-store.js.map +1 -0
- package/lib/commonjs/shared/stores/navigator-dismiss-state.js.map +1 -0
- package/lib/commonjs/shared/stores/utils/reset-stores-for-screen.js +19 -0
- package/lib/commonjs/shared/stores/utils/reset-stores-for-screen.js.map +1 -0
- package/lib/commonjs/shared/types/animation.js.map +1 -0
- package/lib/commonjs/shared/types/bounds.js.map +1 -0
- package/lib/commonjs/shared/types/core.js.map +1 -0
- package/lib/commonjs/shared/types/gesture.js.map +1 -0
- package/lib/commonjs/shared/types/utils.js.map +1 -0
- package/lib/commonjs/shared/utils/animation/animate.js.map +1 -0
- package/lib/commonjs/shared/utils/animation/derivations.js +39 -0
- package/lib/commonjs/shared/utils/animation/derivations.js.map +1 -0
- package/lib/commonjs/shared/utils/animation/start-screen-transition.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_types/builder.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_types/geometry.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_types/get-bounds.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_utils/flatten-styles.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_utils/geometry.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_utils/get-bounds.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_utils/is-bounds-equal.js +19 -0
- package/lib/commonjs/shared/utils/bounds/_utils/is-bounds-equal.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_utils/style-composers.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/_utils/styles.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/constants.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -0
- package/lib/commonjs/shared/utils/gesture/apply-offset-rules.js.map +1 -0
- package/lib/commonjs/shared/utils/gesture/check-gesture-activation.js.map +1 -0
- package/lib/commonjs/shared/utils/gesture/determine-dismissal.js.map +1 -0
- package/lib/commonjs/shared/utils/gesture/map-gesture-to-progress.js.map +1 -0
- package/lib/commonjs/shared/utils/gesture/reset-gesture-values.js.map +1 -0
- package/lib/commonjs/shared/utils/gesture/velocity.js.map +1 -0
- package/lib/commonjs/shared/utils/reanimated/version.js.map +1 -0
- package/lib/module/blank-stack/components/Overlay.js +136 -0
- package/lib/module/blank-stack/components/Overlay.js.map +1 -0
- package/lib/module/blank-stack/components/Screens.js +58 -0
- package/lib/module/blank-stack/components/Screens.js.map +1 -0
- package/lib/module/blank-stack/components/StackView.js +83 -0
- package/lib/module/blank-stack/components/StackView.js.map +1 -0
- package/lib/module/blank-stack/hooks/use-overlay-animation.js +73 -0
- package/lib/module/blank-stack/hooks/use-overlay-animation.js.map +1 -0
- package/lib/module/blank-stack/index.js +4 -0
- package/lib/module/blank-stack/index.js.map +1 -0
- package/lib/module/blank-stack/navigators/createBlankStackNavigator.js +63 -0
- package/lib/module/blank-stack/navigators/createBlankStackNavigator.js.map +1 -0
- package/lib/module/blank-stack/types.js +4 -0
- package/lib/module/blank-stack/types.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js +66 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js +11 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js +190 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_types.js +4 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_types.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js +10 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js +19 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js +20 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js +9 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js +8 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js.map +1 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/index.js +60 -0
- package/lib/module/blank-stack/utils/with-stack-navigation/index.js.map +1 -0
- package/lib/module/native-stack/index.js +4 -0
- package/lib/module/native-stack/index.js.map +1 -0
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -0
- package/lib/module/native-stack/types.js +4 -0
- package/lib/module/native-stack/types.js.map +1 -0
- package/lib/module/native-stack/utils/debounce.js.map +1 -0
- package/lib/module/native-stack/utils/getModalRoutesKeys.js.map +1 -0
- package/lib/module/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -0
- package/lib/module/native-stack/utils/useDismissedRouteError.js.map +1 -0
- package/lib/module/native-stack/utils/useInvalidPreventRemoveError.js.map +1 -0
- package/lib/module/native-stack/views/FontProcessor.js.map +1 -0
- package/lib/module/native-stack/views/FontProcessor.native.js.map +1 -0
- package/lib/module/native-stack/views/FooterComponent.js.map +1 -0
- package/lib/module/native-stack/views/NativeStackView.js.map +1 -0
- package/lib/module/native-stack/views/NativeStackView.native.js +488 -0
- package/lib/module/native-stack/views/NativeStackView.native.js.map +1 -0
- package/lib/module/native-stack/views/useHeaderConfigProps.js.map +1 -0
- package/lib/module/shared/components/controllers/screen-lifecycle.js +122 -0
- package/lib/module/shared/components/controllers/screen-lifecycle.js.map +1 -0
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -0
- package/lib/module/shared/components/integrations/masked-view.js.map +1 -0
- package/lib/module/shared/components/root-transition-aware.js.map +1 -0
- package/lib/module/shared/configs/index.js +18 -0
- package/lib/module/shared/configs/index.js.map +1 -0
- package/lib/module/shared/configs/presets.js.map +1 -0
- package/lib/module/shared/configs/specs.js.map +1 -0
- package/lib/module/shared/constants.js.map +1 -0
- package/lib/module/shared/hooks/animation/use-associated-style.js.map +1 -0
- package/lib/module/shared/hooks/animation/use-screen-animation.js +113 -0
- package/lib/module/shared/hooks/animation/use-screen-animation.js.map +1 -0
- package/lib/module/shared/hooks/bounds/use-bound-registry.js +125 -0
- package/lib/module/shared/hooks/bounds/use-bound-registry.js.map +1 -0
- package/lib/module/shared/hooks/gestures/use-build-gestures.js +230 -0
- package/lib/module/shared/hooks/gestures/use-build-gestures.js.map +1 -0
- package/lib/module/shared/hooks/gestures/use-parent-gesture-registry.js.map +1 -0
- package/lib/module/shared/hooks/gestures/use-scroll-registry.js.map +1 -0
- package/lib/module/shared/hooks/use-shared-value-state.js +22 -0
- package/lib/module/shared/hooks/use-shared-value-state.js.map +1 -0
- package/lib/module/shared/hooks/use-stable-callback-value.js.map +1 -0
- package/lib/module/shared/hooks/use-stable-callback.js.map +1 -0
- package/lib/module/shared/index.js +22 -0
- package/lib/module/shared/index.js.map +1 -0
- package/lib/module/shared/providers/gestures.js.map +1 -0
- package/lib/module/shared/providers/keys.js +29 -0
- package/lib/module/shared/providers/keys.js.map +1 -0
- package/lib/module/shared/providers/screen-transition-provider.js +30 -0
- package/lib/module/shared/providers/screen-transition-provider.js.map +1 -0
- package/lib/module/shared/providers/transition-styles.js.map +1 -0
- package/lib/module/shared/providers/utils/create-provider.js +33 -0
- package/lib/module/shared/providers/utils/create-provider.js.map +1 -0
- package/lib/module/shared/stores/animation-store.js +33 -0
- package/lib/module/shared/stores/animation-store.js.map +1 -0
- package/lib/module/shared/stores/bound-store/_utils.js.map +1 -0
- package/lib/module/shared/stores/bound-store/index.js +112 -0
- package/lib/module/shared/stores/bound-store/index.js.map +1 -0
- package/lib/module/shared/stores/gesture-store.js +35 -0
- package/lib/module/shared/stores/gesture-store.js.map +1 -0
- package/lib/module/shared/stores/navigator-dismiss-state.js.map +1 -0
- package/lib/module/shared/stores/utils/reset-stores-for-screen.js +15 -0
- package/lib/module/shared/stores/utils/reset-stores-for-screen.js.map +1 -0
- package/lib/module/shared/types/animation.js.map +1 -0
- package/lib/module/shared/types/bounds.js.map +1 -0
- package/lib/module/shared/types/core.js.map +1 -0
- package/lib/module/shared/types/gesture.js.map +1 -0
- package/lib/module/shared/types/utils.js.map +1 -0
- package/lib/module/shared/utils/animation/animate.js.map +1 -0
- package/lib/module/shared/utils/animation/derivations.js +34 -0
- package/lib/module/shared/utils/animation/derivations.js.map +1 -0
- package/lib/module/shared/utils/animation/start-screen-transition.js.map +1 -0
- package/lib/module/shared/utils/bounds/_types/builder.js.map +1 -0
- package/lib/module/shared/utils/bounds/_types/geometry.js.map +1 -0
- package/lib/module/shared/utils/bounds/_types/get-bounds.js.map +1 -0
- package/lib/module/shared/utils/bounds/_utils/flatten-styles.js.map +1 -0
- package/lib/module/shared/utils/bounds/_utils/geometry.js.map +1 -0
- package/lib/module/shared/utils/bounds/_utils/get-bounds.js.map +1 -0
- package/lib/module/shared/utils/bounds/_utils/is-bounds-equal.js +14 -0
- package/lib/module/shared/utils/bounds/_utils/is-bounds-equal.js.map +1 -0
- package/lib/module/shared/utils/bounds/_utils/style-composers.js.map +1 -0
- package/lib/module/shared/utils/bounds/_utils/styles.js.map +1 -0
- package/lib/module/shared/utils/bounds/constants.js.map +1 -0
- package/lib/module/shared/utils/bounds/index.js.map +1 -0
- package/lib/module/shared/utils/gesture/apply-offset-rules.js.map +1 -0
- package/lib/module/shared/utils/gesture/check-gesture-activation.js.map +1 -0
- package/lib/module/shared/utils/gesture/determine-dismissal.js.map +1 -0
- package/lib/module/shared/utils/gesture/map-gesture-to-progress.js.map +1 -0
- package/lib/module/shared/utils/gesture/reset-gesture-values.js.map +1 -0
- package/lib/module/shared/utils/gesture/velocity.js.map +1 -0
- package/lib/module/shared/utils/reanimated/version.js.map +1 -0
- package/lib/typescript/blank-stack/components/Overlay.d.ts +5 -0
- package/lib/typescript/blank-stack/components/Overlay.d.ts.map +1 -0
- package/lib/typescript/blank-stack/components/Screens.d.ts +15 -0
- package/lib/typescript/blank-stack/components/Screens.d.ts.map +1 -0
- package/lib/typescript/blank-stack/components/StackView.d.ts +2 -0
- package/lib/typescript/blank-stack/components/StackView.d.ts.map +1 -0
- package/lib/typescript/blank-stack/hooks/use-overlay-animation.d.ts +12 -0
- package/lib/typescript/blank-stack/hooks/use-overlay-animation.d.ts.map +1 -0
- package/lib/typescript/blank-stack/index.d.ts +3 -0
- package/lib/typescript/blank-stack/index.d.ts.map +1 -0
- package/lib/typescript/blank-stack/navigators/createBlankStackNavigator.d.ts +16 -0
- package/lib/typescript/blank-stack/navigators/createBlankStackNavigator.d.ts.map +1 -0
- package/lib/typescript/blank-stack/types.d.ts +217 -0
- package/lib/typescript/blank-stack/types.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.d.ts +8 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_hooks/use-previous.d.ts +2 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_hooks/use-previous.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.d.ts +20 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_types.d.ts +22 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_types.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.d.ts +3 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.d.ts +4 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.d.ts +4 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.d.ts +3 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.d.ts +3 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.d.ts.map +1 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/index.d.ts +6 -0
- package/lib/typescript/blank-stack/utils/with-stack-navigation/index.d.ts.map +1 -0
- package/lib/typescript/native-stack/index.d.ts +3 -0
- package/lib/typescript/native-stack/index.d.ts.map +1 -0
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +16 -0
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -0
- package/lib/typescript/native-stack/types.d.ts +651 -0
- package/lib/typescript/native-stack/types.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/debounce.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/getModalRoutesKeys.d.ts +4 -0
- package/lib/typescript/native-stack/utils/getModalRoutesKeys.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/useAnimatedHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/useDismissedRouteError.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/useInvalidPreventRemoveError.d.ts +3 -0
- package/lib/typescript/native-stack/utils/useInvalidPreventRemoveError.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/FontProcessor.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/FontProcessor.native.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/FooterComponent.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/NativeStackView.d.ts +11 -0
- package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/NativeStackView.native.d.ts +11 -0
- package/lib/typescript/native-stack/views/NativeStackView.native.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/useHeaderConfigProps.d.ts +44 -0
- package/lib/typescript/native-stack/views/useHeaderConfigProps.d.ts.map +1 -0
- package/lib/typescript/shared/components/controllers/screen-lifecycle.d.ts +12 -0
- package/lib/typescript/shared/components/controllers/screen-lifecycle.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -0
- package/lib/typescript/shared/components/integrations/masked-view.d.ts.map +1 -0
- package/lib/typescript/shared/components/root-transition-aware.d.ts.map +1 -0
- package/lib/typescript/shared/configs/index.d.ts +16 -0
- package/lib/typescript/shared/configs/index.d.ts.map +1 -0
- package/lib/typescript/shared/configs/presets.d.ts +12 -0
- package/lib/typescript/shared/configs/presets.d.ts.map +1 -0
- package/lib/typescript/shared/configs/specs.d.ts.map +1 -0
- package/lib/typescript/shared/constants.d.ts +57 -0
- package/lib/typescript/shared/constants.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/animation/use-screen-animation.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/bounds/use-bound-registry.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/gestures/use-build-gestures.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/gestures/use-parent-gesture-registry.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/gestures/use-scroll-registry.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/use-shared-value-state.d.ts +7 -0
- package/lib/typescript/shared/hooks/use-shared-value-state.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/use-stable-callback-value.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/use-stable-callback.d.ts.map +1 -0
- package/lib/typescript/shared/index.d.ts +1324 -0
- package/lib/typescript/shared/index.d.ts.map +1 -0
- package/lib/typescript/shared/providers/gestures.d.ts.map +1 -0
- package/lib/typescript/shared/providers/keys.d.ts +18 -0
- package/lib/typescript/shared/providers/keys.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen-transition-provider.d.ts +14 -0
- package/lib/typescript/shared/providers/screen-transition-provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/transition-styles.d.ts.map +1 -0
- package/lib/typescript/shared/providers/utils/create-provider.d.ts +32 -0
- package/lib/typescript/shared/providers/utils/create-provider.d.ts.map +1 -0
- package/lib/typescript/shared/stores/animation-store.d.ts +17 -0
- package/lib/typescript/shared/stores/animation-store.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bound-store/_utils.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bound-store/index.d.ts +22 -0
- package/lib/typescript/shared/stores/bound-store/index.d.ts.map +1 -0
- package/lib/typescript/shared/stores/gesture-store.d.ts +23 -0
- package/lib/typescript/shared/stores/gesture-store.d.ts.map +1 -0
- package/lib/typescript/shared/stores/navigator-dismiss-state.d.ts.map +1 -0
- package/lib/typescript/shared/stores/utils/reset-stores-for-screen.d.ts +6 -0
- package/lib/typescript/shared/stores/utils/reset-stores-for-screen.d.ts.map +1 -0
- package/lib/typescript/shared/types/animation.d.ts +78 -0
- package/lib/typescript/shared/types/animation.d.ts.map +1 -0
- package/lib/typescript/shared/types/bounds.d.ts.map +1 -0
- package/lib/typescript/shared/types/core.d.ts +91 -0
- package/lib/typescript/shared/types/core.d.ts.map +1 -0
- package/lib/typescript/shared/types/gesture.d.ts.map +1 -0
- package/lib/typescript/shared/types/utils.d.ts.map +1 -0
- package/lib/typescript/shared/utils/animation/animate.d.ts.map +1 -0
- package/lib/typescript/shared/utils/animation/derivations.d.ts.map +1 -0
- package/lib/typescript/shared/utils/animation/start-screen-transition.d.ts +13 -0
- package/lib/typescript/shared/utils/animation/start-screen-transition.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_types/builder.d.ts +118 -0
- package/lib/typescript/shared/utils/bounds/_types/builder.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_types/geometry.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_types/get-bounds.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_utils/flatten-styles.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_utils/geometry.d.ts +27 -0
- package/lib/typescript/shared/utils/bounds/_utils/geometry.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_utils/get-bounds.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_utils/is-bounds-equal.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_utils/style-composers.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/_utils/styles.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/constants.d.ts +7 -0
- package/lib/typescript/shared/utils/bounds/constants.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/index.d.ts +13 -0
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -0
- package/lib/typescript/shared/utils/gesture/apply-offset-rules.d.ts +38 -0
- package/lib/typescript/shared/utils/gesture/apply-offset-rules.d.ts.map +1 -0
- package/lib/typescript/shared/utils/gesture/check-gesture-activation.d.ts +38 -0
- package/lib/typescript/shared/utils/gesture/check-gesture-activation.d.ts.map +1 -0
- package/lib/typescript/shared/utils/gesture/determine-dismissal.d.ts.map +1 -0
- package/lib/typescript/shared/utils/gesture/map-gesture-to-progress.d.ts.map +1 -0
- package/lib/typescript/shared/utils/gesture/reset-gesture-values.d.ts +16 -0
- package/lib/typescript/shared/utils/gesture/reset-gesture-values.d.ts.map +1 -0
- package/lib/typescript/shared/utils/gesture/velocity.d.ts +25 -0
- package/lib/typescript/shared/utils/gesture/velocity.d.ts.map +1 -0
- package/lib/typescript/shared/utils/reanimated/version.d.ts.map +1 -0
- package/package.json +87 -67
- package/src/blank-stack/components/Overlay.tsx +149 -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 +272 -0
- package/src/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.tsx +71 -0
- package/src/blank-stack/utils/with-stack-navigation/_hooks/use-previous.tsx +11 -0
- package/src/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.tsx +267 -0
- package/src/blank-stack/utils/with-stack-navigation/_types.ts +35 -0
- package/src/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.ts +15 -0
- package/src/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.ts +29 -0
- package/src/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.ts +24 -0
- package/src/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.ts +12 -0
- package/src/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.ts +11 -0
- package/src/blank-stack/utils/with-stack-navigation/index.tsx +80 -0
- package/src/native-stack/index.ts +12 -0
- package/src/native-stack/navigators/createNativeStackNavigator.tsx +112 -0
- package/src/native-stack/types.ts +711 -0
- package/src/native-stack/utils/getModalRoutesKeys.ts +21 -0
- package/src/native-stack/utils/useInvalidPreventRemoveError.tsx +31 -0
- package/src/native-stack/views/NativeStackView.native.tsx +655 -0
- package/src/native-stack/views/NativeStackView.tsx +214 -0
- package/src/native-stack/views/useHeaderConfigProps.tsx +295 -0
- package/src/shared/__tests__/gesture.velocity.test.ts +139 -0
- package/src/shared/components/controllers/screen-lifecycle.tsx +139 -0
- package/src/shared/configs/index.ts +26 -0
- package/src/shared/configs/presets.ts +628 -0
- package/src/shared/constants.ts +108 -0
- package/src/shared/hooks/animation/use-screen-animation.tsx +150 -0
- package/src/shared/hooks/bounds/use-bound-registry.tsx +153 -0
- package/src/shared/hooks/gestures/use-build-gestures.tsx +324 -0
- package/src/shared/hooks/use-shared-value-state.ts +28 -0
- package/src/shared/index.ts +26 -0
- package/src/shared/providers/keys.tsx +57 -0
- package/src/shared/providers/screen-transition-provider.tsx +41 -0
- package/src/shared/providers/utils/create-provider.ts +64 -0
- package/src/shared/stores/animation-store.ts +45 -0
- package/src/shared/stores/bound-store/index.ts +125 -0
- package/src/shared/stores/gesture-store.ts +60 -0
- package/src/shared/stores/utils/reset-stores-for-screen.ts +13 -0
- package/src/shared/types/animation.ts +90 -0
- package/src/shared/types/core.ts +97 -0
- package/src/shared/utils/animation/derivations.ts +40 -0
- package/src/shared/utils/animation/start-screen-transition.ts +61 -0
- package/src/shared/utils/bounds/_types/builder.ts +151 -0
- package/src/shared/utils/bounds/_utils/geometry.ts +166 -0
- package/src/shared/utils/bounds/_utils/is-bounds-equal.ts +24 -0
- package/src/shared/utils/bounds/constants.ts +40 -0
- package/src/shared/utils/bounds/index.ts +218 -0
- package/src/shared/utils/gesture/apply-offset-rules.ts +312 -0
- package/src/shared/utils/gesture/check-gesture-activation.ts +310 -0
- package/src/shared/utils/gesture/reset-gesture-values.ts +67 -0
- package/src/shared/utils/gesture/velocity.ts +143 -0
- package/lib/commonjs/__configs__/index.js +0 -22
- package/lib/commonjs/__configs__/index.js.map +0 -1
- package/lib/commonjs/__configs__/presets.js.map +0 -1
- package/lib/commonjs/__configs__/specs.js.map +0 -1
- package/lib/commonjs/components/controllers/screen-lifecycle.js +0 -71
- package/lib/commonjs/components/controllers/screen-lifecycle.js.map +0 -1
- package/lib/commonjs/components/create-transition-aware-component.js.map +0 -1
- package/lib/commonjs/components/integrations/masked-view.js.map +0 -1
- package/lib/commonjs/components/root-transition-aware.js.map +0 -1
- package/lib/commonjs/constants.js.map +0 -1
- package/lib/commonjs/hooks/animation/use-associated-style.js.map +0 -1
- package/lib/commonjs/hooks/animation/use-screen-animation.js +0 -118
- package/lib/commonjs/hooks/animation/use-screen-animation.js.map +0 -1
- package/lib/commonjs/hooks/bounds/use-bound-registry.js +0 -131
- package/lib/commonjs/hooks/bounds/use-bound-registry.js.map +0 -1
- package/lib/commonjs/hooks/gestures/use-build-gestures.js +0 -236
- package/lib/commonjs/hooks/gestures/use-build-gestures.js.map +0 -1
- package/lib/commonjs/hooks/gestures/use-parent-gesture-registry.js.map +0 -1
- package/lib/commonjs/hooks/gestures/use-scroll-registry.js.map +0 -1
- package/lib/commonjs/hooks/use-stable-callback-value.js.map +0 -1
- package/lib/commonjs/hooks/use-stable-callback.js.map +0 -1
- package/lib/commonjs/index.js +0 -40
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/navigators/createNativeStackNavigator.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/utils/debounce.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/utils/getModalRoutesKeys.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/utils/useAnimatedHeaderHeight.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/utils/useDismissedRouteError.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/utils/useInvalidPreventRemoveError.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/views/FontProcessor.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/views/FontProcessor.native.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/views/FooterComponent.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/views/NativeStackView.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/views/NativeStackView.native.js +0 -488
- package/lib/commonjs/integrations/native-stack/views/NativeStackView.native.js.map +0 -1
- package/lib/commonjs/integrations/native-stack/views/useHeaderConfigProps.js.map +0 -1
- package/lib/commonjs/providers/gestures.js.map +0 -1
- package/lib/commonjs/providers/keys.js +0 -35
- package/lib/commonjs/providers/keys.js.map +0 -1
- package/lib/commonjs/providers/screen-transition-provider.js +0 -34
- package/lib/commonjs/providers/screen-transition-provider.js.map +0 -1
- package/lib/commonjs/providers/transition-styles.js.map +0 -1
- package/lib/commonjs/stores/animations.js +0 -39
- package/lib/commonjs/stores/animations.js.map +0 -1
- package/lib/commonjs/stores/bounds/_utils.js.map +0 -1
- package/lib/commonjs/stores/bounds/index.js +0 -116
- package/lib/commonjs/stores/bounds/index.js.map +0 -1
- package/lib/commonjs/stores/gestures.js +0 -39
- package/lib/commonjs/stores/gestures.js.map +0 -1
- package/lib/commonjs/stores/navigator-dismiss-state.js.map +0 -1
- package/lib/commonjs/stores/utils/reset-stores-for-screen.js +0 -19
- package/lib/commonjs/stores/utils/reset-stores-for-screen.js.map +0 -1
- package/lib/commonjs/types/animation.js.map +0 -1
- package/lib/commonjs/types/bounds.js.map +0 -1
- package/lib/commonjs/types/core.js.map +0 -1
- package/lib/commonjs/types/gesture.js.map +0 -1
- package/lib/commonjs/types/navigator.js +0 -6
- package/lib/commonjs/types/navigator.js.map +0 -1
- package/lib/commonjs/types/utils.js.map +0 -1
- package/lib/commonjs/utils/animation/animate.js.map +0 -1
- package/lib/commonjs/utils/animation/derivations.js +0 -39
- package/lib/commonjs/utils/animation/derivations.js.map +0 -1
- package/lib/commonjs/utils/animation/start-screen-transition.js.map +0 -1
- package/lib/commonjs/utils/bounds/_types/builder.js.map +0 -1
- package/lib/commonjs/utils/bounds/_types/geometry.js.map +0 -1
- package/lib/commonjs/utils/bounds/_types/get-bounds.js.map +0 -1
- package/lib/commonjs/utils/bounds/_utils/flatten-styles.js.map +0 -1
- package/lib/commonjs/utils/bounds/_utils/geometry.js.map +0 -1
- package/lib/commonjs/utils/bounds/_utils/get-bounds.js.map +0 -1
- package/lib/commonjs/utils/bounds/_utils/is-bounds-equal.js +0 -19
- package/lib/commonjs/utils/bounds/_utils/is-bounds-equal.js.map +0 -1
- package/lib/commonjs/utils/bounds/_utils/style-composers.js.map +0 -1
- package/lib/commonjs/utils/bounds/_utils/styles.js.map +0 -1
- package/lib/commonjs/utils/bounds/constants.js.map +0 -1
- package/lib/commonjs/utils/bounds/index.js.map +0 -1
- package/lib/commonjs/utils/gesture/apply-offset-rules.js.map +0 -1
- package/lib/commonjs/utils/gesture/check-gesture-activation.js.map +0 -1
- package/lib/commonjs/utils/gesture/determine-dismissal.js.map +0 -1
- package/lib/commonjs/utils/gesture/map-gesture-to-progress.js.map +0 -1
- package/lib/commonjs/utils/gesture/reset-gesture-values.js.map +0 -1
- package/lib/commonjs/utils/gesture/velocity.js.map +0 -1
- package/lib/commonjs/utils/reanimated/version.js.map +0 -1
- package/lib/module/__configs__/index.js +0 -18
- package/lib/module/__configs__/index.js.map +0 -1
- package/lib/module/__configs__/presets.js.map +0 -1
- package/lib/module/__configs__/specs.js.map +0 -1
- package/lib/module/components/controllers/screen-lifecycle.js +0 -65
- package/lib/module/components/controllers/screen-lifecycle.js.map +0 -1
- package/lib/module/components/create-transition-aware-component.js.map +0 -1
- package/lib/module/components/integrations/masked-view.js.map +0 -1
- package/lib/module/components/root-transition-aware.js.map +0 -1
- package/lib/module/constants.js.map +0 -1
- package/lib/module/hooks/animation/use-associated-style.js.map +0 -1
- package/lib/module/hooks/animation/use-screen-animation.js +0 -113
- package/lib/module/hooks/animation/use-screen-animation.js.map +0 -1
- package/lib/module/hooks/bounds/use-bound-registry.js +0 -125
- package/lib/module/hooks/bounds/use-bound-registry.js.map +0 -1
- package/lib/module/hooks/gestures/use-build-gestures.js +0 -230
- package/lib/module/hooks/gestures/use-build-gestures.js.map +0 -1
- package/lib/module/hooks/gestures/use-parent-gesture-registry.js.map +0 -1
- package/lib/module/hooks/gestures/use-scroll-registry.js.map +0 -1
- package/lib/module/hooks/use-stable-callback-value.js.map +0 -1
- package/lib/module/hooks/use-stable-callback.js.map +0 -1
- package/lib/module/index.js +0 -23
- package/lib/module/index.js.map +0 -1
- package/lib/module/integrations/native-stack/navigators/createNativeStackNavigator.js.map +0 -1
- package/lib/module/integrations/native-stack/utils/debounce.js.map +0 -1
- package/lib/module/integrations/native-stack/utils/getModalRoutesKeys.js.map +0 -1
- package/lib/module/integrations/native-stack/utils/useAnimatedHeaderHeight.js.map +0 -1
- package/lib/module/integrations/native-stack/utils/useDismissedRouteError.js.map +0 -1
- package/lib/module/integrations/native-stack/utils/useInvalidPreventRemoveError.js.map +0 -1
- package/lib/module/integrations/native-stack/views/FontProcessor.js.map +0 -1
- package/lib/module/integrations/native-stack/views/FontProcessor.native.js.map +0 -1
- package/lib/module/integrations/native-stack/views/FooterComponent.js.map +0 -1
- package/lib/module/integrations/native-stack/views/NativeStackView.js.map +0 -1
- package/lib/module/integrations/native-stack/views/NativeStackView.native.js +0 -483
- package/lib/module/integrations/native-stack/views/NativeStackView.native.js.map +0 -1
- package/lib/module/integrations/native-stack/views/useHeaderConfigProps.js.map +0 -1
- package/lib/module/providers/gestures.js.map +0 -1
- package/lib/module/providers/keys.js +0 -29
- package/lib/module/providers/keys.js.map +0 -1
- package/lib/module/providers/screen-transition-provider.js +0 -30
- package/lib/module/providers/screen-transition-provider.js.map +0 -1
- package/lib/module/providers/transition-styles.js.map +0 -1
- package/lib/module/stores/animations.js +0 -33
- package/lib/module/stores/animations.js.map +0 -1
- package/lib/module/stores/bounds/_utils.js.map +0 -1
- package/lib/module/stores/bounds/index.js +0 -112
- package/lib/module/stores/bounds/index.js.map +0 -1
- package/lib/module/stores/gestures.js +0 -35
- package/lib/module/stores/gestures.js.map +0 -1
- package/lib/module/stores/navigator-dismiss-state.js.map +0 -1
- package/lib/module/stores/utils/reset-stores-for-screen.js +0 -15
- package/lib/module/stores/utils/reset-stores-for-screen.js.map +0 -1
- package/lib/module/types/animation.js.map +0 -1
- package/lib/module/types/bounds.js.map +0 -1
- package/lib/module/types/core.js.map +0 -1
- package/lib/module/types/gesture.js.map +0 -1
- package/lib/module/types/navigator.js +0 -4
- package/lib/module/types/navigator.js.map +0 -1
- package/lib/module/types/utils.js.map +0 -1
- package/lib/module/utils/animation/animate.js.map +0 -1
- package/lib/module/utils/animation/derivations.js +0 -34
- package/lib/module/utils/animation/derivations.js.map +0 -1
- package/lib/module/utils/animation/start-screen-transition.js.map +0 -1
- package/lib/module/utils/bounds/_types/builder.js.map +0 -1
- package/lib/module/utils/bounds/_types/geometry.js.map +0 -1
- package/lib/module/utils/bounds/_types/get-bounds.js.map +0 -1
- package/lib/module/utils/bounds/_utils/flatten-styles.js.map +0 -1
- package/lib/module/utils/bounds/_utils/geometry.js.map +0 -1
- package/lib/module/utils/bounds/_utils/get-bounds.js.map +0 -1
- package/lib/module/utils/bounds/_utils/is-bounds-equal.js +0 -14
- package/lib/module/utils/bounds/_utils/is-bounds-equal.js.map +0 -1
- package/lib/module/utils/bounds/_utils/style-composers.js.map +0 -1
- package/lib/module/utils/bounds/_utils/styles.js.map +0 -1
- package/lib/module/utils/bounds/constants.js.map +0 -1
- package/lib/module/utils/bounds/index.js.map +0 -1
- package/lib/module/utils/gesture/apply-offset-rules.js.map +0 -1
- package/lib/module/utils/gesture/check-gesture-activation.js.map +0 -1
- package/lib/module/utils/gesture/determine-dismissal.js.map +0 -1
- package/lib/module/utils/gesture/map-gesture-to-progress.js.map +0 -1
- package/lib/module/utils/gesture/reset-gesture-values.js.map +0 -1
- package/lib/module/utils/gesture/velocity.js.map +0 -1
- package/lib/module/utils/reanimated/version.js.map +0 -1
- package/lib/typescript/__configs__/index.d.ts +0 -16
- package/lib/typescript/__configs__/index.d.ts.map +0 -1
- package/lib/typescript/__configs__/presets.d.ts +0 -12
- package/lib/typescript/__configs__/presets.d.ts.map +0 -1
- package/lib/typescript/__configs__/specs.d.ts.map +0 -1
- package/lib/typescript/components/controllers/screen-lifecycle.d.ts +0 -6
- package/lib/typescript/components/controllers/screen-lifecycle.d.ts.map +0 -1
- package/lib/typescript/components/create-transition-aware-component.d.ts.map +0 -1
- package/lib/typescript/components/integrations/masked-view.d.ts.map +0 -1
- package/lib/typescript/components/root-transition-aware.d.ts.map +0 -1
- package/lib/typescript/constants.d.ts +0 -57
- package/lib/typescript/constants.d.ts.map +0 -1
- package/lib/typescript/hooks/animation/use-associated-style.d.ts.map +0 -1
- package/lib/typescript/hooks/animation/use-screen-animation.d.ts.map +0 -1
- package/lib/typescript/hooks/bounds/use-bound-registry.d.ts.map +0 -1
- package/lib/typescript/hooks/gestures/use-build-gestures.d.ts.map +0 -1
- package/lib/typescript/hooks/gestures/use-parent-gesture-registry.d.ts.map +0 -1
- package/lib/typescript/hooks/gestures/use-scroll-registry.d.ts.map +0 -1
- package/lib/typescript/hooks/use-stable-callback-value.d.ts.map +0 -1
- package/lib/typescript/hooks/use-stable-callback.d.ts.map +0 -1
- package/lib/typescript/index.d.ts +0 -1325
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/navigators/createNativeStackNavigator.d.ts +0 -16
- package/lib/typescript/integrations/native-stack/navigators/createNativeStackNavigator.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/utils/debounce.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/utils/getModalRoutesKeys.d.ts +0 -4
- package/lib/typescript/integrations/native-stack/utils/getModalRoutesKeys.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/utils/useAnimatedHeaderHeight.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/utils/useDismissedRouteError.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/utils/useInvalidPreventRemoveError.d.ts +0 -3
- package/lib/typescript/integrations/native-stack/utils/useInvalidPreventRemoveError.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/views/FontProcessor.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/views/FontProcessor.native.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/views/FooterComponent.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/views/NativeStackView.d.ts +0 -11
- package/lib/typescript/integrations/native-stack/views/NativeStackView.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/views/NativeStackView.native.d.ts +0 -11
- package/lib/typescript/integrations/native-stack/views/NativeStackView.native.d.ts.map +0 -1
- package/lib/typescript/integrations/native-stack/views/useHeaderConfigProps.d.ts +0 -44
- package/lib/typescript/integrations/native-stack/views/useHeaderConfigProps.d.ts.map +0 -1
- package/lib/typescript/providers/gestures.d.ts.map +0 -1
- package/lib/typescript/providers/keys.d.ts +0 -16
- package/lib/typescript/providers/keys.d.ts.map +0 -1
- package/lib/typescript/providers/screen-transition-provider.d.ts +0 -11
- package/lib/typescript/providers/screen-transition-provider.d.ts.map +0 -1
- package/lib/typescript/providers/transition-styles.d.ts.map +0 -1
- package/lib/typescript/stores/animations.d.ts +0 -17
- package/lib/typescript/stores/animations.d.ts.map +0 -1
- package/lib/typescript/stores/bounds/_utils.d.ts.map +0 -1
- package/lib/typescript/stores/bounds/index.d.ts +0 -22
- package/lib/typescript/stores/bounds/index.d.ts.map +0 -1
- package/lib/typescript/stores/gestures.d.ts +0 -23
- package/lib/typescript/stores/gestures.d.ts.map +0 -1
- package/lib/typescript/stores/navigator-dismiss-state.d.ts.map +0 -1
- package/lib/typescript/stores/utils/reset-stores-for-screen.d.ts +0 -6
- package/lib/typescript/stores/utils/reset-stores-for-screen.d.ts.map +0 -1
- package/lib/typescript/types/animation.d.ts +0 -70
- package/lib/typescript/types/animation.d.ts.map +0 -1
- package/lib/typescript/types/bounds.d.ts.map +0 -1
- package/lib/typescript/types/core.d.ts +0 -47
- package/lib/typescript/types/core.d.ts.map +0 -1
- package/lib/typescript/types/gesture.d.ts.map +0 -1
- package/lib/typescript/types/navigator.d.ts +0 -691
- package/lib/typescript/types/navigator.d.ts.map +0 -1
- package/lib/typescript/types/utils.d.ts.map +0 -1
- package/lib/typescript/utils/animation/animate.d.ts.map +0 -1
- package/lib/typescript/utils/animation/derivations.d.ts.map +0 -1
- package/lib/typescript/utils/animation/start-screen-transition.d.ts +0 -13
- package/lib/typescript/utils/animation/start-screen-transition.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_types/builder.d.ts +0 -118
- package/lib/typescript/utils/bounds/_types/builder.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_types/geometry.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_types/get-bounds.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_utils/flatten-styles.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_utils/geometry.d.ts +0 -27
- package/lib/typescript/utils/bounds/_utils/geometry.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_utils/get-bounds.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_utils/is-bounds-equal.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_utils/style-composers.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/_utils/styles.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/constants.d.ts +0 -7
- package/lib/typescript/utils/bounds/constants.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/index.d.ts +0 -13
- package/lib/typescript/utils/bounds/index.d.ts.map +0 -1
- package/lib/typescript/utils/gesture/apply-offset-rules.d.ts +0 -38
- package/lib/typescript/utils/gesture/apply-offset-rules.d.ts.map +0 -1
- package/lib/typescript/utils/gesture/check-gesture-activation.d.ts +0 -38
- package/lib/typescript/utils/gesture/check-gesture-activation.d.ts.map +0 -1
- package/lib/typescript/utils/gesture/determine-dismissal.d.ts.map +0 -1
- package/lib/typescript/utils/gesture/map-gesture-to-progress.d.ts.map +0 -1
- package/lib/typescript/utils/gesture/reset-gesture-values.d.ts +0 -16
- package/lib/typescript/utils/gesture/reset-gesture-values.d.ts.map +0 -1
- package/lib/typescript/utils/gesture/velocity.d.ts +0 -25
- package/lib/typescript/utils/gesture/velocity.d.ts.map +0 -1
- package/lib/typescript/utils/reanimated/version.d.ts.map +0 -1
- package/src/__configs__/index.ts +0 -26
- package/src/__configs__/presets.ts +0 -628
- package/src/__tests__/gesture.velocity.test.ts +0 -138
- package/src/components/controllers/screen-lifecycle.tsx +0 -78
- package/src/constants.ts +0 -108
- package/src/hooks/animation/use-screen-animation.tsx +0 -151
- package/src/hooks/bounds/use-bound-registry.tsx +0 -159
- package/src/hooks/gestures/use-build-gestures.tsx +0 -324
- package/src/index.ts +0 -34
- package/src/integrations/native-stack/navigators/createNativeStackNavigator.tsx +0 -112
- package/src/integrations/native-stack/utils/getModalRoutesKeys.ts +0 -21
- package/src/integrations/native-stack/utils/useInvalidPreventRemoveError.tsx +0 -31
- package/src/integrations/native-stack/views/NativeStackView.native.tsx +0 -650
- package/src/integrations/native-stack/views/NativeStackView.tsx +0 -214
- package/src/integrations/native-stack/views/useHeaderConfigProps.tsx +0 -295
- package/src/providers/keys.tsx +0 -38
- package/src/providers/screen-transition-provider.tsx +0 -33
- package/src/stores/animations.ts +0 -45
- package/src/stores/bounds/index.ts +0 -125
- package/src/stores/gestures.ts +0 -60
- package/src/stores/utils/reset-stores-for-screen.ts +0 -13
- package/src/types/animation.ts +0 -81
- package/src/types/core.ts +0 -50
- package/src/types/navigator.ts +0 -753
- package/src/utils/animation/derivations.ts +0 -40
- package/src/utils/animation/start-screen-transition.ts +0 -61
- package/src/utils/bounds/_types/builder.ts +0 -151
- package/src/utils/bounds/_utils/geometry.ts +0 -166
- package/src/utils/bounds/_utils/is-bounds-equal.ts +0 -24
- package/src/utils/bounds/constants.ts +0 -40
- package/src/utils/bounds/index.ts +0 -219
- package/src/utils/gesture/apply-offset-rules.ts +0 -312
- package/src/utils/gesture/check-gesture-activation.ts +0 -310
- package/src/utils/gesture/reset-gesture-values.ts +0 -67
- package/src/utils/gesture/velocity.ts +0 -143
- /package/lib/commonjs/{integrations/native-stack → native-stack}/navigators/createNativeStackNavigator.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/utils/debounce.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/utils/getModalRoutesKeys.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/utils/useAnimatedHeaderHeight.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/utils/useDismissedRouteError.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/utils/useInvalidPreventRemoveError.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/views/FontProcessor.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/views/FontProcessor.native.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/views/FooterComponent.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/views/NativeStackView.js +0 -0
- /package/lib/commonjs/{integrations/native-stack → native-stack}/views/useHeaderConfigProps.js +0 -0
- /package/lib/commonjs/{components → shared/components}/create-transition-aware-component.js +0 -0
- /package/lib/commonjs/{components → shared/components}/integrations/masked-view.js +0 -0
- /package/lib/commonjs/{components → shared/components}/root-transition-aware.js +0 -0
- /package/lib/commonjs/{__configs__ → shared/configs}/presets.js +0 -0
- /package/lib/commonjs/{__configs__ → shared/configs}/specs.js +0 -0
- /package/lib/commonjs/{constants.js → shared/constants.js} +0 -0
- /package/lib/commonjs/{hooks → shared/hooks}/animation/use-associated-style.js +0 -0
- /package/lib/commonjs/{hooks → shared/hooks}/gestures/use-parent-gesture-registry.js +0 -0
- /package/lib/commonjs/{hooks → shared/hooks}/gestures/use-scroll-registry.js +0 -0
- /package/lib/commonjs/{hooks → shared/hooks}/use-stable-callback-value.js +0 -0
- /package/lib/commonjs/{hooks → shared/hooks}/use-stable-callback.js +0 -0
- /package/lib/commonjs/{providers → shared/providers}/gestures.js +0 -0
- /package/lib/commonjs/{providers → shared/providers}/transition-styles.js +0 -0
- /package/lib/commonjs/{stores/bounds → shared/stores/bound-store}/_utils.js +0 -0
- /package/lib/commonjs/{stores → shared/stores}/navigator-dismiss-state.js +0 -0
- /package/lib/commonjs/{types → shared/types}/animation.js +0 -0
- /package/lib/commonjs/{types → shared/types}/bounds.js +0 -0
- /package/lib/commonjs/{types → shared/types}/core.js +0 -0
- /package/lib/commonjs/{types → shared/types}/gesture.js +0 -0
- /package/lib/commonjs/{types → shared/types}/utils.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/animation/animate.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/animation/start-screen-transition.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_types/builder.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_types/geometry.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_types/get-bounds.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_utils/flatten-styles.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_utils/geometry.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_utils/get-bounds.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_utils/style-composers.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/_utils/styles.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/constants.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/bounds/index.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/gesture/apply-offset-rules.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/gesture/check-gesture-activation.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/gesture/determine-dismissal.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/gesture/map-gesture-to-progress.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/gesture/reset-gesture-values.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/gesture/velocity.js +0 -0
- /package/lib/commonjs/{utils → shared/utils}/reanimated/version.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/navigators/createNativeStackNavigator.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/utils/debounce.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/utils/getModalRoutesKeys.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/utils/useAnimatedHeaderHeight.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/utils/useDismissedRouteError.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/utils/useInvalidPreventRemoveError.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/views/FontProcessor.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/views/FontProcessor.native.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/views/FooterComponent.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/views/NativeStackView.js +0 -0
- /package/lib/module/{integrations/native-stack → native-stack}/views/useHeaderConfigProps.js +0 -0
- /package/lib/module/{components → shared/components}/create-transition-aware-component.js +0 -0
- /package/lib/module/{components → shared/components}/integrations/masked-view.js +0 -0
- /package/lib/module/{components → shared/components}/root-transition-aware.js +0 -0
- /package/lib/module/{__configs__ → shared/configs}/presets.js +0 -0
- /package/lib/module/{__configs__ → shared/configs}/specs.js +0 -0
- /package/lib/module/{constants.js → shared/constants.js} +0 -0
- /package/lib/module/{hooks → shared/hooks}/animation/use-associated-style.js +0 -0
- /package/lib/module/{hooks → shared/hooks}/gestures/use-parent-gesture-registry.js +0 -0
- /package/lib/module/{hooks → shared/hooks}/gestures/use-scroll-registry.js +0 -0
- /package/lib/module/{hooks → shared/hooks}/use-stable-callback-value.js +0 -0
- /package/lib/module/{hooks → shared/hooks}/use-stable-callback.js +0 -0
- /package/lib/module/{providers → shared/providers}/gestures.js +0 -0
- /package/lib/module/{providers → shared/providers}/transition-styles.js +0 -0
- /package/lib/module/{stores/bounds → shared/stores/bound-store}/_utils.js +0 -0
- /package/lib/module/{stores → shared/stores}/navigator-dismiss-state.js +0 -0
- /package/lib/module/{types → shared/types}/animation.js +0 -0
- /package/lib/module/{types → shared/types}/bounds.js +0 -0
- /package/lib/module/{types → shared/types}/core.js +0 -0
- /package/lib/module/{types → shared/types}/gesture.js +0 -0
- /package/lib/module/{types → shared/types}/utils.js +0 -0
- /package/lib/module/{utils → shared/utils}/animation/animate.js +0 -0
- /package/lib/module/{utils → shared/utils}/animation/start-screen-transition.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_types/builder.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_types/geometry.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_types/get-bounds.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_utils/flatten-styles.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_utils/geometry.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_utils/get-bounds.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_utils/style-composers.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/_utils/styles.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/constants.js +0 -0
- /package/lib/module/{utils → shared/utils}/bounds/index.js +0 -0
- /package/lib/module/{utils → shared/utils}/gesture/apply-offset-rules.js +0 -0
- /package/lib/module/{utils → shared/utils}/gesture/check-gesture-activation.js +0 -0
- /package/lib/module/{utils → shared/utils}/gesture/determine-dismissal.js +0 -0
- /package/lib/module/{utils → shared/utils}/gesture/map-gesture-to-progress.js +0 -0
- /package/lib/module/{utils → shared/utils}/gesture/reset-gesture-values.js +0 -0
- /package/lib/module/{utils → shared/utils}/gesture/velocity.js +0 -0
- /package/lib/module/{utils → shared/utils}/reanimated/version.js +0 -0
- /package/lib/typescript/{integrations/native-stack → native-stack}/utils/debounce.d.ts +0 -0
- /package/lib/typescript/{integrations/native-stack → native-stack}/utils/useAnimatedHeaderHeight.d.ts +0 -0
- /package/lib/typescript/{integrations/native-stack → native-stack}/utils/useDismissedRouteError.d.ts +0 -0
- /package/lib/typescript/{integrations/native-stack → native-stack}/views/FontProcessor.d.ts +0 -0
- /package/lib/typescript/{integrations/native-stack → native-stack}/views/FontProcessor.native.d.ts +0 -0
- /package/lib/typescript/{integrations/native-stack → native-stack}/views/FooterComponent.d.ts +0 -0
- /package/lib/typescript/{components → shared/components}/create-transition-aware-component.d.ts +0 -0
- /package/lib/typescript/{components → shared/components}/integrations/masked-view.d.ts +0 -0
- /package/lib/typescript/{components → shared/components}/root-transition-aware.d.ts +0 -0
- /package/lib/typescript/{__configs__ → shared/configs}/specs.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/animation/use-associated-style.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/animation/use-screen-animation.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/bounds/use-bound-registry.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/gestures/use-build-gestures.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/gestures/use-parent-gesture-registry.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/gestures/use-scroll-registry.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/use-stable-callback-value.d.ts +0 -0
- /package/lib/typescript/{hooks → shared/hooks}/use-stable-callback.d.ts +0 -0
- /package/lib/typescript/{providers → shared/providers}/gestures.d.ts +0 -0
- /package/lib/typescript/{providers → shared/providers}/transition-styles.d.ts +0 -0
- /package/lib/typescript/{stores/bounds → shared/stores/bound-store}/_utils.d.ts +0 -0
- /package/lib/typescript/{stores → shared/stores}/navigator-dismiss-state.d.ts +0 -0
- /package/lib/typescript/{types → shared/types}/bounds.d.ts +0 -0
- /package/lib/typescript/{types → shared/types}/gesture.d.ts +0 -0
- /package/lib/typescript/{types → shared/types}/utils.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/animation/animate.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/animation/derivations.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/bounds/_types/geometry.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/bounds/_types/get-bounds.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/bounds/_utils/flatten-styles.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/bounds/_utils/get-bounds.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/bounds/_utils/is-bounds-equal.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/bounds/_utils/style-composers.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/bounds/_utils/styles.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/gesture/determine-dismissal.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/gesture/map-gesture-to-progress.d.ts +0 -0
- /package/lib/typescript/{utils → shared/utils}/reanimated/version.d.ts +0 -0
- /package/src/{integrations/native-stack → native-stack}/utils/debounce.tsx +0 -0
- /package/src/{integrations/native-stack → native-stack}/utils/useAnimatedHeaderHeight.tsx +0 -0
- /package/src/{integrations/native-stack → native-stack}/utils/useDismissedRouteError.tsx +0 -0
- /package/src/{integrations/native-stack → native-stack}/views/FontProcessor.native.tsx +0 -0
- /package/src/{integrations/native-stack → native-stack}/views/FontProcessor.tsx +0 -0
- /package/src/{integrations/native-stack → native-stack}/views/FooterComponent.tsx +0 -0
- /package/src/{__tests__ → shared/__tests__}/bounds.store.test.ts +0 -0
- /package/src/{__tests__ → shared/__tests__}/determine-dismissal.test.ts +0 -0
- /package/src/{__tests__ → shared/__tests__}/geometry.test.ts +0 -0
- /package/src/{components → shared/components}/create-transition-aware-component.tsx +0 -0
- /package/src/{components → shared/components}/integrations/masked-view.tsx +0 -0
- /package/src/{components → shared/components}/root-transition-aware.tsx +0 -0
- /package/src/{__configs__ → shared/configs}/specs.ts +0 -0
- /package/src/{hooks → shared/hooks}/animation/use-associated-style.tsx +0 -0
- /package/src/{hooks → shared/hooks}/gestures/use-parent-gesture-registry.tsx +0 -0
- /package/src/{hooks → shared/hooks}/gestures/use-scroll-registry.tsx +0 -0
- /package/src/{hooks → shared/hooks}/use-stable-callback-value.tsx +0 -0
- /package/src/{hooks → shared/hooks}/use-stable-callback.tsx +0 -0
- /package/src/{providers → shared/providers}/gestures.tsx +0 -0
- /package/src/{providers → shared/providers}/transition-styles.tsx +0 -0
- /package/src/{stores/bounds → shared/stores/bound-store}/_utils.ts +0 -0
- /package/src/{stores → shared/stores}/navigator-dismiss-state.ts +0 -0
- /package/src/{types → shared/types}/bounds.ts +0 -0
- /package/src/{types → shared/types}/gesture.ts +0 -0
- /package/src/{types → shared/types}/utils.ts +0 -0
- /package/src/{utils → shared/utils}/animation/animate.ts +0 -0
- /package/src/{utils → shared/utils}/bounds/_types/geometry.ts +0 -0
- /package/src/{utils → shared/utils}/bounds/_types/get-bounds.ts +0 -0
- /package/src/{utils → shared/utils}/bounds/_utils/flatten-styles.ts +0 -0
- /package/src/{utils → shared/utils}/bounds/_utils/get-bounds.ts +0 -0
- /package/src/{utils → shared/utils}/bounds/_utils/style-composers.ts +0 -0
- /package/src/{utils → shared/utils}/bounds/_utils/styles.ts +0 -0
- /package/src/{utils → shared/utils}/gesture/determine-dismissal.ts +0 -0
- /package/src/{utils → shared/utils}/gesture/map-gesture-to-progress.ts +0 -0
- /package/src/{utils → shared/utils}/reanimated/version.ts +0 -0
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
import { Platform } from "react-native";
|
|
2
|
+
import {
|
|
3
|
+
Extrapolation,
|
|
4
|
+
interpolate,
|
|
5
|
+
interpolateColor,
|
|
6
|
+
} from "react-native-reanimated";
|
|
7
|
+
import type { ScreenTransitionConfig } from "../types/core";
|
|
8
|
+
import { DefaultSpec } from "./specs";
|
|
9
|
+
|
|
10
|
+
const platform = Platform.OS;
|
|
11
|
+
|
|
12
|
+
export const SlideFromTop = (
|
|
13
|
+
config: Partial<ScreenTransitionConfig> = {},
|
|
14
|
+
): ScreenTransitionConfig => {
|
|
15
|
+
return {
|
|
16
|
+
enableTransitions: true,
|
|
17
|
+
gestureEnabled: true,
|
|
18
|
+
gestureDirection: "vertical-inverted",
|
|
19
|
+
screenStyleInterpolator: ({
|
|
20
|
+
progress,
|
|
21
|
+
layouts: {
|
|
22
|
+
screen: { height },
|
|
23
|
+
},
|
|
24
|
+
}) => {
|
|
25
|
+
"worklet";
|
|
26
|
+
|
|
27
|
+
const y = interpolate(progress, [0, 1, 2], [-height, 0, height]);
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
contentStyle: {
|
|
31
|
+
transform: [{ translateY: y }],
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
transitionSpec: {
|
|
36
|
+
open: DefaultSpec,
|
|
37
|
+
close: DefaultSpec,
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
...config,
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const ZoomIn = (
|
|
45
|
+
config: Partial<ScreenTransitionConfig> = {},
|
|
46
|
+
): ScreenTransitionConfig => {
|
|
47
|
+
return {
|
|
48
|
+
enableTransitions: true,
|
|
49
|
+
gestureEnabled: false,
|
|
50
|
+
screenStyleInterpolator: ({ progress }) => {
|
|
51
|
+
"worklet";
|
|
52
|
+
|
|
53
|
+
const scale = interpolate(
|
|
54
|
+
progress,
|
|
55
|
+
[0, 1, 2],
|
|
56
|
+
[0.5, 1, 0.5],
|
|
57
|
+
Extrapolation.CLAMP,
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
const opacity = interpolate(
|
|
61
|
+
progress,
|
|
62
|
+
[0, 1, 2],
|
|
63
|
+
[0, 1, 0],
|
|
64
|
+
Extrapolation.CLAMP,
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
contentStyle: {
|
|
69
|
+
transform: [{ scale }],
|
|
70
|
+
opacity,
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
transitionSpec: {
|
|
75
|
+
open: DefaultSpec,
|
|
76
|
+
close: DefaultSpec,
|
|
77
|
+
},
|
|
78
|
+
...config,
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const SlideFromBottom = (
|
|
83
|
+
config: Partial<ScreenTransitionConfig> = {},
|
|
84
|
+
): ScreenTransitionConfig => {
|
|
85
|
+
return {
|
|
86
|
+
enableTransitions: true,
|
|
87
|
+
gestureEnabled: true,
|
|
88
|
+
gestureDirection: "vertical",
|
|
89
|
+
screenStyleInterpolator: ({
|
|
90
|
+
layouts: {
|
|
91
|
+
screen: { height },
|
|
92
|
+
},
|
|
93
|
+
progress,
|
|
94
|
+
}) => {
|
|
95
|
+
"worklet";
|
|
96
|
+
|
|
97
|
+
const y = interpolate(progress, [0, 1, 2], [height, 0, -height]);
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
contentStyle: {
|
|
101
|
+
transform: [{ translateY: y }],
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
transitionSpec: {
|
|
106
|
+
open: DefaultSpec,
|
|
107
|
+
close: DefaultSpec,
|
|
108
|
+
},
|
|
109
|
+
...config,
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export const DraggableCard = (
|
|
114
|
+
config: Partial<ScreenTransitionConfig> = {},
|
|
115
|
+
): ScreenTransitionConfig => {
|
|
116
|
+
return {
|
|
117
|
+
enableTransitions: true,
|
|
118
|
+
gestureEnabled: true,
|
|
119
|
+
gestureDirection: ["horizontal", "vertical"],
|
|
120
|
+
screenStyleInterpolator: ({ current, progress, layouts: { screen } }) => {
|
|
121
|
+
"worklet";
|
|
122
|
+
|
|
123
|
+
/** Combined */
|
|
124
|
+
const scale = interpolate(progress, [0, 1, 2], [0, 1, 0.75]);
|
|
125
|
+
|
|
126
|
+
/** Vertical */
|
|
127
|
+
const translateY = interpolate(
|
|
128
|
+
current.gesture.normalizedY,
|
|
129
|
+
[-1, 1],
|
|
130
|
+
[-screen.height * 0.5, screen.height * 0.5],
|
|
131
|
+
"clamp",
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
/** Horizontal */
|
|
135
|
+
const translateX = interpolate(
|
|
136
|
+
current.gesture.normalizedX,
|
|
137
|
+
[-1, 1],
|
|
138
|
+
[-screen.width * 0.5, screen.width * 0.5],
|
|
139
|
+
"clamp",
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
return {
|
|
143
|
+
contentStyle: {
|
|
144
|
+
transform: [{ scale }, { translateY: translateY }, { translateX }],
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
},
|
|
148
|
+
transitionSpec: {
|
|
149
|
+
open: DefaultSpec,
|
|
150
|
+
close: DefaultSpec,
|
|
151
|
+
},
|
|
152
|
+
...config,
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export const ElasticCard = (
|
|
157
|
+
config: Partial<ScreenTransitionConfig> & {
|
|
158
|
+
elasticFactor?: number;
|
|
159
|
+
} = { elasticFactor: 0.5 },
|
|
160
|
+
): ScreenTransitionConfig => {
|
|
161
|
+
return {
|
|
162
|
+
enableTransitions: true,
|
|
163
|
+
gestureEnabled: true,
|
|
164
|
+
gestureDirection: "bidirectional",
|
|
165
|
+
screenStyleInterpolator: ({
|
|
166
|
+
current,
|
|
167
|
+
next,
|
|
168
|
+
layouts: { screen },
|
|
169
|
+
progress,
|
|
170
|
+
}) => {
|
|
171
|
+
"worklet";
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Applies to both screens ( previous and incoming)
|
|
175
|
+
*/
|
|
176
|
+
const scale = interpolate(progress, [0, 1, 2], [0, 1, 0.8]);
|
|
177
|
+
|
|
178
|
+
// applies to current screen
|
|
179
|
+
const maxElasticityX = screen.width * (config.elasticFactor ?? 0.5);
|
|
180
|
+
const maxElasticityY = screen.height * (config.elasticFactor ?? 0.5);
|
|
181
|
+
const translateX = interpolate(
|
|
182
|
+
current.gesture.normalizedX,
|
|
183
|
+
[-1, 0, 1],
|
|
184
|
+
[-maxElasticityX, 0, maxElasticityX],
|
|
185
|
+
"clamp",
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
const translateY = interpolate(
|
|
189
|
+
current.gesture.normalizedY,
|
|
190
|
+
[-1, 0, 1],
|
|
191
|
+
[-maxElasticityY, 0, maxElasticityY],
|
|
192
|
+
"clamp",
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
// applies to unfocused screen ( previous screen )
|
|
196
|
+
const overlayColor = interpolateColor(
|
|
197
|
+
progress,
|
|
198
|
+
[0, 1],
|
|
199
|
+
["rgba(0,0,0,0)", "rgba(0,0,0,0.5)"],
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
return {
|
|
203
|
+
contentStyle: {
|
|
204
|
+
transform: [{ scale }, { translateX }, { translateY }],
|
|
205
|
+
},
|
|
206
|
+
overlayStyle: {
|
|
207
|
+
backgroundColor: !next ? overlayColor : "rgba(0,0,0,0)",
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
},
|
|
211
|
+
transitionSpec: {
|
|
212
|
+
open: DefaultSpec,
|
|
213
|
+
close: DefaultSpec,
|
|
214
|
+
},
|
|
215
|
+
...config,
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
export const SharedIGImage = (
|
|
220
|
+
config: Partial<ScreenTransitionConfig> = {},
|
|
221
|
+
): ScreenTransitionConfig => {
|
|
222
|
+
return {
|
|
223
|
+
gestureEnabled: true,
|
|
224
|
+
gestureDirection: ["vertical", "horizontal"],
|
|
225
|
+
enableTransitions: true,
|
|
226
|
+
gestureDrivesProgress: false,
|
|
227
|
+
screenStyleInterpolator: ({
|
|
228
|
+
current,
|
|
229
|
+
layouts: {
|
|
230
|
+
screen: { height, width },
|
|
231
|
+
},
|
|
232
|
+
bounds,
|
|
233
|
+
progress,
|
|
234
|
+
focused,
|
|
235
|
+
activeBoundId,
|
|
236
|
+
active,
|
|
237
|
+
}) => {
|
|
238
|
+
"worklet";
|
|
239
|
+
|
|
240
|
+
const normX = active.gesture.normalizedX;
|
|
241
|
+
const normY = active.gesture.normalizedY;
|
|
242
|
+
|
|
243
|
+
// animations for both bounds
|
|
244
|
+
const dragX = interpolate(
|
|
245
|
+
normX,
|
|
246
|
+
[-1, 0, 1],
|
|
247
|
+
[-width * 0.7, 0, width * 0.7],
|
|
248
|
+
"clamp",
|
|
249
|
+
);
|
|
250
|
+
const dragY = interpolate(
|
|
251
|
+
normY,
|
|
252
|
+
[-1, 0, 1],
|
|
253
|
+
[-height * 0.4, 0, height * 0.4],
|
|
254
|
+
"clamp",
|
|
255
|
+
);
|
|
256
|
+
const dragXScale = interpolate(normX, [0, 1], [1, 0.8]);
|
|
257
|
+
const dragYScale = interpolate(normY, [0, 1], [1, 0.8]);
|
|
258
|
+
|
|
259
|
+
const boundValues = bounds({
|
|
260
|
+
method: focused ? "content" : "transform",
|
|
261
|
+
scaleMode: "uniform",
|
|
262
|
+
raw: true,
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
// focused specific animations
|
|
266
|
+
if (focused) {
|
|
267
|
+
const maskedValues = bounds({
|
|
268
|
+
space: "absolute",
|
|
269
|
+
target: "fullscreen",
|
|
270
|
+
method: "size",
|
|
271
|
+
raw: true,
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
return {
|
|
275
|
+
overlayStyle: {
|
|
276
|
+
backgroundColor: "black",
|
|
277
|
+
opacity: interpolate(progress, [0, 1], [0, 0.5]),
|
|
278
|
+
},
|
|
279
|
+
contentStyle: {
|
|
280
|
+
transform: [
|
|
281
|
+
{ translateX: dragX },
|
|
282
|
+
{ translateY: dragY },
|
|
283
|
+
{ scale: dragXScale },
|
|
284
|
+
{ scale: dragYScale },
|
|
285
|
+
],
|
|
286
|
+
},
|
|
287
|
+
|
|
288
|
+
_ROOT_CONTAINER: {
|
|
289
|
+
transform: [
|
|
290
|
+
{ translateX: boundValues.translateX || 0 },
|
|
291
|
+
{ translateY: boundValues.translateY || 0 },
|
|
292
|
+
//@ts-expect-error
|
|
293
|
+
{ scale: boundValues.scale || 1 },
|
|
294
|
+
],
|
|
295
|
+
},
|
|
296
|
+
_ROOT_MASKED: {
|
|
297
|
+
width: maskedValues.width,
|
|
298
|
+
height: maskedValues.height,
|
|
299
|
+
transform: [
|
|
300
|
+
{ translateX: maskedValues.translateX || 0 },
|
|
301
|
+
{ translateY: maskedValues.translateY || 0 },
|
|
302
|
+
],
|
|
303
|
+
borderRadius: interpolate(progress, [0, 1], [0, 24]),
|
|
304
|
+
},
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
return {
|
|
309
|
+
contentStyle: {
|
|
310
|
+
pointerEvents: current.gesture.isDismissing ? "none" : "auto",
|
|
311
|
+
},
|
|
312
|
+
[activeBoundId]: {
|
|
313
|
+
transform: [
|
|
314
|
+
{ translateX: dragX || 0 },
|
|
315
|
+
{ translateY: dragY || 0 },
|
|
316
|
+
{ translateX: boundValues.translateX || 0 },
|
|
317
|
+
{ translateY: boundValues.translateY || 0 },
|
|
318
|
+
{ scaleX: boundValues.scaleX || 1 },
|
|
319
|
+
{ scaleY: boundValues.scaleY || 1 },
|
|
320
|
+
{ scale: dragXScale },
|
|
321
|
+
{ scale: dragYScale },
|
|
322
|
+
],
|
|
323
|
+
},
|
|
324
|
+
};
|
|
325
|
+
},
|
|
326
|
+
transitionSpec: {
|
|
327
|
+
open: {
|
|
328
|
+
stiffness: 1500,
|
|
329
|
+
damping: 1000,
|
|
330
|
+
mass: 3,
|
|
331
|
+
overshootClamping: true,
|
|
332
|
+
//@ts-expect-error
|
|
333
|
+
restSpeedThreshold: 0.02,
|
|
334
|
+
},
|
|
335
|
+
close: {
|
|
336
|
+
stiffness: 1500,
|
|
337
|
+
damping: 1000,
|
|
338
|
+
mass: 3,
|
|
339
|
+
overshootClamping: true,
|
|
340
|
+
//@ts-expect-error
|
|
341
|
+
restSpeedThreshold: 0.02,
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
...config,
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
export const SharedAppleMusic = (
|
|
349
|
+
config: Partial<ScreenTransitionConfig> = {},
|
|
350
|
+
): ScreenTransitionConfig => {
|
|
351
|
+
return {
|
|
352
|
+
enableTransitions: true,
|
|
353
|
+
gestureEnabled: true,
|
|
354
|
+
gestureDirection: ["vertical", "horizontal"],
|
|
355
|
+
gestureDrivesProgress: false,
|
|
356
|
+
screenStyleInterpolator: ({
|
|
357
|
+
bounds,
|
|
358
|
+
activeBoundId,
|
|
359
|
+
focused,
|
|
360
|
+
progress,
|
|
361
|
+
layouts: { screen },
|
|
362
|
+
current,
|
|
363
|
+
active,
|
|
364
|
+
}) => {
|
|
365
|
+
"worklet";
|
|
366
|
+
|
|
367
|
+
const normX = active.gesture.normalizedX;
|
|
368
|
+
const normY = active.gesture.normalizedY;
|
|
369
|
+
const initialDirection = active.gesture.direction;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* ===============================
|
|
373
|
+
* Animations for both bounds
|
|
374
|
+
* ===============================
|
|
375
|
+
*/
|
|
376
|
+
const xResistance = initialDirection === "horizontal" ? 0.7 : 0.4;
|
|
377
|
+
const yResistance = initialDirection === "vertical" ? 0.7 : 0.4;
|
|
378
|
+
|
|
379
|
+
const xScaleOuput = initialDirection === "horizontal" ? [1, 0.5] : [1, 1];
|
|
380
|
+
const yScaleOuput = initialDirection === "vertical" ? [1, 0.5] : [1, 1];
|
|
381
|
+
|
|
382
|
+
const dragX = interpolate(
|
|
383
|
+
normX,
|
|
384
|
+
[-1, 0, 1],
|
|
385
|
+
[-screen.width * xResistance, 0, screen.width * xResistance],
|
|
386
|
+
"clamp",
|
|
387
|
+
);
|
|
388
|
+
const dragY = interpolate(
|
|
389
|
+
normY,
|
|
390
|
+
[-1, 0, 1],
|
|
391
|
+
[-screen.height * yResistance, 0, screen.height * yResistance],
|
|
392
|
+
"clamp",
|
|
393
|
+
);
|
|
394
|
+
const dragXScale = interpolate(normX, [0, 1], xScaleOuput);
|
|
395
|
+
const dragYScale = interpolate(normY, [0, 1], yScaleOuput);
|
|
396
|
+
|
|
397
|
+
const boundValues = bounds({
|
|
398
|
+
method: focused ? "content" : "transform",
|
|
399
|
+
anchor: "top",
|
|
400
|
+
scaleMode: "uniform",
|
|
401
|
+
raw: true,
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
const opacity = interpolate(
|
|
405
|
+
progress,
|
|
406
|
+
[0, 0.25, 1.25, 2],
|
|
407
|
+
[0, 1, 1, 0],
|
|
408
|
+
"clamp",
|
|
409
|
+
);
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* ===============================
|
|
413
|
+
* Focused specific animations
|
|
414
|
+
* ===============================
|
|
415
|
+
*/
|
|
416
|
+
if (focused) {
|
|
417
|
+
const maskedValues = bounds({
|
|
418
|
+
space: "absolute",
|
|
419
|
+
method: "size",
|
|
420
|
+
target: "fullscreen",
|
|
421
|
+
raw: true,
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
// Apple Music style drop shadow that increases with drag magnitude
|
|
425
|
+
const dragMagnitude = Math.max(Math.abs(normX), Math.abs(normY));
|
|
426
|
+
const shadowOpacity = interpolate(
|
|
427
|
+
dragMagnitude,
|
|
428
|
+
[0, 1],
|
|
429
|
+
[0, 0.25],
|
|
430
|
+
"clamp",
|
|
431
|
+
);
|
|
432
|
+
const shadowRadius = interpolate(
|
|
433
|
+
dragMagnitude,
|
|
434
|
+
[0, 1],
|
|
435
|
+
[0, 24],
|
|
436
|
+
"clamp",
|
|
437
|
+
);
|
|
438
|
+
const shadowOffsetY = interpolate(
|
|
439
|
+
dragMagnitude,
|
|
440
|
+
[0, 1],
|
|
441
|
+
[0, 20],
|
|
442
|
+
"clamp",
|
|
443
|
+
);
|
|
444
|
+
const elevation = interpolate(dragMagnitude, [0, 1], [0, 24], "clamp");
|
|
445
|
+
|
|
446
|
+
const IOSShadowStyle = {
|
|
447
|
+
shadowColor: "#000",
|
|
448
|
+
shadowOpacity,
|
|
449
|
+
shadowRadius,
|
|
450
|
+
shadowOffset: { width: 0, height: shadowOffsetY },
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
const AndroidShadowStyle = {
|
|
454
|
+
elevation,
|
|
455
|
+
shadowColor: "#000",
|
|
456
|
+
};
|
|
457
|
+
|
|
458
|
+
return {
|
|
459
|
+
contentStyle: {
|
|
460
|
+
pointerEvents: current.animating ? "none" : "auto",
|
|
461
|
+
transform: [
|
|
462
|
+
{ translateX: dragX || 0 },
|
|
463
|
+
{ translateY: dragY || 0 },
|
|
464
|
+
{ scale: dragXScale },
|
|
465
|
+
{ scale: dragYScale },
|
|
466
|
+
],
|
|
467
|
+
opacity,
|
|
468
|
+
...(platform === "ios" ? IOSShadowStyle : AndroidShadowStyle),
|
|
469
|
+
},
|
|
470
|
+
_ROOT_CONTAINER: {
|
|
471
|
+
transform: [
|
|
472
|
+
{ translateX: boundValues.translateX || 0 },
|
|
473
|
+
{ translateY: boundValues.translateY || 0 },
|
|
474
|
+
//@ts-expect-error
|
|
475
|
+
{ scale: boundValues.scale || 1 },
|
|
476
|
+
],
|
|
477
|
+
},
|
|
478
|
+
_ROOT_MASKED: {
|
|
479
|
+
width: maskedValues.width,
|
|
480
|
+
height: maskedValues.height,
|
|
481
|
+
transform: [
|
|
482
|
+
{ translateX: maskedValues.translateX || 0 },
|
|
483
|
+
{ translateY: maskedValues.translateY || 0 },
|
|
484
|
+
],
|
|
485
|
+
borderRadius: interpolate(progress, [0, 1], [0, 24]),
|
|
486
|
+
},
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* ===============================
|
|
492
|
+
* Unfocused specific animations
|
|
493
|
+
* ===============================
|
|
494
|
+
*/
|
|
495
|
+
|
|
496
|
+
const scaledBoundTranslateX = (boundValues.translateX || 0) * dragXScale;
|
|
497
|
+
const scaledBoundTranslateY = (boundValues.translateY || 0) * dragYScale;
|
|
498
|
+
const scaledBoundScaleX = (boundValues.scaleX || 1) * dragXScale;
|
|
499
|
+
const scaledBoundScaleY = (boundValues.scaleY || 1) * dragYScale;
|
|
500
|
+
|
|
501
|
+
const contentScale = interpolate(progress, [1, 2], [1, 0.9], "clamp");
|
|
502
|
+
|
|
503
|
+
return {
|
|
504
|
+
[activeBoundId]: {
|
|
505
|
+
transform: [
|
|
506
|
+
{ translateX: dragX || 0 },
|
|
507
|
+
{ translateY: dragY || 0 },
|
|
508
|
+
{ translateX: scaledBoundTranslateX },
|
|
509
|
+
{ translateY: scaledBoundTranslateY },
|
|
510
|
+
{ scale: dragXScale },
|
|
511
|
+
{ scale: dragYScale },
|
|
512
|
+
{ scaleX: scaledBoundScaleX },
|
|
513
|
+
{ scaleY: scaledBoundScaleY },
|
|
514
|
+
],
|
|
515
|
+
opacity,
|
|
516
|
+
zIndex: current.animating ? 999 : -1,
|
|
517
|
+
position: "relative",
|
|
518
|
+
},
|
|
519
|
+
contentStyle: {
|
|
520
|
+
transform: [{ scale: contentScale }],
|
|
521
|
+
},
|
|
522
|
+
};
|
|
523
|
+
},
|
|
524
|
+
transitionSpec: {
|
|
525
|
+
open: {
|
|
526
|
+
stiffness: 1000,
|
|
527
|
+
damping: 500,
|
|
528
|
+
mass: 3,
|
|
529
|
+
overshootClamping: true,
|
|
530
|
+
//@ts-expect-error
|
|
531
|
+
restSpeedThreshold: 0.02,
|
|
532
|
+
},
|
|
533
|
+
close: {
|
|
534
|
+
stiffness: 600,
|
|
535
|
+
damping: 60,
|
|
536
|
+
mass: 4,
|
|
537
|
+
overshootClamping: false,
|
|
538
|
+
//@ts-expect-error
|
|
539
|
+
restSpeedThreshold: 0.02,
|
|
540
|
+
restDisplacementThreshold: 0.002,
|
|
541
|
+
},
|
|
542
|
+
},
|
|
543
|
+
...config,
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
export const SharedXImage = (
|
|
548
|
+
config: Partial<ScreenTransitionConfig> = {},
|
|
549
|
+
): ScreenTransitionConfig => {
|
|
550
|
+
return {
|
|
551
|
+
enableTransitions: true,
|
|
552
|
+
gestureEnabled: true,
|
|
553
|
+
gestureDirection: ["vertical", "vertical-inverted"],
|
|
554
|
+
gestureDrivesProgress: false,
|
|
555
|
+
screenStyleInterpolator: ({
|
|
556
|
+
focused,
|
|
557
|
+
activeBoundId,
|
|
558
|
+
bounds,
|
|
559
|
+
current,
|
|
560
|
+
layouts: { screen },
|
|
561
|
+
progress,
|
|
562
|
+
}) => {
|
|
563
|
+
"worklet";
|
|
564
|
+
|
|
565
|
+
// twitter doesn't animate the unfocused screen
|
|
566
|
+
if (!focused) return {};
|
|
567
|
+
|
|
568
|
+
const boundValues = bounds({ method: "transform", raw: true });
|
|
569
|
+
|
|
570
|
+
// content styles
|
|
571
|
+
const dragY = interpolate(
|
|
572
|
+
current.gesture.normalizedY,
|
|
573
|
+
[-1, 0, 1],
|
|
574
|
+
[-screen.height, 0, screen.height],
|
|
575
|
+
);
|
|
576
|
+
|
|
577
|
+
// dynamically changes direction based on the drag direction
|
|
578
|
+
const contentY = interpolate(
|
|
579
|
+
progress,
|
|
580
|
+
[0, 1],
|
|
581
|
+
[dragY >= 0 ? screen.height : -screen.height, 0],
|
|
582
|
+
);
|
|
583
|
+
|
|
584
|
+
const overlayClr = interpolateColor(
|
|
585
|
+
current.progress - Math.abs(current.gesture.normalizedY),
|
|
586
|
+
[0, 1],
|
|
587
|
+
["rgba(0,0,0,0)", "rgba(0,0,0,1)"],
|
|
588
|
+
);
|
|
589
|
+
|
|
590
|
+
const borderRadius = interpolate(current.progress, [0, 1], [12, 0]);
|
|
591
|
+
|
|
592
|
+
// bound styles - only enter animation
|
|
593
|
+
const x = !current.closing ? boundValues.translateX : 0;
|
|
594
|
+
const y = !current.closing ? boundValues.translateY : 0;
|
|
595
|
+
const scaleX = !current.closing ? boundValues.scaleX : 1;
|
|
596
|
+
const scaleY = !current.closing ? boundValues.scaleY : 1;
|
|
597
|
+
|
|
598
|
+
return {
|
|
599
|
+
[activeBoundId]: {
|
|
600
|
+
transform: [
|
|
601
|
+
{
|
|
602
|
+
translateX: x,
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
translateY: y,
|
|
606
|
+
},
|
|
607
|
+
{ scaleX: scaleX },
|
|
608
|
+
{ scaleY: scaleY },
|
|
609
|
+
],
|
|
610
|
+
borderRadius,
|
|
611
|
+
overflow: "hidden",
|
|
612
|
+
},
|
|
613
|
+
contentStyle: {
|
|
614
|
+
transform: [{ translateY: contentY }, { translateY: dragY }],
|
|
615
|
+
pointerEvents: current.animating ? "none" : "auto",
|
|
616
|
+
},
|
|
617
|
+
overlayStyle: {
|
|
618
|
+
backgroundColor: overlayClr,
|
|
619
|
+
},
|
|
620
|
+
};
|
|
621
|
+
},
|
|
622
|
+
transitionSpec: {
|
|
623
|
+
open: DefaultSpec,
|
|
624
|
+
close: DefaultSpec,
|
|
625
|
+
},
|
|
626
|
+
...config,
|
|
627
|
+
};
|
|
628
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { ParamListBase, RouteProp } from "@react-navigation/native";
|
|
2
|
+
import type { MeasuredDimensions } from "react-native-reanimated";
|
|
3
|
+
import type { ScreenTransitionState } from "./types/animation";
|
|
4
|
+
import type { BoundEntry } from "./types/bounds";
|
|
5
|
+
import type { Layout } from "./types/core";
|
|
6
|
+
import type { ActivationArea } from "./types/gesture";
|
|
7
|
+
import type { Complete } from "./types/utils";
|
|
8
|
+
import type { BoundsBuilderOptions } from "./utils/bounds/_types/builder";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Masked view integration
|
|
12
|
+
*/
|
|
13
|
+
export const MASK_STYLE_ID = "_ROOT_MASKED";
|
|
14
|
+
export const CONTAINER_STYLE_ID = "_ROOT_CONTAINER";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Styles
|
|
18
|
+
*/
|
|
19
|
+
export const NO_STYLES = Object.freeze({});
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Default screen transition state
|
|
23
|
+
*/
|
|
24
|
+
export const DEFAULT_SCREEN_TRANSITION_STATE: ScreenTransitionState =
|
|
25
|
+
Object.freeze({
|
|
26
|
+
progress: 0,
|
|
27
|
+
closing: 0,
|
|
28
|
+
animating: 0,
|
|
29
|
+
gesture: {
|
|
30
|
+
x: 0,
|
|
31
|
+
y: 0,
|
|
32
|
+
normalizedX: 0,
|
|
33
|
+
normalizedY: 0,
|
|
34
|
+
isDismissing: 0,
|
|
35
|
+
isDragging: 0,
|
|
36
|
+
direction: null,
|
|
37
|
+
},
|
|
38
|
+
bounds: {} as Record<string, BoundEntry>,
|
|
39
|
+
route: {} as RouteProp<ParamListBase>,
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Bounds API Defaults
|
|
44
|
+
*/
|
|
45
|
+
export const NO_BOUNDS_MAP: Record<string, BoundEntry> = Object.freeze({});
|
|
46
|
+
export const EMPTY_BOUND_HELPER_RESULT = Object.freeze({});
|
|
47
|
+
export const EMPTY_BOUND_HELPER_RESULT_RAW = Object.freeze({
|
|
48
|
+
scaleX: 1,
|
|
49
|
+
scaleY: 1,
|
|
50
|
+
scale: 1,
|
|
51
|
+
translateX: 0,
|
|
52
|
+
translateY: 0,
|
|
53
|
+
width: 0,
|
|
54
|
+
height: 0,
|
|
55
|
+
});
|
|
56
|
+
export const ENTER_RANGE = [0, 1] as const;
|
|
57
|
+
export const EXIT_RANGE = [1, 2] as const;
|
|
58
|
+
|
|
59
|
+
export const FULLSCREEN_DIMENSIONS = (
|
|
60
|
+
dimensions: Layout,
|
|
61
|
+
): MeasuredDimensions => {
|
|
62
|
+
"worklet";
|
|
63
|
+
return {
|
|
64
|
+
x: 0,
|
|
65
|
+
y: 0,
|
|
66
|
+
pageX: 0,
|
|
67
|
+
pageY: 0,
|
|
68
|
+
width: dimensions.width,
|
|
69
|
+
height: dimensions.height,
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const DEFAULT_BUILDER_OPTIONS: Complete<
|
|
74
|
+
Omit<BoundsBuilderOptions, "id">
|
|
75
|
+
> = Object.freeze({
|
|
76
|
+
gestures: { x: 0, y: 0 },
|
|
77
|
+
toFullscreen: false,
|
|
78
|
+
absolute: false,
|
|
79
|
+
relative: true,
|
|
80
|
+
method: "transform",
|
|
81
|
+
contentScaleMode: "auto",
|
|
82
|
+
//
|
|
83
|
+
space: "relative",
|
|
84
|
+
target: "bound",
|
|
85
|
+
scaleMode: "match",
|
|
86
|
+
anchor: "center",
|
|
87
|
+
raw: false,
|
|
88
|
+
} as const);
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Default gesture config
|
|
92
|
+
*/
|
|
93
|
+
export const GESTURE_VELOCITY_IMPACT = 0.3;
|
|
94
|
+
export const DEFAULT_GESTURE_DIRECTION = "horizontal";
|
|
95
|
+
export const DEFAULT_GESTURE_ENABLED = false;
|
|
96
|
+
export const DEFAULT_GESTURE_DRIVES_PROGRESS = true;
|
|
97
|
+
export const DEFAULT_GESTURE_ACTIVATION_AREA: ActivationArea = "screen";
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Default gesture offset
|
|
101
|
+
*/
|
|
102
|
+
export const GESTURE_ACTIVATION_THRESHOLD_X = 10;
|
|
103
|
+
export const GESTURE_ACTIVATION_THRESHOLD_Y = 10;
|
|
104
|
+
export const GESTURE_FAIL_TOLERANCE_X = 15;
|
|
105
|
+
export const GESTURE_FAIL_TOLERANCE_Y = 20;
|
|
106
|
+
export const DEFAULT_EDGE_DISTANCE_HORIZONTAL = 50;
|
|
107
|
+
export const DEFAULT_EDGE_DISTANCE_VERTICAL = 135;
|
|
108
|
+
export const DEFAULT_ACTIVATION_AREA = "screen" as const;
|