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
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StyleSheet } from "react-native";
|
|
4
|
+
import Animated, { interpolate, useAnimatedProps, useDerivedValue, useSharedValue } from "react-native-reanimated";
|
|
5
|
+
import { Screen as RNSScreen } from "react-native-screens";
|
|
6
|
+
import { AnimationStore } from "../../shared/stores/animation-store";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
const EPSILON = 1e-5;
|
|
9
|
+
const STATE_INACTIVE = 0;
|
|
10
|
+
const STATE_TRANSITIONING_OR_BELOW_TOP = 1;
|
|
11
|
+
const STATE_ON_TOP = 2;
|
|
12
|
+
const AnimatedScreen = Animated.createAnimatedComponent(RNSScreen);
|
|
13
|
+
export const Screen = ({
|
|
14
|
+
routeKey,
|
|
15
|
+
index,
|
|
16
|
+
routes,
|
|
17
|
+
isPreloaded,
|
|
18
|
+
activeScreensLimit,
|
|
19
|
+
children,
|
|
20
|
+
freezeOnBlur,
|
|
21
|
+
shouldFreeze
|
|
22
|
+
}) => {
|
|
23
|
+
const sceneProgress = AnimationStore.getAnimation(routeKey, "progress");
|
|
24
|
+
const screenActivity = useSharedValue(1);
|
|
25
|
+
useDerivedValue(() => {
|
|
26
|
+
if (!sceneProgress) {
|
|
27
|
+
screenActivity.value = STATE_TRANSITIONING_OR_BELOW_TOP;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (index < routes.length - activeScreensLimit - 1 || isPreloaded) {
|
|
31
|
+
screenActivity.value = STATE_INACTIVE;
|
|
32
|
+
} else {
|
|
33
|
+
const outputValue = index === routes.length - 1 ? STATE_ON_TOP : index >= routes.length - activeScreensLimit ? STATE_TRANSITIONING_OR_BELOW_TOP : STATE_INACTIVE;
|
|
34
|
+
const v = interpolate(sceneProgress.value, [0, 1 - EPSILON, 1], [1, 1, outputValue], "clamp");
|
|
35
|
+
const next = Math.trunc(v) ?? STATE_TRANSITIONING_OR_BELOW_TOP;
|
|
36
|
+
|
|
37
|
+
// avoid spamming JS thread
|
|
38
|
+
if (next !== screenActivity.value) {
|
|
39
|
+
screenActivity.value = next;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const animatedProps = useAnimatedProps(() => {
|
|
44
|
+
return {
|
|
45
|
+
activityState: screenActivity.value,
|
|
46
|
+
shouldFreeze: screenActivity.value === STATE_INACTIVE && shouldFreeze
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
return /*#__PURE__*/_jsx(AnimatedScreen, {
|
|
50
|
+
enabled: true,
|
|
51
|
+
style: StyleSheet.absoluteFill,
|
|
52
|
+
pointerEvents: "box-none",
|
|
53
|
+
freezeOnBlur: freezeOnBlur,
|
|
54
|
+
animatedProps: animatedProps,
|
|
55
|
+
children: children
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=Screens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","Animated","interpolate","useAnimatedProps","useDerivedValue","useSharedValue","Screen","RNSScreen","AnimationStore","jsx","_jsx","EPSILON","STATE_INACTIVE","STATE_TRANSITIONING_OR_BELOW_TOP","STATE_ON_TOP","AnimatedScreen","createAnimatedComponent","routeKey","index","routes","isPreloaded","activeScreensLimit","children","freezeOnBlur","shouldFreeze","sceneProgress","getAnimation","screenActivity","value","length","outputValue","v","next","Math","trunc","animatedProps","activityState","enabled","style","absoluteFill","pointerEvents"],"sourceRoot":"../../../../src","sources":["blank-stack/components/Screens.tsx"],"mappings":";;AAEA,SAASA,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,IACdC,WAAW,EACXC,gBAAgB,EAChBC,eAAe,EACfC,cAAc,QACR,yBAAyB;AAChC,SAASC,MAAM,IAAIC,SAAS,QAAQ,sBAAsB;AAC1D,SAASC,cAAc,QAAQ,qCAAqC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAarE,MAAMC,OAAO,GAAG,IAAI;AAEpB,MAAMC,cAAc,GAAG,CAAC;AACxB,MAAMC,gCAAgC,GAAG,CAAC;AAC1C,MAAMC,YAAY,GAAG,CAAC;AAEtB,MAAMC,cAAc,GAAGd,QAAQ,CAACe,uBAAuB,CAACT,SAAS,CAAC;AAElE,OAAO,MAAMD,MAAM,GAAGA,CAAC;EACtBW,QAAQ;EACRC,KAAK;EACLC,MAAM;EACNC,WAAW;EACXC,kBAAkB;EAClBC,QAAQ;EACRC,YAAY;EACZC;AACY,CAAC,KAAK;EAClB,MAAMC,aAAa,GAAGjB,cAAc,CAACkB,YAAY,CAACT,QAAQ,EAAE,UAAU,CAAC;EACvE,MAAMU,cAAc,GAAGtB,cAAc,CAAY,CAAC,CAAC;EAEnDD,eAAe,CAAC,MAAM;IACrB,IAAI,CAACqB,aAAa,E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
|
|
2
|
+
|
|
3
|
+
import { SafeAreaProviderCompat } from "@react-navigation/elements";
|
|
4
|
+
import { NavigationContext, NavigationRouteContext } from "@react-navigation/native";
|
|
5
|
+
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
|
6
|
+
import { ScreenContainer } from "react-native-screens";
|
|
7
|
+
import { BlankStackScreenLifecycleController } from "../../shared/components/controllers/screen-lifecycle";
|
|
8
|
+
import { ScreenTransitionProvider } from "../../shared/providers/screen-transition-provider";
|
|
9
|
+
import { withStackNavigationProvider } from "../utils/with-stack-navigation";
|
|
10
|
+
import { Overlay } from "./Overlay";
|
|
11
|
+
import { Screen } from "./Screens";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
function isFabric() {
|
|
14
|
+
return "nativeFabricUIManager" in global;
|
|
15
|
+
}
|
|
16
|
+
const SceneView = ({
|
|
17
|
+
descriptor
|
|
18
|
+
}) => {
|
|
19
|
+
const {
|
|
20
|
+
route,
|
|
21
|
+
navigation,
|
|
22
|
+
render
|
|
23
|
+
} = descriptor;
|
|
24
|
+
return /*#__PURE__*/_jsx(NavigationContext.Provider, {
|
|
25
|
+
value: navigation,
|
|
26
|
+
children: /*#__PURE__*/_jsxs(NavigationRouteContext.Provider, {
|
|
27
|
+
value: route,
|
|
28
|
+
children: [descriptor.options.overlayMode === "screen" && /*#__PURE__*/_jsx(Overlay.Screen, {}), render()]
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
export const StackView = withStackNavigationProvider(({
|
|
33
|
+
activeScreensLimit,
|
|
34
|
+
descriptors,
|
|
35
|
+
focusedIndex,
|
|
36
|
+
routes,
|
|
37
|
+
scenes,
|
|
38
|
+
shouldShowFloatOverlay
|
|
39
|
+
}) => {
|
|
40
|
+
return /*#__PURE__*/_jsx(GestureHandlerRootView, {
|
|
41
|
+
children: /*#__PURE__*/_jsxs(SafeAreaProviderCompat, {
|
|
42
|
+
children: [shouldShowFloatOverlay ? /*#__PURE__*/_jsx(Overlay.Float, {}) : null, /*#__PURE__*/_jsx(ScreenContainer, {
|
|
43
|
+
style: {
|
|
44
|
+
flex: 1
|
|
45
|
+
},
|
|
46
|
+
children: scenes.map((scene, sceneIndex) => {
|
|
47
|
+
const descriptor = scene.descriptor;
|
|
48
|
+
const route = scene.route;
|
|
49
|
+
const isFocused = focusedIndex === sceneIndex;
|
|
50
|
+
const isBelowFocused = focusedIndex - 1 === sceneIndex;
|
|
51
|
+
const previousDescriptor = scenes[sceneIndex - 1]?.descriptor ?? undefined;
|
|
52
|
+
const nextDescriptor = scenes[sceneIndex + 1]?.descriptor ?? undefined;
|
|
53
|
+
const isPreloaded = descriptors[route.key] === undefined;
|
|
54
|
+
|
|
55
|
+
// On Fabric, when screen is frozen, animated and reanimated values are not updated
|
|
56
|
+
// due to component being unmounted. To avoid this, we don't freeze the previous screen there
|
|
57
|
+
const shouldFreeze = isFabric() ? !isPreloaded && !isFocused && !isBelowFocused : !isPreloaded && !isFocused;
|
|
58
|
+
return /*#__PURE__*/_jsx(Screen, {
|
|
59
|
+
isPreloaded: isPreloaded,
|
|
60
|
+
index: sceneIndex,
|
|
61
|
+
activeScreensLimit: activeScreensLimit,
|
|
62
|
+
routeKey: route.key,
|
|
63
|
+
routes: routes,
|
|
64
|
+
shouldFreeze: shouldFreeze,
|
|
65
|
+
freezeOnBlur: descriptor.options.freezeOnBlur,
|
|
66
|
+
children: /*#__PURE__*/_jsx(ScreenTransitionProvider, {
|
|
67
|
+
previous: previousDescriptor,
|
|
68
|
+
current: descriptor,
|
|
69
|
+
next: nextDescriptor,
|
|
70
|
+
LifecycleController: BlankStackScreenLifecycleController,
|
|
71
|
+
children: /*#__PURE__*/_jsx(SceneView, {
|
|
72
|
+
isFocused: isFocused,
|
|
73
|
+
sceneIndex: sceneIndex,
|
|
74
|
+
descriptor: descriptor
|
|
75
|
+
}, route.key)
|
|
76
|
+
})
|
|
77
|
+
}, route.key);
|
|
78
|
+
})
|
|
79
|
+
})]
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
//# sourceMappingURL=StackView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SafeAreaProviderCompat","NavigationContext","NavigationRouteContext","GestureHandlerRootView","ScreenContainer","BlankStackScreenLifecycleController","ScreenTransitionProvider","withStackNavigationProvider","Overlay","Screen","jsx","_jsx","jsxs","_jsxs","isFabric","global","SceneView","descriptor","route","navigation","render","Provider","value","children","options","overlayMode","StackView","activeScreensLimit","descriptors","focusedIndex","routes","scenes","shouldShowFloatOverlay","Float","style","flex","map","scene","sceneIndex","isFocused","isBelowFocused","previousDescriptor","undefined","nextDescriptor","isPreloaded","key","shouldFreeze","index","routeKey","freezeOnBlur","previous","current","next","LifecycleController"],"sourceRoot":"../../../../src","sources":["blank-stack/components/StackView.tsx"],"mappings":";;AAAA,SAASA,sBAAsB,QAAQ,4BAA4B;AACnE,SACCC,iBAAiB,EACjBC,sBAAsB,QAChB,0BAA0B;AACjC,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,mCAAmC,QAAQ,sDAAsD;AAC1G,SAASC,wBAAwB,QAAQ,mDAAmD;AAE5F,SAASC,2BAA2B,QAAQ,gCAAgC;AAC5E,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,MAAM,QAAQ,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEnC,SAASC,QAAQA,CAAA,EAAG;EACnB,OAAO,uBAAuB,IAAIC,MAAM;AACzC;AAQA,MAAMC,SAAS,GAAGA,CAAC;EAAEC;AAA2B,CAAC,KAAK;EACrD,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAO,CAAC,GAAGH,UAAU;EAEhD,oBACCN,IAAA,CAACV,iBAAiB,CAACoB,QAAQ;IAACC,KAAK,EAAEH,UAAW;IAA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QAAQ,CAAC,CAAC,GAC5B,CAAC8B,WAAW,IAAI,CAACL,SAAS,IAAI,CAACC,cAAc,GAC7C,CAACI,WAAW,IAAI,CAACL,SAAS;UAC7B,oBACC5B,IAAA,CAACF,MAAM;YAENmC,WAAW,EAAEA,WAAY;YACzBG,KAAK,EAAET,UAAW;YAClBX,kBAAkB,EAAEA,kBAAmB;YACvCqB,QAAQ,EAAE9B,KAAK,CAAC2B,GAAI;YACpBf,MAAM,EAAEA,MAAO;YACfgB,YAAY,EAAEA,YAAa;YAC3BG,YAAY,EAAEhC,UAAU,CAACO,OAAO,CAACyB,YAAa;YAAA1B,QAAA,eAE9CZ,IAAA,CAACL,wBAAwB;cACxB4C,QAAQ,EAAET,kBAAmB;cAC7BU,OAAO,EAAElC,UAAW;cACpBmC,IAAI,EAAET,cAAe;cACrBU,mBAAmB,EAAEhD,mCAAoC;cAAAkB,QAAA,eAEzDZ,IAAA,CAACK,SAAS;gBAETuB,SAAS,EAAEA,SAAU;gBACrBD,UAAU,EAAEA,UAAW;gBACvBrB,UAAU,EAAEA;cAAW,GAHlBC,KAAK,CAAC2B,GAIX;YAAC,CACuB;UAAC,GArBtB3B,KAAK,CAAC2B,GAsBJ,CAAC;QAEX,CAAC;MAAC,CACc,CAAC;IAAA,CACK;EAAC,CACF,CAAC;AAE3B,CACD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { useWindowDimensions } from "react-native";
|
|
5
|
+
import { useDerivedValue, useSharedValue } from "react-native-reanimated";
|
|
6
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
7
|
+
import { useSharedValueState } from "../../shared/hooks/use-shared-value-state";
|
|
8
|
+
import { useKeys } from "../../shared/providers/keys";
|
|
9
|
+
import { AnimationStore } from "../../shared/stores/animation-store";
|
|
10
|
+
import { GestureStore } from "../../shared/stores/gesture-store";
|
|
11
|
+
import { useStackNavigationContext } from "../utils/with-stack-navigation";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Aggregates progress values for the overlay owner and every scene that sits
|
|
15
|
+
* above it in the stack. The result can be consumed by floating overlays to
|
|
16
|
+
* drive animations that span multiple screens.
|
|
17
|
+
*/
|
|
18
|
+
export const useOverlayAnimation = () => {
|
|
19
|
+
const {
|
|
20
|
+
current
|
|
21
|
+
} = useKeys();
|
|
22
|
+
const {
|
|
23
|
+
scenes,
|
|
24
|
+
focusedIndex
|
|
25
|
+
} = useStackNavigationContext();
|
|
26
|
+
const routeKey = current?.route?.key;
|
|
27
|
+
const gestureState = routeKey ? GestureStore.getRouteGestures(routeKey) : null;
|
|
28
|
+
const fallbackIsDismissing = useSharedValue(0);
|
|
29
|
+
const progressValues = useMemo(() => {
|
|
30
|
+
if (!routeKey) {
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
const overlayIndex = scenes.findIndex(scene => scene.route.key === routeKey);
|
|
34
|
+
if (overlayIndex === -1) {
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
37
|
+
return scenes.slice(overlayIndex).map(scene => {
|
|
38
|
+
return AnimationStore.getAll(scene.route.key);
|
|
39
|
+
});
|
|
40
|
+
}, [routeKey, scenes]);
|
|
41
|
+
const accumulatedProgress = useDerivedValue(() => {
|
|
42
|
+
"worklet";
|
|
43
|
+
|
|
44
|
+
let total = 0;
|
|
45
|
+
for (let i = 0; i < progressValues.length; i += 1) {
|
|
46
|
+
total += progressValues[i].progress.value;
|
|
47
|
+
}
|
|
48
|
+
return total;
|
|
49
|
+
}, [progressValues]);
|
|
50
|
+
const optimisticActiveIndexValue = useDerivedValue(() => {
|
|
51
|
+
"worklet";
|
|
52
|
+
|
|
53
|
+
const activeIndex = progressValues.length - 1;
|
|
54
|
+
const isOneDismissing = Number(progressValues.some(value => value.closing.value > 0));
|
|
55
|
+
const optimisticIndex = activeIndex - isOneDismissing;
|
|
56
|
+
return optimisticIndex;
|
|
57
|
+
});
|
|
58
|
+
const optimisticActiveIndex = useSharedValueState(optimisticActiveIndexValue);
|
|
59
|
+
const screen = useWindowDimensions();
|
|
60
|
+
const insets = useSafeAreaInsets();
|
|
61
|
+
const animation = useDerivedValue(() => ({
|
|
62
|
+
progress: accumulatedProgress.value,
|
|
63
|
+
layouts: {
|
|
64
|
+
screen
|
|
65
|
+
},
|
|
66
|
+
insets
|
|
67
|
+
}));
|
|
68
|
+
return {
|
|
69
|
+
animation,
|
|
70
|
+
optimisticActiveIndex
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=use-overlay-animation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useMemo","useWindowDimensions","useDerivedValue","useSharedValue","useSafeAreaInsets","useSharedValueState","useKeys","AnimationStore","GestureStore","useStackNavigationContext","useOverlayAnimation","current","scenes","focusedIndex","routeKey","route","key","gestureState","getRouteGestures","fallbackIsDismissing","progressValues","overlayIndex","findIndex","scene","slice","map","getAll","accumulatedProgress","total","i","length","progress","value","optimisticActiveIndexValue","activeIndex","isOneDismissing","Number","some","closing","optimisticIndex","optimisticActiveIndex","screen","insets","animation","layouts"],"sourceRoot":"../../../../src","sources":["blank-stack/hooks/use-overlay-animation.tsx"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,mBAAmB,QAAQ,cAAc;AAClD,SAGCC,eAAe,EACfC,cAAc,QACR,yBAAyB;AAChC,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,mBAAmB,QAAQ,2CAA2C;AAC/E,SAASC,OAAO,QAAQ,6BAA6B;AACrD,SACCC,cAAc,QAER,qCAAqC;AAC5C,SAASC,YAAY,QAAQ,mCAAmC;AAEhE,SAASC,yBAAyB,QAAQ,gCAAgC;;AAE1E;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,mBAAmB,GAAGA,CAAA,KAG9B;EACJ,MAAM;IAAEC;EAAQ,CAA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AAMgC,WAAW,GAAGd,cAAc,CAACU,MAAM,GAAG,CAAC;IAE7C,MAAMK,eAAe,GAAGC,MAAM,CAC7BhB,cAAc,CAACiB,IAAI,CAAEL,KAAK,IAAKA,KAAK,CAACM,OAAO,CAACN,KAAK,GAAG,CAAC,CACvD,CAAC;IAED,MAAMO,eAAe,GAAGL,WAAW,GAAGC,eAAe;IAErD,OAAOI,eAAe;EACvB,CAAC,CAAC;EAEF,MAAMC,qBAAqB,GAAGnC,mBAAmB,CAAC4B,0BAA0B,CAAC;EAE7E,MAAMQ,MAAM,GAAGxC,mBAAmB,CAAC,CAAC;EAEpC,MAAMyC,MAAM,GAAGtC,iBAAiB,CAAC,CAAC;EAElC,MAAMuC,SAAS,GAAGzC,eAAe,CAA4B,OAAO;IACnE6B,QAAQ,EAAEJ,mBAAmB,CAACK,KAAK;IACnCY,OAAO,EAAE;MACRH;IACD,CAAC;IACDC;EACD,CAAC,CAAC,CAAC;EAEH,OAAO;IACNC,SAAS;IACTH;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createBlankStackNavigator"],"sourceRoot":"../../../src","sources":["blank-stack/index.ts"],"mappings":";;AAAA,SAASA,yBAAyB,QAAQ,qDAAqD","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createNavigatorFactory","StackActions","StackRouter","useNavigationBuilder","React","StackView","jsx","_jsx","BlankStackNavigator","id","initialRouteName","children","layout","screenListeners","screenOptions","screenLayout","rest","state","describe","descriptors","navigation","NavigationContent","useEffect","addListener","e","isFocused","requestAnimationFrame","index","defaultPrevented","dispatch","popToTop","target","key","createBlankStackNavigator","config"],"sourceRoot":"../../../../src","sources":["blank-stack/navigators/createBlankStackNavigator.tsx"],"mappings":";;AAAA,SACCA,sBAAsB,EAKtBC,YAAY,EAEZC,WAAW,EAIXC,oBAAoB,QACd,0BAA0B;AACjC,OAAO,KAAKC,KAAK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AAO,SAASe,yBAAyBA,CAmBvCC,MAAe,EAAmC;EACnD,OAAOlC,sBAAsB,CAACQ,mBAAmB,CAAC,CAAC0B,MAAM,CAAC;AAC3D","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["blank-stack/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useMemo, useRef } from "react";
|
|
4
|
+
import { useSharedValue } from "react-native-reanimated";
|
|
5
|
+
import useStableCallback from "../../../../shared/hooks/use-stable-callback";
|
|
6
|
+
export const useClosingRouteKeys = () => {
|
|
7
|
+
const keysRef = useRef(new Set());
|
|
8
|
+
const finishedRef = useRef(new Set());
|
|
9
|
+
const shared = useSharedValue([]);
|
|
10
|
+
const add = useStableCallback(key => {
|
|
11
|
+
const keys = keysRef.current;
|
|
12
|
+
if (keys.has(key)) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
finishedRef.current.delete(key);
|
|
16
|
+
keys.add(key);
|
|
17
|
+
shared.modify(prev => {
|
|
18
|
+
"worklet";
|
|
19
|
+
|
|
20
|
+
if (!prev.includes(key)) {
|
|
21
|
+
prev.push(key);
|
|
22
|
+
}
|
|
23
|
+
return prev;
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
const remove = useStableCallback(key => {
|
|
27
|
+
const keys = keysRef.current;
|
|
28
|
+
if (!keys.delete(key)) {
|
|
29
|
+
finishedRef.current.delete(key);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
finishedRef.current.delete(key);
|
|
33
|
+
shared.modify(prev => {
|
|
34
|
+
"worklet";
|
|
35
|
+
|
|
36
|
+
const index = prev.indexOf(key);
|
|
37
|
+
if (index !== -1) {
|
|
38
|
+
prev.splice(index, 1);
|
|
39
|
+
}
|
|
40
|
+
return prev;
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
const clear = useStableCallback(() => {
|
|
44
|
+
const keys = keysRef.current;
|
|
45
|
+
if (!keys.size) {
|
|
46
|
+
finishedRef.current.clear();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
keys.clear();
|
|
50
|
+
finishedRef.current.clear();
|
|
51
|
+
shared.modify(prev => {
|
|
52
|
+
"worklet";
|
|
53
|
+
|
|
54
|
+
prev.length = 0;
|
|
55
|
+
return prev;
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
return useMemo(() => ({
|
|
59
|
+
ref: keysRef,
|
|
60
|
+
shared,
|
|
61
|
+
add,
|
|
62
|
+
remove,
|
|
63
|
+
clear
|
|
64
|
+
}), [shared, add, remove, clear]);
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=use-closing-route-keys.js.map
|
package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useMemo","useRef","useSharedValue","useStableCallback","useClosingRouteKeys","keysRef","Set","finishedRef","shared","add","key","keys","current","has","delete","modify","prev","includes","push","remove","index","indexOf","splice","clear","size","length","ref"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.tsx"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACvC,SAASC,cAAc,QAAQ,yBAAyB;AACxD,OAAOC,iBAAiB,MAAM,8CAA8C;AAE5E,OAAO,MAAMC,mBAAmB,GAAGA,CAAA,KAAM;EACxC,MAAMC,OAAO,GAAGJ,MAAM,CAAc,IAAIK,GAAG,CAAC,CAAC,CAAC;EAC9C,MAAMC,WAAW,GAAGN,MAAM,CAAc,IAAIK,GAAG,CAAC,CAAC,CAAC;EAClD,MAAME,MAAM,GAAGN,cAAc,CAAW,EAAE,CAAC;EAE3C,MAAMO,GAAG,GAAGN,iBAAiB,CAAEO,GAAW,IAAK;IAC9C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IACZhB,WAAW,CAACK,OAAO,CAACW,KAAK,CAAC,CAAC;IAC3Bf,MAAM,CAACO,MAAM,CAAEC,IAAI,IAAK;MACvB,SAAS;;MACTA,IAAI,CAACS,MAAM,GAAG,CAAC;MACf,OAAOT,IAAI;IACZ,CAAC,CAAC;EACH,CAAC,CAAC;EAEF,OAAOhB,OAAO,CACb,OAAO;IACN0B,GAAG,EAAErB,OAAO;IACZG,MAAM;IACNC,GAAG;IACHU,MAAM;IACNI;EACD,CAAC,CAAC,EACF,CAACf,MAAM,EAAEC,GAAG,EAAEU,MAAM,EAAEI,KAAK,CAC5B,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","usePrevious","value","ref","current"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_hooks/use-previous.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEzC,OAAO,MAAMC,WAAW,GAAQC,KAAQ,IAAe;EACtD,MAAMC,GAAG,GAAGH,MAAM,CAAI,IAAI,CAAC;EAE3BD,SAAS,CAAC,MAAM;IACfI,GAAG,CAACC,OAAO,GAAGF,KAAK;EACpB,CAAC,CAAC;EAEF,OAAOC,GAAG,CAACC,OAAO;AACnB,CAAC","ignoreList":[]}
|
package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StackActions } from "@react-navigation/native";
|
|
4
|
+
import { useLayoutEffect, useState } from "react";
|
|
5
|
+
import useStableCallback from "../../../../shared/hooks/use-stable-callback";
|
|
6
|
+
import { areDescriptorsEqual } from "../_utils/are-descriptors-equal";
|
|
7
|
+
import { composeDescriptors } from "../_utils/compose-descriptors";
|
|
8
|
+
import { haveSameRouteKeys } from "../_utils/have-same-route-keys";
|
|
9
|
+
import { routesAreIdentical } from "../_utils/routes-are-identical";
|
|
10
|
+
import { useClosingRouteKeys } from "./use-closing-route-keys";
|
|
11
|
+
import { usePrevious } from "./use-previous";
|
|
12
|
+
/**
|
|
13
|
+
* Aligns current routes with the latest route data while preserving references
|
|
14
|
+
* when possible for performance optimization
|
|
15
|
+
*/
|
|
16
|
+
const alignRoutesWithLatest = (currentRoutes, currentDescriptors, nextRoutes, nextDescriptors) => {
|
|
17
|
+
// Early return for empty current routes
|
|
18
|
+
if (currentRoutes.length === 0) {
|
|
19
|
+
return {
|
|
20
|
+
routes: nextRoutes,
|
|
21
|
+
descriptors: composeDescriptors(nextRoutes, nextDescriptors, currentDescriptors)
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Create lookup map for efficient route finding
|
|
26
|
+
const nextRouteLookup = new Map();
|
|
27
|
+
for (const route of nextRoutes) {
|
|
28
|
+
nextRouteLookup.set(route.key, route);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Track if any changes occurred
|
|
32
|
+
let didChange = currentRoutes.length !== nextRoutes.length;
|
|
33
|
+
|
|
34
|
+
// Align routes, updating references where needed
|
|
35
|
+
const alignedRoutes = currentRoutes.map(route => {
|
|
36
|
+
const nextRoute = nextRouteLookup.get(route.key);
|
|
37
|
+
if (!nextRoute) {
|
|
38
|
+
return route; // Keep current route if not in next
|
|
39
|
+
}
|
|
40
|
+
if (nextRoute !== route) {
|
|
41
|
+
didChange = true;
|
|
42
|
+
return nextRoute; // Update to new route reference
|
|
43
|
+
}
|
|
44
|
+
return route; // Keep current route reference
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// Only create new array if changes occurred
|
|
48
|
+
const routesResult = didChange ? alignedRoutes : currentRoutes;
|
|
49
|
+
return {
|
|
50
|
+
routes: routesResult,
|
|
51
|
+
descriptors: composeDescriptors(routesResult, nextDescriptors, currentDescriptors)
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Synchronizes routes while handling removed routes that may still be animating out.
|
|
57
|
+
* This manages the complex logic of keeping closing routes visible during transitions.
|
|
58
|
+
*/
|
|
59
|
+
const syncRoutesWithRemoved = ({
|
|
60
|
+
prevRoutes,
|
|
61
|
+
prevDescriptors,
|
|
62
|
+
nextRoutes,
|
|
63
|
+
nextDescriptors,
|
|
64
|
+
closingRouteKeys
|
|
65
|
+
}) => {
|
|
66
|
+
if (nextRoutes.length === 0) {
|
|
67
|
+
closingRouteKeys.clear();
|
|
68
|
+
return {
|
|
69
|
+
routes: nextRoutes,
|
|
70
|
+
descriptors: {}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Start with next routes, will mutate if needed
|
|
75
|
+
const derivedRoutes = nextRoutes.slice();
|
|
76
|
+
|
|
77
|
+
// Get focused (last) routes for comparison
|
|
78
|
+
const previousFocusedRoute = prevRoutes[prevRoutes.length - 1];
|
|
79
|
+
const nextFocusedRoute = nextRoutes[nextRoutes.length - 1];
|
|
80
|
+
|
|
81
|
+
// Handle focus changes between routes
|
|
82
|
+
if (previousFocusedRoute && nextFocusedRoute && previousFocusedRoute.key !== nextFocusedRoute.key) {
|
|
83
|
+
const nextRouteWasPresent = prevRoutes.some(route => route.key === nextFocusedRoute.key);
|
|
84
|
+
const previousRouteStillPresent = nextRoutes.some(route => route.key === previousFocusedRoute.key);
|
|
85
|
+
if (nextRouteWasPresent && !previousRouteStillPresent) {
|
|
86
|
+
// Previous route was removed, mark as closing
|
|
87
|
+
closingRouteKeys.add(previousFocusedRoute.key);
|
|
88
|
+
derivedRoutes.push(previousFocusedRoute);
|
|
89
|
+
} else {
|
|
90
|
+
// Next route is now active, not closing
|
|
91
|
+
closingRouteKeys.remove(nextFocusedRoute.key);
|
|
92
|
+
if (!previousRouteStillPresent) {
|
|
93
|
+
// Previous route needs to be inserted for transition
|
|
94
|
+
closingRouteKeys.remove(previousFocusedRoute.key);
|
|
95
|
+
const insertIndex = Math.max(derivedRoutes.length - 1, 0);
|
|
96
|
+
derivedRoutes.splice(insertIndex, 0, previousFocusedRoute);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
} else if (nextFocusedRoute) {
|
|
100
|
+
// Same focused route, ensure it's not marked as closing
|
|
101
|
+
closingRouteKeys.remove(nextFocusedRoute.key);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Clean up closing keys that are no longer in the route list
|
|
105
|
+
const activeKeys = new Set(derivedRoutes.map(route => route.key));
|
|
106
|
+
for (const key of Array.from(closingRouteKeys.ref.current)) {
|
|
107
|
+
if (!activeKeys.has(key)) {
|
|
108
|
+
closingRouteKeys.remove(key);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return {
|
|
112
|
+
routes: derivedRoutes,
|
|
113
|
+
descriptors: composeDescriptors(derivedRoutes, nextDescriptors, prevDescriptors)
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
export const useStackNavigationState = props => {
|
|
117
|
+
const previousRoutes = usePrevious(props.state.routes) ?? [];
|
|
118
|
+
const closingRouteKeys = useClosingRouteKeys();
|
|
119
|
+
const [localState, setLocalState] = useState(() => ({
|
|
120
|
+
routes: props.state.routes,
|
|
121
|
+
descriptors: props.descriptors
|
|
122
|
+
}));
|
|
123
|
+
useLayoutEffect(() => {
|
|
124
|
+
const nextRoutesSnapshot = props.state.routes;
|
|
125
|
+
const previousRoutesSnapshot = previousRoutes;
|
|
126
|
+
setLocalState(current => {
|
|
127
|
+
const routeKeysUnchanged = haveSameRouteKeys(previousRoutesSnapshot, nextRoutesSnapshot);
|
|
128
|
+
let derivedRoutes;
|
|
129
|
+
let derivedDescriptors;
|
|
130
|
+
if (routeKeysUnchanged) {
|
|
131
|
+
const result = alignRoutesWithLatest(current.routes, current.descriptors, nextRoutesSnapshot, props.descriptors);
|
|
132
|
+
derivedRoutes = result.routes;
|
|
133
|
+
derivedDescriptors = result.descriptors;
|
|
134
|
+
} else {
|
|
135
|
+
const fallbackRoutes = previousRoutesSnapshot.length > 0 ? previousRoutesSnapshot : current.routes;
|
|
136
|
+
const result = syncRoutesWithRemoved({
|
|
137
|
+
prevRoutes: fallbackRoutes,
|
|
138
|
+
prevDescriptors: current.descriptors,
|
|
139
|
+
nextRoutes: nextRoutesSnapshot,
|
|
140
|
+
nextDescriptors: props.descriptors,
|
|
141
|
+
closingRouteKeys
|
|
142
|
+
});
|
|
143
|
+
derivedRoutes = result.routes;
|
|
144
|
+
derivedDescriptors = result.descriptors;
|
|
145
|
+
}
|
|
146
|
+
const routesChanged = !routesAreIdentical(current.routes, derivedRoutes);
|
|
147
|
+
const descriptorsChanged = !areDescriptorsEqual(current.descriptors, derivedDescriptors);
|
|
148
|
+
if (!routesChanged && !descriptorsChanged) {
|
|
149
|
+
return current;
|
|
150
|
+
}
|
|
151
|
+
return {
|
|
152
|
+
routes: routesChanged ? derivedRoutes : current.routes,
|
|
153
|
+
descriptors: descriptorsChanged ? derivedDescriptors : current.descriptors
|
|
154
|
+
};
|
|
155
|
+
});
|
|
156
|
+
}, [props.state.routes, props.descriptors, previousRoutes, closingRouteKeys]);
|
|
157
|
+
const handleCloseRoute = useStableCallback(({
|
|
158
|
+
route
|
|
159
|
+
}) => {
|
|
160
|
+
if (props.state.routes.some(r => r.key === route.key)) {
|
|
161
|
+
props.navigation.dispatch({
|
|
162
|
+
...StackActions.pop(),
|
|
163
|
+
source: route.key,
|
|
164
|
+
target: props.state.key
|
|
165
|
+
});
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
closingRouteKeys.remove(route.key);
|
|
169
|
+
setLocalState(current => {
|
|
170
|
+
if (!current.routes.some(candidate => candidate.key === route.key)) {
|
|
171
|
+
return current;
|
|
172
|
+
}
|
|
173
|
+
const nextRoutes = current.routes.filter(candidate => candidate.key !== route.key);
|
|
174
|
+
const nextDescriptors = {
|
|
175
|
+
...current.descriptors
|
|
176
|
+
};
|
|
177
|
+
delete nextDescriptors[route.key];
|
|
178
|
+
return {
|
|
179
|
+
routes: nextRoutes,
|
|
180
|
+
descriptors: nextDescriptors
|
|
181
|
+
};
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
return {
|
|
185
|
+
state: localState,
|
|
186
|
+
handleCloseRoute,
|
|
187
|
+
closingRouteKeys
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
//# sourceMappingURL=use-stack-navigation-state.js.map
|
package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StackActions","useLayoutEffect","useState","useStableCallback","areDescriptorsEqual","composeDescriptors","haveSameRouteKeys","routesAreIdentical","useClosingRouteKeys","usePrevious","alignRoutesWithLatest","currentRoutes","currentDescriptors","nextRoutes","nextDescriptors","length","routes","descriptors","nextRouteLookup","Map","route","set","key","didChange","alignedRoutes","map","nextRoute","get","routesResult","syncRoutesWithRemoved","prevRoutes","prevDescriptors","closingRouteKeys","clear","derivedRoutes","slice","previousFocusedRoute","nextFocusedRoute","nextRouteWasPresent","some","previousRouteStillPresent","add","push","remove","insertIndex","Math","max","splice","activeKeys","Set","Array","from","ref","current","has","useStackNavigationState","props","previousRoutes","state","localState","setLocalState","nextRoutesSnapshot","previousRoutesSnapshot","routeKeysUnchanged","derivedDescriptors","result","fallbackRoutes","routesChanged","descriptorsChanged","handleCloseRoute","r","navigation","dispatch","pop","source","target","candidate","filter"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.tsx"],"mappings":";;AAAA,SAAqBA,YAAY,QAAQ,0BAA0B;AACnE,SAASC,eAAe,EAAEC,QAAQ,QAAQ,OAAO;AACjD,OAAOC,iBAAiB,MAAM,8CAA8C;AAG5E,SAASC,mBAAmB,QAAQ,iCAAiC;AACrE,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,kBAAkB,QAAQ,gCAA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AU;IACjBU,gBAAgB;IAChBrC;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_types.ts"],"mappings":"","ignoreList":[]}
|
package/lib/module/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["areDescriptorsEqual","a","b","aKeys","Object","keys","bKeys","length","every","key"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.ts"],"mappings":";;AAEA,OAAO,MAAMA,mBAAmB,GAAGA,CAClCC,CAA0B,EAC1BC,CAA0B,KACb;EACb,IAAID,CAAC,KAAKC,CAAC,EAAE,OAAO,IAAI;EAExB,MAAMC,KAAK,GAAGC,MAAM,CAACC,IAAI,CAACJ,CAAC,CAAC;EAC5B,MAAMK,KAAK,GAAGF,MAAM,CAACC,IAAI,CAACH,CAAC,CAAC;EAE5B,IAAIC,KAAK,CAACI,MAAM,KAAKD,KAAK,CAACC,MAAM,EAAE,OAAO,KAAK;EAE/C,OAAOJ,KAAK,CAACK,KAAK,CAAEC,GAAG,IAAKR,CAAC,CAACQ,GAAG,CAAC,KAAKP,CAAC,CAACO,GAAG,CAAC,CAAC;AAC/C,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["calculateActiveScreensLimit","routes","descriptors","length","limit","i","route","shouldKeepPrevious","key","options","detachPreviousScreen","Math","min"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.ts"],"mappings":";;AAGA,OAAO,SAASA,2BAA2BA,CAC1CC,MAAgD,EAChDC,WAAoC,EAC3B;EACT,IAAID,MAAM,CAACE,MAAM,KAAK,CAAC,EAAE;IACxB,OAAO,CAAC;EACT;EAEA,IAAIC,KAAK,GAAG,CAAC;EAEb,KAAK,IAAIC,CAAC,GAAGJ,MAAM,CAACE,MAAM,GAAG,CAAC,EAAEE,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE;IAC5C,MAAMC,KAAK,GAAGL,MAAM,CAACI,CAAC,CAAC;IAEvB,MAAME,kBAAkB,GACvBL,WAAW,GAAGI,KAAK,CAACE,GAAG,CAAC,EAAEC,OAAO,EAAEC,oBAAoB,KAAK,IAAI;IAEjE,IAAIH,kBAAkB,EAAE;MACvBH,KAAK,EAAE;MACP;IACD;IAEA;EACD;EAEA,OAAOO,IAAI,CAACC,GAAG,CAACR,KAAK,EAAEH,MAAM,CAACE,MAAM,CAAC;AACtC","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export const composeDescriptors = (routes, nextDescriptors, currentDescriptors) => {
|
|
4
|
+
const composed = {};
|
|
5
|
+
for (const route of routes) {
|
|
6
|
+
const adjusted = nextDescriptors[route.key] ?? currentDescriptors[route.key];
|
|
7
|
+
|
|
8
|
+
// useScreenAnimation depends on this, however with blank-stack, this should be enabled by default
|
|
9
|
+
const withEnableTransitions = {
|
|
10
|
+
...adjusted,
|
|
11
|
+
options: {
|
|
12
|
+
...adjusted.options,
|
|
13
|
+
enableTransitions: true
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
composed[route.key] = withEnableTransitions;
|
|
17
|
+
}
|
|
18
|
+
return composed;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=compose-descriptors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["composeDescriptors","routes","nextDescriptors","currentDescriptors","composed","route","adjusted","key","withEnableTransitions","options","enableTransitions"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.ts"],"mappings":";;AAGA,OAAO,MAAMA,kBAAkB,GAAGA,CACjCC,MAAuB,EACvBC,eAAwC,EACxCC,kBAA2C,KACd;EAC7B,MAAMC,QAAiC,GAAG,CAAC,CAAC;EAE5C,KAAK,MAAMC,KAAK,IAAIJ,MAAM,EAAE;IAC3B,MAAMK,QAAQ,GACbJ,eAAe,CAACG,KAAK,CAACE,GAAG,CAAC,IAAIJ,kBAAkB,CAACE,KAAK,CAACE,GAAG,CAAC;;IAE5D;IACA,MAAMC,qBAAqB,GAAG;MAC7B,GAAGF,QAAQ;MACXG,OAAO,EAAE;QAAE,GAAGH,QAAQ,CAACG,OAAO;QAAEC,iBAAiB,EAAE;MAAK;IACzD,CAAC;IACDN,QAAQ,CAACC,KAAK,CAACE,GAAG,CAAC,GAAGC,qBAAqB;EAC5C;EAEA,OAAOJ,QAAQ;AAChB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["haveSameRouteKeys","previous","next","length","every","route","index","key"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.ts"],"mappings":";;AAEA,OAAO,MAAMA,iBAAiB,GAAGA,CAChCC,QAAyB,EACzBC,IAAqB,KACR;EACb,IAAID,QAAQ,CAACE,MAAM,KAAKD,IAAI,CAACC,MAAM,EAAE;IACpC,OAAO,KAAK;EACb;EAEA,OAAOF,QAAQ,CAACG,KAAK,CAAC,CAACC,KAAK,EAAEC,KAAK,KAAKD,KAAK,EAAEE,GAAG,KAAKL,IAAI,CAACI,KAAK,CAAC,EAAEC,GAAG,CAAC;AACzE,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["routesAreIdentical","a","b","length","every","route","index"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.ts"],"mappings":";;AAEA,OAAO,MAAMA,kBAAkB,GAAGA,CACjCC,CAAkB,EAClBC,CAAkB,KACL;EACb,IAAID,CAAC,KAAKC,CAAC,EAAE,OAAO,IAAI;EACxB,IAAID,CAAC,CAACE,MAAM,KAAKD,CAAC,CAACC,MAAM,EAAE,OAAO,KAAK;EAEvC,OAAOF,CAAC,CAACG,KAAK,CAAC,CAACC,KAAK,EAAEC,KAAK,KAAKD,KAAK,KAAKH,CAAC,CAACI,KAAK,CAAC,CAAC;AACrD,CAAC","ignoreList":[]}
|