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,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StackView = void 0;
|
|
7
|
+
var _elements = require("@react-navigation/elements");
|
|
8
|
+
var _native = require("@react-navigation/native");
|
|
9
|
+
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
10
|
+
var _reactNativeScreens = require("react-native-screens");
|
|
11
|
+
var _screenLifecycle = require("../../shared/components/controllers/screen-lifecycle");
|
|
12
|
+
var _screenTransitionProvider = require("../../shared/providers/screen-transition-provider");
|
|
13
|
+
var _withStackNavigation = require("../utils/with-stack-navigation");
|
|
14
|
+
var _Overlay = require("./Overlay");
|
|
15
|
+
var _Screens = require("./Screens");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
function isFabric() {
|
|
18
|
+
return "nativeFabricUIManager" in global;
|
|
19
|
+
}
|
|
20
|
+
const SceneView = ({
|
|
21
|
+
descriptor
|
|
22
|
+
}) => {
|
|
23
|
+
const {
|
|
24
|
+
route,
|
|
25
|
+
navigation,
|
|
26
|
+
render
|
|
27
|
+
} = descriptor;
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_native.NavigationContext.Provider, {
|
|
29
|
+
value: navigation,
|
|
30
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_native.NavigationRouteContext.Provider, {
|
|
31
|
+
value: route,
|
|
32
|
+
children: [descriptor.options.overlayMode === "screen" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Overlay.Overlay.Screen, {}), render()]
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
const StackView = exports.StackView = (0, _withStackNavigation.withStackNavigationProvider)(({
|
|
37
|
+
activeScreensLimit,
|
|
38
|
+
descriptors,
|
|
39
|
+
focusedIndex,
|
|
40
|
+
routes,
|
|
41
|
+
scenes,
|
|
42
|
+
shouldShowFloatOverlay
|
|
43
|
+
}) => {
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureHandlerRootView, {
|
|
45
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_elements.SafeAreaProviderCompat, {
|
|
46
|
+
children: [shouldShowFloatOverlay ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Overlay.Overlay.Float, {}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeScreens.ScreenContainer, {
|
|
47
|
+
style: {
|
|
48
|
+
flex: 1
|
|
49
|
+
},
|
|
50
|
+
children: scenes.map((scene, sceneIndex) => {
|
|
51
|
+
const descriptor = scene.descriptor;
|
|
52
|
+
const route = scene.route;
|
|
53
|
+
const isFocused = focusedIndex === sceneIndex;
|
|
54
|
+
const isBelowFocused = focusedIndex - 1 === sceneIndex;
|
|
55
|
+
const previousDescriptor = scenes[sceneIndex - 1]?.descriptor ?? undefined;
|
|
56
|
+
const nextDescriptor = scenes[sceneIndex + 1]?.descriptor ?? undefined;
|
|
57
|
+
const isPreloaded = descriptors[route.key] === undefined;
|
|
58
|
+
|
|
59
|
+
// On Fabric, when screen is frozen, animated and reanimated values are not updated
|
|
60
|
+
// due to component being unmounted. To avoid this, we don't freeze the previous screen there
|
|
61
|
+
const shouldFreeze = isFabric() ? !isPreloaded && !isFocused && !isBelowFocused : !isPreloaded && !isFocused;
|
|
62
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Screens.Screen, {
|
|
63
|
+
isPreloaded: isPreloaded,
|
|
64
|
+
index: sceneIndex,
|
|
65
|
+
activeScreensLimit: activeScreensLimit,
|
|
66
|
+
routeKey: route.key,
|
|
67
|
+
routes: routes,
|
|
68
|
+
shouldFreeze: shouldFreeze,
|
|
69
|
+
freezeOnBlur: descriptor.options.freezeOnBlur,
|
|
70
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_screenTransitionProvider.ScreenTransitionProvider, {
|
|
71
|
+
previous: previousDescriptor,
|
|
72
|
+
current: descriptor,
|
|
73
|
+
next: nextDescriptor,
|
|
74
|
+
LifecycleController: _screenLifecycle.BlankStackScreenLifecycleController,
|
|
75
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(SceneView, {
|
|
76
|
+
isFocused: isFocused,
|
|
77
|
+
sceneIndex: sceneIndex,
|
|
78
|
+
descriptor: descriptor
|
|
79
|
+
}, route.key)
|
|
80
|
+
})
|
|
81
|
+
}, route.key);
|
|
82
|
+
})
|
|
83
|
+
})]
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
//# sourceMappingURL=StackView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_elements","require","_native","_reactNativeGestureHandler","_reactNativeScreens","_screenLifecycle","_screenTransitionProvider","_withStackNavigation","_Overlay","_Screens","_jsxRuntime","isFabric","global","SceneView","descriptor","route","navigation","render","jsx","NavigationContext","Provider","value","children","jsxs","NavigationRouteContext","options","overlayMode","Overlay","Screen","StackView","exports","withStackNavigationProvider","activeScreensLimit","descriptors","focusedIndex","routes","scenes","shouldShowFloatOverlay","GestureHandlerRootView","SafeAreaProviderCompat","Float","ScreenContainer","style","flex","map","scene","sceneIndex","isFocused","isBelowFocused","previousDescriptor","undefined","nextDescriptor","isPreloaded","key","shouldFreeze","index","routeKey","freezeOnBlur","ScreenTransitionProvider","previous","current","next","LifecycleController","BlankStackScreenLifecycleController"],"sourceRoot":"../../../../src","sources":["blank-stack/components/StackView.tsx"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAIA,IAAAE,0BAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,yBAAA,GAAAL,OAAA;AAEA,IAAAM,oBAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAAmC,IAAAS,WAAA,GAAAT,OAAA;AAEnC,SAASU,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,oBACC,IAAAJ,WAAA,CAAAQ,GAAA,EAAChB,OAAA,CAAAiB,iBAAiB,CAACC,QAAQ;IAACC,KAAK,EAAEL,UAAW;IAAAM,QAAA,eAC7C,IAAAZ,WAAA,CAAAa,IAAA,EAACrB,OAAA,CAAAsB,sBAAsB,CAACJ,QAAQ;MAACC,KAAK,EAAEN,KA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IoC,SAAS;UAEhD,MAAME,WAAW,GAAGnB,WAAW,CAAClB,KAAK,CAACsC,GAAG,CAAC,KAAKH,SAAS;;UAExD;UACA;UACA,MAAMI,YAAY,GAAG3C,QAAQ,CAAC,CAAC,GAC5B,CAACyC,WAAW,IAAI,CAACL,SAAS,IAAI,CAACC,cAAc,GAC7C,CAACI,WAAW,IAAI,CAACL,SAAS;UAC7B,oBACC,IAAArC,WAAA,CAAAQ,GAAA,EAACT,QAAA,CAAAmB,MAAM;YAENwB,WAAW,EAAEA,WAAY;YACzBG,KAAK,EAAET,UAAW;YAClBd,kBAAkB,EAAEA,kBAAmB;YACvCwB,QAAQ,EAAEzC,KAAK,CAACsC,GAAI;YACpBlB,MAAM,EAAEA,MAAO;YACfmB,YAAY,EAAEA,YAAa;YAC3BG,YAAY,EAAE3C,UAAU,CAACW,OAAO,CAACgC,YAAa;YAAAnC,QAAA,eAE9C,IAAAZ,WAAA,CAAAQ,GAAA,EAACZ,yBAAA,CAAAoD,wBAAwB;cACxBC,QAAQ,EAAEV,kBAAmB;cAC7BW,OAAO,EAAE9C,UAAW;cACpB+C,IAAI,EAAEV,cAAe;cACrBW,mBAAmB,EAAEC,oDAAoC;cAAAzC,QAAA,eAEzD,IAAAZ,WAAA,CAAAQ,GAAA,EAACL,SAAS;gBAETkC,SAAS,EAAEA,SAAU;gBACrBD,UAAU,EAAEA,UAAW;gBACvBhC,UAAU,EAAEA;cAAW,GAHlBC,KAAK,CAACsC,GAIX;YAAC,CACuB;UAAC,GArBtBtC,KAAK,CAACsC,GAsBJ,CAAC;QAEX,CAAC;MAAC,CACc,CAAC;IAAA,CACK;EAAC,CACF,CAAC;AAE3B,CACD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useOverlayAnimation = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
10
|
+
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
11
|
+
var _useSharedValueState = require("../../shared/hooks/use-shared-value-state");
|
|
12
|
+
var _keys = require("../../shared/providers/keys");
|
|
13
|
+
var _animationStore = require("../../shared/stores/animation-store");
|
|
14
|
+
var _gestureStore = require("../../shared/stores/gesture-store");
|
|
15
|
+
var _withStackNavigation = require("../utils/with-stack-navigation");
|
|
16
|
+
/**
|
|
17
|
+
* Aggregates progress values for the overlay owner and every scene that sits
|
|
18
|
+
* above it in the stack. The result can be consumed by floating overlays to
|
|
19
|
+
* drive animations that span multiple screens.
|
|
20
|
+
*/
|
|
21
|
+
const useOverlayAnimation = () => {
|
|
22
|
+
const {
|
|
23
|
+
current
|
|
24
|
+
} = (0, _keys.useKeys)();
|
|
25
|
+
const {
|
|
26
|
+
scenes,
|
|
27
|
+
focusedIndex
|
|
28
|
+
} = (0, _withStackNavigation.useStackNavigationContext)();
|
|
29
|
+
const routeKey = current?.route?.key;
|
|
30
|
+
const gestureState = routeKey ? _gestureStore.GestureStore.getRouteGestures(routeKey) : null;
|
|
31
|
+
const fallbackIsDismissing = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
32
|
+
const progressValues = (0, _react.useMemo)(() => {
|
|
33
|
+
if (!routeKey) {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
const overlayIndex = scenes.findIndex(scene => scene.route.key === routeKey);
|
|
37
|
+
if (overlayIndex === -1) {
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
return scenes.slice(overlayIndex).map(scene => {
|
|
41
|
+
return _animationStore.AnimationStore.getAll(scene.route.key);
|
|
42
|
+
});
|
|
43
|
+
}, [routeKey, scenes]);
|
|
44
|
+
const accumulatedProgress = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
45
|
+
"worklet";
|
|
46
|
+
|
|
47
|
+
let total = 0;
|
|
48
|
+
for (let i = 0; i < progressValues.length; i += 1) {
|
|
49
|
+
total += progressValues[i].progress.value;
|
|
50
|
+
}
|
|
51
|
+
return total;
|
|
52
|
+
}, [progressValues]);
|
|
53
|
+
const optimisticActiveIndexValue = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
54
|
+
"worklet";
|
|
55
|
+
|
|
56
|
+
const activeIndex = progressValues.length - 1;
|
|
57
|
+
const isOneDismissing = Number(progressValues.some(value => value.closing.value > 0));
|
|
58
|
+
const optimisticIndex = activeIndex - isOneDismissing;
|
|
59
|
+
return optimisticIndex;
|
|
60
|
+
});
|
|
61
|
+
const optimisticActiveIndex = (0, _useSharedValueState.useSharedValueState)(optimisticActiveIndexValue);
|
|
62
|
+
const screen = (0, _reactNative.useWindowDimensions)();
|
|
63
|
+
const insets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
|
|
64
|
+
const animation = (0, _reactNativeReanimated.useDerivedValue)(() => ({
|
|
65
|
+
progress: accumulatedProgress.value,
|
|
66
|
+
layouts: {
|
|
67
|
+
screen
|
|
68
|
+
},
|
|
69
|
+
insets
|
|
70
|
+
}));
|
|
71
|
+
return {
|
|
72
|
+
animation,
|
|
73
|
+
optimisticActiveIndex
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
exports.useOverlayAnimation = useOverlayAnimation;
|
|
77
|
+
//# sourceMappingURL=use-overlay-animation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_reactNativeSafeAreaContext","_useSharedValueState","_keys","_animationStore","_gestureStore","_withStackNavigation","useOverlayAnimation","current","useKeys","scenes","focusedIndex","useStackNavigationContext","routeKey","route","key","gestureState","GestureStore","getRouteGestures","fallbackIsDismissing","useSharedValue","progressValues","useMemo","overlayIndex","findIndex","scene","slice","map","AnimationStore","getAll","accumulatedProgress","useDerivedValue","total","i","length","progress","value","optimisticActiveIndexValue","activeIndex","isOneDismissing","Number","some","closing","optimisticIndex","optimisticActiveIndex","useSharedValueState","screen","useWindowDimensions","insets","useSafeAreaInsets","animation","layouts","exports"],"sourceRoot":"../../../../src","sources":["blank-stack/hooks/use-overlay-animation.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AAMA,IAAAG,2BAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AAIA,IAAAO,aAAA,GAAAP,OAAA;AAEA,IAAAQ,oBAAA,GAAAR,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMS,mBAAmB,GAAGA,CAAA,KAG9B;EACJ,MAAM;IAAEC;EAAQ,CAAC,GAAG,IAAAC,aAAO,EAAC,CAAC;EAC7B,MAAM;IAAEC,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,8CAAyB,EAAC,CAAC;EAC5D,MAAMC,QAAQ,GAAGL,OAAO,EAAEM,KAAK,EAAEC,GAAG;EAEpC,MAAMC,YAAY,GAAGH,QAAQ,GAC1BI,0BAAY,CAACC,gBAAgB,CAACL,QAAQ,CAAC,GACvC,IAAI;EAEP,MAAMM,oBAAoB,GAAG,IAAAC,qCAAc,EAAC,CAAC,CAAC;EAE9C,MAAMC,cAAc,GAAG,IAAAC,cAAO,EAAC,MAAM;IACpC,IAAI,CAACT,QAAQ,EAAE;MACd,OAAO,EAAE;IACV;IAEA,MAAMU,YAAY,GAAGb,MAAM,CAACc,SAAS,CACnCC,KAAK,IAAKA,KAAK,CAACX,KAAK,CAACC,GAAG,KAAKF,QAChC,CAAC;IAED,IAAIU,YAAY,KAAK,CAAC,CAAC,EAAE;MACxB,OAAO,EAAE;IACV;IAEA,OAAOb,MAAM,CAACgB,KAAK,CAACH,YAAY,CAAC,CAACI,G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,CAAC;AACF,CAAC;AAACQ,OAAA,CAAA7C,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "createBlankStackNavigator", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _createBlankStackNavigator.createBlankStackNavigator;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _createBlankStackNavigator = require("../blank-stack/navigators/createBlankStackNavigator");
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_createBlankStackNavigator","require"],"sourceRoot":"../../../src","sources":["blank-stack/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,0BAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_native","require","React","_interopRequireWildcard","_StackView","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BlankStackNavigator","id","initialRouteName","children","layout","screenListeners","screenOptions","screenLayout","rest","state","describe","descriptors","navigation","NavigationContent","useNavigationBuilder","StackRouter","useEffect","addListener","isFocused","requestAnimationFrame","index","defaultPrevented","dispatch","StackActions","popToTop","target","key","jsx","StackView","createBlankStackNavigator","config","createNavigatorFactory"],"sourceRoot":"../../../../src","sources":["blank-stack/navigators/createBlankStackNavigator.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAcA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAAoD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAE,wBAAAG,CAAA,EAAAC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,QAAQ;IACRC,MAAM;IACNC,eAAe;IACfC,aAAa;IACbC;EACD,CAAC,CAAC;EAEH9B,KAAK,CAACuC,SAAS,CACd;EACC;EACAJ,UAAU,EAAEK,WAAW,GAAG,UAAU,EAAGpC,CAAM,IAAK;IACjD,MAAMqC,SAAS,GAAGN,UAAU,CAACM,SAAS,CAAC,CAAC;;IAExC;IACA;IACAC,qBAAqB,CAAC,MAAM;MAC3B,IACCV,KAAK,CAACW,KAAK,GAAG,CAAC,IACfF,SAAS,IACT,CAAErC,CAAC,CAAgCwC,gBAAgB,EAClD;QACD;QACA;QACAT,UAAU,CAACU,QAAQ,CAAC;UACnB,GAAGC,oBAAY,CAACC,QAAQ,CAAC,CAAC;UAC1BC,MAAM,EAAEhB,KAAK,CAACiB;QACf,CAAC,CAAC;MACH;IACD,CAAC,CAAC;EACH,CAAC,CAAC,EACH,CAACd,UAAU,EAAEH,KAAK,CAACW,KAAK,EAAEX,KAAK,CAACiB,GAAG,CACpC,CAAC;EAED,oBACC,IAAA9C,WAAA,CAAA+C,GAAA,EAACd,iBAAiB;IAAAV,QAAA,eACjB,IAAAvB,WAAA,CAAA+C,GAAA,EAAChD,UAAA,CAAAiD,SAAS;MAAA,GACLpB,IAAI;MACRC,KAAK,EAAEA,KAAM;MACbG,UAAU,EAAEA,UAAW;MACvBD,WAAW,EAAEA,WAAY;MACzBD,QAAQ,EAAEA;IAAS,CACnB;EAAC,CACgB,CAAC;AAEtB;AAEO,SAASmB,yBAAyBA,CAmBvCC,MAAe,EAAmC;EACnD,OAAO,IAAAC,8BAAsB,EAAC/B,mBAAmB,CAAC,CAAC8B,MAAM,CAAC;AAC3D","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["blank-stack/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useClosingRouteKeys = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
+
var _useStableCallback = _interopRequireDefault(require("../../../../shared/hooks/use-stable-callback"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const useClosingRouteKeys = () => {
|
|
12
|
+
const keysRef = (0, _react.useRef)(new Set());
|
|
13
|
+
const finishedRef = (0, _react.useRef)(new Set());
|
|
14
|
+
const shared = (0, _reactNativeReanimated.useSharedValue)([]);
|
|
15
|
+
const add = (0, _useStableCallback.default)(key => {
|
|
16
|
+
const keys = keysRef.current;
|
|
17
|
+
if (keys.has(key)) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
finishedRef.current.delete(key);
|
|
21
|
+
keys.add(key);
|
|
22
|
+
shared.modify(prev => {
|
|
23
|
+
"worklet";
|
|
24
|
+
|
|
25
|
+
if (!prev.includes(key)) {
|
|
26
|
+
prev.push(key);
|
|
27
|
+
}
|
|
28
|
+
return prev;
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
const remove = (0, _useStableCallback.default)(key => {
|
|
32
|
+
const keys = keysRef.current;
|
|
33
|
+
if (!keys.delete(key)) {
|
|
34
|
+
finishedRef.current.delete(key);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
finishedRef.current.delete(key);
|
|
38
|
+
shared.modify(prev => {
|
|
39
|
+
"worklet";
|
|
40
|
+
|
|
41
|
+
const index = prev.indexOf(key);
|
|
42
|
+
if (index !== -1) {
|
|
43
|
+
prev.splice(index, 1);
|
|
44
|
+
}
|
|
45
|
+
return prev;
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
const clear = (0, _useStableCallback.default)(() => {
|
|
49
|
+
const keys = keysRef.current;
|
|
50
|
+
if (!keys.size) {
|
|
51
|
+
finishedRef.current.clear();
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
keys.clear();
|
|
55
|
+
finishedRef.current.clear();
|
|
56
|
+
shared.modify(prev => {
|
|
57
|
+
"worklet";
|
|
58
|
+
|
|
59
|
+
prev.length = 0;
|
|
60
|
+
return prev;
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
return (0, _react.useMemo)(() => ({
|
|
64
|
+
ref: keysRef,
|
|
65
|
+
shared,
|
|
66
|
+
add,
|
|
67
|
+
remove,
|
|
68
|
+
clear
|
|
69
|
+
}), [shared, add, remove, clear]);
|
|
70
|
+
};
|
|
71
|
+
exports.useClosingRouteKeys = useClosingRouteKeys;
|
|
72
|
+
//# sourceMappingURL=use-closing-route-keys.js.map
|
package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_useStableCallback","_interopRequireDefault","e","__esModule","default","useClosingRouteKeys","keysRef","useRef","Set","finishedRef","shared","useSharedValue","add","useStableCallback","key","keys","current","has","delete","modify","prev","includes","push","remove","index","indexOf","splice","clear","size","length","useMemo","ref","exports"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA6E,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEtE,MAAMG,mBAAmB,GAAGA,CAAA,KAAM;EACxC,MAAMC,OAAO,GAAG,IAAAC,aAAM,EAAc,IAAIC,GAAG,CAAC,CAAC,CAAC;EAC9C,MAAMC,WAAW,GAAG,IAAAF,aAAM,EAAc,IAAIC,GAAG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ACU,OAAO;IAC5B,IAAI,CAACD,IAAI,CAACa,IAAI,EAAE;MACfnB,WAAW,CAACO,OAAO,CAACW,KAAK,CAAC,CAAC;MAC3B;IACD;IAEAZ,IAAI,CAACY,KAAK,CAAC,CAAC;IACZlB,WAAW,CAACO,OAAO,CAACW,KAAK,CAAC,CAAC;IAC3BjB,MAAM,CAACS,MAAM,CAAEC,IAAI,IAAK;MACvB,SAAS;;MACTA,IAAI,CAACS,MAAM,GAAG,CAAC;MACf,OAAOT,IAAI;IACZ,CAAC,CAAC;EACH,CAAC,CAAC;EAEF,OAAO,IAAAU,cAAO,EACb,OAAO;IACNC,GAAG,EAAEzB,OAAO;IACZI,MAAM;IACNE,GAAG;IACHW,MAAM;IACNI;EACD,CAAC,CAAC,EACF,CAACjB,MAAM,EAAEE,GAAG,EAAEW,MAAM,EAAEI,KAAK,CAC5B,CAAC;AACF,CAAC;AAACK,OAAA,CAAA3B,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","usePrevious","value","ref","useRef","useEffect","current","exports"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_hooks/use-previous.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,WAAW,GAAQC,KAAQ,IAAe;EACtD,MAAMC,GAAG,GAAG,IAAAC,aAAM,EAAI,IAAI,CAAC;EAE3B,IAAAC,gBAAS,EAAC,MAAM;IACfF,GAAG,CAACG,OAAO,GAAGJ,KAAK;EACpB,CAAC,CAAC;EAEF,OAAOC,GAAG,CAACG,OAAO;AACnB,CAAC;AAACC,OAAA,CAAAN,WAAA,GAAAA,WAAA","ignoreList":[]}
|
package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useStackNavigationState = void 0;
|
|
7
|
+
var _native = require("@react-navigation/native");
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _useStableCallback = _interopRequireDefault(require("../../../../shared/hooks/use-stable-callback"));
|
|
10
|
+
var _areDescriptorsEqual = require("../_utils/are-descriptors-equal");
|
|
11
|
+
var _composeDescriptors = require("../_utils/compose-descriptors");
|
|
12
|
+
var _haveSameRouteKeys = require("../_utils/have-same-route-keys");
|
|
13
|
+
var _routesAreIdentical = require("../_utils/routes-are-identical");
|
|
14
|
+
var _useClosingRouteKeys = require("./use-closing-route-keys");
|
|
15
|
+
var _usePrevious = require("./use-previous");
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
/**
|
|
18
|
+
* Aligns current routes with the latest route data while preserving references
|
|
19
|
+
* when possible for performance optimization
|
|
20
|
+
*/
|
|
21
|
+
const alignRoutesWithLatest = (currentRoutes, currentDescriptors, nextRoutes, nextDescriptors) => {
|
|
22
|
+
// Early return for empty current routes
|
|
23
|
+
if (currentRoutes.length === 0) {
|
|
24
|
+
return {
|
|
25
|
+
routes: nextRoutes,
|
|
26
|
+
descriptors: (0, _composeDescriptors.composeDescriptors)(nextRoutes, nextDescriptors, currentDescriptors)
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Create lookup map for efficient route finding
|
|
31
|
+
const nextRouteLookup = new Map();
|
|
32
|
+
for (const route of nextRoutes) {
|
|
33
|
+
nextRouteLookup.set(route.key, route);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Track if any changes occurred
|
|
37
|
+
let didChange = currentRoutes.length !== nextRoutes.length;
|
|
38
|
+
|
|
39
|
+
// Align routes, updating references where needed
|
|
40
|
+
const alignedRoutes = currentRoutes.map(route => {
|
|
41
|
+
const nextRoute = nextRouteLookup.get(route.key);
|
|
42
|
+
if (!nextRoute) {
|
|
43
|
+
return route; // Keep current route if not in next
|
|
44
|
+
}
|
|
45
|
+
if (nextRoute !== route) {
|
|
46
|
+
didChange = true;
|
|
47
|
+
return nextRoute; // Update to new route reference
|
|
48
|
+
}
|
|
49
|
+
return route; // Keep current route reference
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// Only create new array if changes occurred
|
|
53
|
+
const routesResult = didChange ? alignedRoutes : currentRoutes;
|
|
54
|
+
return {
|
|
55
|
+
routes: routesResult,
|
|
56
|
+
descriptors: (0, _composeDescriptors.composeDescriptors)(routesResult, nextDescriptors, currentDescriptors)
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Synchronizes routes while handling removed routes that may still be animating out.
|
|
62
|
+
* This manages the complex logic of keeping closing routes visible during transitions.
|
|
63
|
+
*/
|
|
64
|
+
const syncRoutesWithRemoved = ({
|
|
65
|
+
prevRoutes,
|
|
66
|
+
prevDescriptors,
|
|
67
|
+
nextRoutes,
|
|
68
|
+
nextDescriptors,
|
|
69
|
+
closingRouteKeys
|
|
70
|
+
}) => {
|
|
71
|
+
if (nextRoutes.length === 0) {
|
|
72
|
+
closingRouteKeys.clear();
|
|
73
|
+
return {
|
|
74
|
+
routes: nextRoutes,
|
|
75
|
+
descriptors: {}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Start with next routes, will mutate if needed
|
|
80
|
+
const derivedRoutes = nextRoutes.slice();
|
|
81
|
+
|
|
82
|
+
// Get focused (last) routes for comparison
|
|
83
|
+
const previousFocusedRoute = prevRoutes[prevRoutes.length - 1];
|
|
84
|
+
const nextFocusedRoute = nextRoutes[nextRoutes.length - 1];
|
|
85
|
+
|
|
86
|
+
// Handle focus changes between routes
|
|
87
|
+
if (previousFocusedRoute && nextFocusedRoute && previousFocusedRoute.key !== nextFocusedRoute.key) {
|
|
88
|
+
const nextRouteWasPresent = prevRoutes.some(route => route.key === nextFocusedRoute.key);
|
|
89
|
+
const previousRouteStillPresent = nextRoutes.some(route => route.key === previousFocusedRoute.key);
|
|
90
|
+
if (nextRouteWasPresent && !previousRouteStillPresent) {
|
|
91
|
+
// Previous route was removed, mark as closing
|
|
92
|
+
closingRouteKeys.add(previousFocusedRoute.key);
|
|
93
|
+
derivedRoutes.push(previousFocusedRoute);
|
|
94
|
+
} else {
|
|
95
|
+
// Next route is now active, not closing
|
|
96
|
+
closingRouteKeys.remove(nextFocusedRoute.key);
|
|
97
|
+
if (!previousRouteStillPresent) {
|
|
98
|
+
// Previous route needs to be inserted for transition
|
|
99
|
+
closingRouteKeys.remove(previousFocusedRoute.key);
|
|
100
|
+
const insertIndex = Math.max(derivedRoutes.length - 1, 0);
|
|
101
|
+
derivedRoutes.splice(insertIndex, 0, previousFocusedRoute);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
} else if (nextFocusedRoute) {
|
|
105
|
+
// Same focused route, ensure it's not marked as closing
|
|
106
|
+
closingRouteKeys.remove(nextFocusedRoute.key);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Clean up closing keys that are no longer in the route list
|
|
110
|
+
const activeKeys = new Set(derivedRoutes.map(route => route.key));
|
|
111
|
+
for (const key of Array.from(closingRouteKeys.ref.current)) {
|
|
112
|
+
if (!activeKeys.has(key)) {
|
|
113
|
+
closingRouteKeys.remove(key);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
routes: derivedRoutes,
|
|
118
|
+
descriptors: (0, _composeDescriptors.composeDescriptors)(derivedRoutes, nextDescriptors, prevDescriptors)
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
const useStackNavigationState = props => {
|
|
122
|
+
const previousRoutes = (0, _usePrevious.usePrevious)(props.state.routes) ?? [];
|
|
123
|
+
const closingRouteKeys = (0, _useClosingRouteKeys.useClosingRouteKeys)();
|
|
124
|
+
const [localState, setLocalState] = (0, _react.useState)(() => ({
|
|
125
|
+
routes: props.state.routes,
|
|
126
|
+
descriptors: props.descriptors
|
|
127
|
+
}));
|
|
128
|
+
(0, _react.useLayoutEffect)(() => {
|
|
129
|
+
const nextRoutesSnapshot = props.state.routes;
|
|
130
|
+
const previousRoutesSnapshot = previousRoutes;
|
|
131
|
+
setLocalState(current => {
|
|
132
|
+
const routeKeysUnchanged = (0, _haveSameRouteKeys.haveSameRouteKeys)(previousRoutesSnapshot, nextRoutesSnapshot);
|
|
133
|
+
let derivedRoutes;
|
|
134
|
+
let derivedDescriptors;
|
|
135
|
+
if (routeKeysUnchanged) {
|
|
136
|
+
const result = alignRoutesWithLatest(current.routes, current.descriptors, nextRoutesSnapshot, props.descriptors);
|
|
137
|
+
derivedRoutes = result.routes;
|
|
138
|
+
derivedDescriptors = result.descriptors;
|
|
139
|
+
} else {
|
|
140
|
+
const fallbackRoutes = previousRoutesSnapshot.length > 0 ? previousRoutesSnapshot : current.routes;
|
|
141
|
+
const result = syncRoutesWithRemoved({
|
|
142
|
+
prevRoutes: fallbackRoutes,
|
|
143
|
+
prevDescriptors: current.descriptors,
|
|
144
|
+
nextRoutes: nextRoutesSnapshot,
|
|
145
|
+
nextDescriptors: props.descriptors,
|
|
146
|
+
closingRouteKeys
|
|
147
|
+
});
|
|
148
|
+
derivedRoutes = result.routes;
|
|
149
|
+
derivedDescriptors = result.descriptors;
|
|
150
|
+
}
|
|
151
|
+
const routesChanged = !(0, _routesAreIdentical.routesAreIdentical)(current.routes, derivedRoutes);
|
|
152
|
+
const descriptorsChanged = !(0, _areDescriptorsEqual.areDescriptorsEqual)(current.descriptors, derivedDescriptors);
|
|
153
|
+
if (!routesChanged && !descriptorsChanged) {
|
|
154
|
+
return current;
|
|
155
|
+
}
|
|
156
|
+
return {
|
|
157
|
+
routes: routesChanged ? derivedRoutes : current.routes,
|
|
158
|
+
descriptors: descriptorsChanged ? derivedDescriptors : current.descriptors
|
|
159
|
+
};
|
|
160
|
+
});
|
|
161
|
+
}, [props.state.routes, props.descriptors, previousRoutes, closingRouteKeys]);
|
|
162
|
+
const handleCloseRoute = (0, _useStableCallback.default)(({
|
|
163
|
+
route
|
|
164
|
+
}) => {
|
|
165
|
+
if (props.state.routes.some(r => r.key === route.key)) {
|
|
166
|
+
props.navigation.dispatch({
|
|
167
|
+
..._native.StackActions.pop(),
|
|
168
|
+
source: route.key,
|
|
169
|
+
target: props.state.key
|
|
170
|
+
});
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
closingRouteKeys.remove(route.key);
|
|
174
|
+
setLocalState(current => {
|
|
175
|
+
if (!current.routes.some(candidate => candidate.key === route.key)) {
|
|
176
|
+
return current;
|
|
177
|
+
}
|
|
178
|
+
const nextRoutes = current.routes.filter(candidate => candidate.key !== route.key);
|
|
179
|
+
const nextDescriptors = {
|
|
180
|
+
...current.descriptors
|
|
181
|
+
};
|
|
182
|
+
delete nextDescriptors[route.key];
|
|
183
|
+
return {
|
|
184
|
+
routes: nextRoutes,
|
|
185
|
+
descriptors: nextDescriptors
|
|
186
|
+
};
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
return {
|
|
190
|
+
state: localState,
|
|
191
|
+
handleCloseRoute,
|
|
192
|
+
closingRouteKeys
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
exports.useStackNavigationState = useStackNavigationState;
|
|
196
|
+
//# sourceMappingURL=use-stack-navigation-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_native","require","_react","_useStableCallback","_interopRequireDefault","_areDescriptorsEqual","_composeDescriptors","_haveSameRouteKeys","_routesAreIdentical","_useClosingRouteKeys","_usePrevious","e","__esModule","default","alignRoutesWithLatest","currentRoutes","currentDescriptors","nextRoutes","nextDescriptors","length","routes","descriptors","composeDescriptors","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","usePrevious","state","useClosingRouteKeys","localState","setLocalState","useState","useLayoutEffect","nextRoutesSnapshot","previousRoutesSnapshot","routeKeysUnchanged","haveSameRouteKeys","derivedDescriptors","result","fallbackRoutes","routesChanged","routesAreIdentical","descriptorsChanged","areDescriptorsEqual","handleCloseRoute","useStableCallback","r","navigation","dispatch","StackActions","pop","source","target","candidate","filter","exports"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAGA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AACA,IAAAQ,oBAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AAA6C,SAAAG,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAU7C;AACA;AACA;AACA;AACA,MAAMG,qBAAqB,GAAGA,CAC7BC,aAA8B,EAC9BC,kBAA2C,EAC3CC,UAA2B,EAC3BC,eAAwC,KACpC;EACJ;EACA,IAAIH,aAAa,CAACI,MAAM,KAAK,CAAC,EAAE;IAC/B,OAAO;MACNC,MAAM,EAAEH,UAAU;MAClBI,WAAW,EAAE,IAAAC,sCAAkB,EAC9BL,UAAU,EACVC,eAAe,EACfF,kBACD;IACD,CAAC;EACF;;EAEA;EACA,MAAMO,eAAe,GAAG,IAAIC,GAAG,CAAwB,CAAC;EACxD,KAAK,MAAMC,KAAK,IAAIR,UAAU,EAAE;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QAAQ,CAAC;QACzB,GAAGC,oBAAY,CAACC,GAAG,CAAC,CAAC;QACrBC,MAAM,EAAE/D,KAAK,CAACE,GAAG;QACjB8D,MAAM,EAAE5B,KAAK,CAACG,KAAK,CAACrC;MACrB,CAAC,CAAC;MACF;IACD;IAEAU,gBAAgB,CAACW,MAAM,CAACvB,KAAK,CAACE,GAAG,CAAC;IAElCwC,aAAa,CAAET,OAAO,IAAK;MAC1B,IAAI,CAACA,OAAO,CAACtC,MAAM,CAACwB,IAAI,CAAE8C,SAAS,IAAKA,SAAS,CAAC/D,GAAG,KAAKF,KAAK,CAACE,GAAG,CAAC,EAAE;QACrE,OAAO+B,OAAO;MACf;MAEA,MAAMzC,UAAU,GAAGyC,OAAO,CAACtC,MAAM,CAACuE,MAAM,CACtCD,SAAS,IAAKA,SAAS,CAAC/D,GAAG,KAAKF,KAAK,CAACE,GACxC,CAAC;MAED,MAAMT,eAAe,GAAG;QAAE,GAAGwC,OAAO,CAACrC;MAAY,CAAC;MAClD,OAAOH,eAAe,CAACO,KAAK,CAACE,GAAG,CAAC;MAEjC,OAAO;QACNP,MAAM,EAAEH,UAAU;QAClBI,WAAW,EAAEH;MACd,CAAC;IACF,CAAC,CAAC;EACH,CACD,CAAC;EAED,OAAO;IACN8C,KAAK,EAAEE,UAAU;IACjBe,gBAAgB;IAChB5C;EACD,CAAC;AACF,CAAC;AAACuD,OAAA,CAAAhC,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_types.ts"],"mappings":"","ignoreList":[]}
|
package/lib/commonjs/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","exports"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.ts"],"mappings":";;;;;;AAEO,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;AAACC,OAAA,CAAAV,mBAAA,GAAAA,mBAAA","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":";;;;;;AAGO,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,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.composeDescriptors = void 0;
|
|
7
|
+
const composeDescriptors = (routes, nextDescriptors, currentDescriptors) => {
|
|
8
|
+
const composed = {};
|
|
9
|
+
for (const route of routes) {
|
|
10
|
+
const adjusted = nextDescriptors[route.key] ?? currentDescriptors[route.key];
|
|
11
|
+
|
|
12
|
+
// useScreenAnimation depends on this, however with blank-stack, this should be enabled by default
|
|
13
|
+
const withEnableTransitions = {
|
|
14
|
+
...adjusted,
|
|
15
|
+
options: {
|
|
16
|
+
...adjusted.options,
|
|
17
|
+
enableTransitions: true
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
composed[route.key] = withEnableTransitions;
|
|
21
|
+
}
|
|
22
|
+
return composed;
|
|
23
|
+
};
|
|
24
|
+
exports.composeDescriptors = composeDescriptors;
|
|
25
|
+
//# sourceMappingURL=compose-descriptors.js.map
|
package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["composeDescriptors","routes","nextDescriptors","currentDescriptors","composed","route","adjusted","key","withEnableTransitions","options","enableTransitions","exports"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.ts"],"mappings":";;;;;;AAGO,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;AAACO,OAAA,CAAAX,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["haveSameRouteKeys","previous","next","length","every","route","index","key","exports"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.ts"],"mappings":";;;;;;AAEO,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;AAACC,OAAA,CAAAR,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["routesAreIdentical","a","b","length","every","route","index","exports"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.ts"],"mappings":";;;;;;AAEO,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;AAACC,OAAA,CAAAP,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useStackNavigationContext = exports.StackNavigationContext = void 0;
|
|
7
|
+
exports.withStackNavigationProvider = withStackNavigationProvider;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _useStackNavigationState = require("./_hooks/use-stack-navigation-state");
|
|
10
|
+
var _calculateActiveScreensLimit = require("./_utils/calculate-active-screens-limit");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const StackNavigationContext = exports.StackNavigationContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
13
|
+
function withStackNavigationProvider(Component) {
|
|
14
|
+
return function StackNavigationWrapper(props) {
|
|
15
|
+
const {
|
|
16
|
+
state,
|
|
17
|
+
handleCloseRoute,
|
|
18
|
+
closingRouteKeys
|
|
19
|
+
} = (0, _useStackNavigationState.useStackNavigationState)(props);
|
|
20
|
+
const scenes = (0, _react.useMemo)(() => {
|
|
21
|
+
return state.routes.reduce((acc, route) => {
|
|
22
|
+
acc.push({
|
|
23
|
+
route,
|
|
24
|
+
descriptor: state.descriptors[route.key]
|
|
25
|
+
});
|
|
26
|
+
return acc;
|
|
27
|
+
}, []);
|
|
28
|
+
}, [state.routes, state.descriptors]);
|
|
29
|
+
const activeScreensLimit = (0, _react.useMemo)(() => {
|
|
30
|
+
return (0, _calculateActiveScreensLimit.calculateActiveScreensLimit)(state.routes, state.descriptors);
|
|
31
|
+
}, [state.routes, state.descriptors]);
|
|
32
|
+
const shouldShowFloatOverlay = (0, _react.useMemo)(() => {
|
|
33
|
+
return state.routes.some(route => {
|
|
34
|
+
const options = state.descriptors[route.key]?.options;
|
|
35
|
+
return options?.overlayMode === "float" && options?.overlayShown;
|
|
36
|
+
});
|
|
37
|
+
}, [state.routes, state.descriptors]);
|
|
38
|
+
const contextValue = (0, _react.useMemo)(() => {
|
|
39
|
+
return {
|
|
40
|
+
routes: state.routes,
|
|
41
|
+
focusedIndex: props.state.index,
|
|
42
|
+
descriptors: state.descriptors,
|
|
43
|
+
closingRouteKeysShared: closingRouteKeys.shared,
|
|
44
|
+
activeScreensLimit,
|
|
45
|
+
handleCloseRoute,
|
|
46
|
+
scenes,
|
|
47
|
+
shouldShowFloatOverlay
|
|
48
|
+
};
|
|
49
|
+
}, [state, scenes, activeScreensLimit, closingRouteKeys, handleCloseRoute, props.state.index, shouldShowFloatOverlay]);
|
|
50
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StackNavigationContext.Provider, {
|
|
51
|
+
value: contextValue,
|
|
52
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
53
|
+
...contextValue
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
const useStackNavigationContext = () => {
|
|
59
|
+
const context = (0, _react.useContext)(StackNavigationContext);
|
|
60
|
+
if (!context) {
|
|
61
|
+
throw new Error("StackNavigationContext.Provider is missing in the component tree.");
|
|
62
|
+
}
|
|
63
|
+
return context;
|
|
64
|
+
};
|
|
65
|
+
exports.useStackNavigationContext = useStackNavigationContext;
|
|
66
|
+
//# sourceMappingURL=index.js.map
|