react-native-screen-transitions 3.7.0 → 3.8.0-alpha.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/overlay/variations/float-overlay.js +1 -3
- 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 +6 -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 +1 -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 +21 -8
- 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} +5 -5
- 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/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/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.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 +244 -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/overlay/variations/float-overlay.js +1 -3
- 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 +7 -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 +1 -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 +19 -6
- 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} +5 -5
- 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/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/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.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 +239 -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/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 +12 -12
- 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 +1 -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 +1 -1
- 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/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 +14 -4
- 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/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 +24 -0
- 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 +7 -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/overlay/variations/float-overlay.tsx +1 -7
- 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/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 +9 -51
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/types.ts +1 -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 +2 -5
- package/src/shared/providers/screen/gestures/gestures.provider.tsx +21 -4
- 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} +7 -7
- 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/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 +20 -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/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 +33 -0
- package/src/shared/types/index.ts +4 -0
- package/src/shared/types/providers/{managed-stack.types.ts → blank-stack-provider.types.ts} +10 -10
- package/src/shared/types/screen.types.ts +7 -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 +343 -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
package/src/shared/providers/screen/gestures/pan/{pan-lifecycle.ts → behavior/pan-lifecycle.ts}
RENAMED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { clamp, runOnJS } from "react-native-reanimated";
|
|
2
|
-
import { EPSILON, FALSE, TRUE } from "
|
|
3
|
-
import { animateToProgress } from "
|
|
4
|
-
import { emit } from "
|
|
1
|
+
import { clamp, runOnJS, type SharedValue } from "react-native-reanimated";
|
|
2
|
+
import { EPSILON, FALSE, TRUE } from "../../../../../constants";
|
|
3
|
+
import { animateToProgress } from "../../../../../utils/animation/animate-to-progress";
|
|
4
|
+
import { emit } from "../../../../../utils/animation/emit";
|
|
5
5
|
import {
|
|
6
6
|
normalizeGestureTranslation,
|
|
7
7
|
resolveGestureVelocity,
|
|
8
|
-
} from "
|
|
8
|
+
} from "../../shared/physics";
|
|
9
9
|
import type {
|
|
10
|
+
GestureCompositionActivation,
|
|
10
11
|
GestureDimensions,
|
|
11
12
|
PanGestureEvent,
|
|
12
13
|
PanGestureRuntime,
|
|
13
14
|
PanReleaseResult,
|
|
14
15
|
PanTrackState,
|
|
15
|
-
} from "
|
|
16
|
+
} from "../../types";
|
|
16
17
|
import { buildPanReleasePlan } from "./pan-release";
|
|
17
18
|
import { resetPanGestureValues } from "./pan-reset";
|
|
18
19
|
|
|
@@ -26,7 +27,9 @@ export const startPanBase = (runtime: PanGestureRuntime) => {
|
|
|
26
27
|
const wasSettling = gestures.settling.get();
|
|
27
28
|
const hasResidualGesture =
|
|
28
29
|
Math.abs(gestures.normX.get()) > EPSILON ||
|
|
29
|
-
Math.abs(gestures.normY.get()) > EPSILON
|
|
30
|
+
Math.abs(gestures.normY.get()) > EPSILON ||
|
|
31
|
+
Math.abs(gestures.normScale.get()) > EPSILON ||
|
|
32
|
+
Math.abs(gestures.rotation.get()) > EPSILON;
|
|
30
33
|
|
|
31
34
|
if (!wasSettling || !hasResidualGesture) {
|
|
32
35
|
emit(animations.willAnimate, TRUE, FALSE);
|
|
@@ -40,10 +43,18 @@ export const startPanBase = (runtime: PanGestureRuntime) => {
|
|
|
40
43
|
gestures.normX.set(0);
|
|
41
44
|
gestures.normY.set(0);
|
|
42
45
|
gestures.velocity.set(0);
|
|
46
|
+
gestures.scale.set(1);
|
|
47
|
+
gestures.normScale.set(0);
|
|
48
|
+
gestures.focalX.set(0);
|
|
49
|
+
gestures.focalY.set(0);
|
|
50
|
+
gestures.rotation.set(0);
|
|
43
51
|
gestures.raw.x.set(0);
|
|
44
52
|
gestures.raw.y.set(0);
|
|
45
53
|
gestures.raw.normX.set(0);
|
|
46
54
|
gestures.raw.normY.set(0);
|
|
55
|
+
gestures.raw.scale.set(1);
|
|
56
|
+
gestures.raw.normScale.set(0);
|
|
57
|
+
gestures.raw.rotation.set(0);
|
|
47
58
|
gestureProgressBaseline.set(animations.progress.get());
|
|
48
59
|
};
|
|
49
60
|
|
|
@@ -98,12 +109,34 @@ export const finalizePanRelease = (
|
|
|
98
109
|
dimensions: GestureDimensions,
|
|
99
110
|
rawEvent: PanGestureEvent,
|
|
100
111
|
requestDismiss?: () => void,
|
|
112
|
+
gestureCompositionActivation?: SharedValue<GestureCompositionActivation>,
|
|
101
113
|
) => {
|
|
102
114
|
"worklet";
|
|
103
115
|
const {
|
|
116
|
+
policy,
|
|
104
117
|
stores: { gestures, animations, system },
|
|
105
118
|
} = runtime;
|
|
106
|
-
|
|
119
|
+
|
|
120
|
+
const canDriveRelease =
|
|
121
|
+
!gestureCompositionActivation ||
|
|
122
|
+
gestureCompositionActivation.get() === "pan";
|
|
123
|
+
|
|
124
|
+
const plan = buildPanReleasePlan(
|
|
125
|
+
canDriveRelease
|
|
126
|
+
? release
|
|
127
|
+
: {
|
|
128
|
+
target: animations.progress.get(),
|
|
129
|
+
shouldDismiss: false,
|
|
130
|
+
initialVelocity: 0,
|
|
131
|
+
resetNormalizedValuesImmediately:
|
|
132
|
+
policy.gestureProgressMode === "progress-driven",
|
|
133
|
+
transitionSpec: undefined,
|
|
134
|
+
resetSpec: policy.transitionSpec?.open,
|
|
135
|
+
},
|
|
136
|
+
runtime,
|
|
137
|
+
dimensions,
|
|
138
|
+
rawEvent,
|
|
139
|
+
);
|
|
107
140
|
|
|
108
141
|
if (typeof plan.commitProgress === "number") {
|
|
109
142
|
animations.progress.set(plan.commitProgress);
|
|
@@ -122,8 +155,13 @@ export const finalizePanRelease = (
|
|
|
122
155
|
resetNormalizedValues: plan.resetNormalizedValues,
|
|
123
156
|
resetNormalizedValuesImmediately: plan.resetNormalizedValuesImmediately,
|
|
124
157
|
preserveRawValues: plan.preserveRawValues,
|
|
158
|
+
updateLifecycle: canDriveRelease,
|
|
125
159
|
});
|
|
126
160
|
|
|
161
|
+
if (!canDriveRelease) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
|
|
127
165
|
const progressAlreadyAtTarget =
|
|
128
166
|
Math.abs(animations.progress.get() - plan.target) <= EPSILON;
|
|
129
167
|
|
|
@@ -2,28 +2,28 @@ import { clamp } from "react-native-reanimated";
|
|
|
2
2
|
import {
|
|
3
3
|
getPanSnapAxisConfigForDirection,
|
|
4
4
|
isResolvedPanGestureDirection,
|
|
5
|
-
} from "
|
|
5
|
+
} from "../../shared/directions";
|
|
6
6
|
import {
|
|
7
7
|
getPanReleaseHandoffVelocity,
|
|
8
8
|
getPanReleaseProgressVelocity,
|
|
9
9
|
resolveGestureVelocity,
|
|
10
|
-
} from "
|
|
10
|
+
} from "../../shared/physics";
|
|
11
11
|
import {
|
|
12
12
|
getProgressVelocityTowardTarget,
|
|
13
13
|
resolveGestureSnapTransitionSpec,
|
|
14
|
-
} from "
|
|
14
|
+
} from "../../shared/release";
|
|
15
15
|
import {
|
|
16
16
|
primeRuntimeSnapPoint,
|
|
17
17
|
resolveRuntimeGestureSnapPoints,
|
|
18
|
-
} from "
|
|
19
|
-
import { determineDismissal, determineSnapTarget } from "
|
|
18
|
+
} from "../../shared/snap-points";
|
|
19
|
+
import { determineDismissal, determineSnapTarget } from "../../shared/targets";
|
|
20
20
|
import type {
|
|
21
21
|
GestureDimensions,
|
|
22
22
|
PanGestureEvent,
|
|
23
23
|
PanGestureRuntime,
|
|
24
24
|
PanReleasePlan,
|
|
25
25
|
PanReleaseResult,
|
|
26
|
-
} from "
|
|
26
|
+
} from "../../types";
|
|
27
27
|
|
|
28
28
|
const resolvePanReleaseVelocity = (
|
|
29
29
|
runtime: PanGestureRuntime,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { EPSILON, FALSE, TRUE } from "
|
|
2
|
-
import type { GestureStoreMap } from "
|
|
3
|
-
import type { AnimationConfig } from "
|
|
1
|
+
import { EPSILON, FALSE, TRUE } from "../../../../../constants";
|
|
2
|
+
import type { GestureStoreMap } from "../../../../../stores/gesture.store";
|
|
3
|
+
import type { AnimationConfig } from "../../../../../types/animation.types";
|
|
4
4
|
import {
|
|
5
5
|
animateResetValue,
|
|
6
6
|
clearGestureSettlingIfResting,
|
|
7
7
|
getGestureResetSpec,
|
|
8
|
-
} from "
|
|
8
|
+
} from "../../shared/reset";
|
|
9
9
|
|
|
10
10
|
interface ResetPanGestureValuesProps {
|
|
11
11
|
spec?: AnimationConfig;
|
|
@@ -19,6 +19,7 @@ interface ResetPanGestureValuesProps {
|
|
|
19
19
|
resetNormalizedValues?: boolean;
|
|
20
20
|
resetNormalizedValuesImmediately?: boolean;
|
|
21
21
|
preserveRawValues?: boolean;
|
|
22
|
+
updateLifecycle?: boolean;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
const clearPanSettlingIfResting = (gestures: GestureStoreMap) => {
|
|
@@ -47,8 +48,15 @@ export const resetPanGestureValues = ({
|
|
|
47
48
|
resetNormalizedValues = true,
|
|
48
49
|
resetNormalizedValuesImmediately = false,
|
|
49
50
|
preserveRawValues = shouldDismiss,
|
|
51
|
+
updateLifecycle = true,
|
|
50
52
|
}: ResetPanGestureValuesProps) => {
|
|
51
53
|
"worklet";
|
|
54
|
+
const clearSettlingIfNeeded = () => {
|
|
55
|
+
"worklet";
|
|
56
|
+
if (updateLifecycle) {
|
|
57
|
+
clearPanSettlingIfResting(gestures);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
52
60
|
|
|
53
61
|
if (!preserveRawValues) {
|
|
54
62
|
gestures.raw.x.set(0);
|
|
@@ -57,16 +65,18 @@ export const resetPanGestureValues = ({
|
|
|
57
65
|
gestures.raw.normY.set(0);
|
|
58
66
|
}
|
|
59
67
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
if (updateLifecycle) {
|
|
69
|
+
gestures.dragging.set(FALSE);
|
|
70
|
+
gestures.dismissing.set(shouldDismiss ? TRUE : FALSE);
|
|
71
|
+
gestures.settling.set(shouldDismiss ? FALSE : TRUE);
|
|
72
|
+
}
|
|
63
73
|
gestures.velocity.set(shouldDismiss ? (releaseVelocity ?? 0) : 0);
|
|
64
74
|
|
|
65
75
|
animateResetValue(gestures.x, 0, getGestureResetSpec(spec, velocityX), () =>
|
|
66
|
-
|
|
76
|
+
clearSettlingIfNeeded(),
|
|
67
77
|
);
|
|
68
78
|
animateResetValue(gestures.y, 0, getGestureResetSpec(spec, velocityY), () =>
|
|
69
|
-
|
|
79
|
+
clearSettlingIfNeeded(),
|
|
70
80
|
);
|
|
71
81
|
|
|
72
82
|
if (!resetNormalizedValues) {
|
|
@@ -76,7 +86,7 @@ export const resetPanGestureValues = ({
|
|
|
76
86
|
if (resetNormalizedValuesImmediately) {
|
|
77
87
|
gestures.normX.set(0);
|
|
78
88
|
gestures.normY.set(0);
|
|
79
|
-
|
|
89
|
+
clearSettlingIfNeeded();
|
|
80
90
|
return;
|
|
81
91
|
}
|
|
82
92
|
|
|
@@ -84,12 +94,12 @@ export const resetPanGestureValues = ({
|
|
|
84
94
|
gestures.normX,
|
|
85
95
|
0,
|
|
86
96
|
getGestureResetSpec(spec, velocityNormX),
|
|
87
|
-
() =>
|
|
97
|
+
() => clearSettlingIfNeeded(),
|
|
88
98
|
);
|
|
89
99
|
animateResetValue(
|
|
90
100
|
gestures.normY,
|
|
91
101
|
0,
|
|
92
102
|
getGestureResetSpec(spec, velocityNormY),
|
|
93
|
-
() =>
|
|
103
|
+
() => clearSettlingIfNeeded(),
|
|
94
104
|
);
|
|
95
105
|
};
|
|
@@ -1,15 +1,16 @@
|
|
|
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 { usePanGestureSensitivity } from "
|
|
6
|
-
import { resolvePanRuntime } from "
|
|
3
|
+
import { useNavigationHelpers } from "../../../../../hooks/navigation/use-navigation-helpers";
|
|
4
|
+
import type { ScreenOptionsContextValue } from "../../../options";
|
|
5
|
+
import { usePanGestureSensitivity } from "../../hooks/use-gesture-sensitivity";
|
|
6
|
+
import { resolvePanRuntime } from "../../shared/runtime";
|
|
7
7
|
import type {
|
|
8
|
+
GestureCompositionActivation,
|
|
8
9
|
GestureDimensions,
|
|
9
10
|
PanBehavior,
|
|
10
11
|
PanGestureEvent,
|
|
11
12
|
PanGestureRuntime,
|
|
12
|
-
} from "
|
|
13
|
+
} from "../../types";
|
|
13
14
|
import {
|
|
14
15
|
finalizePanRelease,
|
|
15
16
|
startPanBase,
|
|
@@ -25,6 +26,7 @@ export const usePanBehavior = (
|
|
|
25
26
|
runtime: SharedValue<PanGestureRuntime>,
|
|
26
27
|
screenOptions: ScreenOptionsContextValue,
|
|
27
28
|
dimensions: GestureDimensions,
|
|
29
|
+
gestureCompositionActivation: SharedValue<GestureCompositionActivation>,
|
|
28
30
|
): PanBehavior => {
|
|
29
31
|
const { dismissScreen, requestDismiss } = useNavigationHelpers();
|
|
30
32
|
const { withSensitivity, resetSensitivity } =
|
|
@@ -33,12 +35,27 @@ export const usePanBehavior = (
|
|
|
33
35
|
const onStart = useCallback(() => {
|
|
34
36
|
"worklet";
|
|
35
37
|
const latestRuntime = resolvePanRuntime(runtime.get(), screenOptions.get());
|
|
38
|
+
if (gestureCompositionActivation.get() === "pinch") {
|
|
39
|
+
const { gestures } = latestRuntime.stores;
|
|
40
|
+
gestures.x.set(0);
|
|
41
|
+
gestures.y.set(0);
|
|
42
|
+
gestures.normX.set(0);
|
|
43
|
+
gestures.normY.set(0);
|
|
44
|
+
gestures.velocity.set(0);
|
|
45
|
+
gestures.raw.x.set(0);
|
|
46
|
+
gestures.raw.y.set(0);
|
|
47
|
+
gestures.raw.normX.set(0);
|
|
48
|
+
gestures.raw.normY.set(0);
|
|
49
|
+
resetSensitivity();
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
36
53
|
if (latestRuntime.participation.effectiveSnapPoints.hasSnapPoints) {
|
|
37
54
|
primeSnapPanRelease(latestRuntime);
|
|
38
55
|
}
|
|
39
56
|
startPanBase(latestRuntime);
|
|
40
57
|
resetSensitivity();
|
|
41
|
-
}, [runtime, screenOptions, resetSensitivity]);
|
|
58
|
+
}, [runtime, screenOptions, resetSensitivity, gestureCompositionActivation]);
|
|
42
59
|
|
|
43
60
|
const onUpdate = useCallback(
|
|
44
61
|
(rawEvent: PanGestureEvent) => {
|
|
@@ -66,10 +83,20 @@ export const usePanBehavior = (
|
|
|
66
83
|
screenOptions.get(),
|
|
67
84
|
);
|
|
68
85
|
const event = withSensitivity(rawEvent);
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
?
|
|
72
|
-
|
|
86
|
+
|
|
87
|
+
const release = !latestRuntime.policy.enabled
|
|
88
|
+
? {
|
|
89
|
+
target: latestRuntime.stores.animations.progress.get(),
|
|
90
|
+
shouldDismiss: false,
|
|
91
|
+
initialVelocity: 0,
|
|
92
|
+
transitionSpec: undefined,
|
|
93
|
+
resetSpec: latestRuntime.policy.transitionSpec?.open,
|
|
94
|
+
}
|
|
95
|
+
: latestRuntime.participation.effectiveSnapPoints.hasSnapPoints
|
|
96
|
+
? resolveSnapPanRelease(event, latestRuntime, dimensions)
|
|
97
|
+
: resolvePanRelease(event, latestRuntime, dimensions);
|
|
98
|
+
const isPanComposition = gestureCompositionActivation.get() === "pan";
|
|
99
|
+
|
|
73
100
|
finalizePanRelease(
|
|
74
101
|
release,
|
|
75
102
|
latestRuntime,
|
|
@@ -77,7 +104,12 @@ export const usePanBehavior = (
|
|
|
77
104
|
dimensions,
|
|
78
105
|
rawEvent,
|
|
79
106
|
requestDismiss,
|
|
107
|
+
gestureCompositionActivation,
|
|
80
108
|
);
|
|
109
|
+
|
|
110
|
+
if (isPanComposition) {
|
|
111
|
+
gestureCompositionActivation.set(null);
|
|
112
|
+
}
|
|
81
113
|
},
|
|
82
114
|
[
|
|
83
115
|
runtime,
|
|
@@ -86,6 +118,7 @@ export const usePanBehavior = (
|
|
|
86
118
|
dismissScreen,
|
|
87
119
|
requestDismiss,
|
|
88
120
|
withSensitivity,
|
|
121
|
+
gestureCompositionActivation,
|
|
89
122
|
],
|
|
90
123
|
);
|
|
91
124
|
|
package/src/shared/providers/screen/gestures/pan/{build-pan-gesture.ts → use-build-pan-gesture.ts}
RENAMED
|
@@ -7,24 +7,27 @@ import { useGestureBuilderState } from "../hooks/use-gesture-builder-state";
|
|
|
7
7
|
import { useStableRuntimeConfig } from "../hooks/use-stable-runtime-config";
|
|
8
8
|
import type {
|
|
9
9
|
DirectionClaimMap,
|
|
10
|
+
GestureCompositionActivation,
|
|
10
11
|
PanGesture,
|
|
11
12
|
ScreenGestureConfig,
|
|
12
13
|
ScrollGestureState,
|
|
13
14
|
} from "../types";
|
|
14
|
-
import { usePanActivation } from "./pan-activation";
|
|
15
|
-
import { usePanBehavior } from "./use-pan-behavior";
|
|
15
|
+
import { usePanActivation } from "./activation/use-pan-activation";
|
|
16
|
+
import { usePanBehavior } from "./behavior/use-pan-behavior";
|
|
16
17
|
|
|
17
|
-
interface
|
|
18
|
+
interface UseBuildPanGestureProps {
|
|
18
19
|
scrollState: SharedValue<ScrollGestureState | null>;
|
|
19
20
|
gestureConfig: ScreenGestureConfig;
|
|
20
21
|
childDirectionClaims: SharedValue<DirectionClaimMap>;
|
|
22
|
+
gestureCompositionActivation: SharedValue<GestureCompositionActivation>;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export const useBuildPanGesture = ({
|
|
24
26
|
scrollState,
|
|
25
27
|
gestureConfig,
|
|
26
28
|
childDirectionClaims,
|
|
27
|
-
|
|
29
|
+
gestureCompositionActivation,
|
|
30
|
+
}: UseBuildPanGestureProps): PanGesture => {
|
|
28
31
|
const dimensions = useWindowDimensions();
|
|
29
32
|
const { participation, pan: policy } = gestureConfig;
|
|
30
33
|
const screenOptions = useScreenOptionsContext();
|
|
@@ -45,15 +48,21 @@ export const useBuildPanGesture = ({
|
|
|
45
48
|
runtime,
|
|
46
49
|
screenOptions,
|
|
47
50
|
dimensions,
|
|
51
|
+
gestureCompositionActivation,
|
|
48
52
|
});
|
|
49
53
|
|
|
50
|
-
const behavior = usePanBehavior(
|
|
54
|
+
const behavior = usePanBehavior(
|
|
55
|
+
runtime,
|
|
56
|
+
screenOptions,
|
|
57
|
+
dimensions,
|
|
58
|
+
gestureCompositionActivation,
|
|
59
|
+
);
|
|
51
60
|
|
|
52
61
|
const panGesture = useMemo(() => {
|
|
53
62
|
return Gesture.Pan()
|
|
54
63
|
.enabled(true)
|
|
55
64
|
.manualActivation(true)
|
|
56
|
-
.
|
|
65
|
+
.averageTouches(true)
|
|
57
66
|
.onTouchesDown(activation.onTouchesDown)
|
|
58
67
|
.onTouchesMove(activation.onTouchesMove)
|
|
59
68
|
.onStart(behavior.onStart)
|
|
@@ -4,18 +4,23 @@ import type {
|
|
|
4
4
|
GestureTouchEvent,
|
|
5
5
|
} from "react-native-gesture-handler";
|
|
6
6
|
import type { SharedValue } from "react-native-reanimated";
|
|
7
|
-
import type { ScreenOptionsContextValue } from "
|
|
8
|
-
import { resolvePinchRuntime } from "
|
|
9
|
-
import type {
|
|
7
|
+
import type { ScreenOptionsContextValue } from "../../../options";
|
|
8
|
+
import { resolvePinchRuntime } from "../../shared/runtime";
|
|
9
|
+
import type {
|
|
10
|
+
GestureCompositionActivation,
|
|
11
|
+
PinchGestureRuntime,
|
|
12
|
+
} from "../../types";
|
|
10
13
|
|
|
11
14
|
interface UsePinchActivationProps {
|
|
12
15
|
runtime: SharedValue<PinchGestureRuntime>;
|
|
13
16
|
screenOptions: ScreenOptionsContextValue;
|
|
17
|
+
gestureCompositionActivation: SharedValue<GestureCompositionActivation>;
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
export const usePinchActivation = ({
|
|
17
21
|
runtime,
|
|
18
22
|
screenOptions,
|
|
23
|
+
gestureCompositionActivation,
|
|
19
24
|
}: UsePinchActivationProps) => {
|
|
20
25
|
const onTouchesDown = useCallback(
|
|
21
26
|
(
|
|
@@ -28,12 +33,18 @@ export const usePinchActivation = ({
|
|
|
28
33
|
screenOptions.get(),
|
|
29
34
|
);
|
|
30
35
|
|
|
36
|
+
if (gestureCompositionActivation.get() === "pan") {
|
|
37
|
+
stateManager?.fail();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
31
41
|
if (!participation.canTrackGesture || !policy.enabled) {
|
|
32
42
|
stateManager?.fail();
|
|
33
43
|
return;
|
|
34
44
|
}
|
|
35
45
|
|
|
36
46
|
if (event.numberOfTouches === 2) {
|
|
47
|
+
gestureCompositionActivation.set("pinch");
|
|
37
48
|
stateManager?.activate();
|
|
38
49
|
return;
|
|
39
50
|
}
|
|
@@ -42,7 +53,7 @@ export const usePinchActivation = ({
|
|
|
42
53
|
stateManager?.fail();
|
|
43
54
|
}
|
|
44
55
|
},
|
|
45
|
-
[runtime, screenOptions],
|
|
56
|
+
[runtime, screenOptions, gestureCompositionActivation],
|
|
46
57
|
);
|
|
47
58
|
|
|
48
59
|
const onTouchesMove = useCallback(
|
|
@@ -59,13 +70,14 @@ export const usePinchActivation = ({
|
|
|
59
70
|
}
|
|
60
71
|
|
|
61
72
|
if (event.numberOfTouches === 2) {
|
|
73
|
+
gestureCompositionActivation.set("pinch");
|
|
62
74
|
stateManager.activate();
|
|
63
75
|
return;
|
|
64
76
|
}
|
|
65
77
|
|
|
66
78
|
stateManager.fail();
|
|
67
79
|
},
|
|
68
|
-
[runtime, screenOptions],
|
|
80
|
+
[runtime, screenOptions, gestureCompositionActivation],
|
|
69
81
|
);
|
|
70
82
|
|
|
71
83
|
return useMemo(
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { clamp, runOnJS } from "react-native-reanimated";
|
|
2
|
-
import { EPSILON, FALSE, TRUE } from "
|
|
3
|
-
import { animateToProgress } from "
|
|
4
|
-
import { emit } from "
|
|
5
|
-
import { normalizePinchScale } from "
|
|
2
|
+
import { EPSILON, FALSE, TRUE } from "../../../../../constants";
|
|
3
|
+
import { animateToProgress } from "../../../../../utils/animation/animate-to-progress";
|
|
4
|
+
import { emit } from "../../../../../utils/animation/emit";
|
|
5
|
+
import { normalizePinchScale } from "../../shared/physics";
|
|
6
6
|
import type {
|
|
7
7
|
PinchGestureEvent,
|
|
8
8
|
PinchGestureRuntime,
|
|
9
9
|
PinchReleaseResult,
|
|
10
10
|
PinchTrackState,
|
|
11
|
-
} from "
|
|
11
|
+
} from "../../types";
|
|
12
12
|
import { resetPinchGestureValues } from "./pinch-reset";
|
|
13
13
|
|
|
14
14
|
export const startPinchBase = (
|
|
@@ -22,7 +22,9 @@ export const startPinchBase = (
|
|
|
22
22
|
} = runtime;
|
|
23
23
|
|
|
24
24
|
const wasSettling = gestures.settling.get();
|
|
25
|
-
const hasResidualGesture =
|
|
25
|
+
const hasResidualGesture =
|
|
26
|
+
Math.abs(gestures.normScale.get()) > EPSILON ||
|
|
27
|
+
Math.abs(gestures.rotation.get()) > EPSILON;
|
|
26
28
|
|
|
27
29
|
if (!wasSettling || !hasResidualGesture) {
|
|
28
30
|
emit(animations.willAnimate, TRUE, FALSE);
|
|
@@ -36,8 +38,10 @@ export const startPinchBase = (
|
|
|
36
38
|
gestures.velocity.set(0);
|
|
37
39
|
gestures.scale.set(1);
|
|
38
40
|
gestures.normScale.set(0);
|
|
41
|
+
gestures.rotation.set(0);
|
|
39
42
|
gestures.raw.scale.set(1);
|
|
40
43
|
gestures.raw.normScale.set(0);
|
|
44
|
+
gestures.raw.rotation.set(0);
|
|
41
45
|
gestures.focalX.set(event.focalX);
|
|
42
46
|
gestures.focalY.set(event.focalY);
|
|
43
47
|
gestureProgressBaseline.set(animations.progress.get());
|
|
@@ -56,8 +60,6 @@ export const trackPinchGesture = (
|
|
|
56
60
|
|
|
57
61
|
gestures.scale.set(scale);
|
|
58
62
|
gestures.normScale.set(normScale);
|
|
59
|
-
gestures.focalX.set(event.focalX);
|
|
60
|
-
gestures.focalY.set(event.focalY);
|
|
61
63
|
gestures.raw.scale.set(rawScale);
|
|
62
64
|
gestures.raw.normScale.set(rawNormScale);
|
|
63
65
|
gestures.active.set(
|
package/src/shared/providers/screen/gestures/pinch/{pinch-release.ts → behavior/pinch-release.ts}
RENAMED
|
@@ -3,21 +3,21 @@ import {
|
|
|
3
3
|
getPinchReleaseHandoffVelocity,
|
|
4
4
|
normalizePinchScale,
|
|
5
5
|
shouldDismissFromPinch,
|
|
6
|
-
} from "
|
|
6
|
+
} from "../../shared/physics";
|
|
7
7
|
import {
|
|
8
8
|
getProgressVelocityTowardTarget,
|
|
9
9
|
resolveGestureSnapTransitionSpec,
|
|
10
|
-
} from "
|
|
10
|
+
} from "../../shared/release";
|
|
11
11
|
import {
|
|
12
12
|
primeRuntimeSnapPoint,
|
|
13
13
|
resolveRuntimeGestureSnapPoints,
|
|
14
|
-
} from "
|
|
15
|
-
import { determineSnapTarget } from "
|
|
14
|
+
} from "../../shared/snap-points";
|
|
15
|
+
import { determineSnapTarget } from "../../shared/targets";
|
|
16
16
|
import type {
|
|
17
17
|
PinchGestureEvent,
|
|
18
18
|
PinchGestureRuntime,
|
|
19
19
|
PinchReleaseResult,
|
|
20
|
-
} from "
|
|
20
|
+
} from "../../types";
|
|
21
21
|
|
|
22
22
|
const getPinchSnapDirection = (normalizedScale: number) => {
|
|
23
23
|
"worklet";
|
package/src/shared/providers/screen/gestures/pinch/{pinch-reset.ts → behavior/pinch-reset.ts}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { EPSILON, FALSE, TRUE } from "
|
|
2
|
-
import type { GestureStoreMap } from "
|
|
3
|
-
import type { AnimationConfig } from "
|
|
1
|
+
import { EPSILON, FALSE, TRUE } from "../../../../../constants";
|
|
2
|
+
import type { GestureStoreMap } from "../../../../../stores/gesture.store";
|
|
3
|
+
import type { AnimationConfig } from "../../../../../types/animation.types";
|
|
4
4
|
import {
|
|
5
5
|
animateResetValue,
|
|
6
6
|
clearGestureSettlingIfResting,
|
|
7
7
|
getGestureResetSpec,
|
|
8
|
-
} from "
|
|
8
|
+
} from "../../shared/reset";
|
|
9
9
|
|
|
10
10
|
interface ResetPinchGestureValuesProps {
|
|
11
11
|
spec?: AnimationConfig;
|
|
@@ -21,7 +21,8 @@ const clearPinchSettlingIfResting = (gestures: GestureStoreMap) => {
|
|
|
21
21
|
!gestures.dragging.get() &&
|
|
22
22
|
!gestures.dismissing.get() &&
|
|
23
23
|
Math.abs(gestures.scale.get() - 1) <= EPSILON &&
|
|
24
|
-
Math.abs(gestures.normScale.get()) <= EPSILON
|
|
24
|
+
Math.abs(gestures.normScale.get()) <= EPSILON &&
|
|
25
|
+
Math.abs(gestures.rotation.get()) <= EPSILON;
|
|
25
26
|
|
|
26
27
|
if (isResting) {
|
|
27
28
|
gestures.focalX.set(0);
|
|
@@ -43,6 +44,7 @@ export const resetPinchGestureValues = ({
|
|
|
43
44
|
if (!shouldDismiss) {
|
|
44
45
|
gestures.raw.scale.set(1);
|
|
45
46
|
gestures.raw.normScale.set(0);
|
|
47
|
+
gestures.raw.rotation.set(0);
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
gestures.dragging.set(FALSE);
|
|
@@ -52,6 +54,7 @@ export const resetPinchGestureValues = ({
|
|
|
52
54
|
if (resetValuesImmediately) {
|
|
53
55
|
gestures.scale.set(1);
|
|
54
56
|
gestures.normScale.set(0);
|
|
57
|
+
gestures.rotation.set(0);
|
|
55
58
|
clearPinchSettlingIfResting(gestures);
|
|
56
59
|
return;
|
|
57
60
|
}
|
|
@@ -62,4 +65,7 @@ export const resetPinchGestureValues = ({
|
|
|
62
65
|
animateResetValue(gestures.normScale, 0, resetSpec, () =>
|
|
63
66
|
clearPinchSettlingIfResting(gestures),
|
|
64
67
|
);
|
|
68
|
+
animateResetValue(gestures.rotation, 0, resetSpec, () =>
|
|
69
|
+
clearPinchSettlingIfResting(gestures),
|
|
70
|
+
);
|
|
65
71
|
};
|
|
@@ -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()
|