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
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { NavigationContext, NavigationRouteContext } from "@react-navigation/native";
|
|
4
4
|
import * as React from "react";
|
|
5
|
-
import {
|
|
6
|
-
import { Overlay } from "./overlay";
|
|
7
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
6
|
/**
|
|
9
7
|
* Shared scene view for managed stacks (blank-stack, component-stack).
|
|
10
8
|
* Wraps screen render output with navigation context providers
|
|
@@ -20,9 +18,9 @@ export const SceneView = /*#__PURE__*/React.memo(function SceneView({
|
|
|
20
18
|
} = descriptor;
|
|
21
19
|
return /*#__PURE__*/_jsx(NavigationContext.Provider, {
|
|
22
20
|
value: navigation,
|
|
23
|
-
children: /*#__PURE__*/
|
|
21
|
+
children: /*#__PURE__*/_jsx(NavigationRouteContext.Provider, {
|
|
24
22
|
value: route,
|
|
25
|
-
children:
|
|
23
|
+
children: render?.()
|
|
26
24
|
})
|
|
27
25
|
});
|
|
28
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NavigationContext","NavigationRouteContext","React","
|
|
1
|
+
{"version":3,"names":["NavigationContext","NavigationRouteContext","React","jsx","_jsx","SceneView","memo","descriptor","route","navigation","render","Provider","value","children"],"sourceRoot":"../../../../src","sources":["shared/components/scene-view.tsx"],"mappings":";;AAAA,SACCA,iBAAiB,EACjBC,sBAAsB,QAChB,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAO/B;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,SAAS,gBAAGH,KAAK,CAACI,IAAI,CAAC,SAASD,SAASA,CAAC;EACtDE;AACe,CAAC,EAAE;EAClB,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAO,CAAC,GAAGH,UAAU;EAEhD,oBACCH,IAAA,CAACJ,iBAAiB,CAACW,QAAQ;IAACC,KAAK,EAAEH,UAAkB;IAAAI,QAAA,eACpDT,IAAA,CAACH,sBAAsB,CAACU,QAAQ;MAACC,KAAK,EAAEJ,KAAM;MAAAK,QAAA,EAC5CH,MAAM,GAAG;IAAC,CACqB;EAAC,CACP,CAAC;AAE/B,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useCallback } from "react";
|
|
4
|
+
import { useWindowDimensions } from "react-native";
|
|
5
|
+
import { runOnUI } from "react-native-reanimated";
|
|
6
|
+
import { useDescriptorDerivations, useDescriptors } from "../../../providers/screen/descriptors";
|
|
7
|
+
import { AnimationStore } from "../../../stores/animation.store";
|
|
8
|
+
import { animateToProgress } from "../../../utils/animation/animate-to-progress";
|
|
9
|
+
export function useContentLayout() {
|
|
10
|
+
const {
|
|
11
|
+
current
|
|
12
|
+
} = useDescriptors();
|
|
13
|
+
const {
|
|
14
|
+
isFirstKey
|
|
15
|
+
} = useDescriptorDerivations();
|
|
16
|
+
const {
|
|
17
|
+
height: screenHeight
|
|
18
|
+
} = useWindowDimensions();
|
|
19
|
+
const routeKey = current.route.key;
|
|
20
|
+
const animations = AnimationStore.getRouteAnimations(routeKey);
|
|
21
|
+
const autoSnapPointValue = AnimationStore.getAnimation(routeKey, "autoSnapPoint");
|
|
22
|
+
const contentLayoutValue = AnimationStore.getAnimation(routeKey, "contentLayout");
|
|
23
|
+
return useCallback(event => {
|
|
24
|
+
const {
|
|
25
|
+
width,
|
|
26
|
+
height
|
|
27
|
+
} = event.nativeEvent.layout;
|
|
28
|
+
if (width <= 0 || height <= 0) return;
|
|
29
|
+
const fraction = Math.min(height / screenHeight, 1);
|
|
30
|
+
const transitionSpec = current.options.transitionSpec;
|
|
31
|
+
runOnUI((nextWidth, nextHeight, nextFraction, isInitialScreen, spec) => {
|
|
32
|
+
"worklet";
|
|
33
|
+
|
|
34
|
+
contentLayoutValue.value = {
|
|
35
|
+
width: nextWidth,
|
|
36
|
+
height: nextHeight
|
|
37
|
+
};
|
|
38
|
+
const isFirstMeasurement = autoSnapPointValue.value <= 0;
|
|
39
|
+
autoSnapPointValue.value = nextFraction;
|
|
40
|
+
if (!isFirstMeasurement || animations.progress.value !== 0 || animations.animating.value !== 0) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (isInitialScreen) {
|
|
44
|
+
animations.targetProgress.value = nextFraction;
|
|
45
|
+
animations.progress.value = nextFraction;
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
animateToProgress({
|
|
49
|
+
target: nextFraction,
|
|
50
|
+
spec,
|
|
51
|
+
animations
|
|
52
|
+
});
|
|
53
|
+
})(width, height, fraction, isFirstKey, transitionSpec);
|
|
54
|
+
}, [animations, autoSnapPointValue, contentLayoutValue, current.options.transitionSpec, isFirstKey, screenHeight]);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=use-content-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useWindowDimensions","runOnUI","useDescriptorDerivations","useDescriptors","AnimationStore","animateToProgress","useContentLayout","current","isFirstKey","height","screenHeight","routeKey","route","key","animations","getRouteAnimations","autoSnapPointValue","getAnimation","contentLayoutValue","event","width","nativeEvent","layout","fraction","Math","min","transitionSpec","options","nextWidth","nextHeight","nextFraction","isInitialScreen","spec","value","isFirstMeasurement","progress","animating","targetProgress","target"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-container/hooks/use-content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QAC1Bb,KAAK,EAAEQ,SAAS;QAChBnB,MAAM,EAAEoB;MACT,CAAC;MAED,MAAMK,kBAAkB,GAAGlB,kBAAkB,CAACiB,KAAK,IAAI,CAAC;MACxDjB,kBAAkB,CAACiB,KAAK,GAAGH,YAAY;MAEvC,IACC,CAACI,kBAAkB,IACnBpB,UAAU,CAACqB,QAAQ,CAACF,KAAK,KAAK,CAAC,IAC/BnB,UAAU,CAACsB,SAAS,CAACH,KAAK,KAAK,CAAC,EAC/B;QACD;MACD;MAEA,IAAIF,eAAe,EAAE;QACpBjB,UAAU,CAACuB,cAAc,CAACJ,KAAK,GAAGH,YAAY;QAC9ChB,UAAU,CAACqB,QAAQ,CAACF,KAAK,GAAGH,YAAY;QACxC;MACD;MAEAzB,iBAAiB,CAAC;QACjBiC,MAAM,EAAER,YAAY;QACpBE,IAAI;QACJlB;MACD,CAAC,CAAC;IACH,CACD,CAAC,CAACM,KAAK,EAAEX,MAAM,EAAEc,QAAQ,EAAEf,UAAU,EAAEkB,cAAc,CAAC;EACvD,CAAC,EACD,CACCZ,UAAU,EACVE,kBAAkB,EAClBE,kBAAkB,EAClBX,OAAO,CAACoB,OAAO,CAACD,cAAc,EAC9BlB,UAAU,EACVE,YAAY,CAEd,CAAC;AACF","ignoreList":[]}
|
|
@@ -29,6 +29,9 @@ export const BackdropLayer = /*#__PURE__*/memo(function BackdropLayer() {
|
|
|
29
29
|
backdropBehavior
|
|
30
30
|
} = useBackdropPointerEvents();
|
|
31
31
|
const BackdropComponent = current.options.backdropComponent;
|
|
32
|
+
const routeKey = current.route.key;
|
|
33
|
+
const animations = AnimationStore.getRouteAnimations(routeKey);
|
|
34
|
+
const autoSnapPointValue = AnimationStore.getAnimation(routeKey, "autoSnapPoint");
|
|
32
35
|
const AnimatedBackdropComponent = useMemo(() => BackdropComponent ? Animated.createAnimatedComponent(BackdropComponent) : null, [BackdropComponent]);
|
|
33
36
|
const handleBackdropPress = useCallback(() => {
|
|
34
37
|
if (backdropBehavior === "dismiss") {
|
|
@@ -36,24 +39,24 @@ export const BackdropLayer = /*#__PURE__*/memo(function BackdropLayer() {
|
|
|
36
39
|
return;
|
|
37
40
|
}
|
|
38
41
|
if (backdropBehavior === "collapse") {
|
|
39
|
-
const
|
|
42
|
+
const rawSnapPoints = current.options.snapPoints;
|
|
40
43
|
const canDismiss = current.options.gestureEnabled !== false;
|
|
41
44
|
|
|
42
45
|
// No snap points → fallback to dismiss
|
|
43
|
-
if (!
|
|
46
|
+
if (!rawSnapPoints || rawSnapPoints.length === 0) {
|
|
44
47
|
dismissScreen();
|
|
45
48
|
return;
|
|
46
49
|
}
|
|
47
|
-
const
|
|
48
|
-
const gestures = GestureStore.getRouteGestures(current.route.key);
|
|
50
|
+
const gestures = GestureStore.getRouteGestures(routeKey);
|
|
49
51
|
const transitionSpec = current.options.transitionSpec;
|
|
50
52
|
runOnUI(() => {
|
|
51
53
|
"worklet";
|
|
52
54
|
|
|
55
|
+
const resolvedSnaps = rawSnapPoints.map(point => point === "auto" ? autoSnapPointValue.value : point).filter(point => typeof point === "number");
|
|
53
56
|
const {
|
|
54
57
|
target,
|
|
55
58
|
shouldDismiss
|
|
56
|
-
} = findCollapseTarget(animations.progress.value,
|
|
59
|
+
} = findCollapseTarget(animations.progress.value, resolvedSnaps, canDismiss);
|
|
57
60
|
|
|
58
61
|
// If already dismissing, skip
|
|
59
62
|
if (gestures.dismissing.value) return;
|
|
@@ -70,7 +73,7 @@ export const BackdropLayer = /*#__PURE__*/memo(function BackdropLayer() {
|
|
|
70
73
|
});
|
|
71
74
|
})();
|
|
72
75
|
}
|
|
73
|
-
}, [backdropBehavior, current, dismissScreen]);
|
|
76
|
+
}, [animations, autoSnapPointValue, backdropBehavior, current, dismissScreen, routeKey]);
|
|
74
77
|
const animatedBackdropStyle = useAnimatedStyle(() => {
|
|
75
78
|
"worklet";
|
|
76
79
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","useCallback","useMemo","Pressable","StyleSheet","Animated","runOnUI","useAnimatedProps","useAnimatedStyle","DefaultSnapSpec","NO_PROPS","NO_STYLES","useNavigationHelpers","useDescriptors","useScreenStyles","AnimationStore","GestureStore","animateToProgress","findCollapseTarget","useBackdropPointerEvents","jsx","_jsx","jsxs","_jsxs","BackdropLayer","stylesMap","current","dismissScreen","isBackdropActive","backdropBehavior","BackdropComponent","options","backdropComponent","AnimatedBackdropComponent","createAnimatedComponent","handleBackdropPress","snapPoints","canDismiss","gestureEnabled","length","
|
|
1
|
+
{"version":3,"names":["memo","useCallback","useMemo","Pressable","StyleSheet","Animated","runOnUI","useAnimatedProps","useAnimatedStyle","DefaultSnapSpec","NO_PROPS","NO_STYLES","useNavigationHelpers","useDescriptors","useScreenStyles","AnimationStore","GestureStore","animateToProgress","findCollapseTarget","useBackdropPointerEvents","jsx","_jsx","jsxs","_jsxs","BackdropLayer","stylesMap","current","dismissScreen","isBackdropActive","backdropBehavior","BackdropComponent","options","backdropComponent","routeKey","route","key","animations","getRouteAnimations","autoSnapPointValue","getAnimation","AnimatedBackdropComponent","createAnimatedComponent","handleBackdropPress","rawSnapPoints","snapPoints","canDismiss","gestureEnabled","length","gestures","getRouteGestures","transitionSpec","resolvedSnaps","map","point","value","filter","target","shouldDismiss","progress","dismissing","spec","open","expand","close","collapse","onAnimationFinish","undefined","animatedBackdropStyle","backdrop","style","animatedBackdropProps","props","absoluteFillObject","pointerEvents","onPress","children","animatedProps","View"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-container/layers/backdrop.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAClD,SAASC,SAAS,EAAEC,UAAU,QAAQ,cAAc;AACpD,OAAOC,QAAQ,IACdC,OAAO,EACPC,gBAAgB,EAChBC,gBAAgB,QACV,yBAAyB;AAChC,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AACxD,SAASC,oBAAo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F9B,UAAU,EACVE,kBAAkB,EAClBT,gBAAgB,EAChBH,OAAO,EACPC,aAAa,EACbM,QAAQ,CACR,CAAC;EAEF,MAAMkC,qBAAqB,GAAG3D,gBAAgB,CAAC,MAAM;IACpD,SAAS;;IACT,OAAOiB,SAAS,CAAC6B,KAAK,CAACc,QAAQ,EAAEC,KAAK,IAAI1D,SAAS;EACpD,CAAC,CAAC;EAEF,MAAM2D,qBAAqB,GAAG/D,gBAAgB,CAAC,MAAM;IACpD,SAAS;;IACT,OAAOkB,SAAS,CAAC6B,KAAK,CAACc,QAAQ,EAAEG,KAAK,IAAI7D,QAAQ;EACnD,CAAC,CAAC;EAEF,oBACCa,KAAA,CAACpB,SAAS;IACTkE,KAAK,EAAEjE,UAAU,CAACoE,kBAAmB;IACrCC,aAAa,EAAE7C,gBAAgB,GAAG,MAAM,GAAG,MAAO;IAClD8C,OAAO,EAAE9C,gBAAgB,GAAGc,mBAAmB,GAAGwB,SAAU;IAAAS,QAAA,GAK3DnC,yBAAyB,iBACzBnB,IAAA,CAACmB,yBAAyB;MACzB6B,KAAK,EAAE,CAACjE,UAAU,CAACoE,kBAAkB,CAAE;MACvCI,aAAa,EAAEN;IAAsB,CACrC,CACD,eACDjD,IAAA,CAAChB,QAAQ,CAACwE,IAAI;MACbR,KAAK,EAAE,CAACjE,UAAU,CAACoE,kBAAkB,EAAEL,qBAAqB;IAAE,CAC9D,CAAC;EAAA,CACQ,CAAC;AAEd,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/** biome-ignore-all lint/style/noNonNullAssertion: <Screen gesture is under the gesture context, so this will always exist.> */
|
|
4
|
-
import { memo
|
|
4
|
+
import { memo } from "react";
|
|
5
5
|
import { StyleSheet, View } from "react-native";
|
|
6
6
|
import { GestureDetector } from "react-native-gesture-handler";
|
|
7
7
|
import Animated, { useAnimatedProps, useAnimatedStyle } from "react-native-reanimated";
|
|
8
|
-
import {
|
|
8
|
+
import { NO_PROPS, NO_STYLES } from "../../../constants";
|
|
9
9
|
import { useGestureContext } from "../../../providers/gestures";
|
|
10
10
|
import { useDescriptors } from "../../../providers/screen/descriptors";
|
|
11
11
|
import { useScreenStyles } from "../../../providers/screen/styles.provider";
|
|
12
|
-
import {
|
|
12
|
+
import { resolveNavigationMaskEnabled } from "../../../utils/resolve-screen-transition-options";
|
|
13
13
|
import { useBackdropPointerEvents } from "../hooks/use-backdrop-pointer-events";
|
|
14
|
+
import { useContentLayout } from "../hooks/use-content-layout";
|
|
15
|
+
import { MaybeMaskedNavigationContainer } from "./maybe-masked-navigation-container";
|
|
14
16
|
import { SurfaceContainer } from "./surface-container";
|
|
15
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
let LazyMaskedView = View;
|
|
17
|
-
try {
|
|
18
|
-
LazyMaskedView = require("@react-native-masked-view/masked-view").default;
|
|
19
|
-
} catch (_) {
|
|
20
|
-
// optional peer dependency
|
|
21
|
-
}
|
|
22
|
-
let hasWarnedMissingMaskedView = false;
|
|
23
18
|
export const ContentLayer = /*#__PURE__*/memo(({
|
|
24
19
|
children
|
|
25
20
|
}) => {
|
|
@@ -34,10 +29,10 @@ export const ContentLayer = /*#__PURE__*/memo(({
|
|
|
34
29
|
isBackdropActive
|
|
35
30
|
} = useBackdropPointerEvents();
|
|
36
31
|
const gestureContext = useGestureContext();
|
|
37
|
-
const isNavigationMaskEnabled =
|
|
32
|
+
const isNavigationMaskEnabled = resolveNavigationMaskEnabled(current.options);
|
|
38
33
|
const contentPointerEvents = isBackdropActive ? "box-none" : pointerEvents;
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
const hasAutoSnapPoint = current.options.snapPoints?.includes("auto") ?? false;
|
|
35
|
+
const handleContentLayout = useContentLayout();
|
|
41
36
|
const animatedContentStyle = useAnimatedStyle(() => {
|
|
42
37
|
"worklet";
|
|
43
38
|
|
|
@@ -48,49 +43,23 @@ export const ContentLayer = /*#__PURE__*/memo(({
|
|
|
48
43
|
|
|
49
44
|
return stylesMap.value.content?.props ?? NO_PROPS;
|
|
50
45
|
});
|
|
51
|
-
|
|
52
|
-
// ── Navigation mask / container ──
|
|
53
|
-
const animatedNavigationContainerStyle = useAnimatedStyle(() => {
|
|
54
|
-
"worklet";
|
|
55
|
-
|
|
56
|
-
return stylesMap.value[NAVIGATION_CONTAINER_STYLE_ID]?.style || NO_STYLES;
|
|
57
|
-
});
|
|
58
|
-
const animatedNavigationMaskStyle = useAnimatedStyle(() => {
|
|
59
|
-
"worklet";
|
|
60
|
-
|
|
61
|
-
return stylesMap.value[NAVIGATION_MASK_STYLE_ID]?.style || NO_STYLES;
|
|
62
|
-
});
|
|
63
|
-
useEffect(() => {
|
|
64
|
-
if (!isNavigationMaskEnabled) return;
|
|
65
|
-
if (LazyMaskedView !== View) return;
|
|
66
|
-
if (hasWarnedMissingMaskedView) return;
|
|
67
|
-
hasWarnedMissingMaskedView = true;
|
|
68
|
-
logger.warn("maskEnabled requires @react-native-masked-view/masked-view. Install it to enable navigation bounds masking.");
|
|
69
|
-
}, [isNavigationMaskEnabled]);
|
|
70
|
-
const contentChildren = isNavigationMaskEnabled ? LazyMaskedView !== View ? /*#__PURE__*/_jsx(LazyMaskedView, {
|
|
71
|
-
style: styles.navigationMaskedRoot
|
|
72
|
-
// @ts-expect-error masked-view package types are too strict here
|
|
73
|
-
,
|
|
74
|
-
maskElement: /*#__PURE__*/_jsx(Animated.View, {
|
|
75
|
-
style: [styles.navigationMaskElement, animatedNavigationMaskStyle]
|
|
76
|
-
}),
|
|
77
|
-
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
78
|
-
style: [styles.navigationContainer, animatedNavigationContainerStyle],
|
|
79
|
-
children: children
|
|
80
|
-
})
|
|
81
|
-
}) : /*#__PURE__*/_jsx(Animated.View, {
|
|
82
|
-
style: [styles.navigationContainer, animatedNavigationContainerStyle],
|
|
83
|
-
children: children
|
|
84
|
-
}) : children;
|
|
85
46
|
return /*#__PURE__*/_jsx(GestureDetector, {
|
|
86
47
|
gesture: gestureContext.panGesture,
|
|
87
48
|
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
88
49
|
style: [styles.content, animatedContentStyle],
|
|
89
50
|
animatedProps: animatedContentProps,
|
|
90
51
|
pointerEvents: contentPointerEvents,
|
|
91
|
-
children: /*#__PURE__*/_jsx(
|
|
52
|
+
children: /*#__PURE__*/_jsx(MaybeMaskedNavigationContainer, {
|
|
92
53
|
pointerEvents: contentPointerEvents,
|
|
93
|
-
|
|
54
|
+
enabled: isNavigationMaskEnabled,
|
|
55
|
+
children: /*#__PURE__*/_jsx(SurfaceContainer, {
|
|
56
|
+
pointerEvents: contentPointerEvents,
|
|
57
|
+
children: hasAutoSnapPoint ? /*#__PURE__*/_jsx(View, {
|
|
58
|
+
collapsable: false,
|
|
59
|
+
onLayout: handleContentLayout,
|
|
60
|
+
children: children
|
|
61
|
+
}) : children
|
|
62
|
+
})
|
|
94
63
|
})
|
|
95
64
|
})
|
|
96
65
|
});
|
|
@@ -98,15 +67,6 @@ export const ContentLayer = /*#__PURE__*/memo(({
|
|
|
98
67
|
const styles = StyleSheet.create({
|
|
99
68
|
content: {
|
|
100
69
|
flex: 1
|
|
101
|
-
},
|
|
102
|
-
navigationMaskedRoot: {
|
|
103
|
-
flex: 1
|
|
104
|
-
},
|
|
105
|
-
navigationMaskElement: {
|
|
106
|
-
backgroundColor: "white"
|
|
107
|
-
},
|
|
108
|
-
navigationContainer: {
|
|
109
|
-
flex: 1
|
|
110
70
|
}
|
|
111
71
|
});
|
|
112
72
|
//# sourceMappingURL=content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","
|
|
1
|
+
{"version":3,"names":["memo","StyleSheet","View","GestureDetector","Animated","useAnimatedProps","useAnimatedStyle","NO_PROPS","NO_STYLES","useGestureContext","useDescriptors","useScreenStyles","resolveNavigationMaskEnabled","useBackdropPointerEvents","useContentLayout","MaybeMaskedNavigationContainer","SurfaceContainer","jsx","_jsx","ContentLayer","children","stylesMap","current","pointerEvents","isBackdropActive","gestureContext","isNavigationMaskEnabled","options","contentPointerEvents","hasAutoSnapPoint","snapPoints","includes","handleContentLayout","animatedContentStyle","value","content","style","animatedContentProps","props","gesture","panGesture","styles","animatedProps","enabled","collapsable","onLayout","create","flex"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-container/layers/content.tsx"],"mappings":";;AAAA;AACA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,OAAOC,QAAQ,IACdC,gBAAgB,EAChBC,gBAAgB,QACV,yBAAyB;AAChC,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AACxD,SAASC,iBAAiB,QAAQ,6BAA6B;AAC/D,SAASC,cAAc,QAAQ,uCAAuC;AACtE,SAASC,eAAe,QAAQ,2CAA2C;AAC3E,SAASC,4BAA4B,QAAQ,kDAAkD;AAC/F,SAASC,wBAAwB,QAAQ,sCAAsC;AAC/E,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,8BAA8B,QAAQ,qCAAqC;AACpF,SAASC,gBAAgB,QAAQ,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMvD,OAAO,MAAMC,YAAY,gBAAGnB,IAAI,CAAC,CAAC;EAAEoB;AAAgB,CAAC,KAAK;EACzD,MAAM;IAAEC;EAAU,CAAC,GAAGV,eAAe,CAAC,CAAC;EACvC,MAAM;IAAEW;EAAQ,CAAC,GAAGZ,cAAc,CAAC,CAAC;EACpC,MAAM;IAAEa,aAAa;IAAEC;EAAiB,CAAC,GAAGX,wBAAwB,CAAC,CAAC;EACtE,MAAMY,cAAc,GAAGhB,iBAAiB,CAAC,CAAC;EAC1C,MAAMiB,uBAAuB,GAAGd,4BAA4B,CAACU,OAAO,CAACK,OAAO,CAAC;EAC7E,MAAMC,oBA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AE;IACRY,IAAI,EAAE;EACP;AACD,CAAC,CAAC","ignoreList":[]}
|
package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { memo, useEffect } from "react";
|
|
4
|
+
import { Platform, StyleSheet, View } from "react-native";
|
|
5
|
+
import Animated, { useAnimatedStyle } from "react-native-reanimated";
|
|
6
|
+
import { NAVIGATION_CONTAINER_STYLE_ID, NAVIGATION_MASK_STYLE_ID, NO_STYLES } from "../../../constants";
|
|
7
|
+
import { useScreenStyles } from "../../../providers/screen/styles.provider";
|
|
8
|
+
import { logger } from "../../../utils/logger";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
let LazyMaskedView = View;
|
|
11
|
+
try {
|
|
12
|
+
LazyMaskedView = require("@react-native-masked-view/masked-view").default;
|
|
13
|
+
} catch (_) {
|
|
14
|
+
// optional peer dependency
|
|
15
|
+
}
|
|
16
|
+
let hasWarnedMissingMaskedView = false;
|
|
17
|
+
const IS_ANDROID = Platform.OS === "android";
|
|
18
|
+
export const MaybeMaskedNavigationContainer = /*#__PURE__*/memo(({
|
|
19
|
+
enabled,
|
|
20
|
+
children,
|
|
21
|
+
pointerEvents
|
|
22
|
+
}) => {
|
|
23
|
+
const {
|
|
24
|
+
stylesMap
|
|
25
|
+
} = useScreenStyles();
|
|
26
|
+
const animatedNavigationContainerStyle = useAnimatedStyle(() => {
|
|
27
|
+
"worklet";
|
|
28
|
+
|
|
29
|
+
return stylesMap.value[NAVIGATION_CONTAINER_STYLE_ID]?.style || NO_STYLES;
|
|
30
|
+
});
|
|
31
|
+
const animatedNavigationMaskStyle = useAnimatedStyle(() => {
|
|
32
|
+
"worklet";
|
|
33
|
+
|
|
34
|
+
return stylesMap.value[NAVIGATION_MASK_STYLE_ID]?.style || NO_STYLES;
|
|
35
|
+
});
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (!enabled) return;
|
|
38
|
+
if (LazyMaskedView !== View) return;
|
|
39
|
+
if (hasWarnedMissingMaskedView) return;
|
|
40
|
+
hasWarnedMissingMaskedView = true;
|
|
41
|
+
logger.warn("navigationMaskEnabled requires @react-native-masked-view/masked-view. Install it to enable navigation bounds masking.");
|
|
42
|
+
}, [enabled]);
|
|
43
|
+
const navigationContainer = /*#__PURE__*/_jsx(Animated.View, {
|
|
44
|
+
style: [styles.navigationContainer, animatedNavigationContainerStyle],
|
|
45
|
+
pointerEvents: pointerEvents,
|
|
46
|
+
collapsable: false,
|
|
47
|
+
renderToHardwareTextureAndroid: IS_ANDROID && !enabled,
|
|
48
|
+
needsOffscreenAlphaCompositing: IS_ANDROID && !enabled,
|
|
49
|
+
children: children
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// Navigation zoom uses the root container transform even when the mask
|
|
53
|
+
// wrapper is disabled. Only the mask element itself is optional.
|
|
54
|
+
if (!enabled) return navigationContainer;
|
|
55
|
+
if (LazyMaskedView === View) {
|
|
56
|
+
return navigationContainer;
|
|
57
|
+
}
|
|
58
|
+
return /*#__PURE__*/_jsx(LazyMaskedView, {
|
|
59
|
+
style: styles.navigationMaskedRoot
|
|
60
|
+
// @ts-expect-error masked-view package types are too strict here
|
|
61
|
+
,
|
|
62
|
+
maskElement: /*#__PURE__*/_jsx(Animated.View, {
|
|
63
|
+
style: [styles.navigationMaskElement, animatedNavigationMaskStyle],
|
|
64
|
+
pointerEvents: "none"
|
|
65
|
+
}),
|
|
66
|
+
pointerEvents: pointerEvents,
|
|
67
|
+
children: navigationContainer
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
const styles = StyleSheet.create({
|
|
71
|
+
navigationMaskedRoot: {
|
|
72
|
+
flex: 1
|
|
73
|
+
},
|
|
74
|
+
navigationMaskElement: {
|
|
75
|
+
backgroundColor: "white"
|
|
76
|
+
},
|
|
77
|
+
navigationContainer: {
|
|
78
|
+
flex: 1
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
//# sourceMappingURL=maybe-masked-navigation-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","useEffect","Platform","StyleSheet","View","Animated","useAnimatedStyle","NAVIGATION_CONTAINER_STYLE_ID","NAVIGATION_MASK_STYLE_ID","NO_STYLES","useScreenStyles","logger","jsx","_jsx","LazyMaskedView","require","default","_","hasWarnedMissingMaskedView","IS_ANDROID","OS","MaybeMaskedNavigationContainer","enabled","children","pointerEvents","stylesMap","animatedNavigationContainerStyle","value","style","animatedNavigationMaskStyle","warn","navigationContainer","styles","collapsable","renderToHardwareTextureAndroid","needsOffscreenAlphaCompositing","navigationMaskedRoot","maskElement","navigationMaskElement","create","flex","backgroundColor"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-container/layers/maybe-masked-navigation-container.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,SAAS,QAAQ,OAAO;AACvC,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAwB,cAAc;AACzE,OAAOC,QAAQ,IAAIC,gBAAgB,QAAQ,yBAAyB;AACpE,SACCC,6BAA6B,EAC7BC,wBAAwB,EACxBC,SAAS,QACH,oBAAoB;AAC3B,SAASC,eAAe,QAAQ,2CAA2C;AAC3E,SAASC,MAAM,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQ/C,IAAIC,cAAc,GAAGV,IAAI;AAEzB,IAAI;EACHU,cAAc,GAAGC,OAAO,CAAC,uCAAuC,CAAC,CAACC,OAAO;AAC1E,CAAC,CAAC,OAAOC,CAAC,EAAE;EACX;AAAA;AAGD,IAAIC,0BAA0B,GAAG,KAAK;AACtC,MAAMC,UAAU,GAAGjB,QAAQ,CAACkB,EAAE,KAAK,SAAS;AAE5C,OAAO,MAAMC,8BAA8B,gBAAGrB,IAAI,CACjD,CAAC;EAAEsB,OAAO;EAAEC,QAAQ;EAAEC;AAAqB,CAAC,KAAK;EAChD,M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AET,2BAA2B,CAAE;MACnEL,aAAa,EAAC;IAAM,CACpB,CACD;IACDA,aAAa,EAAEA,aAAc;IAAAD,QAAA,EAE5BQ;EAAmB,CACL,CAAC;AAEnB,CACD,CAAC;AAED,MAAMC,MAAM,GAAG7B,UAAU,CAACoC,MAAM,CAAC;EAChCH,oBAAoB,EAAE;IACrBI,IAAI,EAAE;EACP,CAAC;EACDF,qBAAqB,EAAE;IACtBG,eAAe,EAAE;EAClB,CAAC;EACDV,mBAAmB,EAAE;IACpBS,IAAI,EAAE;EACP;AACD,CAAC,CAAC","ignoreList":[]}
|
package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useLayoutEffect","runOnJS","useAnimatedReaction","useDerivedValue","useStack","useSharedValueState","useStableCallback","useGestureContext","useDescriptorDerivations","useStackCoreContext","useManagedStackContext","StackType","animateToProgress","resetStoresForScreen","useNavigatorHistoryRegistry","useManagedClose","current","animations","activate","deactivate","resetStores","handleCloseRoute","closingRouteKeysShared","routeKey","route","key","handleCloseEnd","finished","requestAnimationFrame","transitionSpec","options","keys","value","includes","isClosing","wasClosing","target","spec","onAnimationFinish","useNativeStackClose","gestureCtx","isAncestorDismissingViaGesture","ancestorContext","gestureAnimationValues","dismissing","handleBeforeRemove","e","isEnabled","enableTransitions","navigation","state","getState","routeIndex","routes","findIndex","isFirstScreen","closing","set","preventDefault","dispatch","data","action","addListener","useCloseTransition","navigatorKey","flags","isBranchScreen","branchNavigatorKey","isNativeStack","STACK_TYPE","NATIVE","closeParams"],"sourceRoot":"../../../../../../../src","sources":["shared/components/screen-lifecycle/hooks/use-close-transition/index.ts"],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"names":["useLayoutEffect","runOnJS","useAnimatedReaction","useDerivedValue","useStack","useSharedValueState","useStableCallback","useGestureContext","useDescriptorDerivations","useStackCoreContext","useManagedStackContext","StackType","animateToProgress","resetStoresForScreen","useNavigatorHistoryRegistry","useManagedClose","current","animations","activate","deactivate","resetStores","handleCloseRoute","closingRouteKeysShared","routeKey","route","key","handleCloseEnd","finished","requestAnimationFrame","transitionSpec","options","keys","value","includes","isClosing","wasClosing","target","spec","onAnimationFinish","useNativeStackClose","gestureCtx","isAncestorDismissingViaGesture","ancestorContext","gestureAnimationValues","dismissing","handleBeforeRemove","e","isEnabled","enableTransitions","navigation","state","getState","routeIndex","routes","findIndex","isFirstScreen","closing","set","preventDefault","dispatch","data","action","addListener","useCloseTransition","navigatorKey","flags","isBranchScreen","branchNavigatorKey","isNativeStack","STACK_TYPE","NATIVE","closeParams"],"sourceRoot":"../../../../../../../src","sources":["shared/components/screen-lifecycle/hooks/use-close-transition/index.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,OAAO;AACvC,SACCC,OAAO,EACPC,mBAAmB,EACnBC,eAAe,QACT,yBAAyB;AAChC,SAASC,QAAQ,QAAQ,wCAAwC;AACjE,SAASC,mBAAmB,QAAQ,qDAAqD;AACzF,OAAOC,iBAAiB,MAAM,uCAAuC;AACrE,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAECC,wBAAwB,QAClB,0CAA0C;AACjD,SAASC,mBAAmB,QAAQ,2CAA2C;AAC/E,SAASC,sBAAsB,QAAQ,8CAA8C;AAErF,SAASC,SAAS,QAAQ,+BAA+B;AACzD,SAASC,iBAAiB,QAAQ,iDAAiD;AACnF,SAASC,oBAAoB,QAAQ,mCAAmC;AACxE,SAASC,2BAA2B,QAAQ,0CAA0C;AAUtF;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAGA,CAAC;EACxBC,OAAO;EACPC,UAAU;EACVC,QAAQ;EACRC,UAAU;EACVC;AACgB,CAAC,KAAK;EACtB,MAAM;IAAEC,gBAAgB;IAAEC;EAAuB,CAAC,GAAGZ,sBAAsB,CAAC,CAAC;EAC7E,MAAMa,QAAQ,GAAGP,OAAO,CAACQ,KAAK,CAACC,GAAG;EAElC,MAAMC,cAAc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C7BC,QAAoB,EACpBC,UAAsB,EACrB;EACD,MAAMI,QAAQ,GAAGP,OAAO,CAACQ,KAAK,CAACC,GAAG;EAClC,MAAM;IAAEuC;EAAa,CAAC,GAAG5D,QAAQ,CAAC,CAAC;EACnC,MAAM;IAAE6D;EAAM,CAAC,GAAGxD,mBAAmB,CAAC,CAAC;EACvC,MAAM;IAAEyD,cAAc;IAAEC;EAAmB,CAAC,GAAG3D,wBAAwB,CAAC,CAAC;EACzE,MAAM4D,aAAa,GAAGH,KAAK,CAACI,UAAU,KAAK1D,SAAS,CAAC2D,MAAM;EAE3D,MAAMlD,WAAW,GAAGd,iBAAiB,CAAC,MAAM;IAC3CO,oBAAoB,CAACU,QAAQ,EAAE2C,cAAc,EAAEC,kBAAkB,CAAC;EACnE,CAAC,CAAC;EAEF,MAAMI,WAA4B,GAAG;IACpCvD,OAAO;IACPC,UAAU;IACVC,QAAQ;IACRC,UAAU;IACVC;EACD,CAAC;EAEDN,2BAA2B,CAACkD,YAAY,EAAEzC,QAAQ,CAAC;EACnD,IAAI6C,aAAa,EAAE;IAClB;IACA7B,mBAAmB,CAACgC,WAAW,CAAC;EACjC,CAAC,MAAM;IACN;IACAxD,eAAe,CAACwD,WAAW,CAAC;EAC7B;AACD","ignoreList":[]}
|
|
@@ -6,6 +6,8 @@ import { useHighRefreshRate } from "./use-high-refresh-rate";
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Calculates the initial progress value based on snap points configuration.
|
|
9
|
+
* Returns `'auto'` if the initial snap point is the `'auto'` keyword
|
|
10
|
+
* (meaning the animation must be deferred until content is measured).
|
|
9
11
|
*/
|
|
10
12
|
function getInitialProgress({
|
|
11
13
|
snapPoints,
|
|
@@ -38,13 +40,24 @@ export function useOpenTransition(current, animations, isFirstKey) {
|
|
|
38
40
|
snapPoints,
|
|
39
41
|
initialSnapIndex
|
|
40
42
|
});
|
|
41
|
-
const target = targetProgress ?? 1;
|
|
42
43
|
if (isFirstKey) {
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
if (targetProgress === "auto") {
|
|
45
|
+
animations.targetProgress.set(0);
|
|
46
|
+
animations.progress.set(0);
|
|
47
|
+
} else {
|
|
48
|
+
const target = targetProgress ?? 1;
|
|
49
|
+
animations.targetProgress.set(target);
|
|
50
|
+
animations.progress.set(target);
|
|
51
|
+
}
|
|
45
52
|
animations.animating.set(0);
|
|
46
53
|
animations.closing.set(0);
|
|
47
|
-
animations.entering.set(
|
|
54
|
+
animations.entering.set(0);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// When the initial snap point is 'auto', defer the opening animation until
|
|
59
|
+
// ScreenContainer has measured the content and set autoSnapPoint.
|
|
60
|
+
if (targetProgress === "auto") {
|
|
48
61
|
return;
|
|
49
62
|
}
|
|
50
63
|
activateHighRefreshRate();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useLayoutEffect","animateToProgress","useHighRefreshRate","getInitialProgress","snapPoints","initialSnapIndex","undefined","clampedIndex","Math","min","max","length","useOpenTransition","current","animations","isFirstKey","activateHighRefreshRate","deactivateHighRefreshRate","options","targetProgress","
|
|
1
|
+
{"version":3,"names":["useLayoutEffect","animateToProgress","useHighRefreshRate","getInitialProgress","snapPoints","initialSnapIndex","undefined","clampedIndex","Math","min","max","length","useOpenTransition","current","animations","isFirstKey","activateHighRefreshRate","deactivateHighRefreshRate","options","targetProgress","set","progress","target","animating","closing","entering","spec","transitionSpec","onAnimationFinish"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-lifecycle/hooks/use-open-transition.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,OAAO;AAIvC,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,SAASC,kBAAkB,QAAQ,yBAAyB;;AAE5D;AACA;AACA;AACA;AACA;AACA,SAASC,kBAAkBA,CAAC;EAC3BC,UAAU;EACVC;AAID,CAAC,EAA+B;EAC/B,IAAI,CAACD,UAAU,EAAE;IAChB,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C;MACjBqB,MAAM,EAAEH,cAAc,IAAI,MAAM;MAChCO,IAAI,EAAEb,OAAO,CAACK,OAAO,CAACS,cAAc;MACpCb,UAAU;MACVc,iBAAiB,EAAEX;IACpB,CAAC,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IAAED,uBAAuB;IAAEC;EAA0B,CAAC;AAC9D","ignoreList":[]}
|
|
@@ -6,6 +6,10 @@ import { Platform } from "react-native";
|
|
|
6
6
|
*/
|
|
7
7
|
export const MASK_STYLE_ID = "_ROOT_MASKED";
|
|
8
8
|
export const CONTAINER_STYLE_ID = "_ROOT_CONTAINER";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Navigation mask integration
|
|
12
|
+
*/
|
|
9
13
|
export const NAVIGATION_MASK_HOST_FLAG_STYLE_ID = "_NAVIGATION_MASK_HOST";
|
|
10
14
|
export const NAVIGATION_MASK_STYLE_ID = "_NAVIGATION_ROOT_MASK";
|
|
11
15
|
export const NAVIGATION_CONTAINER_STYLE_ID = "_NAVIGATION_ROOT_CONTAINER";
|
|
@@ -42,7 +46,7 @@ export const createScreenTransitionState = (route, meta) => ({
|
|
|
42
46
|
closing: 0,
|
|
43
47
|
animating: 0,
|
|
44
48
|
settled: 1,
|
|
45
|
-
entering:
|
|
49
|
+
entering: 0,
|
|
46
50
|
gesture: {
|
|
47
51
|
...DEFAULT_GESTURE_VALUES
|
|
48
52
|
},
|
|
@@ -58,7 +62,7 @@ export const DEFAULT_SCREEN_TRANSITION_STATE = Object.freeze({
|
|
|
58
62
|
closing: 0,
|
|
59
63
|
animating: 0,
|
|
60
64
|
settled: 1,
|
|
61
|
-
entering:
|
|
65
|
+
entering: 0,
|
|
62
66
|
gesture: DEFAULT_GESTURE_VALUES,
|
|
63
67
|
route: {}
|
|
64
68
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","MASK_STYLE_ID","CONTAINER_STYLE_ID","NAVIGATION_MASK_HOST_FLAG_STYLE_ID","NAVIGATION_MASK_STYLE_ID","NAVIGATION_CONTAINER_STYLE_ID","NO_STYLES","Object","freeze","NO_PROPS","DEFAULT_GESTURE_VALUES","x","y","normX","normY","dismissing","dragging","direction","normalizedX","normalizedY","isDismissing","isDragging","createScreenTransitionState","route","meta","progress","closing","animating","settled","entering","gesture","DEFAULT_SCREEN_TRANSITION_STATE","EMPTY_BOUND_HELPER_RESULT","EMPTY_BOUND_HELPER_RESULT_RAW","scaleX","scaleY","scale","translateX","translateY","width","height","ENTER_RANGE","EXIT_RANGE","FULLSCREEN_DIMENSIONS","dimensions","pageX","pageY","DEFAULT_GESTURE_VELOCITY_IMPACT","DEFAULT_GESTURE_SNAP_VELOCITY_IMPACT","DEFAULT_GESTURE_RELEASE_VELOCITY_MAX","DEFAULT_GESTURE_RELEASE_VELOCITY_SCALE","DEFAULT_GESTURE_DIRECTION","DEFAULT_GESTURE_DRIVES_PROGRESS","DEFAULT_GESTURE_SNAP_LOCKED","DEFAULT_GESTURE_ACTIVATION_AREA","IS_WEB","OS","TRUE","FALSE","EPSILON","ANIMATION_SNAP_THRESHOLD"],"sourceRoot":"../../../src","sources":["shared/constants.ts"],"mappings":";;AACA,SAASA,QAAQ,QAAQ,cAAc;AAOvC;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3C,OAAO,MAAMC,kBAAkB,GAAG,iBAAiB;
|
|
1
|
+
{"version":3,"names":["Platform","MASK_STYLE_ID","CONTAINER_STYLE_ID","NAVIGATION_MASK_HOST_FLAG_STYLE_ID","NAVIGATION_MASK_STYLE_ID","NAVIGATION_CONTAINER_STYLE_ID","NO_STYLES","Object","freeze","NO_PROPS","DEFAULT_GESTURE_VALUES","x","y","normX","normY","dismissing","dragging","direction","normalizedX","normalizedY","isDismissing","isDragging","createScreenTransitionState","route","meta","progress","closing","animating","settled","entering","gesture","DEFAULT_SCREEN_TRANSITION_STATE","EMPTY_BOUND_HELPER_RESULT","EMPTY_BOUND_HELPER_RESULT_RAW","scaleX","scaleY","scale","translateX","translateY","width","height","ENTER_RANGE","EXIT_RANGE","FULLSCREEN_DIMENSIONS","dimensions","pageX","pageY","DEFAULT_GESTURE_VELOCITY_IMPACT","DEFAULT_GESTURE_SNAP_VELOCITY_IMPACT","DEFAULT_GESTURE_RELEASE_VELOCITY_MAX","DEFAULT_GESTURE_RELEASE_VELOCITY_SCALE","DEFAULT_GESTURE_DIRECTION","DEFAULT_GESTURE_DRIVES_PROGRESS","DEFAULT_GESTURE_SNAP_LOCKED","DEFAULT_GESTURE_ACTIVATION_AREA","IS_WEB","OS","TRUE","FALSE","EPSILON","ANIMATION_SNAP_THRESHOLD"],"sourceRoot":"../../../src","sources":["shared/constants.ts"],"mappings":";;AACA,SAASA,QAAQ,QAAQ,cAAc;AAOvC;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3C,OAAO,MAAMC,kBAAkB,GAAG,iBAAiB;;AAEnD;AACA;AACA;AACA,OAAO,MAAMC,kCAAkC,GAAG,uBAAuB;AACzE,OAAO,MAAMC,wBAAwB,GAAG,uBAAuB;AAC/D,OAAO,MAAMC,6BAA6B,GAAG,4BAA4B;;AAEzE;AACA;AACA;AACA,OAAO,MAAMC,SAAS,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC1C,OAAO,MAAMC,QAAQ,GAAGF,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,CAAC;;AAEzC;AACA;AACA;AACA,MAAME,sBAAsB,GAAG;EAC9BC,CAAC,EAAE,CAAC;EACJC,CAAC,EAAE,CAAC;EACJC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAE,CAAC;EACRC,UAAU,EAAE,CAAC;EACbC,QAAQ,EAAE,CAAC;EACXC,SAAS,EAAE,IAAI;EAEf;EACAC,WAAW,EAAE,CAAC;EACdC,WAAW,EAAE,CAAC;EACdC,YAAY,EAAE,CAAC;EACfC,UAAU,EAAE;AACb,CAAU;;AAEV;AACA;A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M,EAAEI,UAAU,CAACJ;EACpB,CAAC;AACF,CAAC;AAED,OAAO,MAAMO,+BAA+B,GAAG,GAAG;AAClD,OAAO,MAAMC,oCAAoC,GAAG,GAAG;AACvD,OAAO,MAAMC,oCAAoC,GAAG,GAAG;AACvD,OAAO,MAAMC,sCAAsC,GAAG,CAAC;AACvD,OAAO,MAAMC,yBAAyB,GAAG,YAAY;AACrD,OAAO,MAAMC,+BAA+B,GAAG,IAAI;AACnD,OAAO,MAAMC,2BAA2B,GAAG,KAAK;AAChD,OAAO,MAAMC,+BAA+C,GAAG,QAAQ;AAEvE,OAAO,MAAMC,MAAM,GAAGvD,QAAQ,CAACwD,EAAE,KAAK,KAAK;AAE3C,OAAO,MAAMC,IAAI,GAAG,CAAC;AACrB,OAAO,MAAMC,KAAK,GAAG,CAAC;;AAEtB;AACA;AACA;AACA,OAAO,MAAMC,OAAO,GAAG,IAAI;;AAE3B;AACA;AACA;AACA;AACA,OAAO,MAAMC,wBAAwB,GAAG,IAAI","ignoreList":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const isAncestorTarget = target => {
|
|
4
|
+
return typeof target === "object" && target !== null && "ancestor" in target;
|
|
5
|
+
};
|
|
6
|
+
function getGestureAncestors(self) {
|
|
7
|
+
const ancestors = [];
|
|
8
|
+
const startIsolated = self.isIsolated;
|
|
9
|
+
let current = self.ancestorContext;
|
|
10
|
+
while (current) {
|
|
11
|
+
if (current.isIsolated !== startIsolated) {
|
|
12
|
+
break;
|
|
13
|
+
}
|
|
14
|
+
ancestors.push(current);
|
|
15
|
+
current = current.ancestorContext;
|
|
16
|
+
}
|
|
17
|
+
return ancestors;
|
|
18
|
+
}
|
|
19
|
+
export function resolveScreenGestureTarget({
|
|
20
|
+
target,
|
|
21
|
+
self
|
|
22
|
+
}) {
|
|
23
|
+
if (!self) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
if (!target || target === "self") {
|
|
27
|
+
return self.panGestureRef ?? null;
|
|
28
|
+
}
|
|
29
|
+
const ancestors = getGestureAncestors(self);
|
|
30
|
+
if (target === "parent") {
|
|
31
|
+
return ancestors[0]?.panGestureRef ?? null;
|
|
32
|
+
}
|
|
33
|
+
if (target === "root") {
|
|
34
|
+
return ancestors[ancestors.length - 1]?.panGestureRef ?? null;
|
|
35
|
+
}
|
|
36
|
+
if (!isAncestorTarget(target)) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const depth = target.ancestor;
|
|
40
|
+
if (!Number.isInteger(depth) || depth < 1) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return ancestors[depth - 1]?.panGestureRef ?? null;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=resolve-screen-gesture-target.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isAncestorTarget","target","getGestureAncestors","self","ancestors","startIsolated","isIsolated","current","ancestorContext","push","resolveScreenGestureTarget","panGestureRef","length","depth","ancestor","Number","isInteger"],"sourceRoot":"../../../../../src","sources":["shared/hooks/gestures/resolve-screen-gesture-target.ts"],"mappings":";;AAUA,MAAMA,gBAAgB,GACrBC,MAA2B,IACS;EACpC,OAAO,OAAOA,MAAM,KAAK,QAAQ,IAAIA,MAAM,KAAK,IAAI,IAAI,UAAU,IAAIA,MAAM;AAC7E,CAAC;AAED,SAASC,mBAAmBA,CAACC,IAAwB,EAAwB;EAC5E,MAAMC,SAA+B,GAAG,EAAE;EAC1C,MAAMC,aAAa,GAAGF,IAAI,CAACG,UAAU;EACrC,IAAIC,OAAO,GAAGJ,IAAI,CAACK,eAAe;EAElC,OAAOD,OAAO,EAAE;IACf,IAAIA,OAAO,CAACD,UAAU,KAAKD,aAAa,EAAE;MACzC;IACD;IAEAD,SAAS,CAACK,IAAI,CAACF,OAAO,CAAC;IACvBA,OAAO,GAAGA,OAAO,CAACC,eAAe;EAClC;EAEA,OAAOJ,SAAS;AACjB;AAEA,OAAO,SAASM,0BAA0BA,CAAC;EAC1CT,MAAM;EACNE;AACO,CAAC,EAAoB;EAC5B,IAAI,CAACA,IAAI,EAAE;IACV,OAAO,IAAI;EACZ;EAEA,IAAI,CAACF,MAAM,IAAIA,MAAM,KAAK,MAAM,EAAE;IACjC,OAAOE,IAAI,CAACQ,aAAa,IAAI,IAAI;EAClC;EAEA,MAAMP,SAAS,GAAGF,mBAAmB,CAACC,IAAI,CAAC;EAE3C,IAAIF,MAAM,KAAK,QAAQ,EAAE;IACxB,OAAOG,SAAS,CAAC,CAAC,CAAC,EAAEO,aAAa,IAAI,IAAI;EAC3C;EAEA,IAAIV,MAAM,KAAK,MAAM,EAAE;IACtB,OAAOG,SAAS,CAACA,SAAS,CAACQ,MAAM,GAAG,CAAC,CAAC,EAAED,aAAa,IAAI,IAAI;EAC9D;EAEA,IAAI,CAACX,gBAAgB,CAACC,MAAM,CAAC,EAAE;IAC9B,OAAO,IAAI;EACZ;EAEA,MAAMY,KAAK,GAAGZ,MAAM,CAACa,QAAQ;EAC7B,IAAI,CAACC,MAAM,CAACC,SAAS,CAACH,KAAK,CAAC,IAAIA,KAAK,GAAG,CAAC,EAAE;IAC1C,OAAO,IAAI;EACZ;EAEA,OAAOT,SAAS,CAACS,KAAK,GAAG,CAAC,CAAC,EAAEF,aAAa,IAAI,IAAI;AACnD","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["shared/hooks/gestures/types.ts"],"mappings":"","ignoreList":[]}
|