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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ReduceMotion } from "react-native-reanimated";
|
|
2
|
+
/**
|
|
3
|
+
* Internal spring animation configuration.
|
|
4
|
+
*
|
|
5
|
+
* @param mass - The weight of the spring. Reducing this value makes the
|
|
6
|
+
* animation faster.
|
|
7
|
+
* @param damping - How quickly a spring slows down. Higher damping means the
|
|
8
|
+
* spring will come to rest faster.
|
|
9
|
+
* @param stiffness - How bouncy the spring is.
|
|
10
|
+
* @param duration - Perceptual duration of the animation in milliseconds.
|
|
11
|
+
* Actual duration is 1.5 times the value of perceptual duration.
|
|
12
|
+
* @param dampingRatio - How damped the spring is. Value `1` means the spring is
|
|
13
|
+
* critically damped, value `<1` means the spring is underdamped and value
|
|
14
|
+
* `>1` means the spring is overdamped.
|
|
15
|
+
* @param velocity - Initial velocity applied to the spring equation.
|
|
16
|
+
* @param overshootClamping - Whether a spring can bounce over the `toValue`.
|
|
17
|
+
* @param energyThreshold - Relative energy threshold below which the spring
|
|
18
|
+
* will snap to `toValue` without further oscillations.
|
|
19
|
+
* @param reduceMotion - Optional reduced-motion override. `ReduceMotion.Always`
|
|
20
|
+
* finishes immediately, `ReduceMotion.Never` runs normally, and
|
|
21
|
+
* `ReduceMotion.System` is treated like the default in this internal fork.
|
|
22
|
+
* @see https://docs.swmansion.com/react-native-reanimated/docs/animations/withSpring/#config-
|
|
23
|
+
*/
|
|
24
|
+
export type SpringConfig = {
|
|
25
|
+
mass?: number;
|
|
26
|
+
overshootClamping?: boolean;
|
|
27
|
+
energyThreshold?: number;
|
|
28
|
+
velocity?: number;
|
|
29
|
+
reduceMotion?: ReduceMotion;
|
|
30
|
+
} & ({
|
|
31
|
+
stiffness?: number;
|
|
32
|
+
damping?: number;
|
|
33
|
+
duration?: never;
|
|
34
|
+
dampingRatio?: never;
|
|
35
|
+
clamp?: never;
|
|
36
|
+
} | {
|
|
37
|
+
stiffness?: never;
|
|
38
|
+
damping?: never;
|
|
39
|
+
duration?: number;
|
|
40
|
+
dampingRatio?: number;
|
|
41
|
+
clamp?: {
|
|
42
|
+
min?: number;
|
|
43
|
+
max?: number;
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=springConfigs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"springConfigs.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/animation/spring/springConfigs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,YAAY,GAAG;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC5B,GAAG,CACD;IACA,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC;CACb,GACD;IACA,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACtC,CACH,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Animation } from "react-native-reanimated";
|
|
2
|
+
import type { SpringConfig } from "./springConfigs";
|
|
3
|
+
type Timestamp = number;
|
|
4
|
+
export type DefaultSpringConfig = {
|
|
5
|
+
[K in keyof Required<SpringConfig>]: K extends "reduceMotion" | "clamp" ? Required<SpringConfig>[K] | undefined : Required<SpringConfig>[K];
|
|
6
|
+
};
|
|
7
|
+
export interface SpringConfigInner {
|
|
8
|
+
useDuration: boolean;
|
|
9
|
+
skipAnimation: boolean;
|
|
10
|
+
settleDistance: number;
|
|
11
|
+
}
|
|
12
|
+
export interface SpringAnimation extends Animation<SpringAnimation> {
|
|
13
|
+
current: number;
|
|
14
|
+
toValue: number;
|
|
15
|
+
velocity: number;
|
|
16
|
+
settled: boolean;
|
|
17
|
+
lastTimestamp: Timestamp;
|
|
18
|
+
startTimestamp: Timestamp;
|
|
19
|
+
startValue: number;
|
|
20
|
+
zeta: number;
|
|
21
|
+
omega0: number;
|
|
22
|
+
omega1: number;
|
|
23
|
+
initialEnergy: number;
|
|
24
|
+
}
|
|
25
|
+
export type InnerSpringAnimation = SpringAnimation;
|
|
26
|
+
export declare function checkIfConfigIsValid(config: DefaultSpringConfig): boolean;
|
|
27
|
+
export declare function safeMergeConfigs<TConfig extends object>(defaults: TConfig, userConfig?: Partial<TConfig>): TConfig;
|
|
28
|
+
export declare function initialCalculations(stiffness: number | undefined, config: DefaultSpringConfig & SpringConfigInner): {
|
|
29
|
+
zeta: number;
|
|
30
|
+
omega0: number;
|
|
31
|
+
omega1: number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* We make an assumption that we can manipulate zeta without changing duration
|
|
35
|
+
* of movement. According to theory this change is small and tests shows that we
|
|
36
|
+
* can indeed ignore it.
|
|
37
|
+
*/
|
|
38
|
+
export declare function scaleZetaToMatchClamps(animation: SpringAnimation, clamp: {
|
|
39
|
+
min?: number;
|
|
40
|
+
max?: number;
|
|
41
|
+
}): number;
|
|
42
|
+
export declare function getEnergy(displacement: number, velocity: number, stiffness: number, mass: number): number;
|
|
43
|
+
/** Runs before initial */
|
|
44
|
+
export declare function calculateNewStiffnessToMatchDuration(x0: number, config: DefaultSpringConfig & SpringConfigInner, v0: number): number;
|
|
45
|
+
export declare function criticallyDampedSpringCalculations(animation: InnerSpringAnimation, precalculatedValues: {
|
|
46
|
+
v0: number;
|
|
47
|
+
x0: number;
|
|
48
|
+
omega0: number;
|
|
49
|
+
t: number;
|
|
50
|
+
}): {
|
|
51
|
+
position: number;
|
|
52
|
+
velocity: number;
|
|
53
|
+
};
|
|
54
|
+
export declare function underDampedSpringCalculations(animation: InnerSpringAnimation, precalculatedValues: {
|
|
55
|
+
zeta: number;
|
|
56
|
+
v0: number;
|
|
57
|
+
x0: number;
|
|
58
|
+
omega0: number;
|
|
59
|
+
omega1: number;
|
|
60
|
+
t: number;
|
|
61
|
+
}): {
|
|
62
|
+
position: number;
|
|
63
|
+
velocity: number;
|
|
64
|
+
};
|
|
65
|
+
export declare function isAnimationTerminatingCalculation(animation: InnerSpringAnimation, config: DefaultSpringConfig & SpringConfigInner): boolean;
|
|
66
|
+
export declare function isAnimationSettledCalculation(animation: InnerSpringAnimation, config: DefaultSpringConfig & SpringConfigInner): boolean;
|
|
67
|
+
export {};
|
|
68
|
+
//# sourceMappingURL=springUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"springUtils.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/animation/spring/springUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,KAAK,SAAS,GAAG,MAAM,CAAC;AAIxB,MAAM,MAAM,mBAAmB,GAAG;KAChC,CAAC,IAAI,MAAM,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,cAAc,GAAG,OAAO,GACpE,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,GACrC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;CAC5B,CAAC;AAEF,MAAM,WAAW,iBAAiB;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,eAAgB,SAAQ,SAAS,CAAC,eAAe,CAAC;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,SAAS,CAAC;IACzB,cAAc,EAAE,SAAS,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC;AACnD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CA6BzE;AAED,wBAAgB,gBAAgB,CAAC,OAAO,SAAS,MAAM,EACtD,QAAQ,EAAE,OAAO,EACjB,UAAU,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAC3B,OAAO,CAcT;AAgCD,wBAAgB,mBAAmB,CAClC,SAAS,oBAAI,EACb,MAAM,EAAE,mBAAmB,GAAG,iBAAiB,GAC7C;IACF,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CACf,CA4BA;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACrC,SAAS,EAAE,eAAe,EAC1B,KAAK,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACnC,MAAM,CA2DR;AAED,wBAAgB,SAAS,CACxB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,UAMZ;AAED,0BAA0B;AAC1B,wBAAgB,oCAAoC,CACnD,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,mBAAmB,GAAG,iBAAiB,EAC/C,EAAE,EAAE,MAAM,UA+DV;AAED,wBAAgB,kCAAkC,CACjD,SAAS,EAAE,oBAAoB,EAC/B,mBAAmB,EAAE;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;CACV,GACC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAkBxC;AAED,wBAAgB,6BAA6B,CAC5C,SAAS,EAAE,oBAAoB,EAC/B,mBAAmB,EAAE;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;CACV,GACC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAuBxC;AAED,wBAAgB,iCAAiC,CAChD,SAAS,EAAE,oBAAoB,EAC/B,MAAM,EAAE,mBAAmB,GAAG,iBAAiB,GAC7C,OAAO,CAsBT;AAED,wBAAgB,6BAA6B,CAC5C,SAAS,EAAE,oBAAoB,EAC/B,MAAM,EAAE,mBAAmB,GAAG,iBAAiB,GAC7C,OAAO,CAuBT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/animation/state.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/utils/bounds/navigation/reveal/build.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAMhF,wBAAgB,iBAAiB,CAAC,EACjC,GAAG,EACH,KAAK,EACL,aAAa,GACb,EAAE,uBAAuB,GAAG,uBAAuB,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/utils/bounds/navigation/reveal/build.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAMhF,wBAAgB,iBAAiB,CAAC,EACjC,GAAG,EACH,KAAK,EACL,aAAa,GACb,EAAE,uBAAuB,GAAG,uBAAuB,CAgbnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/utils/bounds/navigation/zoom/build.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAgC5E,wBAAgB,eAAe,CAAC,EAC/B,GAAG,EACH,WAAW,EACX,KAAK,GACL,EAAE,qBAAqB,GAAG,qBAAqB,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/utils/bounds/navigation/zoom/build.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAgC5E,wBAAgB,eAAe,CAAC,EAC/B,GAAG,EACH,WAAW,EACX,KAAK,GACL,EAAE,qBAAqB,GAAG,qBAAqB,CA8Z/C"}
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
} from "../../shared/components/activity";
|
|
10
10
|
import { Overlay } from "../../shared/components/overlay";
|
|
11
11
|
import { ScreenComposer } from "../../shared/providers/screen/screen-composer";
|
|
12
|
+
import { withBlankStack } from "../../shared/providers/stack/blank-stack.provider";
|
|
12
13
|
import { withStackCore } from "../../shared/providers/stack/core.provider";
|
|
13
|
-
import { withManagedStack } from "../../shared/providers/stack/managed.provider";
|
|
14
14
|
import type { BaseStackScene } from "../../shared/types/stack.types";
|
|
15
15
|
import type {
|
|
16
16
|
BlankStackDescriptor,
|
|
@@ -53,7 +53,7 @@ const BlankSceneRow = memo(function BlankSceneRow({
|
|
|
53
53
|
|
|
54
54
|
export const StackView = withStackCore(
|
|
55
55
|
{ TRANSITIONS_ALWAYS_ON: true, DISABLE_NATIVE_SCREENS: false },
|
|
56
|
-
|
|
56
|
+
withBlankStack<BlankStackDescriptor, BlankStackNavigationHelpers>(
|
|
57
57
|
({ scenes, shouldShowFloatOverlay }) => {
|
|
58
58
|
return (
|
|
59
59
|
<Fragment>
|
|
@@ -2,8 +2,8 @@ import { Fragment } from "react";
|
|
|
2
2
|
import { Overlay } from "../../shared/components/overlay";
|
|
3
3
|
import { SceneView } from "../../shared/components/scene-view";
|
|
4
4
|
import { ScreenComposer } from "../../shared/providers/screen/screen-composer";
|
|
5
|
+
import { withBlankStack } from "../../shared/providers/stack/blank-stack.provider";
|
|
5
6
|
import { withStackCore } from "../../shared/providers/stack/core.provider";
|
|
6
|
-
import { withManagedStack } from "../../shared/providers/stack/managed.provider";
|
|
7
7
|
import { StackType } from "../../shared/types/stack.types";
|
|
8
8
|
import type {
|
|
9
9
|
ComponentStackDescriptor,
|
|
@@ -13,7 +13,7 @@ import { ComponentScreen } from "./component-screen";
|
|
|
13
13
|
|
|
14
14
|
export const StackView = withStackCore(
|
|
15
15
|
{ TRANSITIONS_ALWAYS_ON: true, STACK_TYPE: StackType.COMPONENT },
|
|
16
|
-
|
|
16
|
+
withBlankStack<ComponentStackDescriptor, ComponentStackNavigationHelpers>(
|
|
17
17
|
({ scenes, shouldShowFloatOverlay }) => {
|
|
18
18
|
return (
|
|
19
19
|
<Fragment>
|
|
@@ -10,11 +10,6 @@ import {
|
|
|
10
10
|
useStackCoreContext,
|
|
11
11
|
withStackCore,
|
|
12
12
|
} from "../../providers/stack/core.provider";
|
|
13
|
-
import { useStackDerived } from "../../providers/stack/helpers/use-stack-derived";
|
|
14
|
-
import {
|
|
15
|
-
AnimationStore,
|
|
16
|
-
type AnimationStoreMap,
|
|
17
|
-
} from "../../stores/animation.store";
|
|
18
13
|
import type { BaseStackDescriptor, BaseStackRoute } from "../../types";
|
|
19
14
|
import { StackType } from "../../types/stack.types";
|
|
20
15
|
import { isOverlayVisible } from "../../utils/overlay/visibility";
|
|
@@ -44,7 +39,6 @@ type TransitionStackState = {
|
|
|
44
39
|
routes: BaseStackRoute[];
|
|
45
40
|
routeKeys: string[];
|
|
46
41
|
scenes: ScreenTransitionsAdapterScene[];
|
|
47
|
-
animationMaps: AnimationStoreMap[];
|
|
48
42
|
routeIndexByKey: Map<string, number>;
|
|
49
43
|
shouldShowFloatOverlay: boolean;
|
|
50
44
|
};
|
|
@@ -81,7 +75,6 @@ function buildTransitionStackState({
|
|
|
81
75
|
const allRoutes = routes.concat(preloadedRoutes);
|
|
82
76
|
const routeKeys: string[] = [];
|
|
83
77
|
const scenes: ScreenTransitionsAdapterScene[] = [];
|
|
84
|
-
const animationMaps: AnimationStoreMap[] = [];
|
|
85
78
|
const routeIndexByKey = new Map<string, number>();
|
|
86
79
|
let shouldShowFloatOverlay = false;
|
|
87
80
|
|
|
@@ -114,7 +107,6 @@ function buildTransitionStackState({
|
|
|
114
107
|
previousDescriptor,
|
|
115
108
|
});
|
|
116
109
|
routeKeys.push(route.key);
|
|
117
|
-
animationMaps.push(AnimationStore.getBag(route.key));
|
|
118
110
|
routeIndexByKey.set(route.key, sceneIndex);
|
|
119
111
|
|
|
120
112
|
if (
|
|
@@ -131,7 +123,6 @@ function buildTransitionStackState({
|
|
|
131
123
|
routes: allRoutes,
|
|
132
124
|
routeKeys,
|
|
133
125
|
scenes,
|
|
134
|
-
animationMaps,
|
|
135
126
|
routeIndexByKey,
|
|
136
127
|
shouldShowFloatOverlay,
|
|
137
128
|
};
|
|
@@ -155,9 +146,6 @@ function ScreenTransitionsStackContent({
|
|
|
155
146
|
}),
|
|
156
147
|
[layoutArgs.state, layoutArgs.descriptors],
|
|
157
148
|
);
|
|
158
|
-
const { optimisticFocusedIndex } = useStackDerived(
|
|
159
|
-
transitionState.animationMaps,
|
|
160
|
-
);
|
|
161
149
|
const stackContextValue = useMemo<StackContextValue>(
|
|
162
150
|
() => ({
|
|
163
151
|
flags,
|
|
@@ -165,7 +153,6 @@ function ScreenTransitionsStackContent({
|
|
|
165
153
|
routeKeys: transitionState.routeKeys,
|
|
166
154
|
routes: transitionState.routes as Route<string>[],
|
|
167
155
|
scenes: transitionState.scenes,
|
|
168
|
-
optimisticFocusedIndex,
|
|
169
156
|
focusedIndex: layoutArgs.state.index,
|
|
170
157
|
}),
|
|
171
158
|
[
|
|
@@ -175,7 +162,6 @@ function ScreenTransitionsStackContent({
|
|
|
175
162
|
transitionState.routeKeys,
|
|
176
163
|
transitionState.routes,
|
|
177
164
|
transitionState.scenes,
|
|
178
|
-
optimisticFocusedIndex,
|
|
179
165
|
],
|
|
180
166
|
);
|
|
181
167
|
const adapterContextValue = useMemo(
|
|
@@ -39,7 +39,7 @@ export const useMeasurer = ({
|
|
|
39
39
|
const { width: viewportWidth, height: viewportHeight } =
|
|
40
40
|
useWindowDimensions();
|
|
41
41
|
|
|
42
|
-
const scrollState = ScrollStore.getValue(currentScreenKey, "
|
|
42
|
+
const scrollState = ScrollStore.getValue(currentScreenKey, "coordination");
|
|
43
43
|
const pendingLifecycleStartBlockCount = SystemStore.getValue(
|
|
44
44
|
currentScreenKey,
|
|
45
45
|
"pendingLifecycleStartBlockCount",
|
|
@@ -12,7 +12,10 @@ import Animated, {
|
|
|
12
12
|
} from "react-native-reanimated";
|
|
13
13
|
import { NO_PROPS, NO_STYLES } from "../constants";
|
|
14
14
|
import { RegisterBoundsProvider } from "../providers/register-bounds.provider";
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
ScrollMetadataOwnerProvider,
|
|
17
|
+
useScrollGestureCoordination,
|
|
18
|
+
} from "../providers/screen/gestures/scroll-coordination";
|
|
16
19
|
import { useScreenStyles } from "../providers/screen/styles";
|
|
17
20
|
import type { TransitionAwareProps } from "../types/screen.types";
|
|
18
21
|
|
|
@@ -55,6 +58,7 @@ export function createTransitionAwareComponent<P extends object>(
|
|
|
55
58
|
onContentSizeChange,
|
|
56
59
|
onLayout,
|
|
57
60
|
nativeGesture,
|
|
61
|
+
metadataOwnerProviderValue,
|
|
58
62
|
} = useScrollGestureCoordination({
|
|
59
63
|
onContentSizeChange: scrollableProps.onContentSizeChange,
|
|
60
64
|
onLayout: scrollableProps.onLayout,
|
|
@@ -89,14 +93,18 @@ export function createTransitionAwareComponent<P extends object>(
|
|
|
89
93
|
/>
|
|
90
94
|
);
|
|
91
95
|
|
|
92
|
-
|
|
93
|
-
return scrollableComponent;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return (
|
|
96
|
+
const coordinatedScrollableComponent = nativeGesture ? (
|
|
97
97
|
<GestureDetector gesture={nativeGesture}>
|
|
98
98
|
{scrollableComponent}
|
|
99
99
|
</GestureDetector>
|
|
100
|
+
) : (
|
|
101
|
+
scrollableComponent
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
return (
|
|
105
|
+
<ScrollMetadataOwnerProvider value={metadataOwnerProviderValue}>
|
|
106
|
+
{coordinatedScrollableComponent}
|
|
107
|
+
</ScrollMetadataOwnerProvider>
|
|
100
108
|
);
|
|
101
109
|
});
|
|
102
110
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { snapDescriptorToIndex } from "../../../animation/snap-to";
|
|
3
|
-
import { useOptimisticFocusedIndex } from "../../../hooks/navigation/use-optimistic-focused-index";
|
|
4
3
|
import { useStack } from "../../../hooks/navigation/use-stack";
|
|
5
4
|
import { ScreenAnimationProvider } from "../../../providers/screen/animation";
|
|
6
5
|
import type { BaseDescriptor } from "../../../providers/screen/descriptors";
|
|
7
6
|
import { DescriptorsProvider } from "../../../providers/screen/descriptors";
|
|
8
|
-
import { ScreenOptionsProvider } from "../../../providers/screen/options";
|
|
9
7
|
import { ScreenStylesProvider } from "../../../providers/screen/styles";
|
|
10
8
|
import type { OverlayScreenState } from "../../../types/overlay.types";
|
|
11
9
|
|
|
@@ -17,12 +15,7 @@ import { OverlayHost } from "./overlay-host";
|
|
|
17
15
|
* Gets routes and descriptors from stack context.
|
|
18
16
|
*/
|
|
19
17
|
export function FloatOverlay() {
|
|
20
|
-
const { scenes,
|
|
21
|
-
useStack();
|
|
22
|
-
const focusedIndex = useOptimisticFocusedIndex(
|
|
23
|
-
optimisticFocusedIndex,
|
|
24
|
-
routeKeys.length,
|
|
25
|
-
);
|
|
18
|
+
const { scenes, focusedIndex, flags, routes, routeKeys } = useStack();
|
|
26
19
|
|
|
27
20
|
const activeOverlay = useMemo(
|
|
28
21
|
() =>
|
|
@@ -71,16 +64,11 @@ export function FloatOverlay() {
|
|
|
71
64
|
|
|
72
65
|
return (
|
|
73
66
|
<DescriptorsProvider current={current} previous={previous} next={next}>
|
|
74
|
-
<
|
|
75
|
-
<
|
|
76
|
-
<
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
overlayScreenState={overlayScreenState}
|
|
80
|
-
/>
|
|
81
|
-
</ScreenStylesProvider>
|
|
82
|
-
</ScreenAnimationProvider>
|
|
83
|
-
</ScreenOptionsProvider>
|
|
67
|
+
<ScreenAnimationProvider>
|
|
68
|
+
<ScreenStylesProvider isFloatingOverlay>
|
|
69
|
+
<OverlayHost scene={scene} overlayScreenState={overlayScreenState} />
|
|
70
|
+
</ScreenStylesProvider>
|
|
71
|
+
</ScreenAnimationProvider>
|
|
84
72
|
</DescriptorsProvider>
|
|
85
73
|
);
|
|
86
74
|
}
|
|
@@ -10,7 +10,7 @@ type SceneViewProps = {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* Shared scene view for
|
|
13
|
+
* Shared scene view for JS-rendered stacks (blank-stack, component-stack).
|
|
14
14
|
* Wraps screen render output with navigation context providers
|
|
15
15
|
* and optional screen overlay.
|
|
16
16
|
*/
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
type BaseDescriptor,
|
|
6
6
|
useDescriptorDerivations,
|
|
7
7
|
} from "../../../providers/screen/descriptors";
|
|
8
|
+
import { useBlankStackContext } from "../../../providers/stack/blank-stack.provider";
|
|
8
9
|
import { useStackCoreContext } from "../../../providers/stack/core.provider";
|
|
9
|
-
import { useManagedStackContext } from "../../../providers/stack/managed.provider";
|
|
10
10
|
import { GestureStore } from "../../../stores/gesture.store";
|
|
11
11
|
import {
|
|
12
12
|
LifecycleTransitionRequestKind,
|
|
@@ -22,22 +22,25 @@ interface CloseHookParams {
|
|
|
22
22
|
resetStores: () => void;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const
|
|
25
|
+
const useBlankStackClose = ({
|
|
26
26
|
current,
|
|
27
27
|
requestLifecycleTransition,
|
|
28
28
|
resetStores,
|
|
29
29
|
}: CloseHookParams) => {
|
|
30
|
-
const { handleCloseRoute } =
|
|
30
|
+
const { handleCloseRoute } = useBlankStackContext();
|
|
31
31
|
|
|
32
32
|
useLayoutEffect(() => {
|
|
33
33
|
if (current.activity !== "closing") {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
requestLifecycleTransition(
|
|
37
|
+
requestLifecycleTransition(
|
|
38
|
+
LifecycleTransitionRequestKind.BlankStackClose,
|
|
39
|
+
0,
|
|
40
|
+
);
|
|
38
41
|
}, [current.activity, requestLifecycleTransition]);
|
|
39
42
|
|
|
40
|
-
const
|
|
43
|
+
const handleBlankStackCloseEnd = useStableCallback((finished: boolean) => {
|
|
41
44
|
if (!finished) return;
|
|
42
45
|
handleCloseRoute({ route: current.route });
|
|
43
46
|
requestAnimationFrame(() => {
|
|
@@ -45,7 +48,7 @@ const useManagedClose = ({
|
|
|
45
48
|
});
|
|
46
49
|
});
|
|
47
50
|
|
|
48
|
-
return {
|
|
51
|
+
return { handleBlankStackCloseEnd };
|
|
49
52
|
};
|
|
50
53
|
|
|
51
54
|
/**
|
|
@@ -114,7 +117,7 @@ export function useCloseTransitionIntent(
|
|
|
114
117
|
current: BaseDescriptor,
|
|
115
118
|
system: SystemStoreMap,
|
|
116
119
|
): {
|
|
117
|
-
|
|
120
|
+
handleBlankStackCloseEnd?: (finished: boolean) => void;
|
|
118
121
|
handleNativeCloseEnd?: (finished: boolean) => void;
|
|
119
122
|
} {
|
|
120
123
|
const routeKey = current.route.key;
|
|
@@ -136,5 +139,5 @@ export function useCloseTransitionIntent(
|
|
|
136
139
|
return useNativeStackClose(closeParams);
|
|
137
140
|
}
|
|
138
141
|
|
|
139
|
-
return
|
|
142
|
+
return useBlankStackClose(closeParams);
|
|
140
143
|
}
|
|
@@ -11,13 +11,13 @@ export const useTransitionStartController = ({
|
|
|
11
11
|
current,
|
|
12
12
|
animations,
|
|
13
13
|
system,
|
|
14
|
-
|
|
14
|
+
onBlankStackCloseFinish,
|
|
15
15
|
onNativeCloseFinish,
|
|
16
16
|
}: {
|
|
17
17
|
current: BaseDescriptor;
|
|
18
18
|
animations: AnimationStoreMap;
|
|
19
19
|
system: SystemStoreMap;
|
|
20
|
-
|
|
20
|
+
onBlankStackCloseFinish?: (finished: boolean) => void;
|
|
21
21
|
onNativeCloseFinish?: (finished: boolean) => void;
|
|
22
22
|
}) => {
|
|
23
23
|
const {
|
|
@@ -51,8 +51,8 @@ export const useTransitionStartController = ({
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
const onAnimationFinish =
|
|
54
|
-
kind === LifecycleTransitionRequestKind.
|
|
55
|
-
?
|
|
54
|
+
kind === LifecycleTransitionRequestKind.BlankStackClose
|
|
55
|
+
? onBlankStackCloseFinish
|
|
56
56
|
: kind === LifecycleTransitionRequestKind.NativeClose
|
|
57
57
|
? onNativeCloseFinish
|
|
58
58
|
: undefined;
|
|
@@ -20,7 +20,7 @@ export const ScreenLifecycle = ({ children }: Props) => {
|
|
|
20
20
|
const animations = AnimationStore.getBag(current.route.key);
|
|
21
21
|
const system = SystemStore.getBag(current.route.key);
|
|
22
22
|
|
|
23
|
-
const {
|
|
23
|
+
const { handleBlankStackCloseEnd, handleNativeCloseEnd } =
|
|
24
24
|
useCloseTransitionIntent(current, system);
|
|
25
25
|
|
|
26
26
|
useOpenTransitionIntent(current, animations, system);
|
|
@@ -29,7 +29,7 @@ export const ScreenLifecycle = ({ children }: Props) => {
|
|
|
29
29
|
current,
|
|
30
30
|
animations,
|
|
31
31
|
system,
|
|
32
|
-
|
|
32
|
+
onBlankStackCloseFinish: handleBlankStackCloseEnd,
|
|
33
33
|
onNativeCloseFinish: handleNativeCloseEnd,
|
|
34
34
|
});
|
|
35
35
|
|
package/src/shared/constants.ts
CHANGED
|
@@ -48,6 +48,7 @@ const DEFAULT_RAW_GESTURE_VALUES = {
|
|
|
48
48
|
normY: 0,
|
|
49
49
|
scale: 1,
|
|
50
50
|
normScale: 0,
|
|
51
|
+
rotation: 0,
|
|
51
52
|
} as const;
|
|
52
53
|
|
|
53
54
|
const DEFAULT_GESTURE_VALUES = {
|
|
@@ -182,14 +183,3 @@ export const FALSE = 0;
|
|
|
182
183
|
* Small value for floating-point comparisons to handle animation/interpolation imprecision
|
|
183
184
|
*/
|
|
184
185
|
export const EPSILON = 1e-5;
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Number of consecutive frames progress must remain near its target before it
|
|
188
|
-
* is treated as logically settled.
|
|
189
|
-
*/
|
|
190
|
-
export const LOGICAL_SETTLE_REQUIRED_FRAMES = 5;
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Progress distance from target required for logical settle.
|
|
194
|
-
*/
|
|
195
|
-
export const LOGICAL_SETTLE_PROGRESS_THRESHOLD = 0.001;
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
} from "../../providers/screen/descriptors";
|
|
8
8
|
import type { ScreenTransitionConfig } from "../../types/screen.types";
|
|
9
9
|
import type { BaseStackNavigation } from "../../types/stack.types";
|
|
10
|
-
import { useOptimisticFocusedIndex } from "./use-optimistic-focused-index";
|
|
11
10
|
import { type StackContextValue, useStack } from "./use-stack";
|
|
12
11
|
|
|
13
12
|
export interface ScreenState<
|
|
@@ -64,7 +63,7 @@ export interface ScreenState<
|
|
|
64
63
|
export function useScreenState<
|
|
65
64
|
TNavigation extends BaseStackNavigation = BaseStackNavigation,
|
|
66
65
|
>(): ScreenState<TNavigation> {
|
|
67
|
-
const { routes, scenes, routeKeys,
|
|
66
|
+
const { routes, scenes, routeKeys, focusedIndex } =
|
|
68
67
|
useStack<StackContextValue>();
|
|
69
68
|
const { current } = useDescriptors<BaseDescriptor>();
|
|
70
69
|
|
|
@@ -73,11 +72,6 @@ export function useScreenState<
|
|
|
73
72
|
[routeKeys, current.route.key],
|
|
74
73
|
);
|
|
75
74
|
|
|
76
|
-
const focusedIndex = useOptimisticFocusedIndex(
|
|
77
|
-
optimisticFocusedIndex,
|
|
78
|
-
routeKeys.length,
|
|
79
|
-
);
|
|
80
|
-
|
|
81
75
|
const focusedScene = useMemo(() => {
|
|
82
76
|
return scenes[focusedIndex] ?? scenes[scenes.length - 1];
|
|
83
77
|
}, [scenes, focusedIndex]);
|
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
useRef,
|
|
9
9
|
useSyncExternalStore,
|
|
10
10
|
} from "react";
|
|
11
|
-
import type { DerivedValue } from "react-native-reanimated";
|
|
12
11
|
import type { StackCoreContextValue } from "../../providers/stack/core.provider";
|
|
13
12
|
import type { OverlayProps } from "../../types/overlay.types";
|
|
14
13
|
import type {
|
|
@@ -41,7 +40,6 @@ export interface StackContextValue extends StackCoreContextValue {
|
|
|
41
40
|
routeKeys: string[];
|
|
42
41
|
routes: Route<string>[];
|
|
43
42
|
scenes: StackScene[];
|
|
44
|
-
optimisticFocusedIndex: DerivedValue<number>;
|
|
45
43
|
focusedIndex: number;
|
|
46
44
|
requestDismiss?: StackDismissRequest;
|
|
47
45
|
}
|
package/src/shared/index.ts
CHANGED
|
@@ -65,6 +65,10 @@ export type {
|
|
|
65
65
|
ScreenTransitionConfig,
|
|
66
66
|
ScreenTransitionDepthTarget,
|
|
67
67
|
ScreenTransitionTarget,
|
|
68
|
+
ScrollGestureAxis,
|
|
69
|
+
ScrollGestureAxisState,
|
|
70
|
+
ScrollGestureState,
|
|
71
|
+
ScrollMetadataState,
|
|
68
72
|
TransitionInterpolatedStyle,
|
|
69
73
|
TransitionSlotStyle,
|
|
70
74
|
TransitionSpec,
|
package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts
CHANGED
|
@@ -44,25 +44,30 @@ export const createTransitionAccessor = (
|
|
|
44
44
|
) => {
|
|
45
45
|
"worklet";
|
|
46
46
|
|
|
47
|
-
const getSources = (): TransitionAccessorSource[] => {
|
|
47
|
+
const getSources = (): readonly TransitionAccessorSource[] => {
|
|
48
48
|
"worklet";
|
|
49
49
|
if (!descendantSources) {
|
|
50
|
-
return
|
|
50
|
+
return sources;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
const descendants = descendantSources.get();
|
|
54
54
|
if (descendants.length === 0) {
|
|
55
|
-
return
|
|
55
|
+
return sources;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
const currentSources = sources.slice();
|
|
59
|
+
for (let index = 0; index < descendants.length; index++) {
|
|
60
|
+
currentSources.push(descendants[index].source);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return currentSources;
|
|
59
64
|
};
|
|
60
65
|
|
|
61
66
|
const buildScope = (
|
|
62
67
|
sourceIndex: TransitionSourceIndex,
|
|
68
|
+
currentSources: readonly TransitionAccessorSource[],
|
|
63
69
|
): ScreenInterpolationProps | null => {
|
|
64
70
|
"worklet";
|
|
65
|
-
const currentSources = getSources();
|
|
66
71
|
const source = currentSources[sourceIndex];
|
|
67
72
|
if (!source) return null;
|
|
68
73
|
|
|
@@ -84,7 +89,7 @@ export const createTransitionAccessor = (
|
|
|
84
89
|
return null;
|
|
85
90
|
}
|
|
86
91
|
|
|
87
|
-
return buildScope(targetIndex);
|
|
92
|
+
return buildScope(targetIndex, currentSources);
|
|
88
93
|
},
|
|
89
94
|
};
|
|
90
95
|
};
|
|
@@ -101,7 +106,7 @@ export const createTransitionAccessor = (
|
|
|
101
106
|
return null;
|
|
102
107
|
}
|
|
103
108
|
|
|
104
|
-
return buildScope(targetIndex);
|
|
109
|
+
return buildScope(targetIndex, currentSources);
|
|
105
110
|
};
|
|
106
111
|
};
|
|
107
112
|
|
|
@@ -127,26 +132,24 @@ export const useBuildTransitionAccessor = () => {
|
|
|
127
132
|
screenInterpolatorPropsRevision,
|
|
128
133
|
};
|
|
129
134
|
|
|
130
|
-
const
|
|
131
|
-
(source) => ({
|
|
135
|
+
const transitionSources: TransitionAccessorSource[] =
|
|
136
|
+
ancestorScreenAnimationSources.map((source) => ({
|
|
132
137
|
...source,
|
|
133
138
|
boundsAccessor: buildSourceBoundsAccessor(source),
|
|
134
|
-
})
|
|
135
|
-
);
|
|
139
|
+
}));
|
|
136
140
|
|
|
137
141
|
const selfTransitionSource = {
|
|
138
142
|
...selfSource,
|
|
139
143
|
boundsAccessor: buildSourceBoundsAccessor(selfSource),
|
|
140
144
|
};
|
|
141
145
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
];
|
|
146
|
+
transitionSources.reverse();
|
|
147
|
+
const originIndex = transitionSources.length;
|
|
148
|
+
transitionSources.push(selfTransitionSource);
|
|
146
149
|
|
|
147
150
|
return createTransitionAccessor(
|
|
148
151
|
transitionSources,
|
|
149
|
-
|
|
152
|
+
originIndex,
|
|
150
153
|
descendantScreenAnimationSources,
|
|
151
154
|
);
|
|
152
155
|
}, [
|