react-native-screen-transitions 3.7.1 → 3.8.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/blank-stack/components/stack-view.js +2 -2
- package/lib/commonjs/blank-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/component-stack/components/stack-view.js +2 -2
- package/lib/commonjs/component-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/shared/adapters/with-screen-transitions/stack-layout.js +1 -10
- package/lib/commonjs/shared/adapters/with-screen-transitions/stack-layout.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/create-transition-aware-component.js +7 -5
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +7 -12
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/scene-view.js +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +7 -7
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +2 -2
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/index.js +2 -2
- package/lib/commonjs/shared/components/screen-lifecycle/index.js.map +1 -1
- package/lib/commonjs/shared/constants.js +3 -13
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/hooks/navigation/use-screen-state.js +1 -3
- package/lib/commonjs/shared/hooks/navigation/use-screen-state.js.map +1 -1
- package/lib/commonjs/shared/hooks/navigation/use-stack.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +15 -12
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js +2 -6
- package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +7 -23
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js +14 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js +22 -9
- package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/ownership/compute-claimed-directions.js +2 -1
- package/lib/commonjs/shared/providers/screen/gestures/ownership/compute-claimed-directions.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/{pan-activation-decision.js → activation/pan-activation-decision.js} +12 -6
- package/lib/commonjs/shared/providers/screen/gestures/pan/activation/pan-activation-decision.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/{pan-activation-rules.js → activation/pan-activation-rules.js} +12 -9
- package/lib/commonjs/shared/providers/screen/gestures/pan/activation/pan-activation-rules.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/{pan-activation.js → activation/use-pan-activation.js} +15 -10
- package/lib/commonjs/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/{pan-lifecycle.js → behavior/pan-lifecycle.js} +29 -8
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/{pan-release.js → behavior/pan-release.js} +5 -5
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/{pan-reset.js → behavior/pan-reset.js} +21 -11
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-reset.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/{use-pan-behavior.js → behavior/use-pan-behavior.js} +34 -8
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/{build-pan-gesture.js → use-build-pan-gesture.js} +10 -8
- package/lib/commonjs/shared/providers/screen/gestures/pan/use-build-pan-gesture.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pinch/{pinch-activation.js → activation/use-pinch-activation.js} +12 -5
- package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pinch/{pinch-lifecycle.js → behavior/pinch-lifecycle.js} +7 -7
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pinch/{pinch-release.js → behavior/pinch-release.js} +4 -4
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pinch/{pinch-reset.js → behavior/pinch-reset.js} +6 -3
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-reset.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pinch/{use-pinch-behavior.js → behavior/use-pinch-behavior.js} +6 -5
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pinch/{build-pinch-gesture.js → use-build-pinch-gesture.js} +9 -7
- package/lib/commonjs/shared/providers/screen/gestures/pinch/use-build-pinch-gesture.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js +62 -0
- package/lib/commonjs/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js +21 -0
- package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js +29 -0
- package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js +45 -0
- package/lib/commonjs/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/index.js +7 -0
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/scroll-metadata-owner.js +40 -0
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/scroll-metadata-owner.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/update-scroll-gesture-state.js +51 -13
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/update-scroll-gesture-state.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js +74 -6
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/directions.js +17 -5
- package/lib/commonjs/shared/providers/screen/gestures/shared/directions.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +67 -2
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/reset.js +3 -12
- package/lib/commonjs/shared/providers/screen/gestures/shared/reset.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/runtime.js +1 -10
- package/lib/commonjs/shared/providers/screen/gestures/shared/runtime.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/snap-points.js +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/snap-points.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/types.js +2 -0
- package/lib/commonjs/shared/providers/screen/gestures/types.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/options/helpers.js +60 -24
- package/lib/commonjs/shared/providers/screen/options/helpers.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/components/{maybe-floating-container.js → floating-overlay-layer.js} +5 -5
- package/lib/commonjs/shared/providers/screen/styles/components/floating-overlay-layer.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js +3 -3
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/{helpers/managed-stack-state/managed-stack-controller.js → blank-stack-state/blank-stack-controller.js} +11 -11
- package/lib/commonjs/shared/providers/stack/blank-stack-state/blank-stack-controller.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/{helpers/managed-stack-state/helpers/build-managed-stack-state.js → blank-stack-state/helpers/build-blank-stack-state.js} +18 -18
- package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js +58 -0
- package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/navigation/compose-descriptors.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/navigation/resolve-scene-neighbors.js.map +1 -0
- package/lib/commonjs/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/sync-routes-with-removed.js +6 -23
- package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/navigation/sync-routes-with-removed.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/{helpers/managed-stack-state/helpers/reconcile-managed-routes.js → blank-stack-state/helpers/reconcile-blank-stack-routes.js} +8 -8
- package/lib/commonjs/shared/providers/stack/{helpers/managed-stack-state/helpers/reconcile-managed-routes.js.map → blank-stack-state/helpers/reconcile-blank-stack-routes.js.map} +1 -1
- package/lib/commonjs/shared/providers/stack/{helpers/managed-stack-state/helpers/helpers.js → blank-stack-state/helpers/state-equality.js} +1 -1
- package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/state-equality.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/types.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/{helpers/managed-stack-state → blank-stack-state}/index.js +5 -5
- package/lib/commonjs/shared/providers/stack/blank-stack-state/index.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/{managed.provider.js → blank-stack.provider.js} +20 -27
- package/lib/commonjs/shared/providers/stack/blank-stack.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/direct.provider.js +3 -13
- package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/commonjs/shared/stores/animation.store.js +2 -0
- package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
- package/lib/commonjs/shared/stores/gesture.store.js +5 -1
- package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
- package/lib/commonjs/shared/stores/scroll.store.js +49 -5
- package/lib/commonjs/shared/stores/scroll.store.js.map +1 -1
- package/lib/commonjs/shared/stores/system.store.js +1 -4
- package/lib/commonjs/shared/stores/system.store.js.map +1 -1
- package/lib/commonjs/shared/types/animation.types.js.map +1 -1
- package/lib/commonjs/shared/types/gesture.types.js +12 -0
- package/lib/commonjs/shared/types/gesture.types.js.map +1 -1
- package/lib/commonjs/shared/types/providers/blank-stack-provider.types.js +6 -0
- package/lib/commonjs/shared/types/providers/blank-stack-provider.types.js.map +1 -0
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js +10 -4
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/animate.js +22 -5
- package/lib/commonjs/shared/utils/animation/animate.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/spring/index.js +13 -0
- package/lib/commonjs/shared/utils/animation/spring/index.js.map +1 -0
- package/lib/commonjs/shared/utils/animation/spring/spring.js +248 -0
- package/lib/commonjs/shared/utils/animation/spring/spring.js.map +1 -0
- package/lib/commonjs/shared/{types/providers/managed-stack.types.js → utils/animation/spring/springConfigs.js} +1 -1
- package/lib/commonjs/shared/utils/animation/spring/springConfigs.js.map +1 -0
- package/lib/commonjs/shared/utils/animation/spring/springUtils.js +313 -0
- package/lib/commonjs/shared/utils/animation/spring/springUtils.js.map +1 -0
- package/lib/commonjs/shared/utils/animation/state.js +2 -0
- package/lib/commonjs/shared/utils/animation/state.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +5 -5
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +4 -4
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/module/blank-stack/components/stack-view.js +2 -2
- package/lib/module/blank-stack/components/stack-view.js.map +1 -1
- package/lib/module/component-stack/components/stack-view.js +2 -2
- package/lib/module/component-stack/components/stack-view.js.map +1 -1
- package/lib/module/shared/adapters/with-screen-transitions/stack-layout.js +1 -10
- package/lib/module/shared/adapters/with-screen-transitions/stack-layout.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/create-transition-aware-component.js +8 -6
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/float-overlay.js +7 -12
- package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/module/shared/components/scene-view.js +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +7 -7
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +2 -2
- package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/index.js +2 -2
- package/lib/module/shared/components/screen-lifecycle/index.js.map +1 -1
- package/lib/module/shared/constants.js +2 -12
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/hooks/navigation/use-screen-state.js +1 -3
- package/lib/module/shared/hooks/navigation/use-screen-state.js.map +1 -1
- package/lib/module/shared/hooks/navigation/use-stack.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +15 -12
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js +2 -6
- package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +8 -24
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js +14 -1
- package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -1
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/gestures.provider.js +20 -7
- package/lib/module/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/ownership/compute-claimed-directions.js +2 -1
- package/lib/module/shared/providers/screen/gestures/ownership/compute-claimed-directions.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/{pan-activation-decision.js → activation/pan-activation-decision.js} +12 -6
- package/lib/module/shared/providers/screen/gestures/pan/activation/pan-activation-decision.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/pan/{pan-activation-rules.js → activation/pan-activation-rules.js} +12 -9
- package/lib/module/shared/providers/screen/gestures/pan/activation/pan-activation-rules.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/pan/{pan-activation.js → activation/use-pan-activation.js} +15 -10
- package/lib/module/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/pan/{pan-lifecycle.js → behavior/pan-lifecycle.js} +29 -8
- package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/pan/{pan-release.js → behavior/pan-release.js} +5 -5
- package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/pan/{pan-reset.js → behavior/pan-reset.js} +21 -11
- package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-reset.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +75 -0
- package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/pan/{build-pan-gesture.js → use-build-pan-gesture.js} +9 -7
- package/lib/module/shared/providers/screen/gestures/pan/use-build-pan-gesture.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/pinch/{pinch-activation.js → activation/use-pinch-activation.js} +12 -5
- package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/pinch/{pinch-lifecycle.js → behavior/pinch-lifecycle.js} +7 -7
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/pinch/{pinch-release.js → behavior/pinch-release.js} +4 -4
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/pinch/{pinch-reset.js → behavior/pinch-reset.js} +6 -3
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-reset.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/pinch/{use-pinch-behavior.js → behavior/use-pinch-behavior.js} +6 -5
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/pinch/{build-pinch-gesture.js → use-build-pinch-gesture.js} +8 -6
- package/lib/module/shared/providers/screen/gestures/pinch/use-build-pinch-gesture.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js +57 -0
- package/lib/module/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js +15 -0
- package/lib/module/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js +24 -0
- package/lib/module/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js +40 -0
- package/lib/module/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/index.js +1 -0
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/index.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/scroll-metadata-owner.js +33 -0
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/scroll-metadata-owner.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/update-scroll-gesture-state.js +48 -12
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/update-scroll-gesture-state.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js +76 -8
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/directions.js +14 -4
- package/lib/module/shared/providers/screen/gestures/shared/directions.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/policy.js +68 -3
- package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/reset.js +4 -13
- package/lib/module/shared/providers/screen/gestures/shared/reset.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/runtime.js +1 -10
- package/lib/module/shared/providers/screen/gestures/shared/runtime.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/snap-points.js +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/snap-points.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/types.js +2 -0
- package/lib/module/shared/providers/screen/gestures/types.js.map +1 -1
- package/lib/module/shared/providers/screen/options/helpers.js +60 -24
- package/lib/module/shared/providers/screen/options/helpers.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/components/{maybe-floating-container.js → floating-overlay-layer.js} +4 -4
- package/lib/module/shared/providers/screen/styles/components/floating-overlay-layer.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/styles.provider.js +3 -3
- package/lib/module/shared/providers/screen/styles/styles.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/{helpers/managed-stack-state/managed-stack-controller.js → blank-stack-state/blank-stack-controller.js} +9 -9
- package/lib/module/shared/providers/stack/blank-stack-state/blank-stack-controller.js.map +1 -0
- package/lib/module/shared/providers/stack/{helpers/managed-stack-state/helpers/build-managed-stack-state.js → blank-stack-state/helpers/build-blank-stack-state.js} +10 -10
- package/lib/module/shared/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js.map +1 -0
- package/lib/module/shared/providers/stack/{helpers/managed-stack-state/helpers/derive-managed-stack-state.js → blank-stack-state/helpers/derive-blank-stack-state.js} +7 -7
- package/lib/module/shared/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js.map +1 -0
- package/lib/module/shared/providers/stack/blank-stack-state/helpers/navigation/compose-descriptors.js.map +1 -0
- package/lib/module/shared/providers/stack/blank-stack-state/helpers/navigation/resolve-scene-neighbors.js.map +1 -0
- package/lib/module/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/sync-routes-with-removed.js +6 -23
- package/lib/module/shared/providers/stack/blank-stack-state/helpers/navigation/sync-routes-with-removed.js.map +1 -0
- package/lib/module/shared/providers/stack/{helpers/managed-stack-state/helpers/reconcile-managed-routes.js → blank-stack-state/helpers/reconcile-blank-stack-routes.js} +5 -5
- package/lib/module/shared/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.js.map +1 -0
- package/lib/module/shared/providers/stack/{helpers/managed-stack-state/helpers/helpers.js → blank-stack-state/helpers/state-equality.js} +1 -1
- package/lib/module/shared/providers/stack/blank-stack-state/helpers/state-equality.js.map +1 -0
- package/lib/module/shared/providers/stack/blank-stack-state/helpers/types.js.map +1 -0
- package/lib/module/shared/providers/stack/{helpers/managed-stack-state → blank-stack-state}/index.js +3 -3
- package/lib/module/shared/providers/stack/blank-stack-state/index.js.map +1 -0
- package/lib/module/shared/providers/stack/{managed.provider.js → blank-stack.provider.js} +19 -26
- package/lib/module/shared/providers/stack/blank-stack.provider.js.map +1 -0
- package/lib/module/shared/providers/stack/direct.provider.js +3 -13
- package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/module/shared/stores/animation.store.js +2 -0
- package/lib/module/shared/stores/animation.store.js.map +1 -1
- package/lib/module/shared/stores/gesture.store.js +5 -1
- package/lib/module/shared/stores/gesture.store.js.map +1 -1
- package/lib/module/shared/stores/scroll.store.js +49 -5
- package/lib/module/shared/stores/scroll.store.js.map +1 -1
- package/lib/module/shared/stores/system.store.js +1 -4
- package/lib/module/shared/stores/system.store.js.map +1 -1
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/types/gesture.types.js +16 -0
- package/lib/module/shared/types/gesture.types.js.map +1 -1
- package/lib/module/shared/types/providers/blank-stack-provider.types.js +4 -0
- package/lib/module/shared/types/providers/blank-stack-provider.types.js.map +1 -0
- package/lib/module/shared/utils/animation/animate-to-progress.js +11 -5
- package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/module/shared/utils/animation/animate.js +21 -5
- package/lib/module/shared/utils/animation/animate.js.map +1 -1
- package/lib/module/shared/utils/animation/spring/index.js +4 -0
- package/lib/module/shared/utils/animation/spring/index.js.map +1 -0
- package/lib/module/shared/utils/animation/spring/spring.js +243 -0
- package/lib/module/shared/utils/animation/spring/spring.js.map +1 -0
- package/lib/module/shared/utils/animation/spring/springConfigs.js +4 -0
- package/lib/module/shared/utils/animation/spring/springConfigs.js.map +1 -0
- package/lib/module/shared/utils/animation/spring/springUtils.js +300 -0
- package/lib/module/shared/utils/animation/spring/springUtils.js.map +1 -0
- package/lib/module/shared/utils/animation/state.js +2 -0
- package/lib/module/shared/utils/animation/state.js.map +1 -0
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js +5 -5
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js +4 -4
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/typescript/blank-stack/components/stack-view.d.ts +1 -1
- package/lib/typescript/blank-stack/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/component-stack/components/stack-view.d.ts +1 -1
- package/lib/typescript/component-stack/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts.map +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts +2 -2
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +0 -9
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-screen-state.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +0 -2
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +13 -13
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/build-screen-transition-options.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts +3 -6
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/selected-interpolator-options.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +3 -2
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/gestures.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/ownership/compute-claimed-directions.d.ts +2 -2
- package/lib/typescript/shared/providers/screen/gestures/ownership/compute-claimed-directions.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/{pan-activation-decision.d.ts → activation/pan-activation-decision.d.ts} +3 -3
- package/lib/typescript/shared/providers/screen/gestures/pan/activation/pan-activation-decision.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/pan/{pan-activation-rules.d.ts → activation/pan-activation-rules.d.ts} +11 -11
- package/lib/typescript/shared/providers/screen/gestures/pan/activation/pan-activation-rules.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/pan/{pan-activation.d.ts → activation/use-pan-activation.d.ts} +5 -4
- package/lib/typescript/shared/providers/screen/gestures/pan/activation/use-pan-activation.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/pan/{pan-lifecycle.d.ts → behavior/pan-lifecycle.d.ts} +3 -2
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/pan/{pan-release.d.ts → behavior/pan-release.d.ts} +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-release.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/pan/{pan-reset.d.ts → behavior/pan-reset.d.ts} +4 -3
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-reset.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts +5 -0
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/pan/use-build-pan-gesture.d.ts +11 -0
- package/lib/typescript/shared/providers/screen/gestures/pan/use-build-pan-gesture.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/pinch/{pinch-activation.d.ts → activation/use-pinch-activation.d.ts} +5 -4
- package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/pinch/{pinch-lifecycle.d.ts → behavior/pinch-lifecycle.d.ts} +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/pinch/{pinch-release.d.ts → behavior/pinch-release.d.ts} +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-release.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/pinch/{pinch-reset.d.ts → behavior/pinch-reset.d.ts} +2 -2
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-reset.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.d.ts +5 -0
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/pinch/use-build-pinch-gesture.d.ts +9 -0
- package/lib/typescript/shared/providers/screen/gestures/pinch/use-build-pinch-gesture.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.d.ts +15 -0
- package/lib/typescript/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.d.ts +4 -0
- package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.d.ts +5 -0
- package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.d.ts +9 -0
- package/lib/typescript/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/index.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/scroll-metadata-owner.d.ts +12 -0
- package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/scroll-metadata-owner.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/update-scroll-gesture-state.d.ts +5 -1
- package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/update-scroll-gesture-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.d.ts +4 -0
- package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/directions.d.ts +8 -6
- package/lib/typescript/shared/providers/screen/gestures/shared/directions.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +2 -2
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/reset.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/runtime.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts +15 -5
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/options/helpers.d.ts +2 -2
- package/lib/typescript/shared/providers/screen/options/helpers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/options/types.d.ts +4 -3
- package/lib/typescript/shared/providers/screen/options/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts +7 -0
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/blank-stack-controller.d.ts +13 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/blank-stack-controller.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/build-blank-stack-state.d.ts +13 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/build-blank-stack-state.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.d.ts +12 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.d.ts.map +1 -0
- package/lib/typescript/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/compose-descriptors.d.ts +1 -1
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/navigation/compose-descriptors.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/navigation/resolve-scene-neighbors.d.ts.map +1 -0
- package/lib/typescript/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/sync-routes-with-removed.d.ts +2 -4
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/navigation/sync-routes-with-removed.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.d.ts +12 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/{helpers/managed-stack-state/helpers/helpers.d.ts → blank-stack-state/helpers/state-equality.d.ts} +4 -4
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/state-equality.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/types.d.ts +39 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/types.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/index.d.ts +12 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/index.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/blank-stack.provider.d.ts +8 -0
- package/lib/typescript/shared/providers/stack/blank-stack.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/animation.store.d.ts +1 -0
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/gesture.store.d.ts +2 -0
- package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/scroll.store.d.ts +15 -8
- package/lib/typescript/shared/stores/scroll.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/system.store.d.ts +1 -5
- package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +12 -10
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +1 -1
- package/lib/typescript/shared/types/gesture.types.d.ts +41 -1
- package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +1 -1
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/types/providers/{managed-stack.types.d.ts → blank-stack-provider.types.d.ts} +11 -11
- package/lib/typescript/shared/types/providers/blank-stack-provider.types.d.ts.map +1 -0
- package/lib/typescript/shared/types/screen.types.d.ts +14 -2
- 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/animation/animate.d.ts +8 -3
- package/lib/typescript/shared/utils/animation/animate.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/spring/index.d.ts +3 -0
- package/lib/typescript/shared/utils/animation/spring/index.d.ts.map +1 -0
- package/lib/typescript/shared/utils/animation/spring/spring.d.ts +24 -0
- package/lib/typescript/shared/utils/animation/spring/spring.d.ts.map +1 -0
- package/lib/typescript/shared/utils/animation/spring/springConfigs.d.ts +46 -0
- package/lib/typescript/shared/utils/animation/spring/springConfigs.d.ts.map +1 -0
- package/lib/typescript/shared/utils/animation/spring/springUtils.d.ts +68 -0
- package/lib/typescript/shared/utils/animation/spring/springUtils.d.ts.map +1 -0
- package/lib/typescript/shared/utils/animation/state.d.ts +6 -0
- package/lib/typescript/shared/utils/animation/state.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/blank-stack/components/stack-view.tsx +2 -2
- package/src/component-stack/components/stack-view.tsx +2 -2
- package/src/shared/adapters/with-screen-transitions/stack-layout.tsx +0 -14
- package/src/shared/components/create-boundary-component/hooks/use-measurer.ts +1 -1
- package/src/shared/components/create-transition-aware-component.tsx +14 -6
- package/src/shared/components/overlay/variations/float-overlay.tsx +6 -18
- package/src/shared/components/scene-view.tsx +1 -1
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition-intent.ts +11 -8
- package/src/shared/components/screen-lifecycle/hooks/use-transition-start-controller.ts +4 -4
- package/src/shared/components/screen-lifecycle/index.tsx +2 -2
- package/src/shared/constants.ts +1 -11
- package/src/shared/hooks/navigation/use-screen-state.ts +1 -7
- package/src/shared/hooks/navigation/use-stack.tsx +0 -2
- package/src/shared/index.ts +4 -0
- package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +19 -16
- package/src/shared/providers/screen/animation/helpers/build-screen-transition-options.ts +2 -17
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.ts +3 -3
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +11 -51
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/types.ts +3 -7
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +1 -1
- package/src/shared/providers/screen/animation/helpers/selected-interpolator-options.ts +24 -1
- package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +6 -5
- package/src/shared/providers/screen/gestures/gestures.provider.tsx +22 -5
- package/src/shared/providers/screen/gestures/ownership/compute-claimed-directions.ts +6 -9
- package/src/shared/providers/screen/gestures/pan/{pan-activation-decision.ts → activation/pan-activation-decision.ts} +17 -8
- package/src/shared/providers/screen/gestures/pan/{pan-activation-rules.ts → activation/pan-activation-rules.ts} +32 -25
- package/src/shared/providers/screen/gestures/pan/{pan-activation.ts → activation/use-pan-activation.ts} +23 -12
- package/src/shared/providers/screen/gestures/pan/{pan-lifecycle.ts → behavior/pan-lifecycle.ts} +46 -8
- package/src/shared/providers/screen/gestures/pan/{pan-release.ts → behavior/pan-release.ts} +6 -6
- package/src/shared/providers/screen/gestures/pan/{pan-reset.ts → behavior/pan-reset.ts} +22 -12
- package/src/shared/providers/screen/gestures/pan/{use-pan-behavior.ts → behavior/use-pan-behavior.ts} +43 -10
- package/src/shared/providers/screen/gestures/pan/{build-pan-gesture.ts → use-build-pan-gesture.ts} +15 -6
- package/src/shared/providers/screen/gestures/pinch/{pinch-activation.ts → activation/use-pinch-activation.ts} +17 -5
- package/src/shared/providers/screen/gestures/pinch/{pinch-lifecycle.ts → behavior/pinch-lifecycle.ts} +10 -8
- package/src/shared/providers/screen/gestures/pinch/{pinch-release.ts → behavior/pinch-release.ts} +5 -5
- package/src/shared/providers/screen/gestures/pinch/{pinch-reset.ts → behavior/pinch-reset.ts} +11 -5
- package/src/shared/providers/screen/gestures/pinch/{use-pinch-behavior.ts → behavior/use-pinch-behavior.ts} +16 -6
- package/src/shared/providers/screen/gestures/pinch/{build-pinch-gesture.ts → use-build-pinch-gesture.ts} +18 -6
- package/src/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.ts +87 -0
- package/src/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.ts +19 -0
- package/src/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.ts +47 -0
- package/src/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.ts +55 -0
- package/src/shared/providers/screen/gestures/scroll-coordination/index.ts +1 -0
- package/src/shared/providers/screen/gestures/scroll-coordination/scroll-metadata-owner.tsx +43 -0
- package/src/shared/providers/screen/gestures/scroll-coordination/update-scroll-gesture-state.ts +59 -4
- package/src/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.ts +130 -8
- package/src/shared/providers/screen/gestures/shared/directions.ts +27 -13
- package/src/shared/providers/screen/gestures/shared/policy.ts +99 -5
- package/src/shared/providers/screen/gestures/shared/reset.ts +9 -17
- package/src/shared/providers/screen/gestures/shared/runtime.ts +1 -14
- package/src/shared/providers/screen/gestures/shared/snap-points.ts +1 -1
- package/src/shared/providers/screen/gestures/types.ts +22 -3
- package/src/shared/providers/screen/options/helpers.ts +85 -30
- package/src/shared/providers/screen/options/types.ts +6 -5
- package/src/shared/providers/screen/styles/components/{maybe-floating-container.tsx → floating-overlay-layer.tsx} +6 -6
- package/src/shared/providers/screen/styles/styles.provider.tsx +3 -3
- package/src/shared/providers/stack/{helpers/managed-stack-state/managed-stack-controller.ts → blank-stack-state/blank-stack-controller.ts} +22 -20
- package/src/shared/providers/stack/{helpers/managed-stack-state/helpers/build-managed-stack-state.ts → blank-stack-state/helpers/build-blank-stack-state.ts} +28 -25
- package/src/shared/providers/stack/{helpers/managed-stack-state/helpers/derive-managed-stack-state.ts → blank-stack-state/helpers/derive-blank-stack-state.ts} +13 -13
- package/src/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/compose-descriptors.ts +1 -1
- package/src/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/sync-routes-with-removed.ts +8 -40
- package/src/shared/providers/stack/{helpers/managed-stack-state/helpers/reconcile-managed-routes.ts → blank-stack-state/helpers/reconcile-blank-stack-routes.ts} +26 -22
- package/src/shared/providers/stack/{helpers/managed-stack-state/helpers/helpers.ts → blank-stack-state/helpers/state-equality.ts} +4 -4
- package/src/shared/providers/stack/{helpers/managed-stack-state → blank-stack-state}/helpers/types.ts +16 -15
- package/src/shared/providers/stack/{helpers/managed-stack-state → blank-stack-state}/index.ts +9 -9
- package/src/shared/providers/stack/blank-stack.provider.tsx +118 -0
- package/src/shared/providers/stack/direct.provider.tsx +38 -54
- package/src/shared/stores/animation.store.ts +3 -0
- package/src/shared/stores/gesture.store.ts +6 -0
- package/src/shared/stores/scroll.store.ts +80 -7
- package/src/shared/stores/system.store.ts +1 -9
- package/src/shared/types/animation.types.ts +12 -14
- package/src/shared/types/bounds.types.ts +1 -1
- package/src/shared/types/gesture.types.ts +51 -1
- package/src/shared/types/index.ts +8 -0
- package/src/shared/types/providers/{managed-stack.types.ts → blank-stack-provider.types.ts} +10 -10
- package/src/shared/types/screen.types.ts +15 -2
- package/src/shared/utils/animation/animate-to-progress.ts +18 -7
- package/src/shared/utils/animation/animate.ts +44 -21
- package/src/shared/utils/animation/spring/index.ts +2 -0
- package/src/shared/utils/animation/spring/spring.ts +347 -0
- package/src/shared/utils/animation/spring/springConfigs.ts +46 -0
- package/src/shared/utils/animation/spring/springUtils.ts +418 -0
- package/src/shared/utils/animation/state.ts +6 -0
- package/src/shared/utils/bounds/navigation/reveal/build.ts +5 -9
- package/src/shared/utils/bounds/navigation/zoom/build.ts +4 -6
- package/lib/commonjs/shared/hooks/navigation/use-closing-route-keys.js +0 -61
- package/lib/commonjs/shared/hooks/navigation/use-closing-route-keys.js.map +0 -1
- package/lib/commonjs/shared/hooks/navigation/use-optimistic-focused-index.js +0 -20
- package/lib/commonjs/shared/hooks/navigation/use-optimistic-focused-index.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js +0 -29
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/build-pan-gesture.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation-decision.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation-rules.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/build-pinch-gesture.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-release.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-reset.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/components/maybe-floating-container.js.map +0 -1
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.js.map +0 -1
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.js +0 -58
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.js.map +0 -1
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/helpers.js.map +0 -1
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/types.js.map +0 -1
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/index.js.map +0 -1
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/managed-stack-controller.js.map +0 -1
- package/lib/commonjs/shared/providers/stack/helpers/use-closing-route-map.js +0 -30
- package/lib/commonjs/shared/providers/stack/helpers/use-closing-route-map.js.map +0 -1
- package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js +0 -58
- package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js.map +0 -1
- package/lib/commonjs/shared/providers/stack/helpers/use-stack-derived.js +0 -27
- package/lib/commonjs/shared/providers/stack/helpers/use-stack-derived.js.map +0 -1
- package/lib/commonjs/shared/providers/stack/managed.provider.js.map +0 -1
- package/lib/commonjs/shared/types/providers/managed-stack.types.js.map +0 -1
- package/lib/commonjs/shared/utils/navigation/compose-descriptors.js.map +0 -1
- package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js.map +0 -1
- package/lib/commonjs/shared/utils/navigation/sync-routes-with-removed.js.map +0 -1
- package/lib/module/shared/hooks/navigation/use-closing-route-keys.js +0 -55
- package/lib/module/shared/hooks/navigation/use-closing-route-keys.js.map +0 -1
- package/lib/module/shared/hooks/navigation/use-optimistic-focused-index.js +0 -17
- package/lib/module/shared/hooks/navigation/use-optimistic-focused-index.js.map +0 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js +0 -22
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/pan/build-pan-gesture.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-activation-decision.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-activation-rules.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-release.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js +0 -49
- package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/pinch/build-pinch-gesture.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-release.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-reset.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/components/maybe-floating-container.js.map +0 -1
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.js.map +0 -1
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.js.map +0 -1
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/helpers.js.map +0 -1
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/reconcile-managed-routes.js.map +0 -1
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/types.js.map +0 -1
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/index.js.map +0 -1
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/managed-stack-controller.js.map +0 -1
- package/lib/module/shared/providers/stack/helpers/use-closing-route-map.js +0 -25
- package/lib/module/shared/providers/stack/helpers/use-closing-route-map.js.map +0 -1
- package/lib/module/shared/providers/stack/helpers/use-processed-routes.js +0 -54
- package/lib/module/shared/providers/stack/helpers/use-processed-routes.js.map +0 -1
- package/lib/module/shared/providers/stack/helpers/use-stack-derived.js +0 -23
- package/lib/module/shared/providers/stack/helpers/use-stack-derived.js.map +0 -1
- package/lib/module/shared/providers/stack/managed.provider.js.map +0 -1
- package/lib/module/shared/types/providers/managed-stack.types.js +0 -4
- package/lib/module/shared/types/providers/managed-stack.types.js.map +0 -1
- package/lib/module/shared/utils/navigation/compose-descriptors.js.map +0 -1
- package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js.map +0 -1
- package/lib/module/shared/utils/navigation/sync-routes-with-removed.js.map +0 -1
- package/lib/typescript/shared/hooks/navigation/use-closing-route-keys.d.ts +0 -8
- package/lib/typescript/shared/hooks/navigation/use-closing-route-keys.d.ts.map +0 -1
- package/lib/typescript/shared/hooks/navigation/use-optimistic-focused-index.d.ts +0 -7
- package/lib/typescript/shared/hooks/navigation/use-optimistic-focused-index.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.d.ts +0 -5
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/build-pan-gesture.d.ts +0 -10
- package/lib/typescript/shared/providers/screen/gestures/pan/build-pan-gesture.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation-decision.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation-rules.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-lifecycle.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-release.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/use-pan-behavior.d.ts +0 -5
- package/lib/typescript/shared/providers/screen/gestures/pan/use-pan-behavior.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/build-pinch-gesture.d.ts +0 -7
- package/lib/typescript/shared/providers/screen/gestures/pinch/build-pinch-gesture.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-activation.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-lifecycle.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-release.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-reset.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/use-pinch-behavior.d.ts +0 -5
- package/lib/typescript/shared/providers/screen/gestures/pinch/use-pinch-behavior.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts +0 -7
- package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts.map +0 -1
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.d.ts +0 -13
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.d.ts.map +0 -1
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.d.ts +0 -12
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.d.ts.map +0 -1
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/helpers.d.ts.map +0 -1
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/reconcile-managed-routes.d.ts +0 -12
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/reconcile-managed-routes.d.ts.map +0 -1
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/types.d.ts +0 -39
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/types.d.ts.map +0 -1
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/index.d.ts +0 -12
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/index.d.ts.map +0 -1
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/managed-stack-controller.d.ts +0 -13
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/managed-stack-controller.d.ts.map +0 -1
- package/lib/typescript/shared/providers/stack/helpers/use-closing-route-map.d.ts +0 -7
- package/lib/typescript/shared/providers/stack/helpers/use-closing-route-map.d.ts.map +0 -1
- package/lib/typescript/shared/providers/stack/helpers/use-processed-routes.d.ts +0 -17
- package/lib/typescript/shared/providers/stack/helpers/use-processed-routes.d.ts.map +0 -1
- package/lib/typescript/shared/providers/stack/helpers/use-stack-derived.d.ts +0 -18
- package/lib/typescript/shared/providers/stack/helpers/use-stack-derived.d.ts.map +0 -1
- package/lib/typescript/shared/providers/stack/managed.provider.d.ts +0 -8
- package/lib/typescript/shared/providers/stack/managed.provider.d.ts.map +0 -1
- package/lib/typescript/shared/types/providers/managed-stack.types.d.ts.map +0 -1
- package/lib/typescript/shared/utils/navigation/compose-descriptors.d.ts.map +0 -1
- package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts.map +0 -1
- package/lib/typescript/shared/utils/navigation/sync-routes-with-removed.d.ts.map +0 -1
- package/src/shared/hooks/navigation/use-closing-route-keys.ts +0 -60
- package/src/shared/hooks/navigation/use-optimistic-focused-index.ts +0 -19
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.ts +0 -41
- package/src/shared/providers/stack/helpers/use-closing-route-map.ts +0 -28
- package/src/shared/providers/stack/helpers/use-processed-routes.ts +0 -85
- package/src/shared/providers/stack/helpers/use-stack-derived.ts +0 -34
- package/src/shared/providers/stack/managed.provider.tsx +0 -126
- /package/lib/commonjs/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/compose-descriptors.js +0 -0
- /package/lib/commonjs/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/resolve-scene-neighbors.js +0 -0
- /package/lib/commonjs/shared/providers/stack/{helpers/managed-stack-state → blank-stack-state}/helpers/types.js +0 -0
- /package/lib/module/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/compose-descriptors.js +0 -0
- /package/lib/module/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/resolve-scene-neighbors.js +0 -0
- /package/lib/module/shared/providers/stack/{helpers/managed-stack-state → blank-stack-state}/helpers/types.js +0 -0
- /package/lib/typescript/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/resolve-scene-neighbors.d.ts +0 -0
- /package/src/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/resolve-scene-neighbors.ts +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { useCallback, useMemo } from "react";
|
|
2
2
|
import type { SharedValue } from "react-native-reanimated";
|
|
3
|
-
import { useNavigationHelpers } from "
|
|
4
|
-
import type { ScreenOptionsContextValue } from "
|
|
5
|
-
import { usePinchGestureSensitivity } from "
|
|
6
|
-
import { resolvePinchRuntime } from "
|
|
3
|
+
import { useNavigationHelpers } from "../../../../../hooks/navigation/use-navigation-helpers";
|
|
4
|
+
import type { ScreenOptionsContextValue } from "../../../options";
|
|
5
|
+
import { usePinchGestureSensitivity } from "../../hooks/use-gesture-sensitivity";
|
|
6
|
+
import { resolvePinchRuntime } from "../../shared/runtime";
|
|
7
7
|
import type {
|
|
8
|
+
GestureCompositionActivation,
|
|
8
9
|
PinchBehavior,
|
|
9
10
|
PinchGestureEvent,
|
|
10
11
|
PinchGestureRuntime,
|
|
11
|
-
} from "
|
|
12
|
+
} from "../../types";
|
|
12
13
|
import {
|
|
13
14
|
finalizePinchRelease,
|
|
14
15
|
startPinchBase,
|
|
@@ -23,6 +24,7 @@ import {
|
|
|
23
24
|
export const usePinchBehavior = (
|
|
24
25
|
runtime: SharedValue<PinchGestureRuntime>,
|
|
25
26
|
screenOptions: ScreenOptionsContextValue,
|
|
27
|
+
gestureCompositionActivation: SharedValue<GestureCompositionActivation>,
|
|
26
28
|
): PinchBehavior => {
|
|
27
29
|
const { dismissScreen, requestDismiss } = useNavigationHelpers();
|
|
28
30
|
const { withSensitivity, resetSensitivity } =
|
|
@@ -75,8 +77,16 @@ export const usePinchBehavior = (
|
|
|
75
77
|
dismissScreen,
|
|
76
78
|
requestDismiss,
|
|
77
79
|
);
|
|
80
|
+
gestureCompositionActivation.set(null);
|
|
78
81
|
},
|
|
79
|
-
[
|
|
82
|
+
[
|
|
83
|
+
runtime,
|
|
84
|
+
screenOptions,
|
|
85
|
+
dismissScreen,
|
|
86
|
+
requestDismiss,
|
|
87
|
+
withSensitivity,
|
|
88
|
+
gestureCompositionActivation,
|
|
89
|
+
],
|
|
80
90
|
);
|
|
81
91
|
|
|
82
92
|
return useMemo(
|
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { Gesture } from "react-native-gesture-handler";
|
|
3
|
+
import type { SharedValue } from "react-native-reanimated";
|
|
3
4
|
import { useScreenOptionsContext } from "../../options";
|
|
4
5
|
import { useGestureBuilderState } from "../hooks/use-gesture-builder-state";
|
|
5
6
|
import { useStableRuntimeConfig } from "../hooks/use-stable-runtime-config";
|
|
6
|
-
import type {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
import type {
|
|
8
|
+
GestureCompositionActivation,
|
|
9
|
+
PinchGesture,
|
|
10
|
+
ScreenGestureConfig,
|
|
11
|
+
} from "../types";
|
|
12
|
+
import { usePinchActivation } from "./activation/use-pinch-activation";
|
|
13
|
+
import { usePinchBehavior } from "./behavior/use-pinch-behavior";
|
|
9
14
|
|
|
10
|
-
interface
|
|
15
|
+
interface UseBuildPinchGestureProps {
|
|
11
16
|
gestureConfig: ScreenGestureConfig;
|
|
17
|
+
gestureCompositionActivation: SharedValue<GestureCompositionActivation>;
|
|
12
18
|
}
|
|
13
19
|
|
|
14
20
|
export const useBuildPinchGesture = ({
|
|
15
21
|
gestureConfig,
|
|
16
|
-
|
|
22
|
+
gestureCompositionActivation,
|
|
23
|
+
}: UseBuildPinchGestureProps): PinchGesture => {
|
|
17
24
|
const { participation, pinch: policy } = gestureConfig;
|
|
18
25
|
const screenOptions = useScreenOptionsContext();
|
|
19
26
|
const { gestureProgressBaseline, lockedSnapPoint } =
|
|
@@ -29,9 +36,14 @@ export const useBuildPinchGesture = ({
|
|
|
29
36
|
const activation = usePinchActivation({
|
|
30
37
|
runtime,
|
|
31
38
|
screenOptions,
|
|
39
|
+
gestureCompositionActivation,
|
|
32
40
|
});
|
|
33
41
|
|
|
34
|
-
const behavior = usePinchBehavior(
|
|
42
|
+
const behavior = usePinchBehavior(
|
|
43
|
+
runtime,
|
|
44
|
+
screenOptions,
|
|
45
|
+
gestureCompositionActivation,
|
|
46
|
+
);
|
|
35
47
|
|
|
36
48
|
const pinchGesture = useMemo(() => {
|
|
37
49
|
return Gesture.Pinch()
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { useCallback, useMemo } from "react";
|
|
2
|
+
import type {
|
|
3
|
+
GestureStateManager,
|
|
4
|
+
GestureTouchEvent,
|
|
5
|
+
} from "react-native-gesture-handler";
|
|
6
|
+
import type { SharedValue } from "react-native-reanimated";
|
|
7
|
+
import type { ScreenOptionsContextValue } from "../../../options";
|
|
8
|
+
import { resolvePinchRuntime } from "../../shared/runtime";
|
|
9
|
+
import type {
|
|
10
|
+
GestureCompositionActivation,
|
|
11
|
+
RotationGestureRuntime,
|
|
12
|
+
} from "../../types";
|
|
13
|
+
|
|
14
|
+
interface UseRotationActivationProps {
|
|
15
|
+
runtime: SharedValue<RotationGestureRuntime>;
|
|
16
|
+
screenOptions: ScreenOptionsContextValue;
|
|
17
|
+
gestureCompositionActivation: SharedValue<GestureCompositionActivation>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const useRotationActivation = ({
|
|
21
|
+
runtime,
|
|
22
|
+
screenOptions,
|
|
23
|
+
gestureCompositionActivation,
|
|
24
|
+
}: UseRotationActivationProps) => {
|
|
25
|
+
const onTouchesDown = useCallback(
|
|
26
|
+
(
|
|
27
|
+
event: GestureTouchEvent,
|
|
28
|
+
stateManager: GestureStateManager | undefined,
|
|
29
|
+
) => {
|
|
30
|
+
"worklet";
|
|
31
|
+
const { participation, policy } = resolvePinchRuntime(
|
|
32
|
+
runtime.get(),
|
|
33
|
+
screenOptions.get(),
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
if (gestureCompositionActivation.get() === "pan") {
|
|
37
|
+
stateManager?.fail();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (!participation.canTrackGesture || !policy.enabled) {
|
|
42
|
+
stateManager?.fail();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (event.numberOfTouches === 2) {
|
|
47
|
+
gestureCompositionActivation.set("pinch");
|
|
48
|
+
stateManager?.activate();
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (event.numberOfTouches > 2) {
|
|
53
|
+
stateManager?.fail();
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
[runtime, screenOptions, gestureCompositionActivation],
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
const onTouchesMove = useCallback(
|
|
60
|
+
(event: GestureTouchEvent, stateManager: GestureStateManager) => {
|
|
61
|
+
"worklet";
|
|
62
|
+
const { participation, policy } = resolvePinchRuntime(
|
|
63
|
+
runtime.get(),
|
|
64
|
+
screenOptions.get(),
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
if (!participation.canTrackGesture || !policy.enabled) {
|
|
68
|
+
stateManager.fail();
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (event.numberOfTouches === 2) {
|
|
73
|
+
gestureCompositionActivation.set("pinch");
|
|
74
|
+
stateManager.activate();
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
stateManager.fail();
|
|
79
|
+
},
|
|
80
|
+
[runtime, screenOptions, gestureCompositionActivation],
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
return useMemo(
|
|
84
|
+
() => ({ onTouchesDown, onTouchesMove }),
|
|
85
|
+
[onTouchesDown, onTouchesMove],
|
|
86
|
+
);
|
|
87
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { RotationGestureEvent, RotationGestureRuntime } from "../../types";
|
|
2
|
+
|
|
3
|
+
export const startRotationGesture = (
|
|
4
|
+
gestures: RotationGestureRuntime["stores"]["gestures"],
|
|
5
|
+
) => {
|
|
6
|
+
"worklet";
|
|
7
|
+
gestures.rotation.set(0);
|
|
8
|
+
gestures.raw.rotation.set(0);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const trackRotationGesture = (
|
|
12
|
+
event: RotationGestureEvent,
|
|
13
|
+
rawEvent: RotationGestureEvent,
|
|
14
|
+
gestures: RotationGestureRuntime["stores"]["gestures"],
|
|
15
|
+
) => {
|
|
16
|
+
"worklet";
|
|
17
|
+
gestures.rotation.set(event.rotation);
|
|
18
|
+
gestures.raw.rotation.set(rawEvent.rotation);
|
|
19
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useCallback, useMemo } from "react";
|
|
2
|
+
import type { SharedValue } from "react-native-reanimated";
|
|
3
|
+
import type { ScreenOptionsContextValue } from "../../../options";
|
|
4
|
+
import { resolvePinchRuntime } from "../../shared/runtime";
|
|
5
|
+
import type {
|
|
6
|
+
RotationBehavior,
|
|
7
|
+
RotationGestureEvent,
|
|
8
|
+
RotationGestureRuntime,
|
|
9
|
+
} from "../../types";
|
|
10
|
+
import {
|
|
11
|
+
startRotationGesture,
|
|
12
|
+
trackRotationGesture,
|
|
13
|
+
} from "./rotation-lifecycle";
|
|
14
|
+
|
|
15
|
+
export const useRotationBehavior = (
|
|
16
|
+
runtime: SharedValue<RotationGestureRuntime>,
|
|
17
|
+
screenOptions: ScreenOptionsContextValue,
|
|
18
|
+
): RotationBehavior => {
|
|
19
|
+
const onStart = useCallback(() => {
|
|
20
|
+
"worklet";
|
|
21
|
+
const latestRuntime = resolvePinchRuntime(
|
|
22
|
+
runtime.get(),
|
|
23
|
+
screenOptions.get(),
|
|
24
|
+
);
|
|
25
|
+
startRotationGesture(latestRuntime.stores.gestures);
|
|
26
|
+
}, [runtime, screenOptions]);
|
|
27
|
+
|
|
28
|
+
const onUpdate = useCallback(
|
|
29
|
+
(rawEvent: RotationGestureEvent) => {
|
|
30
|
+
"worklet";
|
|
31
|
+
const latestRuntime = resolvePinchRuntime(
|
|
32
|
+
runtime.get(),
|
|
33
|
+
screenOptions.get(),
|
|
34
|
+
);
|
|
35
|
+
trackRotationGesture(rawEvent, rawEvent, latestRuntime.stores.gestures);
|
|
36
|
+
},
|
|
37
|
+
[runtime, screenOptions],
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
return useMemo(
|
|
41
|
+
() => ({
|
|
42
|
+
onStart,
|
|
43
|
+
onUpdate,
|
|
44
|
+
}),
|
|
45
|
+
[onStart, onUpdate],
|
|
46
|
+
);
|
|
47
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { Gesture } from "react-native-gesture-handler";
|
|
3
|
+
import type { SharedValue } from "react-native-reanimated";
|
|
4
|
+
import { useScreenOptionsContext } from "../../options";
|
|
5
|
+
import { useGestureBuilderState } from "../hooks/use-gesture-builder-state";
|
|
6
|
+
import { useStableRuntimeConfig } from "../hooks/use-stable-runtime-config";
|
|
7
|
+
import type {
|
|
8
|
+
GestureCompositionActivation,
|
|
9
|
+
RotationGesture,
|
|
10
|
+
ScreenGestureConfig,
|
|
11
|
+
} from "../types";
|
|
12
|
+
import { useRotationActivation } from "./activation/use-rotation-activation";
|
|
13
|
+
import { useRotationBehavior } from "./behavior/use-rotation-behavior";
|
|
14
|
+
|
|
15
|
+
interface UseBuildRotationGestureProps {
|
|
16
|
+
gestureConfig: ScreenGestureConfig;
|
|
17
|
+
gestureCompositionActivation: SharedValue<GestureCompositionActivation>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const useBuildRotationGesture = ({
|
|
21
|
+
gestureConfig,
|
|
22
|
+
gestureCompositionActivation,
|
|
23
|
+
}: UseBuildRotationGestureProps): RotationGesture => {
|
|
24
|
+
const { participation, pinch: policy } = gestureConfig;
|
|
25
|
+
const screenOptions = useScreenOptionsContext();
|
|
26
|
+
const { gestureProgressBaseline, lockedSnapPoint } =
|
|
27
|
+
useGestureBuilderState(participation);
|
|
28
|
+
|
|
29
|
+
const runtime = useStableRuntimeConfig({
|
|
30
|
+
participation,
|
|
31
|
+
policy,
|
|
32
|
+
gestureProgressBaseline,
|
|
33
|
+
lockedSnapPoint,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const activation = useRotationActivation({
|
|
37
|
+
runtime,
|
|
38
|
+
screenOptions,
|
|
39
|
+
gestureCompositionActivation,
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const behavior = useRotationBehavior(runtime, screenOptions);
|
|
43
|
+
|
|
44
|
+
const rotationGesture = useMemo(() => {
|
|
45
|
+
return Gesture.Rotation()
|
|
46
|
+
.enabled(true)
|
|
47
|
+
.manualActivation(true)
|
|
48
|
+
.onTouchesDown(activation.onTouchesDown)
|
|
49
|
+
.onTouchesMove(activation.onTouchesMove)
|
|
50
|
+
.onStart(behavior.onStart)
|
|
51
|
+
.onUpdate(behavior.onUpdate);
|
|
52
|
+
}, [activation, behavior]);
|
|
53
|
+
|
|
54
|
+
return rotationGesture;
|
|
55
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ReactNode, useMemo } from "react";
|
|
2
|
+
import createProvider from "../../../../utils/create-provider";
|
|
3
|
+
import type { ScrollGestureAxis } from "../types";
|
|
4
|
+
|
|
5
|
+
type ScrollMetadataOwnerContextValue = Record<ScrollGestureAxis, boolean>;
|
|
6
|
+
|
|
7
|
+
interface ScrollMetadataOwnerProviderProps {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
value: ScrollMetadataOwnerContextValue;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const DEFAULT_SCROLL_METADATA_OWNER_CONTEXT: ScrollMetadataOwnerContextValue = {
|
|
13
|
+
vertical: false,
|
|
14
|
+
horizontal: false,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
ScrollMetadataOwnerProvider,
|
|
19
|
+
useScrollMetadataOwnerContext: useMaybeScrollMetadataOwnerContext,
|
|
20
|
+
} = createProvider("ScrollMetadataOwner", { guarded: false })<
|
|
21
|
+
ScrollMetadataOwnerProviderProps,
|
|
22
|
+
ScrollMetadataOwnerContextValue
|
|
23
|
+
>(({ children, value }) => ({ children, value }));
|
|
24
|
+
|
|
25
|
+
export const useScrollMetadataOwnerContext = () =>
|
|
26
|
+
useMaybeScrollMetadataOwnerContext() ?? DEFAULT_SCROLL_METADATA_OWNER_CONTEXT;
|
|
27
|
+
|
|
28
|
+
export const useScrollMetadataOwnerProviderValue = (
|
|
29
|
+
axis: ScrollGestureAxis,
|
|
30
|
+
) => {
|
|
31
|
+
const parent = useScrollMetadataOwnerContext();
|
|
32
|
+
|
|
33
|
+
return useMemo(() => {
|
|
34
|
+
if (parent[axis]) return parent;
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
...parent,
|
|
38
|
+
[axis]: true,
|
|
39
|
+
};
|
|
40
|
+
}, [axis, parent]);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export { ScrollMetadataOwnerProvider };
|
package/src/shared/providers/screen/gestures/scroll-coordination/update-scroll-gesture-state.ts
CHANGED
|
@@ -2,14 +2,27 @@ import type {
|
|
|
2
2
|
ScrollGestureAxis,
|
|
3
3
|
ScrollGestureAxisState,
|
|
4
4
|
ScrollGestureState,
|
|
5
|
+
ScrollMetadataState,
|
|
5
6
|
} from "../types";
|
|
6
7
|
|
|
8
|
+
function createScrollGestureAxisState(): ScrollGestureAxisState {
|
|
9
|
+
"worklet";
|
|
10
|
+
return { offset: 0, contentSize: 0, layoutSize: 0, isTouched: false };
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
const createScrollGestureState = (): ScrollGestureState => {
|
|
8
14
|
"worklet";
|
|
9
15
|
return {
|
|
10
|
-
vertical:
|
|
11
|
-
horizontal:
|
|
12
|
-
|
|
16
|
+
vertical: createScrollGestureAxisState(),
|
|
17
|
+
horizontal: createScrollGestureAxisState(),
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const createScrollMetadataState = (): ScrollMetadataState => {
|
|
22
|
+
"worklet";
|
|
23
|
+
return {
|
|
24
|
+
vertical: null,
|
|
25
|
+
horizontal: null,
|
|
13
26
|
};
|
|
14
27
|
};
|
|
15
28
|
|
|
@@ -37,8 +50,50 @@ export const updateScrollGestureAxisState = (
|
|
|
37
50
|
}
|
|
38
51
|
|
|
39
52
|
if (patch.isTouched !== undefined) {
|
|
40
|
-
|
|
53
|
+
axisState.isTouched = patch.isTouched;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return nextState;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const updateScrollMetadataAxisState = (
|
|
60
|
+
state: ScrollMetadataState | null,
|
|
61
|
+
axis: ScrollGestureAxis,
|
|
62
|
+
patch: Partial<ScrollGestureAxisState> & { isTouched?: boolean },
|
|
63
|
+
): ScrollMetadataState => {
|
|
64
|
+
"worklet";
|
|
65
|
+
|
|
66
|
+
const nextState = state ?? createScrollMetadataState();
|
|
67
|
+
const axisState = nextState[axis] ?? createScrollGestureAxisState();
|
|
68
|
+
nextState[axis] = axisState;
|
|
69
|
+
|
|
70
|
+
if (patch.offset !== undefined) {
|
|
71
|
+
axisState.offset = patch.offset;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (patch.contentSize !== undefined) {
|
|
75
|
+
axisState.contentSize = patch.contentSize;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (patch.layoutSize !== undefined) {
|
|
79
|
+
axisState.layoutSize = patch.layoutSize;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (patch.isTouched !== undefined) {
|
|
83
|
+
axisState.isTouched = patch.isTouched;
|
|
41
84
|
}
|
|
42
85
|
|
|
43
86
|
return nextState;
|
|
44
87
|
};
|
|
88
|
+
|
|
89
|
+
export const clearScrollMetadataAxisState = (
|
|
90
|
+
state: ScrollMetadataState | null,
|
|
91
|
+
axis: ScrollGestureAxis,
|
|
92
|
+
): ScrollMetadataState | null => {
|
|
93
|
+
"worklet";
|
|
94
|
+
if (!state) return null;
|
|
95
|
+
|
|
96
|
+
state[axis] = null;
|
|
97
|
+
|
|
98
|
+
return state.vertical || state.horizontal ? state : null;
|
|
99
|
+
};
|
package/src/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
1
|
+
import { useLayoutEffect, useMemo, useState } from "react";
|
|
2
2
|
import type { LayoutChangeEvent } from "react-native";
|
|
3
3
|
import { Gesture, type GestureType } from "react-native-gesture-handler";
|
|
4
4
|
import {
|
|
@@ -9,13 +9,23 @@ import {
|
|
|
9
9
|
import { useSharedValueState } from "../../../../hooks/reanimated/use-shared-value-state";
|
|
10
10
|
import useStableCallback from "../../../../hooks/use-stable-callback";
|
|
11
11
|
import { AnimationStore } from "../../../../stores/animation.store";
|
|
12
|
+
import { ScrollStore } from "../../../../stores/scroll.store";
|
|
12
13
|
import { useGestureContext } from "../gestures.provider";
|
|
13
14
|
import type {
|
|
14
15
|
ScrollGestureAxis,
|
|
15
16
|
ScrollGestureAxisState,
|
|
16
17
|
ScrollGestureState,
|
|
18
|
+
ScrollMetadataState,
|
|
17
19
|
} from "../types";
|
|
18
|
-
import {
|
|
20
|
+
import {
|
|
21
|
+
useScrollMetadataOwnerContext,
|
|
22
|
+
useScrollMetadataOwnerProviderValue,
|
|
23
|
+
} from "./scroll-metadata-owner";
|
|
24
|
+
import {
|
|
25
|
+
clearScrollMetadataAxisState,
|
|
26
|
+
updateScrollGestureAxisState,
|
|
27
|
+
updateScrollMetadataAxisState,
|
|
28
|
+
} from "./update-scroll-gesture-state";
|
|
19
29
|
import { walkUpScrollGestureCoordination } from "./walk-up-scroll-gesture-coordination";
|
|
20
30
|
|
|
21
31
|
interface ScrollGestureCoordinationProps {
|
|
@@ -41,6 +51,31 @@ const modifyScrollGestureAxisState = (
|
|
|
41
51
|
});
|
|
42
52
|
};
|
|
43
53
|
|
|
54
|
+
const modifyScrollMetadataAxisState = (
|
|
55
|
+
scrollState: SharedValue<ScrollMetadataState | null>,
|
|
56
|
+
axis: ScrollGestureAxis,
|
|
57
|
+
patch: ScrollGesturePatch,
|
|
58
|
+
) => {
|
|
59
|
+
"worklet";
|
|
60
|
+
|
|
61
|
+
scrollState.modify(<T extends ScrollMetadataState | null>(state: T): T => {
|
|
62
|
+
"worklet";
|
|
63
|
+
return updateScrollMetadataAxisState(state, axis, patch) as T;
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const clearScrollMetadataAxis = (
|
|
68
|
+
scrollState: SharedValue<ScrollMetadataState | null>,
|
|
69
|
+
axis: ScrollGestureAxis,
|
|
70
|
+
) => {
|
|
71
|
+
"worklet";
|
|
72
|
+
|
|
73
|
+
scrollState.modify(<T extends ScrollMetadataState | null>(state: T): T => {
|
|
74
|
+
"worklet";
|
|
75
|
+
return clearScrollMetadataAxisState(state, axis) as T;
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
44
79
|
/**
|
|
45
80
|
* Returns scroll handlers and a native gesture for ScrollView coordination.
|
|
46
81
|
*
|
|
@@ -56,11 +91,63 @@ export const useScrollGestureCoordination = (
|
|
|
56
91
|
const context = useGestureContext();
|
|
57
92
|
const scrollDirection = props.direction ?? "vertical";
|
|
58
93
|
|
|
94
|
+
const metadataOwnerContext = useScrollMetadataOwnerContext();
|
|
95
|
+
const metadataOwnerProviderValue =
|
|
96
|
+
useScrollMetadataOwnerProviderValue(scrollDirection);
|
|
97
|
+
const isFirstMetadataWriterInTree = !metadataOwnerContext[scrollDirection];
|
|
98
|
+
const [metadataWriterId] = useState(() =>
|
|
99
|
+
ScrollStore.createMetadataWriterId(),
|
|
100
|
+
);
|
|
101
|
+
const [writesMetadata, setWritesMetadata] = useState(false);
|
|
102
|
+
|
|
59
103
|
const { scrollStates, panGestures, pinchGestures, ownerRouteKeys } = useMemo(
|
|
60
104
|
() => walkUpScrollGestureCoordination(context, scrollDirection),
|
|
61
105
|
[context, scrollDirection],
|
|
62
106
|
);
|
|
63
107
|
|
|
108
|
+
const routeKey = context?.routeKey;
|
|
109
|
+
const metadataState = useMemo(
|
|
110
|
+
() => (routeKey ? ScrollStore.getValue(routeKey, "metadata") : null),
|
|
111
|
+
[routeKey],
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
useLayoutEffect(() => {
|
|
115
|
+
if (!routeKey || !isFirstMetadataWriterInTree) {
|
|
116
|
+
setWritesMetadata(false);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const claimed = ScrollStore.claimMetadataWriter(
|
|
121
|
+
routeKey,
|
|
122
|
+
scrollDirection,
|
|
123
|
+
metadataWriterId,
|
|
124
|
+
);
|
|
125
|
+
setWritesMetadata(claimed);
|
|
126
|
+
|
|
127
|
+
return () => {
|
|
128
|
+
const released = ScrollStore.releaseMetadataWriter(
|
|
129
|
+
routeKey,
|
|
130
|
+
scrollDirection,
|
|
131
|
+
metadataWriterId,
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
if (!released || !metadataState) return;
|
|
135
|
+
|
|
136
|
+
if (!ScrollStore.hasMetadataWriters(routeKey)) {
|
|
137
|
+
metadataState.set(null);
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
clearScrollMetadataAxis(metadataState, scrollDirection);
|
|
142
|
+
};
|
|
143
|
+
}, [
|
|
144
|
+
routeKey,
|
|
145
|
+
scrollDirection,
|
|
146
|
+
isFirstMetadataWriterInTree,
|
|
147
|
+
metadataState,
|
|
148
|
+
metadataWriterId,
|
|
149
|
+
]);
|
|
150
|
+
|
|
64
151
|
const ownerClosingValues = useMemo(
|
|
65
152
|
() =>
|
|
66
153
|
ownerRouteKeys.map((routeKey) =>
|
|
@@ -92,6 +179,12 @@ export const useScrollGestureCoordination = (
|
|
|
92
179
|
isTouched: true,
|
|
93
180
|
});
|
|
94
181
|
}
|
|
182
|
+
|
|
183
|
+
if (writesMetadata && metadataState) {
|
|
184
|
+
modifyScrollMetadataAxisState(metadataState, scrollDirection, {
|
|
185
|
+
isTouched: true,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
95
188
|
};
|
|
96
189
|
|
|
97
190
|
const clearIsTouched = () => {
|
|
@@ -101,6 +194,12 @@ export const useScrollGestureCoordination = (
|
|
|
101
194
|
isTouched: false,
|
|
102
195
|
});
|
|
103
196
|
}
|
|
197
|
+
|
|
198
|
+
if (writesMetadata && metadataState) {
|
|
199
|
+
modifyScrollMetadataAxisState(metadataState, scrollDirection, {
|
|
200
|
+
isTouched: false,
|
|
201
|
+
});
|
|
202
|
+
}
|
|
104
203
|
};
|
|
105
204
|
|
|
106
205
|
let gesture = Gesture.Native()
|
|
@@ -121,12 +220,17 @@ export const useScrollGestureCoordination = (
|
|
|
121
220
|
}
|
|
122
221
|
|
|
123
222
|
return gesture;
|
|
124
|
-
}, [
|
|
223
|
+
}, [
|
|
224
|
+
panGestures,
|
|
225
|
+
pinchGestures,
|
|
226
|
+
scrollStates,
|
|
227
|
+
scrollDirection,
|
|
228
|
+
writesMetadata,
|
|
229
|
+
metadataState,
|
|
230
|
+
]);
|
|
125
231
|
|
|
126
232
|
const scrollHandler = useAnimatedScrollHandler({
|
|
127
233
|
onScroll: (event) => {
|
|
128
|
-
if (scrollStates.length === 0) return;
|
|
129
|
-
|
|
130
234
|
const offset =
|
|
131
235
|
scrollDirection === "horizontal"
|
|
132
236
|
? event.contentOffset.x
|
|
@@ -135,7 +239,14 @@ export const useScrollGestureCoordination = (
|
|
|
135
239
|
for (const scrollState of scrollStates) {
|
|
136
240
|
modifyScrollGestureAxisState(scrollState, scrollDirection, {
|
|
137
241
|
offset,
|
|
138
|
-
isTouched: scrollState.get()?.isTouched ?? true,
|
|
242
|
+
isTouched: scrollState.get()?.[scrollDirection].isTouched ?? true,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (writesMetadata && metadataState) {
|
|
247
|
+
modifyScrollMetadataAxisState(metadataState, scrollDirection, {
|
|
248
|
+
offset,
|
|
249
|
+
isTouched: metadataState.get()?.[scrollDirection]?.isTouched ?? true,
|
|
139
250
|
});
|
|
140
251
|
}
|
|
141
252
|
},
|
|
@@ -144,7 +255,6 @@ export const useScrollGestureCoordination = (
|
|
|
144
255
|
const onContentSizeChange = useStableCallback(
|
|
145
256
|
(width: number, height: number) => {
|
|
146
257
|
props.onContentSizeChange?.(width, height);
|
|
147
|
-
if (scrollStates.length === 0) return;
|
|
148
258
|
|
|
149
259
|
const contentSize = scrollDirection === "horizontal" ? width : height;
|
|
150
260
|
|
|
@@ -153,12 +263,17 @@ export const useScrollGestureCoordination = (
|
|
|
153
263
|
contentSize,
|
|
154
264
|
});
|
|
155
265
|
}
|
|
266
|
+
|
|
267
|
+
if (writesMetadata && metadataState) {
|
|
268
|
+
modifyScrollMetadataAxisState(metadataState, scrollDirection, {
|
|
269
|
+
contentSize,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
156
272
|
},
|
|
157
273
|
);
|
|
158
274
|
|
|
159
275
|
const onLayout = useStableCallback((event: LayoutChangeEvent) => {
|
|
160
276
|
props.onLayout?.(event);
|
|
161
|
-
if (scrollStates.length === 0) return;
|
|
162
277
|
|
|
163
278
|
const { width, height } = event.nativeEvent.layout;
|
|
164
279
|
const layoutSize = scrollDirection === "horizontal" ? width : height;
|
|
@@ -168,6 +283,12 @@ export const useScrollGestureCoordination = (
|
|
|
168
283
|
layoutSize,
|
|
169
284
|
});
|
|
170
285
|
}
|
|
286
|
+
|
|
287
|
+
if (writesMetadata && metadataState) {
|
|
288
|
+
modifyScrollMetadataAxisState(metadataState, scrollDirection, {
|
|
289
|
+
layoutSize,
|
|
290
|
+
});
|
|
291
|
+
}
|
|
171
292
|
});
|
|
172
293
|
|
|
173
294
|
return {
|
|
@@ -176,5 +297,6 @@ export const useScrollGestureCoordination = (
|
|
|
176
297
|
onContentSizeChange,
|
|
177
298
|
onLayout,
|
|
178
299
|
nativeGesture,
|
|
300
|
+
metadataOwnerProviderValue,
|
|
179
301
|
};
|
|
180
302
|
};
|