react-native-screen-transitions 3.4.0-alpha.0 → 3.4.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -2
- package/lib/commonjs/shared/animation/snap-to.js +5 -1
- package/lib/commonjs/shared/animation/snap-to.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +5 -10
- package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js +2 -2
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/index.js +1 -3
- package/lib/commonjs/shared/components/overlay/index.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js +2 -16
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/commonjs/shared/components/scene-view.js +2 -4
- package/lib/commonjs/shared/components/scene-view.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +9 -6
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js +47 -55
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +77 -0
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js +17 -4
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
- package/lib/commonjs/shared/constants.js +6 -2
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/hooks/gestures/resolve-screen-gesture-target.js +49 -0
- package/lib/commonjs/shared/hooks/gestures/resolve-screen-gesture-target.js.map +1 -0
- package/lib/commonjs/shared/hooks/gestures/types.js +2 -0
- package/lib/commonjs/shared/hooks/gestures/types.js.map +1 -0
- package/lib/commonjs/shared/hooks/gestures/use-screen-gesture.js +7 -3
- package/lib/commonjs/shared/hooks/gestures/use-screen-gesture.js.map +1 -1
- package/lib/commonjs/shared/hooks/navigation/use-stack.js.map +1 -1
- package/lib/commonjs/shared/index.js +15 -3
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js +55 -18
- package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js +44 -0
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +31 -17
- package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js +1 -9
- package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +11 -6
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js +33 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/animation/types.js +2 -0
- package/lib/commonjs/shared/providers/screen/animation/types.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js +9 -3
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/direct.provider.js +1 -1
- package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js +1 -1
- package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
- package/lib/commonjs/shared/stores/animation.store.js +8 -2
- package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +7 -0
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js +6 -0
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js +24 -9
- package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/geometry.js +3 -2
- package/lib/commonjs/shared/utils/bounds/helpers/geometry.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js +3 -2
- package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js +2 -2
- package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js +6 -5
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js +4 -3
- package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/index.js +3 -3
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/zoom/accessor.js +54 -0
- package/lib/commonjs/shared/utils/bounds/zoom/accessor.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/zoom/build.js +541 -0
- package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/zoom/config.js +118 -0
- package/lib/commonjs/shared/utils/bounds/zoom/config.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/zoom/index.js +20 -0
- package/lib/commonjs/shared/utils/bounds/zoom/index.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/zoom/types.js.map +1 -0
- package/lib/commonjs/shared/utils/gesture/validate-snap-points.js +11 -5
- package/lib/commonjs/shared/utils/gesture/validate-snap-points.js.map +1 -1
- package/lib/commonjs/shared/utils/overlay/visibility.js +2 -9
- package/lib/commonjs/shared/utils/overlay/visibility.js.map +1 -1
- package/lib/module/shared/animation/snap-to.js +5 -1
- package/lib/module/shared/animation/snap-to.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +5 -10
- package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +1 -1
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js +3 -3
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/module/shared/components/overlay/index.js +1 -3
- package/lib/module/shared/components/overlay/index.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/overlay-host.js +3 -17
- package/lib/module/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/module/shared/components/scene-view.js +3 -5
- package/lib/module/shared/components/scene-view.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/backdrop.js +9 -6
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js +52 -60
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +72 -0
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js +17 -4
- package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
- package/lib/module/shared/constants.js +6 -2
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/hooks/gestures/resolve-screen-gesture-target.js +45 -0
- package/lib/module/shared/hooks/gestures/resolve-screen-gesture-target.js.map +1 -0
- package/lib/module/shared/hooks/gestures/types.js +2 -0
- package/lib/module/shared/hooks/gestures/types.js.map +1 -0
- package/lib/module/shared/hooks/gestures/use-screen-gesture.js +7 -4
- package/lib/module/shared/hooks/gestures/use-screen-gesture.js.map +1 -1
- package/lib/module/shared/hooks/navigation/use-stack.js.map +1 -1
- package/lib/module/shared/index.js +1 -2
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/providers/gestures/handlers/use-handlers.js +55 -18
- package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
- package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js +38 -0
- package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -0
- package/lib/module/shared/providers/screen/animation/animation.provider.js +30 -15
- package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/derivations.js +1 -9
- package/lib/module/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +11 -6
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js +29 -0
- package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +1 -0
- package/lib/module/shared/providers/screen/animation/index.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/types.js +2 -0
- package/lib/module/shared/providers/screen/animation/types.js.map +1 -0
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js +9 -3
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/module/shared/providers/stack/direct.provider.js +2 -2
- package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/helpers/use-processed-routes.js +2 -2
- package/lib/module/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
- package/lib/module/shared/stores/animation.store.js +8 -2
- package/lib/module/shared/stores/animation.store.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +7 -0
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/utils/animation/animate-to-progress.js +6 -0
- package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js +24 -9
- package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/geometry.js +3 -2
- package/lib/module/shared/utils/bounds/helpers/geometry.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/interpolators.js +3 -2
- package/lib/module/shared/utils/bounds/helpers/interpolators.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/link-accessor.js +2 -2
- package/lib/module/shared/utils/bounds/helpers/link-accessor.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js +6 -5
- package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/style-composers.js +4 -3
- package/lib/module/shared/utils/bounds/helpers/style-composers.js.map +1 -1
- package/lib/module/shared/utils/bounds/index.js +3 -3
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/shared/utils/bounds/zoom/accessor.js +49 -0
- package/lib/module/shared/utils/bounds/zoom/accessor.js.map +1 -0
- package/lib/module/shared/utils/bounds/zoom/build.js +536 -0
- package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -0
- package/lib/module/shared/utils/bounds/zoom/config.js +112 -0
- package/lib/module/shared/utils/bounds/zoom/config.js.map +1 -0
- package/lib/module/shared/utils/bounds/zoom/index.js +5 -0
- package/lib/module/shared/utils/bounds/zoom/index.js.map +1 -0
- package/lib/module/shared/utils/bounds/zoom/types.js.map +1 -0
- package/lib/module/shared/utils/gesture/validate-snap-points.js +11 -5
- package/lib/module/shared/utils/gesture/validate-snap-points.js.map +1 -1
- package/lib/module/shared/utils/overlay/visibility.js +1 -7
- package/lib/module/shared/utils/overlay/visibility.js.map +1 -1
- package/lib/typescript/shared/animation/snap-to.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +0 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/index.d.ts +0 -2
- package/lib/typescript/shared/components/overlay/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts +7 -0
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +3 -0
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/gestures/resolve-screen-gesture-target.d.ts +10 -0
- package/lib/typescript/shared/hooks/gestures/resolve-screen-gesture-target.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/gestures/types.d.ts +4 -0
- package/lib/typescript/shared/hooks/gestures/types.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/gestures/use-screen-gesture.d.ts +4 -2
- package/lib/typescript/shared/hooks/gestures/use-screen-gesture.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +1 -2
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +16 -17
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts +18 -0
- package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts +6 -3
- package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts +0 -2
- package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts +11 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/animation/index.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/types.d.ts +4 -0
- package/lib/typescript/shared/providers/screen/animation/types.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts +5 -1
- package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/animation.store.d.ts +4 -0
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +2 -0
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +26 -51
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +46 -9
- package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +3 -3
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/types/overlay.types.d.ts +1 -22
- package/lib/typescript/shared/types/overlay.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +16 -15
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts +2 -2
- package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts +3 -2
- package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts +3 -2
- package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts +3 -2
- package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts +2 -1
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts +4 -3
- package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/options.d.ts +5 -4
- package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts +17 -0
- package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/zoom/build.d.ts +4 -0
- package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/zoom/config.d.ts +43 -0
- package/lib/typescript/shared/utils/bounds/zoom/config.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/zoom/index.d.ts +3 -0
- package/lib/typescript/shared/utils/bounds/zoom/index.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/zoom/types.d.ts +17 -0
- package/lib/typescript/shared/utils/bounds/zoom/types.d.ts.map +1 -0
- package/lib/typescript/shared/utils/gesture/validate-snap-points.d.ts +5 -3
- package/lib/typescript/shared/utils/gesture/validate-snap-points.d.ts.map +1 -1
- package/lib/typescript/shared/utils/overlay/visibility.d.ts +1 -4
- package/lib/typescript/shared/utils/overlay/visibility.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/shared/animation/snap-to.ts +12 -1
- package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +2 -14
- package/src/shared/components/overlay/helpers/get-active-overlay.ts +3 -3
- package/src/shared/components/overlay/index.ts +0 -2
- package/src/shared/components/overlay/variations/overlay-host.tsx +2 -16
- package/src/shared/components/scene-view.tsx +0 -3
- package/src/shared/components/screen-container/layers/backdrop.tsx +25 -6
- package/src/shared/components/screen-container/layers/content.tsx +80 -77
- package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +93 -0
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition/index.ts +1 -2
- package/src/shared/components/screen-lifecycle/hooks/use-open-transition.ts +20 -6
- package/src/shared/constants.ts +6 -2
- package/src/shared/hooks/gestures/resolve-screen-gesture-target.ts +66 -0
- package/src/shared/hooks/gestures/types.ts +5 -0
- package/src/shared/hooks/gestures/use-screen-gesture.ts +10 -3
- package/src/shared/hooks/navigation/use-stack.tsx +1 -2
- package/src/shared/index.ts +14 -16
- package/src/shared/providers/gestures/handlers/use-handlers.ts +67 -24
- package/src/shared/providers/gestures/helpers/gesture-snap-points.ts +72 -0
- package/src/shared/providers/screen/animation/animation.provider.tsx +46 -10
- package/src/shared/providers/screen/animation/helpers/derivations.ts +0 -8
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +26 -5
- package/src/shared/providers/screen/animation/helpers/resolve-screen-animation-target.ts +44 -0
- package/src/shared/providers/screen/animation/index.tsx +4 -1
- package/src/shared/providers/screen/animation/types.ts +5 -0
- package/src/shared/providers/screen/animation/use-screen-animation.tsx +16 -3
- package/src/shared/providers/stack/direct.provider.tsx +2 -5
- package/src/shared/providers/stack/helpers/use-processed-routes.ts +2 -2
- package/src/shared/stores/animation.store.ts +13 -1
- package/src/shared/stores/bounds/internals/resolver.ts +13 -1
- package/src/shared/stores/bounds/types.ts +2 -0
- package/src/shared/types/animation.types.ts +25 -58
- package/src/shared/types/bounds.types.ts +30 -10
- package/src/shared/types/index.ts +2 -15
- package/src/shared/types/overlay.types.ts +1 -28
- package/src/shared/types/screen.types.ts +17 -16
- package/src/shared/utils/animation/animate-to-progress.ts +7 -0
- package/src/shared/utils/bounds/helpers/build-bounds-options.ts +2 -2
- package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +34 -8
- package/src/shared/utils/bounds/helpers/geometry.ts +3 -2
- package/src/shared/utils/bounds/helpers/interpolators.ts +8 -6
- package/src/shared/utils/bounds/helpers/link-accessor.ts +10 -6
- package/src/shared/utils/bounds/helpers/resolve-bound-tag.ts +9 -6
- package/src/shared/utils/bounds/helpers/style-composers.ts +4 -3
- package/src/shared/utils/bounds/index.ts +6 -8
- package/src/shared/utils/bounds/types/options.ts +6 -4
- package/src/shared/utils/bounds/zoom/accessor.ts +69 -0
- package/src/shared/utils/bounds/zoom/build.ts +705 -0
- package/src/shared/utils/bounds/zoom/config.ts +179 -0
- package/src/shared/utils/bounds/zoom/index.ts +2 -0
- package/src/shared/utils/bounds/zoom/types.ts +22 -0
- package/src/shared/utils/gesture/validate-snap-points.ts +20 -8
- package/src/shared/utils/overlay/visibility.ts +1 -16
- package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js +0 -64
- package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/math.js +0 -132
- package/lib/commonjs/shared/utils/bounds/helpers/math.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/navigation-accessor.js +0 -45
- package/lib/commonjs/shared/utils/bounds/helpers/navigation-accessor.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/helpers.js +0 -60
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/helpers.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/index.js +0 -20
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/index.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/types.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/zoom.js +0 -295
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/zoom.js.map +0 -1
- package/lib/module/shared/components/overlay/variations/screen-overlay.js +0 -61
- package/lib/module/shared/components/overlay/variations/screen-overlay.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/math.js +0 -115
- package/lib/module/shared/utils/bounds/helpers/math.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/navigation-accessor.js +0 -40
- package/lib/module/shared/utils/bounds/helpers/navigation-accessor.js.map +0 -1
- package/lib/module/shared/utils/bounds/sugar/navigation/helpers.js +0 -54
- package/lib/module/shared/utils/bounds/sugar/navigation/helpers.js.map +0 -1
- package/lib/module/shared/utils/bounds/sugar/navigation/index.js +0 -15
- package/lib/module/shared/utils/bounds/sugar/navigation/index.js.map +0 -1
- package/lib/module/shared/utils/bounds/sugar/navigation/types.js.map +0 -1
- package/lib/module/shared/utils/bounds/sugar/navigation/zoom.js +0 -290
- package/lib/module/shared/utils/bounds/sugar/navigation/zoom.js.map +0 -1
- package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts +0 -10
- package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/math.d.ts +0 -38
- package/lib/typescript/shared/utils/bounds/helpers/math.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/navigation-accessor.d.ts +0 -16
- package/lib/typescript/shared/utils/bounds/helpers/navigation-accessor.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/sugar/navigation/helpers.d.ts +0 -17
- package/lib/typescript/shared/utils/bounds/sugar/navigation/helpers.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/sugar/navigation/index.d.ts +0 -3
- package/lib/typescript/shared/utils/bounds/sugar/navigation/index.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/sugar/navigation/types.d.ts +0 -18
- package/lib/typescript/shared/utils/bounds/sugar/navigation/types.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/sugar/navigation/zoom.d.ts +0 -4
- package/lib/typescript/shared/utils/bounds/sugar/navigation/zoom.d.ts.map +0 -1
- package/src/shared/components/overlay/variations/screen-overlay.tsx +0 -68
- package/src/shared/utils/bounds/helpers/math.ts +0 -161
- package/src/shared/utils/bounds/helpers/navigation-accessor.ts +0 -61
- package/src/shared/utils/bounds/sugar/navigation/helpers.ts +0 -74
- package/src/shared/utils/bounds/sugar/navigation/index.ts +0 -14
- package/src/shared/utils/bounds/sugar/navigation/types.ts +0 -26
- package/src/shared/utils/bounds/sugar/navigation/zoom.ts +0 -348
- /package/lib/commonjs/shared/utils/bounds/{sugar/navigation → zoom}/types.js +0 -0
- /package/lib/module/shared/utils/bounds/{sugar/navigation → zoom}/types.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style-composers.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/helpers/style-composers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EACX,wBAAwB,EACxB,gBAAgB,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGpE;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAClC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,GAAG,EAAE,kBAAkB,CAAC;IACxB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,cAAc,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"style-composers.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/helpers/style-composers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EACX,wBAAwB,EACxB,gBAAgB,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGpE;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAClC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,GAAG,EAAE,kBAAkB,CAAC;IACxB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,cAAc,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF;;;;;;GAMG;AACH,KAAK,oBAAoB,GAAG;IAC3B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,GAAG,EAAE,kBAAkB,CAAC;IACxB,QAAQ,EAAE,wBAAwB,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,cAAc,EAAE,aAAa,CAAC;CAC9B,CAAC;AAiEF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,GAAG,UAAU,CAwC5E;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,GAAG,UAAU,CAyC5E;AAED,wBAAgB,wBAAwB,CACvC,MAAM,EAAE,oBAAoB,GAC1B,UAAU,CA6BZ;AAED,wBAAgB,wBAAwB,CACvC,MAAM,EAAE,oBAAoB,GAC1B,UAAU,CAoCZ;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,GAAG,UAAU,CA+B5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/bounds/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAS/D,eAAO,MAAM,oBAAoB,GAChC,UAAU,MAAM,IAAI,CAAC,wBAAwB,EAAE,QAAQ,CAAC,KACtD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/bounds/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAS/D,eAAO,MAAM,oBAAoB,GAChC,UAAU,MAAM,IAAI,CAAC,wBAAwB,EAAE,QAAQ,CAAC,KACtD,cAkIF,CAAC"}
|
|
@@ -2,12 +2,13 @@ import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
|
|
|
2
2
|
import type { ScreenTransitionState } from "../../../types/animation.types";
|
|
3
3
|
import type { BoundsMethod } from "../../../types/bounds.types";
|
|
4
4
|
import type { Layout } from "../../../types/screen.types";
|
|
5
|
+
export type BoundId = string | number;
|
|
5
6
|
export type BoundsAnchor = "topLeading" | "top" | "topTrailing" | "leading" | "center" | "trailing" | "bottomLeading" | "bottom" | "bottomTrailing";
|
|
6
7
|
export type BoundsScaleMode = "match" | "none" | "uniform";
|
|
7
8
|
type BoundsTarget = "bound" | "fullscreen" | MeasuredDimensions;
|
|
8
9
|
type BoundsSpace = "relative" | "absolute";
|
|
9
10
|
export type BoundsComputeParams = {
|
|
10
|
-
id?:
|
|
11
|
+
id?: BoundId;
|
|
11
12
|
previous?: ScreenTransitionState;
|
|
12
13
|
current: ScreenTransitionState;
|
|
13
14
|
next?: ScreenTransitionState;
|
|
@@ -49,7 +50,7 @@ export type BoundsOptions = {
|
|
|
49
50
|
* The ID of the bound to compute bounds for.
|
|
50
51
|
* When `group` is also provided, this is the member id within the group (not the combined tag).
|
|
51
52
|
*/
|
|
52
|
-
id:
|
|
53
|
+
id: BoundId;
|
|
53
54
|
/**
|
|
54
55
|
* Optional group name for collection/list scenarios.
|
|
55
56
|
* When provided, boundaries are tracked as a group and the active member id
|
|
@@ -66,8 +67,8 @@ export type BoundsOptions = {
|
|
|
66
67
|
*
|
|
67
68
|
* - "transform": translates and scales (scaleX/scaleY), no width/height size
|
|
68
69
|
* - "size": translates and sizes (width/height), no scaleX/scaleY
|
|
69
|
-
* - "content": screen-level content transform that aligns the
|
|
70
|
-
* so
|
|
70
|
+
* - "content": screen-level content transform that aligns the current screen
|
|
71
|
+
* so its bound matches the paired target bound during the transition
|
|
71
72
|
* @default "transform"
|
|
72
73
|
*/
|
|
73
74
|
method?: BoundsMethod;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/types/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,MAAM,YAAY,GACrB,YAAY,GACZ,KAAK,GACL,aAAa,GACb,SAAS,GACT,QAAQ,GACR,UAAU,GACV,eAAe,GACf,QAAQ,GACR,gBAAgB,CAAC;AAEpB,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAE3D,KAAK,YAAY,GAAG,OAAO,GAAG,YAAY,GAAG,kBAAkB,CAAC;AAEhE,KAAK,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC;AAE3C,MAAM,MAAM,mBAAmB,GAAG;IACjC,EAAE,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/types/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtC,MAAM,MAAM,YAAY,GACrB,YAAY,GACZ,KAAK,GACL,aAAa,GACb,SAAS,GACT,QAAQ,GACR,UAAU,GACV,eAAe,GACf,QAAQ,GACR,gBAAgB,CAAC;AAEpB,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAE3D,KAAK,YAAY,GAAG,OAAO,GAAG,YAAY,GAAG,kBAAkB,CAAC;AAEhE,KAAK,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC;AAE3C,MAAM,MAAM,mBAAmB,GAAG;IACjC,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,0BAA0B,GAAG;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,0BAA0B,GAAG;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACd,CAAC;AAGF,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,aAAa,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,IAAI,GAC7E,CAAC,CAAC,QAAQ,CAAC,SAAS,MAAM,GACzB,CAAC,CAAC,OAAO,CAAC,SAAS,UAAU,GAC5B,qBAAqB,GACrB,qBAAqB,GACtB,CAAC,CAAC,QAAQ,CAAC,SAAS,SAAS,GAC5B,gBAAgB,GAChB,CAAC,CAAC,OAAO,CAAC,SAAS,UAAU,GAC5B,0BAA0B,GAC1B,0BAA0B,GAC7B,UAAU,CAAC;AAEd,MAAM,MAAM,aAAa,GAAG;IAC3B;;;OAGG;IACH,EAAE,EAAE,OAAO,CAAC;IAEZ;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAEtC;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAE5B;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACd,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ScreenInterpolationProps } from "../../../types/animation.types";
|
|
2
|
+
import type { BoundsNavigationZoomOptions } from "../../../types/bounds.types";
|
|
3
|
+
import type { ResolveBoundTagParams } from "../helpers/resolve-bound-tag";
|
|
4
|
+
import type { BoundId, BoundsOptions } from "../types/options";
|
|
5
|
+
type ZoomAccessorParams = {
|
|
6
|
+
id?: BoundId;
|
|
7
|
+
group?: string;
|
|
8
|
+
getProps: () => Omit<ScreenInterpolationProps, "bounds">;
|
|
9
|
+
resolveBoundTag: (params: ResolveBoundTagParams) => string | undefined;
|
|
10
|
+
computeRaw: (overrides?: Partial<BoundsOptions>, frameProps?: Omit<ScreenInterpolationProps, "bounds">) => Record<string, unknown>;
|
|
11
|
+
zoomBaseOptions?: Pick<BoundsNavigationZoomOptions, "anchor" | "scaleMode" | "target">;
|
|
12
|
+
};
|
|
13
|
+
export declare const createZoomAccessor: ({ id, group, getProps, resolveBoundTag, computeRaw, zoomBaseOptions, }: ZoomAccessorParams) => {
|
|
14
|
+
zoom: (options?: BoundsNavigationZoomOptions) => import("../../../types/animation.types").TransitionInterpolatedStyle;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=accessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessor.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/zoom/accessor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAG/D,KAAK,kBAAkB,GAAG;IACzB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,IAAI,CAAC,wBAAwB,EAAE,QAAQ,CAAC,CAAC;IACzD,eAAe,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,MAAM,GAAG,SAAS,CAAC;IACvE,UAAU,EAAE,CACX,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,EAClC,UAAU,CAAC,EAAE,IAAI,CAAC,wBAAwB,EAAE,QAAQ,CAAC,KACjD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7B,eAAe,CAAC,EAAE,IAAI,CACrB,2BAA2B,EAC3B,QAAQ,GAAG,WAAW,GAAG,QAAQ,CACjC,CAAC;CACF,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,wEAOhC,kBAAkB;qBA0BF,2BAA2B;CAc7C,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TransitionInterpolatedStyle } from "../../../types/animation.types";
|
|
2
|
+
import type { BuildZoomStylesParams } from "./types";
|
|
3
|
+
export declare const buildZoomStyles: ({ id, group, zoomOptions, props, resolveTag, computeRaw, }: BuildZoomStylesParams) => TransitionInterpolatedStyle;
|
|
4
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/zoom/build.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AASlF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAwarD,eAAO,MAAM,eAAe,GAAI,4DAO7B,qBAAqB,KAAG,2BA6P1B,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { BoundsNavigationZoomOptions } from "../../../types/bounds.types";
|
|
2
|
+
import type { BoundId, BoundsOptions } from "../types/options";
|
|
3
|
+
import type { ResolveTag } from "./types";
|
|
4
|
+
type ZoomMask = NonNullable<BoundsNavigationZoomOptions["mask"]>;
|
|
5
|
+
type ZoomRadiusValue = Exclude<ZoomMask["borderRadius"], undefined>;
|
|
6
|
+
type ResolvedZoomOutset = {
|
|
7
|
+
top: number;
|
|
8
|
+
right: number;
|
|
9
|
+
bottom: number;
|
|
10
|
+
left: number;
|
|
11
|
+
};
|
|
12
|
+
export type ResolvedZoomOptions = {
|
|
13
|
+
mask: {
|
|
14
|
+
borderRadius: ZoomRadiusValue;
|
|
15
|
+
borderTopLeftRadius?: ZoomRadiusValue;
|
|
16
|
+
borderTopRightRadius?: ZoomRadiusValue;
|
|
17
|
+
borderBottomLeftRadius?: ZoomRadiusValue;
|
|
18
|
+
borderBottomRightRadius?: ZoomRadiusValue;
|
|
19
|
+
borderCurve?: "circular" | "continuous";
|
|
20
|
+
outset: ResolvedZoomOutset;
|
|
21
|
+
};
|
|
22
|
+
motion: {
|
|
23
|
+
dragResistance: number;
|
|
24
|
+
dragDirectionalScaleMin: number;
|
|
25
|
+
dragDirectionalScaleMax: number;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare const toNumber: (value: unknown, fallback?: number) => number;
|
|
29
|
+
export declare const resolveZoomConfig: ({ id, group, zoomOptions, currentRouteKey, resolveTag, defaultAnchor, }: {
|
|
30
|
+
id: BoundId;
|
|
31
|
+
group?: string;
|
|
32
|
+
zoomOptions?: BoundsNavigationZoomOptions;
|
|
33
|
+
currentRouteKey?: string;
|
|
34
|
+
resolveTag: ResolveTag;
|
|
35
|
+
defaultAnchor: BoundsOptions["anchor"] | undefined;
|
|
36
|
+
}) => {
|
|
37
|
+
resolvedTag: string;
|
|
38
|
+
sharedOptions: Partial<BoundsOptions>;
|
|
39
|
+
explicitTarget: BoundsOptions["target"] | undefined;
|
|
40
|
+
zoomOptions: ResolvedZoomOptions;
|
|
41
|
+
} | null;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/zoom/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAM1C,KAAK,QAAQ,GAAG,WAAW,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC,CAAC;AACjE,KAAK,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC,CAAC;AAYpE,KAAK,kBAAkB,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE;QACL,YAAY,EAAE,eAAe,CAAC;QAC9B,mBAAmB,CAAC,EAAE,eAAe,CAAC;QACtC,oBAAoB,CAAC,EAAE,eAAe,CAAC;QACvC,sBAAsB,CAAC,EAAE,eAAe,CAAC;QACzC,uBAAuB,CAAC,EAAE,eAAe,CAAC;QAC1C,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;QACxC,MAAM,EAAE,kBAAkB,CAAC;KAC3B,CAAC;IACF,MAAM,EAAE;QACP,cAAc,EAAE,MAAM,CAAC;QACvB,uBAAuB,EAAE,MAAM,CAAC;QAChC,uBAAuB,EAAE,MAAM,CAAC;KAChC,CAAC;CACF,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,OAAO,OAAO,EAAE,iBAAY,KAAG,MAGvD,CAAC;AAiEF,eAAO,MAAM,iBAAiB,GAAI,yEAO/B;IACF,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,2BAA2B,CAAC;IAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;CACnD,KAAG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACtC,cAAc,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;IACpD,WAAW,EAAE,mBAAmB,CAAC;CACjC,GAAG,IA6CH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/zoom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ScreenInterpolationProps } from "../../../types/animation.types";
|
|
2
|
+
import type { BoundsNavigationZoomOptions } from "../../../types/bounds.types";
|
|
3
|
+
import type { BoundId, BoundsOptions } from "../types/options";
|
|
4
|
+
export type ResolveTag = (params: {
|
|
5
|
+
id?: BoundId;
|
|
6
|
+
group?: string;
|
|
7
|
+
}) => string | undefined;
|
|
8
|
+
export type ComputeRaw = (overrides: Partial<BoundsOptions>, frameProps?: Omit<ScreenInterpolationProps, "bounds">) => Record<string, unknown>;
|
|
9
|
+
export type BuildZoomStylesParams = {
|
|
10
|
+
id: BoundId;
|
|
11
|
+
group?: string;
|
|
12
|
+
zoomOptions?: BoundsNavigationZoomOptions;
|
|
13
|
+
props: Omit<ScreenInterpolationProps, "bounds">;
|
|
14
|
+
resolveTag: ResolveTag;
|
|
15
|
+
computeRaw: ComputeRaw;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/zoom/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE/D,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE;IACjC,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,KAAK,MAAM,GAAG,SAAS,CAAC;AAEzB,MAAM,MAAM,UAAU,GAAG,CACxB,SAAS,EAAE,OAAO,CAAC,aAAa,CAAC,EACjC,UAAU,CAAC,EAAE,IAAI,CAAC,wBAAwB,EAAE,QAAQ,CAAC,KACjD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE7B,MAAM,MAAM,qBAAqB,GAAG;IACnC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,2BAA2B,CAAC;IAC1C,KAAK,EAAE,IAAI,CAAC,wBAAwB,EAAE,QAAQ,CAAC,CAAC;IAChD,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;CACvB,CAAC"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import type { SnapPoint } from "../../types/screen.types";
|
|
1
2
|
/**
|
|
2
|
-
* Filters snap points to only valid, finite values.
|
|
3
|
+
* Filters snap points to only valid, finite numeric values.
|
|
3
4
|
* Excludes zero (dismiss) when canDismiss is false.
|
|
4
5
|
*/
|
|
5
|
-
export declare function sanitizeSnapPoints(snapPoints:
|
|
6
|
+
export declare function sanitizeSnapPoints(snapPoints: SnapPoint[], canDismiss: boolean): number[];
|
|
6
7
|
export interface EffectiveSnapPointsResult {
|
|
7
8
|
hasSnapPoints: boolean;
|
|
9
|
+
hasAutoSnapPoint: boolean;
|
|
8
10
|
snapPoints: number[];
|
|
9
11
|
minSnapPoint: number;
|
|
10
12
|
maxSnapPoint: number;
|
|
11
13
|
}
|
|
12
14
|
interface ValidateSnapPointsOptions {
|
|
13
|
-
snapPoints?:
|
|
15
|
+
snapPoints?: SnapPoint[];
|
|
14
16
|
canDismiss?: boolean;
|
|
15
17
|
}
|
|
16
18
|
export declare const validateSnapPoints: ({ snapPoints, canDismiss, }: ValidateSnapPointsOptions) => EffectiveSnapPointsResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-snap-points.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/gesture/validate-snap-points.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,kBAAkB,CACjC,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"validate-snap-points.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/gesture/validate-snap-points.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D;;;GAGG;AACH,wBAAgB,kBAAkB,CACjC,UAAU,EAAE,SAAS,EAAE,EACvB,UAAU,EAAE,OAAO,GACjB,MAAM,EAAE,CASV;AAED,MAAM,WAAW,yBAAyB;IACzC,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,yBAAyB;IAClC,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,GAAI,6BAGhC,yBAAyB,KAAG,yBAqC9B,CAAC"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import type { OverlayMode } from "../../types/overlay.types";
|
|
2
1
|
type OverlayOptionsLike = {
|
|
3
2
|
overlay?: unknown;
|
|
4
|
-
overlayMode?: OverlayMode;
|
|
5
3
|
overlayShown?: boolean;
|
|
6
4
|
};
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const isScreenOverlayVisible: (options?: OverlayOptionsLike) => boolean;
|
|
5
|
+
export declare const isOverlayVisible: (options?: OverlayOptionsLike) => boolean;
|
|
9
6
|
export {};
|
|
10
7
|
//# sourceMappingURL=visibility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/overlay/visibility.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/overlay/visibility.ts"],"names":[],"mappings":"AAAA,KAAK,kBAAkB,GAAG;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,UAAU,kBAAkB,KAAG,OAE/D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-screen-transitions",
|
|
3
|
-
"version": "3.4.0-alpha.
|
|
3
|
+
"version": "3.4.0-alpha.1",
|
|
4
4
|
"description": "Easy screen transitions for React Native and Expo",
|
|
5
5
|
"author": "Ed",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "bob build",
|
|
44
44
|
"lint": "biome check ./src",
|
|
45
|
-
"typecheck": "tsc
|
|
45
|
+
"typecheck": "tsc -p tsconfig.typecheck.json",
|
|
46
46
|
"prepublishOnly": "bun run build",
|
|
47
47
|
"release": "release-it",
|
|
48
48
|
"release:stable": "release-it",
|
|
@@ -11,7 +11,18 @@ const getSortedSnapPoints = (
|
|
|
11
11
|
): number[] | null => {
|
|
12
12
|
const snapPoints = descriptor.options?.snapPoints;
|
|
13
13
|
if (!snapPoints || snapPoints.length === 0) return null;
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
// Resolve 'auto' to the measured fraction stored in AnimationStore
|
|
16
|
+
const autoVal = AnimationStore.getAnimation(
|
|
17
|
+
descriptor.route.key,
|
|
18
|
+
"autoSnapPoint",
|
|
19
|
+
).value;
|
|
20
|
+
|
|
21
|
+
const resolved = snapPoints
|
|
22
|
+
.map((p) => (p === "auto" ? autoVal : p))
|
|
23
|
+
.filter((p): p is number => typeof p === "number" && p > 0);
|
|
24
|
+
|
|
25
|
+
return resolved.length > 0 ? resolved.sort((a, b) => a - b) : null;
|
|
15
26
|
};
|
|
16
27
|
|
|
17
28
|
export function snapDescriptorToIndex(
|
|
@@ -9,21 +9,9 @@ export function buildBoundaryMatchKey(
|
|
|
9
9
|
params: BuildBoundaryMatchKeyParams,
|
|
10
10
|
): string;
|
|
11
11
|
export function buildBoundaryMatchKey(
|
|
12
|
-
|
|
13
|
-
id: BoundaryId,
|
|
14
|
-
): string;
|
|
15
|
-
export function buildBoundaryMatchKey(
|
|
16
|
-
paramsOrGroup: BuildBoundaryMatchKeyParams | string | undefined,
|
|
17
|
-
legacyId?: BoundaryId,
|
|
12
|
+
params: BuildBoundaryMatchKeyParams,
|
|
18
13
|
): string {
|
|
19
14
|
"worklet";
|
|
20
|
-
|
|
21
|
-
if (typeof paramsOrGroup === "object" && paramsOrGroup !== null) {
|
|
22
|
-
const { group, id } = paramsOrGroup;
|
|
23
|
-
return group ? `${group}:${id}` : String(id);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const group = paramsOrGroup;
|
|
27
|
-
const id = legacyId;
|
|
15
|
+
const { group, id } = params;
|
|
28
16
|
return group ? `${group}:${id}` : String(id);
|
|
29
17
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { StackScene } from "../../../hooks/navigation/use-stack";
|
|
2
|
-
import {
|
|
2
|
+
import { isOverlayVisible } from "../../../utils/overlay/visibility";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Find the active float overlay from scenes.
|
|
6
6
|
* Scans from the top of the stack downward to find the first screen
|
|
7
|
-
* with a visible overlay
|
|
7
|
+
* with a visible overlay.
|
|
8
8
|
*/
|
|
9
9
|
export function getActiveFloatOverlay(
|
|
10
10
|
scenes: StackScene[],
|
|
@@ -30,7 +30,7 @@ export function getActiveFloatOverlay(
|
|
|
30
30
|
continue;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
if (
|
|
33
|
+
if (isOverlayVisible(options)) {
|
|
34
34
|
return { scene, overlayIndex: i };
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -3,13 +3,11 @@ import {
|
|
|
3
3
|
NavigationRouteContext,
|
|
4
4
|
} from "@react-navigation/native";
|
|
5
5
|
import { memo, useMemo } from "react";
|
|
6
|
-
import { Animated, StyleSheet,
|
|
6
|
+
import { Animated, StyleSheet, View } from "react-native";
|
|
7
7
|
import { useDerivedValue } from "react-native-reanimated";
|
|
8
|
-
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
9
8
|
import type { StackScene } from "../../../hooks/navigation/use-stack";
|
|
10
9
|
import { useScreenAnimation } from "../../../providers/screen/animation";
|
|
11
10
|
import type { BaseDescriptor } from "../../../providers/screen/descriptors";
|
|
12
|
-
import type { OverlayInterpolationProps } from "../../../types/animation.types";
|
|
13
11
|
import type {
|
|
14
12
|
OverlayProps,
|
|
15
13
|
OverlayScreenState,
|
|
@@ -25,8 +23,6 @@ export const OverlayHost = memo(function OverlayHost({
|
|
|
25
23
|
overlayScreenState,
|
|
26
24
|
}: OverlayHostProps) {
|
|
27
25
|
const OverlayComponent = scene.descriptor.options.overlay;
|
|
28
|
-
const screen = useWindowDimensions();
|
|
29
|
-
const insets = useSafeAreaInsets();
|
|
30
26
|
|
|
31
27
|
const screenAnimation = useScreenAnimation();
|
|
32
28
|
const relativeProgress = useDerivedValue(() => {
|
|
@@ -34,22 +30,12 @@ export const OverlayHost = memo(function OverlayHost({
|
|
|
34
30
|
return screenAnimation.value.stackProgress;
|
|
35
31
|
});
|
|
36
32
|
|
|
37
|
-
const overlayAnimation = useDerivedValue<OverlayInterpolationProps>(() => ({
|
|
38
|
-
progress: relativeProgress.value,
|
|
39
|
-
layouts: { screen },
|
|
40
|
-
insets,
|
|
41
|
-
}));
|
|
42
|
-
|
|
43
33
|
const overlayProps: OverlayProps<BaseDescriptor["navigation"]> = useMemo(
|
|
44
34
|
() => ({
|
|
45
35
|
...overlayScreenState,
|
|
46
36
|
progress: relativeProgress,
|
|
47
|
-
/**@deprecated */
|
|
48
|
-
overlayAnimation,
|
|
49
|
-
/**@deprecated */
|
|
50
|
-
screenAnimation,
|
|
51
37
|
}),
|
|
52
|
-
[relativeProgress,
|
|
38
|
+
[relativeProgress, overlayScreenState],
|
|
53
39
|
);
|
|
54
40
|
|
|
55
41
|
if (!OverlayComponent) {
|
|
@@ -4,8 +4,6 @@ import {
|
|
|
4
4
|
} from "@react-navigation/native";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import type { BaseStackDescriptor } from "../types/stack.types";
|
|
7
|
-
import { isScreenOverlayVisible } from "../utils/overlay/visibility";
|
|
8
|
-
import { Overlay } from "./overlay";
|
|
9
7
|
|
|
10
8
|
type SceneViewProps = {
|
|
11
9
|
descriptor: BaseStackDescriptor;
|
|
@@ -24,7 +22,6 @@ export const SceneView = React.memo(function SceneView({
|
|
|
24
22
|
return (
|
|
25
23
|
<NavigationContext.Provider value={navigation as any}>
|
|
26
24
|
<NavigationRouteContext.Provider value={route}>
|
|
27
|
-
{isScreenOverlayVisible(descriptor.options) && <Overlay.Screen />}
|
|
28
25
|
{render?.()}
|
|
29
26
|
</NavigationRouteContext.Provider>
|
|
30
27
|
</NavigationContext.Provider>
|
|
@@ -23,6 +23,12 @@ export const BackdropLayer = memo(function BackdropLayer() {
|
|
|
23
23
|
const { isBackdropActive, backdropBehavior } = useBackdropPointerEvents();
|
|
24
24
|
|
|
25
25
|
const BackdropComponent = current.options.backdropComponent;
|
|
26
|
+
const routeKey = current.route.key;
|
|
27
|
+
const animations = AnimationStore.getRouteAnimations(routeKey);
|
|
28
|
+
const autoSnapPointValue = AnimationStore.getAnimation(
|
|
29
|
+
routeKey,
|
|
30
|
+
"autoSnapPoint",
|
|
31
|
+
);
|
|
26
32
|
|
|
27
33
|
const AnimatedBackdropComponent = useMemo(
|
|
28
34
|
() =>
|
|
@@ -38,24 +44,27 @@ export const BackdropLayer = memo(function BackdropLayer() {
|
|
|
38
44
|
}
|
|
39
45
|
|
|
40
46
|
if (backdropBehavior === "collapse") {
|
|
41
|
-
const
|
|
47
|
+
const rawSnapPoints = current.options.snapPoints;
|
|
42
48
|
const canDismiss = current.options.gestureEnabled !== false;
|
|
43
49
|
|
|
44
50
|
// No snap points → fallback to dismiss
|
|
45
|
-
if (!
|
|
51
|
+
if (!rawSnapPoints || rawSnapPoints.length === 0) {
|
|
46
52
|
dismissScreen();
|
|
47
53
|
return;
|
|
48
54
|
}
|
|
49
55
|
|
|
50
|
-
const
|
|
51
|
-
const gestures = GestureStore.getRouteGestures(current.route.key);
|
|
56
|
+
const gestures = GestureStore.getRouteGestures(routeKey);
|
|
52
57
|
const transitionSpec = current.options.transitionSpec;
|
|
53
58
|
|
|
54
59
|
runOnUI(() => {
|
|
55
60
|
"worklet";
|
|
61
|
+
const resolvedSnaps = rawSnapPoints
|
|
62
|
+
.map((point) => (point === "auto" ? autoSnapPointValue.value : point))
|
|
63
|
+
.filter((point): point is number => typeof point === "number");
|
|
64
|
+
|
|
56
65
|
const { target, shouldDismiss } = findCollapseTarget(
|
|
57
66
|
animations.progress.value,
|
|
58
|
-
|
|
67
|
+
resolvedSnaps,
|
|
59
68
|
canDismiss,
|
|
60
69
|
);
|
|
61
70
|
|
|
@@ -79,7 +88,14 @@ export const BackdropLayer = memo(function BackdropLayer() {
|
|
|
79
88
|
});
|
|
80
89
|
})();
|
|
81
90
|
}
|
|
82
|
-
}, [
|
|
91
|
+
}, [
|
|
92
|
+
animations,
|
|
93
|
+
autoSnapPointValue,
|
|
94
|
+
backdropBehavior,
|
|
95
|
+
current,
|
|
96
|
+
dismissScreen,
|
|
97
|
+
routeKey,
|
|
98
|
+
]);
|
|
83
99
|
|
|
84
100
|
const animatedBackdropStyle = useAnimatedStyle(() => {
|
|
85
101
|
"worklet";
|
|
@@ -97,6 +113,9 @@ export const BackdropLayer = memo(function BackdropLayer() {
|
|
|
97
113
|
pointerEvents={isBackdropActive ? "auto" : "none"}
|
|
98
114
|
onPress={isBackdropActive ? handleBackdropPress : undefined}
|
|
99
115
|
>
|
|
116
|
+
{/* Keep blur props and visual style separated.
|
|
117
|
+
* BlurView's animatable ref points at the inner native blur view, and mixing
|
|
118
|
+
* animated style with animatedProps can break intensity updates. */}
|
|
100
119
|
{AnimatedBackdropComponent && (
|
|
101
120
|
<AnimatedBackdropComponent
|
|
102
121
|
style={[StyleSheet.absoluteFillObject]}
|