react-native-screen-transitions 3.4.0-alpha.0 → 3.4.0-alpha.2
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 +11 -1046
- package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js +69 -2
- package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js +9 -0
- package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js.map +1 -1
- 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/hooks/helpers/measurement-rules.js +195 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +7 -14
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +19 -18
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +54 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +40 -8
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js +72 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +16 -7
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +7 -4
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +14 -15
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +27 -9
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js +22 -8
- package/lib/commonjs/shared/components/create-boundary-component/index.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/create-transition-aware-component.js +3 -2
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/native-screen-container.js +12 -6
- package/lib/commonjs/shared/components/native-screen-container.js.map +1 -1
- package/lib/commonjs/shared/components/native-screen.js +35 -8
- package/lib/commonjs/shared/components/native-screen.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/hooks/use-content-layout.js +60 -0
- package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js.map +1 -0
- 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 +16 -56
- 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 +86 -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 +61 -25
- package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.js +11 -6
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.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/layout-anchor.provider.js +4 -6
- package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +1 -1
- 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 +25 -13
- 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/core.provider.js +14 -21
- package/lib/commonjs/shared/providers/stack/core.provider.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 +10 -2
- package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/presence.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 +33 -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 +4 -8
- 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 +13 -3
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/types/frame-props.js +6 -0
- package/lib/commonjs/shared/utils/bounds/types/frame-props.js.map +1 -0
- 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 +548 -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/commonjs/shared/utils/resolve-screen-transition-options.js +25 -0
- package/lib/commonjs/shared/utils/resolve-screen-transition-options.js.map +1 -0
- package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js +69 -3
- package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/module/component-stack/navigators/create-component-stack-navigator.js +9 -0
- package/lib/module/component-stack/navigators/create-component-stack-navigator.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/hooks/helpers/measurement-rules.js +182 -0
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +7 -14
- package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +19 -18
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +49 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +41 -8
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js +67 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +16 -7
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +7 -4
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +14 -15
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +27 -9
- package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/index.js +22 -8
- package/lib/module/shared/components/create-boundary-component/index.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/create-transition-aware-component.js +3 -2
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/native-screen-container.js +12 -6
- package/lib/module/shared/components/native-screen-container.js.map +1 -1
- package/lib/module/shared/components/native-screen.js +35 -8
- package/lib/module/shared/components/native-screen.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/hooks/use-content-layout.js +56 -0
- package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -0
- 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 +18 -58
- 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 +81 -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 +61 -25
- package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
- package/lib/module/shared/providers/gestures/helpers/gesture-activation.js +11 -6
- package/lib/module/shared/providers/gestures/helpers/gesture-activation.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/layout-anchor.provider.js +4 -6
- package/lib/module/shared/providers/layout-anchor.provider.js.map +1 -1
- 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 +25 -13
- 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/core.provider.js +14 -21
- package/lib/module/shared/providers/stack/core.provider.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 +10 -2
- package/lib/module/shared/stores/animation.store.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/presence.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 +33 -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 +4 -8
- 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 +13 -3
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/shared/utils/bounds/types/frame-props.js +4 -0
- package/lib/module/shared/utils/bounds/types/frame-props.js.map +1 -0
- 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 +543 -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/module/shared/utils/resolve-screen-transition-options.js +19 -0
- package/lib/module/shared/utils/resolve-screen-transition-options.js.map +1 -0
- package/lib/typescript/blank-stack/index.d.ts +1 -1
- package/lib/typescript/blank-stack/index.d.ts.map +1 -1
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +29 -4
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/blank-stack/types.d.ts +33 -4
- package/lib/typescript/blank-stack/types.d.ts.map +1 -1
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +8 -0
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/shared/animation/snap-to.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +81 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts +2 -3
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts +11 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts +2 -2
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.d.ts +11 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-layout-handler.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts +3 -3
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts +2 -2
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts +5 -3
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts +2 -4
- package/lib/typescript/shared/components/create-boundary-component/types.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/create-transition-aware-component.d.ts +1 -0
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/native-screen-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/native-screen.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/hooks/use-content-layout.d.ts +3 -0
- package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts.map +1 -0
- 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 +9 -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 -18
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts +1 -1
- package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/helpers/gesture-activation.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/layout-anchor.provider.d.ts +1 -1
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +1 -1
- 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/core.provider.d.ts +2 -0
- package/lib/typescript/shared/providers/stack/core.provider.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 +8 -2
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/presence.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 +33 -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 +62 -37
- 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 +2 -2
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts +5 -0
- package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts.map +1 -0
- 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/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts +5 -0
- package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts.map +1 -0
- package/package.json +3 -2
- package/src/blank-stack/index.ts +1 -0
- package/src/blank-stack/navigators/create-blank-stack-navigator.tsx +138 -19
- package/src/blank-stack/types.ts +33 -5
- package/src/component-stack/navigators/create-component-stack-navigator.tsx +8 -0
- package/src/shared/animation/snap-to.ts +12 -1
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +258 -0
- package/src/shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts +7 -17
- package/src/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts +38 -28
- package/src/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.ts +58 -0
- package/src/shared/components/create-boundary-component/hooks/use-group-active-measurement.ts +41 -10
- package/src/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.ts +82 -0
- package/src/shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts +24 -12
- package/src/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.ts +11 -9
- package/src/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.ts +29 -26
- package/src/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.ts +26 -17
- package/src/shared/components/create-boundary-component/index.tsx +25 -6
- package/src/shared/components/create-boundary-component/types.ts +8 -4
- package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +2 -14
- package/src/shared/components/create-transition-aware-component.tsx +5 -2
- package/src/shared/components/native-screen-container.tsx +11 -3
- package/src/shared/components/native-screen.tsx +65 -20
- 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/hooks/use-content-layout.ts +82 -0
- package/src/shared/components/screen-container/layers/backdrop.tsx +25 -6
- package/src/shared/components/screen-container/layers/content.tsx +23 -82
- package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +101 -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 +75 -29
- package/src/shared/providers/gestures/helpers/gesture-activation.ts +11 -6
- package/src/shared/providers/gestures/helpers/gesture-snap-points.ts +72 -0
- package/src/shared/providers/layout-anchor.provider.tsx +2 -5
- package/src/shared/providers/register-bounds.provider.tsx +1 -1
- 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 +51 -14
- 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/core.provider.tsx +27 -14
- 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 +21 -5
- package/src/shared/stores/bounds/internals/presence.ts +3 -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 +32 -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 +67 -38
- 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 +47 -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 +7 -10
- package/src/shared/utils/bounds/helpers/style-composers.ts +4 -3
- package/src/shared/utils/bounds/index.ts +22 -13
- package/src/shared/utils/bounds/types/frame-props.ts +5 -0
- 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 +715 -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/src/shared/utils/resolve-screen-transition-options.ts +37 -0
- 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/providers/viewport.provider.js +0 -33
- package/lib/commonjs/shared/providers/viewport.provider.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/providers/viewport.provider.js +0 -27
- package/lib/module/shared/providers/viewport.provider.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/providers/viewport.provider.d.ts +0 -13
- package/lib/typescript/shared/providers/viewport.provider.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/providers/viewport.provider.tsx +0 -39
- 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
|
@@ -20,6 +20,7 @@ const GESTURE_FAIL_TOLERANCE_Y = 20;
|
|
|
20
20
|
const DEFAULT_EDGE_DISTANCE_HORIZONTAL = 50;
|
|
21
21
|
const DEFAULT_EDGE_DISTANCE_VERTICAL = 135;
|
|
22
22
|
const DEFAULT_ACTIVATION_AREA = "screen";
|
|
23
|
+
const SCROLL_EPILSON = 1;
|
|
23
24
|
function normalizeSides(area) {
|
|
24
25
|
"worklet";
|
|
25
26
|
|
|
@@ -276,6 +277,10 @@ function checkScrollBoundary(scrollConfig, direction, snapAxisInverted) {
|
|
|
276
277
|
// Calculate max scroll values
|
|
277
278
|
const maxScrollX = Math.max(0, contentWidth - layoutWidth);
|
|
278
279
|
const maxScrollY = Math.max(0, contentHeight - layoutHeight);
|
|
280
|
+
const atTop = scrollY <= SCROLL_EPILSON;
|
|
281
|
+
const atBottom = scrollY >= maxScrollY - SCROLL_EPILSON;
|
|
282
|
+
const atLeft = scrollX <= SCROLL_EPILSON;
|
|
283
|
+
const atRight = scrollX >= maxScrollX - SCROLL_EPILSON;
|
|
279
284
|
|
|
280
285
|
// For snap point sheets (snapAxisInverted is defined), boundary depends on sheet origin
|
|
281
286
|
// Even if content isn't scrollable, respect bounce/overscroll state
|
|
@@ -284,12 +289,12 @@ function checkScrollBoundary(scrollConfig, direction, snapAxisInverted) {
|
|
|
284
289
|
if (isVerticalDirection) {
|
|
285
290
|
// Bottom sheet (not inverted): boundary at scroll top
|
|
286
291
|
// Top sheet (inverted): boundary at scroll bottom
|
|
287
|
-
return snapAxisInverted ?
|
|
292
|
+
return snapAxisInverted ? atBottom : atTop;
|
|
288
293
|
}
|
|
289
294
|
// Horizontal direction
|
|
290
295
|
// Right drawer (not inverted): boundary at scroll left
|
|
291
296
|
// Left drawer (inverted): boundary at scroll right
|
|
292
|
-
return snapAxisInverted ?
|
|
297
|
+
return snapAxisInverted ? atRight : atLeft;
|
|
293
298
|
}
|
|
294
299
|
|
|
295
300
|
// Non-sheet screens: each direction has its own boundary
|
|
@@ -297,19 +302,19 @@ function checkScrollBoundary(scrollConfig, direction, snapAxisInverted) {
|
|
|
297
302
|
case "vertical":
|
|
298
303
|
// Swipe down - check if at top of vertical scroll
|
|
299
304
|
// Even if content isn't scrollable, respect bounce/overscroll state
|
|
300
|
-
return
|
|
305
|
+
return atTop;
|
|
301
306
|
case "vertical-inverted":
|
|
302
307
|
// Swipe up - check if at bottom of vertical scroll
|
|
303
308
|
// Even if content isn't scrollable, respect bounce/overscroll state
|
|
304
|
-
return
|
|
309
|
+
return atBottom;
|
|
305
310
|
case "horizontal":
|
|
306
311
|
// Swipe right - check if at left of horizontal scroll
|
|
307
312
|
// Even if content isn't scrollable, respect bounce/overscroll state
|
|
308
|
-
return
|
|
313
|
+
return atLeft;
|
|
309
314
|
case "horizontal-inverted":
|
|
310
315
|
// Swipe left - check if at right of horizontal scroll
|
|
311
316
|
// Even if content isn't scrollable, respect bounce/overscroll state
|
|
312
|
-
return
|
|
317
|
+
return atRight;
|
|
313
318
|
default:
|
|
314
319
|
return true;
|
|
315
320
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_gesture","require","GESTURE_ACTIVATION_THRESHOLD_X","GESTURE_ACTIVATION_THRESHOLD_Y","GESTURE_FAIL_TOLERANCE_X","GESTURE_FAIL_TOLERANCE_Y","DEFAULT_EDGE_DISTANCE_HORIZONTAL","DEFAULT_EDGE_DISTANCE_VERTICAL","DEFAULT_ACTIVATION_AREA","normalizeSides","area","mode","left","right","top","bottom","s","computeEdgeConstraints","initialTouch","dimensions","sides","responseDistance","xDist","yDist","horizontalRight","x","horizontalLeft","width","verticalDown","y","verticalUp","height","calculateSwipeDirs","deltaX","deltaY","isVerticalSwipe","Math","abs","isHorizontalSwipe","isSwipingDown","isSwipingUp","isSwipingRight","isSwipingLeft","shouldActivateOrFail","params","hasHorizontal","hasVertical","allowedRight","allowedLeft","allowedUp","allowedDown","horizontalGateRight","horizontalGateLeft","verticalGateUp","verticalGateDown","shouldActivate","shouldFail","hasEnoughHorizontalMovement","hasAcceptableVerticalDeviation","rightOk","leftOk","hasEnoughVerticalMovement","hasAcceptableHorizontalDeviation","upOk","downOk","applyOffsetRules","touch","directions","manager","gestureOffsetState","activationArea","vertical","verticalInverted","horizontal","horizontalInverted","value","GestureOffsetState","PENDING","PASSED","FAILED","fail","exports","checkScrollBoundary","scrollConfig","direction","snapAxisInverted","scrollX","scrollY","contentWidth","contentHeight","layoutWidth","layoutHeight","maxScrollX","max","maxScrollY","undefined","isVerticalDirection"],"sourceRoot":"../../../../../../src","sources":["shared/providers/gestures/helpers/gesture-activation.ts"],"mappings":";;;;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAwDA;AACA;AACA;AACA,MAAMC,8BAA8B,GAAG,EAAE;AACzC,MAAMC,8BAA8B,GAAG,EAAE;AACzC,MAAMC,wBAAwB,GAAG,EAAE;AACnC,MAAMC,wBAAwB,GAAG,EAAE;AACnC,MAAMC,gCAAgC,GAAG,EAAE;AAC3C,MAAMC,8BAA8B,GAAG,GAAG;AAC1C,MAAMC,uBAAuB,GAAG,QAAiB;
|
|
1
|
+
{"version":3,"names":["_gesture","require","GESTURE_ACTIVATION_THRESHOLD_X","GESTURE_ACTIVATION_THRESHOLD_Y","GESTURE_FAIL_TOLERANCE_X","GESTURE_FAIL_TOLERANCE_Y","DEFAULT_EDGE_DISTANCE_HORIZONTAL","DEFAULT_EDGE_DISTANCE_VERTICAL","DEFAULT_ACTIVATION_AREA","SCROLL_EPILSON","normalizeSides","area","mode","left","right","top","bottom","s","computeEdgeConstraints","initialTouch","dimensions","sides","responseDistance","xDist","yDist","horizontalRight","x","horizontalLeft","width","verticalDown","y","verticalUp","height","calculateSwipeDirs","deltaX","deltaY","isVerticalSwipe","Math","abs","isHorizontalSwipe","isSwipingDown","isSwipingUp","isSwipingRight","isSwipingLeft","shouldActivateOrFail","params","hasHorizontal","hasVertical","allowedRight","allowedLeft","allowedUp","allowedDown","horizontalGateRight","horizontalGateLeft","verticalGateUp","verticalGateDown","shouldActivate","shouldFail","hasEnoughHorizontalMovement","hasAcceptableVerticalDeviation","rightOk","leftOk","hasEnoughVerticalMovement","hasAcceptableHorizontalDeviation","upOk","downOk","applyOffsetRules","touch","directions","manager","gestureOffsetState","activationArea","vertical","verticalInverted","horizontal","horizontalInverted","value","GestureOffsetState","PENDING","PASSED","FAILED","fail","exports","checkScrollBoundary","scrollConfig","direction","snapAxisInverted","scrollX","scrollY","contentWidth","contentHeight","layoutWidth","layoutHeight","maxScrollX","max","maxScrollY","atTop","atBottom","atLeft","atRight","undefined","isVerticalDirection"],"sourceRoot":"../../../../../../src","sources":["shared/providers/gestures/helpers/gesture-activation.ts"],"mappings":";;;;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAwDA;AACA;AACA;AACA,MAAMC,8BAA8B,GAAG,EAAE;AACzC,MAAMC,8BAA8B,GAAG,EAAE;AACzC,MAAMC,wBAAwB,GAAG,EAAE;AACnC,MAAMC,wBAAwB,GAAG,EAAE;AACnC,MAAMC,gCAAgC,GAAG,EAAE;AAC3C,MAAMC,8BAA8B,GAAG,GAAG;AAC1C,MAAMC,uBAAuB,GAAG,QAAiB;AACjD,MAAMC,cAAc,GAAG,CAAC;AAEjB,SAASC,cAAcA,CAACC,IAA4B,EAAmB;EAC7E,SAAS;;EACT,IAAI,CAACA,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;IACtC,MAAMC,IAAoB,GAAGD,IAAI,IAAIH,uBAAuB;IAC5D,OAAO;MA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AU,GAAG1D,IAAI,CAACyD,GAAG,CAAC,CAAC,EAAEJ,aAAa,GAAGE,YAAY,CAAC;EAC5D,MAAMI,KAAK,GAAGR,OAAO,IAAI/E,cAAc;EACvC,MAAMwF,QAAQ,GAAGT,OAAO,IAAIO,UAAU,GAAGtF,cAAc;EACvD,MAAMyF,MAAM,GAAGX,OAAO,IAAI9E,cAAc;EACxC,MAAM0F,OAAO,GAAGZ,OAAO,IAAIM,UAAU,GAAGpF,cAAc;;EAEtD;EACA;EACA,IAAI6E,gBAAgB,KAAKc,SAAS,EAAE;IACnC,MAAMC,mBAAmB,GACxBhB,SAAS,KAAK,UAAU,IAAIA,SAAS,KAAK,mBAAmB;IAE9D,IAAIgB,mBAAmB,EAAE;MACxB;MACA;MACA,OAAOf,gBAAgB,GAAGW,QAAQ,GAAGD,KAAK;IAC3C;IACA;IACA;IACA;IACA,OAAOV,gBAAgB,GAAGa,OAAO,GAAGD,MAAM;EAC3C;;EAEA;EACA,QAAQb,SAAS;IAChB,KAAK,UAAU;MACd;MACA;MACA,OAAOW,KAAK;IAEb,KAAK,mBAAmB;MACvB;MACA;MACA,OAAOC,QAAQ;IAEhB,KAAK,YAAY;MAChB;MACA;MACA,OAAOC,MAAM;IAEd,KAAK,qBAAqB;MACzB;MACA;MACA,OAAOC,OAAO;IAEf;MACC,OAAO,IAAI;EACb;AACD","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.resolveRuntimeSnapPoints = exports.findNearestSnapPoint = void 0;
|
|
7
|
+
const resolveRuntimeSnapPoints = ({
|
|
8
|
+
snapPoints,
|
|
9
|
+
hasAutoSnapPoint,
|
|
10
|
+
autoSnapPoint,
|
|
11
|
+
minSnapPoint,
|
|
12
|
+
maxSnapPoint,
|
|
13
|
+
canDismiss
|
|
14
|
+
}) => {
|
|
15
|
+
"worklet";
|
|
16
|
+
|
|
17
|
+
const resolvedAutoSnapPoint = hasAutoSnapPoint && autoSnapPoint > 0 ? autoSnapPoint : null;
|
|
18
|
+
const resolvedSnapPoints = resolvedAutoSnapPoint === null ? snapPoints : [...snapPoints, resolvedAutoSnapPoint].sort((a, b) => a - b);
|
|
19
|
+
const resolvedMinSnapPoint = resolvedAutoSnapPoint !== null && !canDismiss ? Math.min(minSnapPoint === -1 ? resolvedAutoSnapPoint : minSnapPoint, resolvedAutoSnapPoint) : minSnapPoint;
|
|
20
|
+
return {
|
|
21
|
+
resolvedAutoSnapPoint,
|
|
22
|
+
resolvedSnapPoints,
|
|
23
|
+
resolvedMinSnapPoint,
|
|
24
|
+
resolvedMaxSnapPoint: resolvedSnapPoints[resolvedSnapPoints.length - 1] ?? maxSnapPoint
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
exports.resolveRuntimeSnapPoints = resolveRuntimeSnapPoints;
|
|
28
|
+
const findNearestSnapPoint = (progress, snapPoints) => {
|
|
29
|
+
"worklet";
|
|
30
|
+
|
|
31
|
+
let nearest = snapPoints[0] ?? progress;
|
|
32
|
+
let smallestDistance = Math.abs(progress - nearest);
|
|
33
|
+
for (let i = 1; i < snapPoints.length; i++) {
|
|
34
|
+
const point = snapPoints[i];
|
|
35
|
+
const distance = Math.abs(progress - point);
|
|
36
|
+
if (distance < smallestDistance) {
|
|
37
|
+
smallestDistance = distance;
|
|
38
|
+
nearest = point;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return nearest;
|
|
42
|
+
};
|
|
43
|
+
exports.findNearestSnapPoint = findNearestSnapPoint;
|
|
44
|
+
//# sourceMappingURL=gesture-snap-points.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveRuntimeSnapPoints","snapPoints","hasAutoSnapPoint","autoSnapPoint","minSnapPoint","maxSnapPoint","canDismiss","resolvedAutoSnapPoint","resolvedSnapPoints","sort","a","b","resolvedMinSnapPoint","Math","min","resolvedMaxSnapPoint","length","exports","findNearestSnapPoint","progress","nearest","smallestDistance","abs","i","point","distance"],"sourceRoot":"../../../../../../src","sources":["shared/providers/gestures/helpers/gesture-snap-points.ts"],"mappings":";;;;;;AAgBO,MAAMA,wBAAwB,GAAGA,CAAC;EACxCC,UAAU;EACVC,gBAAgB;EAChBC,aAAa;EACbC,YAAY;EACZC,YAAY;EACZC;AAC8B,CAAC,KAAsC;EACrE,SAAS;;EAET,MAAMC,qBAAqB,GAC1BL,gBAAgB,IAAIC,aAAa,GAAG,CAAC,GAAGA,aAAa,GAAG,IAAI;EAE7D,MAAMK,kBAAkB,GACvBD,qBAAqB,KAAK,IAAI,GAC3BN,UAAU,GACV,CAAC,GAAGA,UAAU,EAAEM,qBAAqB,CAAC,CAACE,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CAAC,CAAC;EAEhE,MAAMC,oBAAoB,GACzBL,qBAAqB,KAAK,IAAI,IAAI,CAACD,UAAU,GAC1CO,IAAI,CAACC,GAAG,CACRV,YAAY,KAAK,CAAC,CAAC,GAAGG,qBAAqB,GAAGH,YAAY,EAC1DG,qBACD,CAAC,GACAH,YAAY;EAEhB,OAAO;IACNG,qBAAqB;IACrBC,kBAAkB;IAClBI,oBAAoB;IACpBG,oBAAoB,EACnBP,kBAAkB,CAACA,kBAAkB,CAACQ,MAAM,GAAG,CAAC,CAAC,IAAIX;EACvD,CAAC;AACF,CAAC;AAACY,OAAA,CAAAjB,wBAAA,GAAAA,wBAAA;AAEK,MAAMkB,oBAAoB,GAAGA,CACnCC,QAAgB,EAChBlB,UAAoB,KACR;EACZ,SAAS;;EAET,IAAImB,OAAO,GAAGnB,UAAU,CAAC,CAAC,CAAC,IAAIkB,QAAQ;EACvC,IAAIE,gBAAgB,GAAGR,IAAI,CAACS,GAAG,CAACH,QAAQ,GAAGC,OAAO,CAAC;EAEnD,KAAK,IAAIG,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGtB,UAAU,CAACe,MAAM,EAAEO,CAAC,EAAE,EAAE;IAC3C,MAAMC,KAAK,GAAGvB,UAAU,CAACsB,CAAC,CAAC;IAC3B,MAAME,QAAQ,GAAGZ,IAAI,CAACS,GAAG,CAACH,QAAQ,GAAGK,KAAK,CAAC;IAE3C,IAAIC,QAAQ,GAAGJ,gBAAgB,EAAE;MAChCA,gBAAgB,GAAGI,QAAQ;MAC3BL,OAAO,GAAGI,KAAK;IAChB;EACD;EAEA,OAAOJ,OAAO;AACf,CAAC;AAACH,OAAA,CAAAC,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useLayoutAnchorContext = exports.LayoutAnchorProvider = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
8
9
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
10
|
var _createProvider = _interopRequireDefault(require("../utils/create-provider"));
|
|
10
|
-
var _viewport = require("./viewport.provider");
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
/**
|
|
13
13
|
* Provides a reference point for correcting bounds measurements.
|
|
@@ -34,11 +34,9 @@ const {
|
|
|
34
34
|
children
|
|
35
35
|
}) => {
|
|
36
36
|
const {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
} = (0, _viewport.useViewportContext)();
|
|
37
|
+
width: screenWidth,
|
|
38
|
+
height: screenHeight
|
|
39
|
+
} = (0, _reactNative.useWindowDimensions)();
|
|
42
40
|
const correctMeasurement = (0, _react.useCallback)(measured => {
|
|
43
41
|
"worklet";
|
|
44
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_createProvider","_interopRequireDefault","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_createProvider","_interopRequireDefault","e","__esModule","default","LayoutAnchorProvider","useLayoutAnchorContext","createProvider","guarded","anchorRef","children","width","screenWidth","height","screenHeight","useWindowDimensions","correctMeasurement","useCallback","measured","anchor","measure","scaleX","scaleY","relativeX","pageX","relativeY","pageY","x","y","isMeasurementInViewport","toleranceX","toleranceY","centerX","centerY","value","useMemo","exports"],"sourceRoot":"../../../../src","sources":["shared/providers/layout-anchor.provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AAKA,IAAAG,eAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAsD,SAAAI,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAsBtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;EAAEG,oBAAoB;EAAEC;AAAuB,CAAC,GAAG,IAAAC,uBAAc,EACtE,cAAc,EACd;EAAEC,OAAO,EAAE;AAAM,CAClB,CAAC,CACA,CAAC;EAAEC,SAAS;EAAEC;AAAS,CAAC,KAAK;EAC5B,MAAM;IAAEC,KAAK,EAAEC,WAAW;IAAEC,MAAM,EAAEC;EAAa,CAAC,GAAG,IAAAC,gCAAmB,EAAC,CAAC;EAE1E,MAAMC,kBAAkB,GAAG,IAAAC,kBAAW,EACpCC,QAA4B,IAAyB;IACrD,SAAS;;IACT,MAAMC,MAAM,GAAG,IAAAC,8BAAO,EAACX,SAAS,CAAC;IACjC,IAAI,CAACU,MAAM,EAAE,OAAOD,QAAQ;;IAE5B;IACA;IACA,MAAMG,MAAM,GAAGF,MAAM,CAACR,KAAK,GAAG,CAAC,GAAGQ,MAAM,CAACR,KAAK,GAAGC,WAAW,GAAG,CAAC;IAChE,MAAMU,MAAM,GAAGH,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AO,IAAI,CAACF,UAAU,IACtBE,OAAO,IAAIpB,WAAW,GAAGkB,UAAU,IACnCG,OAAO,IAAI,CAACF,UAAU,IACtBE,OAAO,IAAInB,YAAY,GAAGiB,UAAU;EAEtC,CAAC,EACD,CAACnB,WAAW,EAAEE,YAAY,CAC3B,CAAC;EAED,MAAMoB,KAAK,GAAG,IAAAC,cAAO,EACpB,OAAO;IAAEnB,kBAAkB;IAAEa;EAAwB,CAAC,CAAC,EACvD,CAACb,kBAAkB,EAAEa,uBAAuB,CAC7C,CAAC;EAED,OAAO;IACNK,KAAK;IACLxB;EACD,CAAC;AACF,CACD,CAAC;AAAC0B,OAAA,CAAA9B,sBAAA,GAAAA,sBAAA;AAAA8B,OAAA,CAAA/B,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -3,18 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.ScreenAnimationContext = void 0;
|
|
7
|
+
exports.ScreenAnimationProvider = ScreenAnimationProvider;
|
|
8
|
+
exports.useScreenAnimationContext = useScreenAnimationContext;
|
|
7
9
|
var _react = require("react");
|
|
8
10
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
-
var _createProvider = _interopRequireDefault(require("../../../utils/create-provider"));
|
|
10
11
|
var _pipeline = require("./helpers/pipeline");
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
const ScreenAnimationContext = exports.ScreenAnimationContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
14
|
+
ScreenAnimationContext.displayName = "ScreenAnimation";
|
|
15
|
+
function ScreenAnimationProvider({
|
|
16
|
+
children
|
|
17
|
+
}) {
|
|
18
|
+
const parentContext = (0, _react.useContext)(ScreenAnimationContext);
|
|
18
19
|
const {
|
|
19
20
|
screenInterpolatorProps,
|
|
20
21
|
nextInterpolator,
|
|
@@ -30,17 +31,30 @@ const {
|
|
|
30
31
|
bounds: boundsAccessor
|
|
31
32
|
};
|
|
32
33
|
});
|
|
34
|
+
const ancestorScreenAnimations = (0, _react.useMemo)(() => {
|
|
35
|
+
if (!parentContext) {
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
return [parentContext.screenAnimation, ...parentContext.ancestorScreenAnimations];
|
|
39
|
+
}, [parentContext]);
|
|
33
40
|
const value = (0, _react.useMemo)(() => ({
|
|
34
41
|
screenInterpolatorProps,
|
|
35
42
|
nextInterpolator,
|
|
36
43
|
currentInterpolator,
|
|
37
44
|
boundsAccessor,
|
|
38
|
-
screenAnimation
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
screenAnimation,
|
|
46
|
+
ancestorScreenAnimations
|
|
47
|
+
}), [screenInterpolatorProps, nextInterpolator, currentInterpolator, boundsAccessor, screenAnimation, ancestorScreenAnimations]);
|
|
48
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ScreenAnimationContext.Provider, {
|
|
49
|
+
value: value,
|
|
50
|
+
children: children
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function useScreenAnimationContext() {
|
|
54
|
+
const context = (0, _react.useContext)(ScreenAnimationContext);
|
|
55
|
+
if (!context) {
|
|
56
|
+
throw new Error("ScreenAnimation context must be used within a ScreenAnimationProvider");
|
|
57
|
+
}
|
|
58
|
+
return context;
|
|
59
|
+
}
|
|
46
60
|
//# sourceMappingURL=animation.provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_pipeline","_jsxRuntime","ScreenAnimationContext","exports","createContext","displayName","ScreenAnimationProvider","children","parentContext","useContext","screenInterpolatorProps","nextInterpolator","currentInterpolator","boundsAccessor","useScreenAnimationPipeline","screenAnimation","useDerivedValue","props","value","bounds","ancestorScreenAnimations","useMemo","jsx","Provider","useScreenAnimationContext","context","Error"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/animation/animation.provider.tsx"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAAgE,IAAAG,WAAA,GAAAH,OAAA;AAahE,MAAMI,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,gBAC3B,IAAAE,oBAAa,EAAqC,IAAI,CAAC;AACxDF,sBAAsB,CAACG,WAAW,GAAG,iBAAiB;AAEtD,SAASC,uBAAuBA,CAAC;EAAEC;AAAgB,CAAC,EAAE;EACrD,MAAMC,aAAa,GAAG,IAAAC,iBAAU,EAACP,sBAAsB,CAAC;EAExD,MAAM;IACLQ,uBAAuB;IACvBC,gBAAgB;IAChBC,mBAAmB;IACnBC;EACD,CAAC,GAAG,IAAAC,oCAA0B,EAAC,CAAC;EAEhC,MAAMC,eAAe,GAAG,IAAAC,sCAAe,EAA2B,MAAM;IACvE,SAAS;;IACT,MAAMC,KAAK,GAAGP,uBAAuB,CAACQ,KAAK;IAC3C,OAAO;MACN,GAAGD,KAAK;MACRE,MAAM,EAAEN;IACT,CAAC;EACF,CAAC,CAAC;EAEF,MAAMO,wBAAwB,GAAG,IAAAC,cAAO,EAAC,MAAM;IAC9C,IAAI,CAACb,aAAa,EAAE;MACnB,OAAO,EAAE;IACV;IAEA,OAAO,CACNA,aAAa,CAACO,eAAe,EAC7B,GAAGP,aAAa,CAACY,wBAAwB,CACzC;EACF,CAAC,EAAE,CAACZ,aAAa,CAAC,CAAC;EAEnB,MAAMU,KAAK,GAAG,IAAAG,cAAO,EACpB,OAAO;IACNX,uBAAuB;IACvBC,gBAAgB;IAChBC,mBAAmB;IACnBC,cAAc;IACdE,eAAe;IACfK;EACD,CAAC,CAAC,EACF,CACCV,uBAAuB,EACvBC,gBAAgB,EAChBC,mBAAmB,EACnBC,cAAc,EACdE,eAAe,EACfK,wBAAwB,CAE1B,CAAC;EAED,oBACC,IAAAnB,WAAA,CAAAqB,GAAA,EAACpB,sBAAsB,CAACqB,QAAQ;IAACL,KAAK,EAAEA,KAAM;IAAAX,QAAA,EAC5CA;EAAQ,CACuB,CAAC;AAEpC;AAEA,SAASiB,yBAAyBA,CAAA,EAAgC;EACjE,MAAMC,OAAO,GAAG,IAAAhB,iBAAU,EAACP,sBAAsB,CAAC;EAElD,IAAI,CAACuB,OAAO,EAAE;IACb,MAAM,IAAIC,KAAK,CACd,uEACD,CAAC;EACF;EAEA,OAAOD,OAAO;AACf","ignoreList":[]}
|
|
@@ -25,19 +25,11 @@ const derivations = ({
|
|
|
25
25
|
|
|
26
26
|
// The screen NOT driving the transition
|
|
27
27
|
const inactive = focused ? previous : current;
|
|
28
|
-
|
|
29
|
-
// deprecated
|
|
30
|
-
const isActiveTransitioning = !!(active.gesture.dragging || active.animating);
|
|
31
|
-
|
|
32
|
-
// deprecated
|
|
33
|
-
const isDismissing = !!(active.gesture.dismissing || active.closing);
|
|
34
28
|
return {
|
|
35
29
|
progress,
|
|
36
30
|
focused,
|
|
37
31
|
active,
|
|
38
|
-
inactive
|
|
39
|
-
isActiveTransitioning,
|
|
40
|
-
isDismissing
|
|
32
|
+
inactive
|
|
41
33
|
};
|
|
42
34
|
};
|
|
43
35
|
exports.derivations = derivations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["derivations","previous","current","next","progress","focused","active","inactive","
|
|
1
|
+
{"version":3,"names":["derivations","previous","current","next","progress","focused","active","inactive","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/animation/helpers/derivations.ts"],"mappings":";;;;;;AAQA;AACA;AACA;AACO,MAAMA,WAAW,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,OAAO;EAAEC;AAAwB,CAAC,KAAK;EAC9E,SAAS;;EAET;EACA,MAAMC,QAAQ,GAAGF,OAAO,CAACE,QAAQ,IAAID,IAAI,EAAEC,QAAQ,IAAI,CAAC,CAAC;;EAEzD;EACA,MAAMC,OAAO,GAAG,CAACF,IAAI;;EAErB;EACA,MAAMG,MAAM,GAAGD,OAAO,GAAGH,OAAO,GAAIC,IAAI,IAAID,OAAQ;;EAEpD;EACA,MAAMK,QAAQ,GAAGF,OAAO,GAAGJ,QAAQ,GAAGC,OAAO;EAE7C,OAAO;IACNE,QAAQ;IACRC,OAAO;IACPC,MAAM;IACNC;EACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAAR,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -5,13 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useScreenAnimationPipeline = useScreenAnimationPipeline;
|
|
7
7
|
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
8
9
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
10
|
+
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
9
11
|
var _constants = require("../../../../constants");
|
|
10
12
|
var _useStack = require("../../../../hooks/navigation/use-stack");
|
|
11
13
|
var _animation = require("../../../../stores/animation.store");
|
|
12
14
|
var _gesture = require("../../../../stores/gesture.store");
|
|
13
15
|
var _bounds = require("../../../../utils/bounds");
|
|
14
|
-
var
|
|
16
|
+
var _resolveScreenTransitionOptions = require("../../../../utils/resolve-screen-transition-options");
|
|
15
17
|
var _descriptors = require("../../descriptors");
|
|
16
18
|
var _derivations = require("./derivations");
|
|
17
19
|
var _worklet = require("./worklet");
|
|
@@ -91,10 +93,8 @@ function useScreenAnimationPipeline() {
|
|
|
91
93
|
stackProgress: rootStackProgress,
|
|
92
94
|
routeKeys
|
|
93
95
|
} = (0, _useStack.useStack)();
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
insets
|
|
97
|
-
} = (0, _viewport.useViewportContext)();
|
|
96
|
+
const dimensions = (0, _reactNative.useWindowDimensions)();
|
|
97
|
+
const insets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
|
|
98
98
|
const transitionsAlwaysOn = flags.TRANSITIONS_ALWAYS_ON;
|
|
99
99
|
const {
|
|
100
100
|
current: currentDescriptor,
|
|
@@ -106,12 +106,17 @@ function useScreenAnimationPipeline() {
|
|
|
106
106
|
const prevAnimation = useBuildScreenTransitionState(previousDescriptor, "previous");
|
|
107
107
|
const currentRouteKey = currentDescriptor?.route?.key;
|
|
108
108
|
const currentIndex = routeKeys.indexOf(currentRouteKey);
|
|
109
|
-
const
|
|
109
|
+
const sortedNumericSnapPoints = (0, _react.useMemo)(() => {
|
|
110
110
|
const points = currentDescriptor?.options?.snapPoints;
|
|
111
|
-
|
|
111
|
+
if (!points) return [];
|
|
112
|
+
return points.filter(p => typeof p === "number").sort((a, b) => a - b);
|
|
112
113
|
}, [currentDescriptor?.options?.snapPoints]);
|
|
114
|
+
const hasAutoSnapPoint = (0, _react.useMemo)(() => currentDescriptor?.options?.snapPoints?.includes("auto") ?? false, [currentDescriptor?.options?.snapPoints]);
|
|
115
|
+
const autoSnapPointValue = _animation.AnimationStore.getAnimation(currentRouteKey ?? "_", "autoSnapPoint");
|
|
116
|
+
const contentLayoutValue = _animation.AnimationStore.getAnimation(currentRouteKey ?? "_", "contentLayout");
|
|
113
117
|
const nextRouteKey = nextDescriptor?.route?.key;
|
|
114
118
|
const nextHasTransitions = !!nextRouteKey && hasTransitionsEnabled(nextDescriptor?.options, transitionsAlwaysOn);
|
|
119
|
+
const currentNavigationMaskEnabled = (0, _resolveScreenTransitionOptions.resolveNavigationMaskEnabled)(currentDescriptor?.options ?? {});
|
|
115
120
|
const framePropsMutable = (0, _reactNativeReanimated.useSharedValue)({
|
|
116
121
|
layouts: {
|
|
117
122
|
screen: dimensions
|
|
@@ -123,11 +128,10 @@ function useScreenAnimationPipeline() {
|
|
|
123
128
|
progress: 0,
|
|
124
129
|
stackProgress: 0,
|
|
125
130
|
snapIndex: -1,
|
|
131
|
+
navigationMaskEnabled: false,
|
|
126
132
|
focused: true,
|
|
127
133
|
active: _constants.DEFAULT_SCREEN_TRANSITION_STATE,
|
|
128
|
-
inactive: undefined
|
|
129
|
-
isActiveTransitioning: false,
|
|
130
|
-
isDismissing: false
|
|
134
|
+
inactive: undefined
|
|
131
135
|
});
|
|
132
136
|
const boundsAccessor = (0, _react.useMemo)(() => {
|
|
133
137
|
return (0, _bounds.createBoundsAccessor)(() => {
|
|
@@ -155,10 +159,15 @@ function useScreenAnimationPipeline() {
|
|
|
155
159
|
// This gives us the sum of progress values from current screen onwards
|
|
156
160
|
// Falls back to current progress if index is invalid
|
|
157
161
|
const stackProgress = currentIndex >= 0 ? rootStackProgress.value - currentIndex : progress;
|
|
158
|
-
|
|
162
|
+
|
|
163
|
+
// Resolve 'auto' snap point reactively so computeSnapIndex stays accurate
|
|
164
|
+
const resolvedAutoSnap = hasAutoSnapPoint && autoSnapPointValue.value > 0 ? autoSnapPointValue.value : null;
|
|
165
|
+
const resolvedSnapPoints = resolvedAutoSnap !== null ? [...sortedNumericSnapPoints, resolvedAutoSnap].sort((a, b) => a - b) : sortedNumericSnapPoints;
|
|
166
|
+
const snapIndex = computeSnapIndex(current.progress, resolvedSnapPoints);
|
|
159
167
|
const nextProps = {
|
|
160
168
|
layouts: {
|
|
161
|
-
screen: dimensions
|
|
169
|
+
screen: dimensions,
|
|
170
|
+
content: contentLayoutValue.value ?? undefined
|
|
162
171
|
},
|
|
163
172
|
insets,
|
|
164
173
|
previous,
|
|
@@ -169,7 +178,10 @@ function useScreenAnimationPipeline() {
|
|
|
169
178
|
snapIndex,
|
|
170
179
|
...helpers
|
|
171
180
|
};
|
|
172
|
-
framePropsMutable.value =
|
|
181
|
+
framePropsMutable.value = {
|
|
182
|
+
...nextProps,
|
|
183
|
+
navigationMaskEnabled: currentNavigationMaskEnabled
|
|
184
|
+
};
|
|
173
185
|
return nextProps;
|
|
174
186
|
});
|
|
175
187
|
const nextInterpolator = nextDescriptor?.options.screenStyleInterpolator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_constants","_useStack","_animation","_gesture","_bounds","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_reactNativeSafeAreaContext","_constants","_useStack","_animation","_gesture","_bounds","_resolveScreenTransitionOptions","_descriptors","_derivations","_worklet","computeSnapIndex","progress","snapPoints","length","i","t","unwrapInto","s","out","unwrapped","value","closing","entering","animating","gesture","x","y","normX","normY","dismissing","dragging","direction","normalizedX","normalizedY","isDismissing","isDragging","settled","meta","useBuildScreenTransitionState","descriptor","slot","key","route","options","gestureEnabled","shouldUseNeutralNextGestures","useMemo","undefined","plainRoute","toPlainRoute","plainMeta","toPlainValue","AnimationStore","getRouteAnimation","GestureStore","peekRouteGestures","getNeutralGestures","getRouteGestures","createScreenTransitionState","hasTransitionsEnabled","alwaysOn","enableTransitions","useScreenAnimationPipeline","flags","stackProgress","rootStackProgress","routeKeys","useStack","dimensions","useWindowDimensions","insets","useSafeAreaInsets","transitionsAlwaysOn","TRANSITIONS_ALWAYS_ON","current","currentDescriptor","next","nextDescriptor","previous","previousDescriptor","useDescriptors","currentAnimation","nextAnimation","prevAnimation","currentRouteKey","currentIndex","indexOf","sortedNumericSnapPoints","points","filter","p","sort","a","b","hasAutoSnapPoint","includes","autoSnapPointValue","getAnimation","contentLayoutValue","nextRouteKey","nextHasTransitions","currentNavigationMaskEnabled","resolveNavigationMaskEnabled","framePropsMutable","useSharedValue","layouts","screen","DEFAULT_SCREEN_TRANSITION_STATE","snapIndex","navigationMaskEnabled","focused","active","inactive","boundsAccessor","createBoundsAccessor","screenInterpolatorProps","useDerivedValue","helpers","derivations","resolvedAutoSnap","resolvedSnapPoints","nextProps","content","nextInterpolator","screenStyleInterpolator","currentInterpolator"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/animation/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,CAAC7C,KAAK,GAAGiE,YAAY,GAAG1E,QAAQ;;IAEtE;IACA,MAAM4G,gBAAgB,GACrBzB,gBAAgB,IAAIE,kBAAkB,CAAC5E,KAAK,GAAG,CAAC,GAC7C4E,kBAAkB,CAAC5E,KAAK,GACxB,IAAI;IACR,MAAMoG,kBAAkB,GACvBD,gBAAgB,KAAK,IAAI,GACtB,CAAC,GAAGhC,uBAAuB,EAAEgC,gBAAgB,CAAC,CAAC5B,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CAAC,CAAC,GACpEN,uBAAuB;IAE3B,MAAMqB,SAAS,GAAGlG,gBAAgB,CAACgE,OAAO,CAAC/D,QAAQ,EAAE6G,kBAAkB,CAAC;IAExE,MAAMC,SAAmD,GAAG;MAC3DhB,OAAO,EAAE;QACRC,MAAM,EAAEtC,UAAU;QAClBsD,OAAO,EAAExB,kBAAkB,CAAC9E,KAAK,IAAI2B;MACtC,CAAC;MACDuB,MAAM;MACNQ,QAAQ;MACRJ,OAAO;MACPE,IAAI;MACJjE,QAAQ;MACRqD,aAAa;MACb4C,SAAS;MACT,GAAGS;IACJ,CAAC;IAEDd,iBAAiB,CAACnF,KAAK,GAAG;MACzB,GAAGqG,SAAS;MACZZ,qBAAqB,EAAER;IACxB,CAAC;IACD,OAAOoB,SAAS;EACjB,CAAC,CAAC;EAEF,MAAME,gBAAgB,GAAG9C,cAAc,EAAElC,OAAO,CAACiF,uBAAuB;EACxE,MAAMC,mBAAmB,GACxBlD,iBAAiB,EAAEhC,OAAO,CAACiF,uBAAuB;EAEnD,OAAO;IACNT,uBAAuB;IACvBQ,gBAAgB;IAChBE,mBAAmB;IACnBZ;EACD,CAAC;AACF","ignoreList":[]}
|
package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.resolveScreenAnimationTarget = resolveScreenAnimationTarget;
|
|
7
|
+
const isAncestorTarget = target => {
|
|
8
|
+
return typeof target === "object" && target !== null && "ancestor" in target;
|
|
9
|
+
};
|
|
10
|
+
function resolveScreenAnimationTarget({
|
|
11
|
+
target,
|
|
12
|
+
self,
|
|
13
|
+
ancestors
|
|
14
|
+
}) {
|
|
15
|
+
if (!target || target === "self") {
|
|
16
|
+
return self;
|
|
17
|
+
}
|
|
18
|
+
if (target === "parent") {
|
|
19
|
+
return ancestors[0] ?? self;
|
|
20
|
+
}
|
|
21
|
+
if (target === "root") {
|
|
22
|
+
return ancestors[ancestors.length - 1] ?? self;
|
|
23
|
+
}
|
|
24
|
+
if (!isAncestorTarget(target)) {
|
|
25
|
+
return self;
|
|
26
|
+
}
|
|
27
|
+
const depth = target.ancestor;
|
|
28
|
+
if (!Number.isInteger(depth) || depth < 1) {
|
|
29
|
+
return self;
|
|
30
|
+
}
|
|
31
|
+
return ancestors[depth - 1] ?? self;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=resolve-screen-animation-target.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isAncestorTarget","target","resolveScreenAnimationTarget","self","ancestors","length","depth","ancestor","Number","isInteger"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/animation/helpers/resolve-screen-animation-target.ts"],"mappings":";;;;;;AAUA,MAAMA,gBAAgB,GACrBC,MAA6B,IACO;EACpC,OAAO,OAAOA,MAAM,KAAK,QAAQ,IAAIA,MAAM,KAAK,IAAI,IAAI,UAAU,IAAIA,MAAM;AAC7E,CAAC;AAEM,SAASC,4BAA4BA,CAAC;EAC5CD,MAAM;EACNE,IAAI;EACJC;AACO,CAAC,EAA0C;EAClD,IAAI,CAACH,MAAM,IAAIA,MAAM,KAAK,MAAM,EAAE;IACjC,OAAOE,IAAI;EACZ;EAEA,IAAIF,MAAM,KAAK,QAAQ,EAAE;IACxB,OAAOG,SAAS,CAAC,CAAC,CAAC,IAAID,IAAI;EAC5B;EAEA,IAAIF,MAAM,KAAK,MAAM,EAAE;IACtB,OAAOG,SAAS,CAACA,SAAS,CAACC,MAAM,GAAG,CAAC,CAAC,IAAIF,IAAI;EAC/C;EAEA,IAAI,CAACH,gBAAgB,CAACC,MAAM,CAAC,EAAE;IAC9B,OAAOE,IAAI;EACZ;EAEA,MAAMG,KAAK,GAAGL,MAAM,CAACM,QAAQ;EAC7B,IAAI,CAACC,MAAM,CAACC,SAAS,CAACH,KAAK,CAAC,IAAIA,KAAK,GAAG,CAAC,EAAE;IAC1C,OAAOH,IAAI;EACZ;EAEA,OAAOC,SAAS,CAACE,KAAK,GAAG,CAAC,CAAC,IAAIH,IAAI;AACpC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/animation/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -5,10 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useScreenAnimation = useScreenAnimation;
|
|
7
7
|
var _animation = require("./animation.provider");
|
|
8
|
-
|
|
8
|
+
var _resolveScreenAnimationTarget = require("./helpers/resolve-screen-animation-target");
|
|
9
|
+
function useScreenAnimation(target) {
|
|
9
10
|
const {
|
|
10
|
-
screenAnimation
|
|
11
|
+
screenAnimation,
|
|
12
|
+
ancestorScreenAnimations
|
|
11
13
|
} = (0, _animation.useScreenAnimationContext)();
|
|
12
|
-
return
|
|
14
|
+
return (0, _resolveScreenAnimationTarget.resolveScreenAnimationTarget)({
|
|
15
|
+
target,
|
|
16
|
+
self: screenAnimation,
|
|
17
|
+
ancestors: ancestorScreenAnimations
|
|
18
|
+
});
|
|
13
19
|
}
|
|
14
20
|
//# sourceMappingURL=use-screen-animation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_animation","require","useScreenAnimation","screenAnimation","useScreenAnimationContext"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/animation/use-screen-animation.tsx"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["_animation","require","_resolveScreenAnimationTarget","useScreenAnimation","target","screenAnimation","ancestorScreenAnimations","useScreenAnimationContext","resolveScreenAnimationTarget","self","ancestors"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/animation/use-screen-animation.tsx"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,6BAAA,GAAAD,OAAA;AAKO,SAASE,kBAAkBA,CACjCC,MAA8B,EACW;EACzC,MAAM;IAAEC,eAAe;IAAEC;EAAyB,CAAC,GAClD,IAAAC,oCAAyB,EAAC,CAAC;EAC5B,OAAO,IAAAC,0DAA4B,EAAC;IACnCJ,MAAM;IACNK,IAAI,EAAEJ,eAAe;IACrBK,SAAS,EAAEJ;EACZ,CAAC,CAAC;AACH","ignoreList":[]}
|
|
@@ -11,7 +11,6 @@ var _reactNative = require("react-native");
|
|
|
11
11
|
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
12
12
|
var _stack = require("../../types/stack.types");
|
|
13
13
|
var _createProvider = _interopRequireDefault(require("../../utils/create-provider"));
|
|
14
|
-
var _viewport = require("../viewport.provider");
|
|
15
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
16
|
const {
|
|
@@ -26,25 +25,24 @@ const {
|
|
|
26
25
|
const {
|
|
27
26
|
TRANSITIONS_ALWAYS_ON = false,
|
|
28
27
|
DISABLE_NATIVE_SCREENS = false,
|
|
28
|
+
DISABLE_NATIVE_SCREEN_CONTAINER = false,
|
|
29
29
|
STACK_TYPE = _stack.StackType.BLANK
|
|
30
30
|
} = config;
|
|
31
31
|
const flags = (0, _react.useMemo)(() => ({
|
|
32
32
|
TRANSITIONS_ALWAYS_ON,
|
|
33
33
|
STACK_TYPE,
|
|
34
|
-
DISABLE_NATIVE_SCREENS
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
flags
|
|
38
|
-
}), [flags]);
|
|
34
|
+
DISABLE_NATIVE_SCREENS,
|
|
35
|
+
DISABLE_NATIVE_SCREEN_CONTAINER
|
|
36
|
+
}), [TRANSITIONS_ALWAYS_ON, STACK_TYPE, DISABLE_NATIVE_SCREENS, DISABLE_NATIVE_SCREEN_CONTAINER]);
|
|
39
37
|
return {
|
|
40
|
-
value
|
|
38
|
+
value: {
|
|
39
|
+
flags
|
|
40
|
+
},
|
|
41
41
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureHandlerRootView, {
|
|
42
42
|
style: styles.container,
|
|
43
43
|
pointerEvents: STACK_TYPE === _stack.StackType.COMPONENT ? "box-none" : undefined,
|
|
44
44
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.SafeAreaProviderCompat, {
|
|
45
|
-
children:
|
|
46
|
-
children: children
|
|
47
|
-
})
|
|
45
|
+
children: children
|
|
48
46
|
})
|
|
49
47
|
})
|
|
50
48
|
};
|
|
@@ -58,22 +56,17 @@ exports.useStackCoreContext = useStackCoreContext;
|
|
|
58
56
|
function withStackCore(defaultConfig, Component) {
|
|
59
57
|
return function StackCoreWrapper({
|
|
60
58
|
DISABLE_NATIVE_SCREENS,
|
|
59
|
+
DISABLE_NATIVE_SCREEN_CONTAINER,
|
|
61
60
|
TRANSITIONS_ALWAYS_ON,
|
|
62
61
|
STACK_TYPE,
|
|
63
62
|
...props
|
|
64
63
|
}) {
|
|
65
|
-
//
|
|
64
|
+
// Start from defaults, then apply explicit overrides from the caller.
|
|
66
65
|
const config = {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
TRANSITIONS_ALWAYS_ON
|
|
72
|
-
}),
|
|
73
|
-
...(STACK_TYPE !== undefined && {
|
|
74
|
-
STACK_TYPE
|
|
75
|
-
}),
|
|
76
|
-
...defaultConfig
|
|
66
|
+
TRANSITIONS_ALWAYS_ON: TRANSITIONS_ALWAYS_ON ?? defaultConfig.TRANSITIONS_ALWAYS_ON,
|
|
67
|
+
STACK_TYPE: STACK_TYPE ?? defaultConfig.STACK_TYPE,
|
|
68
|
+
DISABLE_NATIVE_SCREENS: DISABLE_NATIVE_SCREENS ?? defaultConfig.DISABLE_NATIVE_SCREENS,
|
|
69
|
+
DISABLE_NATIVE_SCREEN_CONTAINER: DISABLE_NATIVE_SCREEN_CONTAINER ?? defaultConfig.DISABLE_NATIVE_SCREEN_CONTAINER
|
|
77
70
|
};
|
|
78
71
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(InternalStackCoreProvider, {
|
|
79
72
|
config: config,
|