react-native-screen-transitions 3.6.0-alpha.1 → 3.6.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/component-stack/components/component-screen.js +1 -7
- package/lib/commonjs/component-stack/components/component-screen.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js +27 -34
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js +4 -4
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +17 -19
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +27 -7
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js +23 -51
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js +3 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js +75 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +15 -2
- package/lib/commonjs/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js +103 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js +52 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
- package/lib/commonjs/shared/components/native-screen.js +2 -13
- package/lib/commonjs/shared/components/native-screen.js.map +1 -1
- package/lib/commonjs/shared/constants.js +2 -7
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +35 -0
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
- package/lib/commonjs/shared/providers/register-bounds.provider.js +48 -55
- package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
- 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/hydrate-transition-state/index.js +1 -6
- 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.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js +9 -2
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js +19 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js +18 -2
- package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +1 -5
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +125 -0
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/index.js +6 -12
- package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/clear.js +13 -21
- package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/entries.js +49 -9
- package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +143 -82
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +17 -43
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/state.js +26 -3
- package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/commonjs/shared/stores/gesture.store.js +2 -0
- package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
- package/lib/commonjs/shared/types/gesture.types.js +2 -2
- package/lib/commonjs/shared/types/gesture.types.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +21 -8
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +23 -0
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +91 -199
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js +15 -2
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +155 -14
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
- package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
- package/lib/module/component-stack/components/component-screen.js +2 -8
- package/lib/module/component-stack/components/component-screen.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +27 -34
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +4 -4
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +18 -20
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +28 -8
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js +22 -50
- package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
- package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/index.js +3 -1
- package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js +70 -0
- package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +13 -1
- package/lib/module/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js +98 -0
- package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/utils/source-signals.js +47 -0
- package/lib/module/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
- package/lib/module/shared/components/native-screen.js +3 -14
- package/lib/module/shared/components/native-screen.js.map +1 -1
- package/lib/module/shared/constants.js +1 -6
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +30 -0
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
- package/lib/module/shared/providers/register-bounds.provider.js +48 -55
- package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
- 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/hydrate-transition-state/index.js +1 -1
- 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.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
- package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js +10 -3
- package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-release.js +20 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
- package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js +3 -3
- package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js +3 -3
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +3 -3
- package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/physics.js +15 -0
- package/lib/module/shared/providers/screen/gestures/shared/physics.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/policy.js +3 -3
- package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +105 -0
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
- package/lib/module/shared/stores/bounds/index.js +7 -13
- package/lib/module/shared/stores/bounds/index.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/clear.js +14 -22
- package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/entries.js +49 -9
- package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +139 -80
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +17 -43
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/state.js +25 -2
- package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/module/shared/stores/gesture.store.js +2 -0
- package/lib/module/shared/stores/gesture.store.js.map +1 -1
- package/lib/module/shared/types/animation.types.js +0 -4
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/types/gesture.types.js +0 -1
- package/lib/module/shared/types/gesture.types.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
- package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +21 -8
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +18 -0
- package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js +90 -198
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/config.js +14 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js +144 -12
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
- package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
- package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts +1 -0
- package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts +5 -4
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts +6 -2
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts +5 -4
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +7 -7
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts +11 -7
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts +10 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.d.ts → utils/measured-bounds.d.ts} +3 -2
- package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts +22 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts +16 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +0 -5
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +1 -1
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +21 -0
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -0
- package/lib/typescript/shared/providers/register-bounds.provider.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/hydrate-transition-state/index.d.ts +0 -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/pipeline.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-release.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/use-pan-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/use-pinch-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts +7 -0
- package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +0 -10
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts +2 -0
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +18 -0
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/index.d.ts +6 -12
- package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts +13 -10
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts +26 -5
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +14 -7
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/stores/gesture.store.d.ts +1 -0
- package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +0 -18
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/gesture.types.d.ts +8 -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/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts +4 -0
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.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/reveal/config.d.ts +14 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts +48 -7
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/options.d.ts +2 -3
- package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
- package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts +3 -2
- package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/component-stack/components/component-screen.tsx +3 -11
- package/src/shared/components/create-boundary-component/create-boundary-component.tsx +30 -27
- package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +5 -5
- package/src/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts +25 -24
- package/src/shared/components/create-boundary-component/hooks/use-initial-source-measurement.ts +41 -11
- package/src/shared/components/create-boundary-component/hooks/use-measurer.ts +49 -64
- package/src/shared/components/create-boundary-component/hooks/use-refresh-boundary.ts +44 -83
- package/src/shared/components/create-boundary-component/index.tsx +3 -1
- package/src/shared/components/create-boundary-component/types.ts +13 -11
- package/src/shared/components/create-boundary-component/utils/destination-signals.ts +129 -0
- package/src/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.ts → utils/measured-bounds.ts} +25 -1
- package/src/shared/components/create-boundary-component/utils/refresh-signals.ts +164 -0
- package/src/shared/components/create-boundary-component/utils/source-signals.ts +72 -0
- package/src/shared/components/native-screen.tsx +3 -12
- package/src/shared/constants.ts +1 -6
- package/src/shared/index.ts +0 -3
- package/src/shared/providers/helpers/measured-bounds-writes.ts +67 -0
- package/src/shared/providers/register-bounds.provider.tsx +68 -91
- package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +0 -14
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +1 -2
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +1 -4
- package/src/shared/providers/screen/gestures/pan/pan-activation.ts +4 -1
- package/src/shared/providers/screen/gestures/pan/pan-lifecycle.ts +18 -2
- package/src/shared/providers/screen/gestures/pan/pan-release.ts +33 -0
- package/src/shared/providers/screen/gestures/pan/pan-reset.ts +3 -0
- package/src/shared/providers/screen/gestures/pan/use-pan-behavior.ts +9 -6
- package/src/shared/providers/screen/gestures/pinch/pinch-activation.ts +5 -2
- package/src/shared/providers/screen/gestures/pinch/pinch-lifecycle.ts +1 -0
- package/src/shared/providers/screen/gestures/pinch/use-pinch-behavior.ts +9 -6
- package/src/shared/providers/screen/gestures/shared/physics.ts +25 -0
- package/src/shared/providers/screen/gestures/shared/policy.ts +3 -5
- package/src/shared/providers/screen/gestures/types.ts +2 -0
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +0 -3
- package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +161 -0
- package/src/shared/stores/bounds/index.ts +10 -20
- package/src/shared/stores/bounds/internals/clear.ts +17 -41
- package/src/shared/stores/bounds/internals/entries.ts +56 -13
- package/src/shared/stores/bounds/internals/links.ts +222 -113
- package/src/shared/stores/bounds/internals/resolver.ts +23 -87
- package/src/shared/stores/bounds/internals/state.ts +27 -5
- package/src/shared/stores/bounds/types.ts +17 -7
- package/src/shared/stores/gesture.store.ts +3 -0
- package/src/shared/types/animation.types.ts +0 -23
- package/src/shared/types/gesture.types.ts +8 -2
- package/src/shared/types/index.ts +0 -4
- package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +1 -0
- package/src/shared/utils/bounds/helpers/create-link-accessor.ts +6 -6
- package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +20 -11
- package/src/shared/utils/bounds/helpers/resolve-bounds-pair-key.ts +22 -0
- package/src/shared/utils/bounds/navigation/reveal/build.ts +153 -297
- package/src/shared/utils/bounds/navigation/reveal/config.ts +20 -1
- package/src/shared/utils/bounds/navigation/reveal/math.ts +234 -18
- package/src/shared/utils/bounds/types/options.ts +2 -3
- package/src/shared/utils/navigation/resolve-scene-neighbors.ts +36 -23
- package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -43
- package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -17
- package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -28
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -75
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -20
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -16
- package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
- package/lib/commonjs/shared/providers/layout-anchor.provider.js +0 -86
- package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js +0 -49
- package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js +0 -25
- package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js +0 -30
- package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js +0 -79
- package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/matching.js +0 -13
- package/lib/commonjs/shared/stores/bounds/helpers/matching.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js +0 -30
- package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/internals/groups.js +0 -102
- package/lib/commonjs/shared/stores/bounds/internals/groups.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -38
- package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -12
- package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -23
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -68
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -15
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -12
- package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
- package/lib/module/shared/providers/layout-anchor.provider.js +0 -80
- package/lib/module/shared/providers/layout-anchor.provider.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/entries.helpers.js +0 -42
- package/lib/module/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/find-latest.js +0 -19
- package/lib/module/shared/stores/bounds/helpers/find-latest.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/groups.helpers.js +0 -23
- package/lib/module/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/link.helpers.js +0 -69
- package/lib/module/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/matching.js +0 -9
- package/lib/module/shared/stores/bounds/helpers/matching.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js +0 -24
- package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/internals/groups.js +0 -95
- package/lib/module/shared/stores/bounds/internals/groups.js.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts +0 -15
- package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts +0 -2
- package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts +0 -22
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +0 -29
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts +0 -3
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +0 -8
- package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +0 -1
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +0 -39
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts +0 -5
- package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts +0 -3
- package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts +0 -10
- package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts +0 -14
- package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts +0 -3
- package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts +0 -5
- package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/internals/groups.d.ts +0 -16
- package/lib/typescript/shared/stores/bounds/internals/groups.d.ts.map +0 -1
- package/src/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.ts +0 -83
- package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +0 -20
- package/src/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.ts +0 -48
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +0 -101
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement.ts +0 -25
- package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +0 -14
- package/src/shared/providers/layout-anchor.provider.tsx +0 -112
- package/src/shared/stores/bounds/helpers/entries.helpers.ts +0 -55
- package/src/shared/stores/bounds/helpers/find-latest.ts +0 -22
- package/src/shared/stores/bounds/helpers/groups.helpers.ts +0 -27
- package/src/shared/stores/bounds/helpers/link.helpers.ts +0 -131
- package/src/shared/stores/bounds/helpers/matching.ts +0 -11
- package/src/shared/stores/bounds/helpers/tag-state.helpers.ts +0 -24
- package/src/shared/stores/bounds/internals/groups.ts +0 -116
|
@@ -2,7 +2,10 @@ import { clamp } from "react-native-reanimated";
|
|
|
2
2
|
import { EPSILON, FALSE, TRUE } from "../../../../constants";
|
|
3
3
|
import { animateToProgress } from "../../../../utils/animation/animate-to-progress";
|
|
4
4
|
import { emit } from "../../../../utils/animation/emit";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
normalizeGestureTranslation,
|
|
7
|
+
resolveGestureVelocity,
|
|
8
|
+
} from "../shared/physics";
|
|
6
9
|
import type {
|
|
7
10
|
GestureDimensions,
|
|
8
11
|
PanGestureEvent,
|
|
@@ -36,6 +39,7 @@ export const startPanBase = (runtime: PanGestureRuntime) => {
|
|
|
36
39
|
gestures.y.set(0);
|
|
37
40
|
gestures.normX.set(0);
|
|
38
41
|
gestures.normY.set(0);
|
|
42
|
+
gestures.velocity.set(0);
|
|
39
43
|
gestures.raw.x.set(0);
|
|
40
44
|
gestures.raw.y.set(0);
|
|
41
45
|
gestures.raw.normX.set(0);
|
|
@@ -51,18 +55,28 @@ export const trackPanGesture = (
|
|
|
51
55
|
): PanTrackState => {
|
|
52
56
|
"worklet";
|
|
53
57
|
const { translationX: x, translationY: y } = event;
|
|
54
|
-
const {
|
|
58
|
+
const {
|
|
59
|
+
translationX: rawX,
|
|
60
|
+
translationY: rawY,
|
|
61
|
+
velocityX,
|
|
62
|
+
velocityY,
|
|
63
|
+
} = rawEvent;
|
|
55
64
|
const { width, height } = dimensions;
|
|
56
65
|
|
|
57
66
|
const normX = clamp(normalizeGestureTranslation(x, width), -1, 1);
|
|
58
67
|
const normY = clamp(normalizeGestureTranslation(y, height), -1, 1);
|
|
59
68
|
const rawNormX = clamp(normalizeGestureTranslation(rawX, width), -1, 1);
|
|
60
69
|
const rawNormY = clamp(normalizeGestureTranslation(rawY, height), -1, 1);
|
|
70
|
+
const velocity = resolveGestureVelocity(
|
|
71
|
+
velocityX / Math.max(1, width),
|
|
72
|
+
velocityY / Math.max(1, height),
|
|
73
|
+
);
|
|
61
74
|
|
|
62
75
|
gestures.x.set(x);
|
|
63
76
|
gestures.y.set(y);
|
|
64
77
|
gestures.normX.set(normX);
|
|
65
78
|
gestures.normY.set(normY);
|
|
79
|
+
gestures.velocity.set(velocity);
|
|
66
80
|
gestures.raw.x.set(rawX);
|
|
67
81
|
gestures.raw.y.set(rawY);
|
|
68
82
|
gestures.raw.normX.set(rawNormX);
|
|
@@ -73,6 +87,7 @@ export const trackPanGesture = (
|
|
|
73
87
|
y,
|
|
74
88
|
normX,
|
|
75
89
|
normY,
|
|
90
|
+
velocity,
|
|
76
91
|
};
|
|
77
92
|
};
|
|
78
93
|
|
|
@@ -102,6 +117,7 @@ export const finalizePanRelease = (
|
|
|
102
117
|
velocityY: plan.resetVelocityY,
|
|
103
118
|
velocityNormX: plan.resetVelocityNormX,
|
|
104
119
|
velocityNormY: plan.resetVelocityNormY,
|
|
120
|
+
releaseVelocity: plan.releaseVelocity,
|
|
105
121
|
resetNormalizedValues: plan.resetNormalizedValues,
|
|
106
122
|
resetNormalizedValuesImmediately: plan.resetNormalizedValuesImmediately,
|
|
107
123
|
preserveRawValues: plan.preserveRawValues,
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
getPanReleaseHandoffVelocity,
|
|
8
8
|
getPanReleaseProgressVelocity,
|
|
9
|
+
resolveGestureVelocity,
|
|
9
10
|
} from "../shared/physics";
|
|
10
11
|
import {
|
|
11
12
|
getProgressVelocityTowardTarget,
|
|
@@ -24,6 +25,26 @@ import type {
|
|
|
24
25
|
PanReleaseResult,
|
|
25
26
|
} from "../types";
|
|
26
27
|
|
|
28
|
+
const resolvePanReleaseVelocity = (
|
|
29
|
+
runtime: PanGestureRuntime,
|
|
30
|
+
velocityNormX: number,
|
|
31
|
+
velocityNormY: number,
|
|
32
|
+
) => {
|
|
33
|
+
"worklet";
|
|
34
|
+
const activeGesture = runtime.stores.gestures.active.get();
|
|
35
|
+
|
|
36
|
+
switch (activeGesture) {
|
|
37
|
+
case "horizontal":
|
|
38
|
+
case "horizontal-inverted":
|
|
39
|
+
return resolveGestureVelocity(velocityNormX, 0);
|
|
40
|
+
case "vertical":
|
|
41
|
+
case "vertical-inverted":
|
|
42
|
+
return resolveGestureVelocity(0, velocityNormY);
|
|
43
|
+
default:
|
|
44
|
+
return resolveGestureVelocity(velocityNormX, velocityNormY);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
27
48
|
const resolveActivePanSnapAxis = (runtime: PanGestureRuntime) => {
|
|
28
49
|
"worklet";
|
|
29
50
|
const activeGesture = runtime.stores.gestures.active.get();
|
|
@@ -226,6 +247,17 @@ export const buildPanReleasePlan = (
|
|
|
226
247
|
resetVelocityScale === 0 ? 0 : rawEvent.velocityX * resetVelocityScale;
|
|
227
248
|
const resetVelocityY =
|
|
228
249
|
resetVelocityScale === 0 ? 0 : rawEvent.velocityY * resetVelocityScale;
|
|
250
|
+
const releaseVelocityNormX =
|
|
251
|
+
rawEvent.velocityX / Math.max(1, dimensions.width);
|
|
252
|
+
const releaseVelocityNormY =
|
|
253
|
+
rawEvent.velocityY / Math.max(1, dimensions.height);
|
|
254
|
+
const releaseVelocity = release.shouldDismiss
|
|
255
|
+
? resolvePanReleaseVelocity(
|
|
256
|
+
runtime,
|
|
257
|
+
releaseVelocityNormX,
|
|
258
|
+
releaseVelocityNormY,
|
|
259
|
+
)
|
|
260
|
+
: 0;
|
|
229
261
|
|
|
230
262
|
return {
|
|
231
263
|
target: release.target,
|
|
@@ -235,6 +267,7 @@ export const buildPanReleasePlan = (
|
|
|
235
267
|
resetVelocityY,
|
|
236
268
|
resetVelocityNormX: resetVelocityX / Math.max(1, dimensions.width),
|
|
237
269
|
resetVelocityNormY: resetVelocityY / Math.max(1, dimensions.height),
|
|
270
|
+
releaseVelocity,
|
|
238
271
|
resetNormalizedValues: !release.shouldDismiss || progressDriven,
|
|
239
272
|
resetNormalizedValuesImmediately:
|
|
240
273
|
release.resetNormalizedValuesImmediately === true,
|
|
@@ -15,6 +15,7 @@ interface ResetPanGestureValuesProps {
|
|
|
15
15
|
velocityY?: number;
|
|
16
16
|
velocityNormX?: number;
|
|
17
17
|
velocityNormY?: number;
|
|
18
|
+
releaseVelocity?: number;
|
|
18
19
|
resetNormalizedValues?: boolean;
|
|
19
20
|
resetNormalizedValuesImmediately?: boolean;
|
|
20
21
|
preserveRawValues?: boolean;
|
|
@@ -42,6 +43,7 @@ export const resetPanGestureValues = ({
|
|
|
42
43
|
velocityY,
|
|
43
44
|
velocityNormX,
|
|
44
45
|
velocityNormY,
|
|
46
|
+
releaseVelocity,
|
|
45
47
|
resetNormalizedValues = true,
|
|
46
48
|
resetNormalizedValuesImmediately = false,
|
|
47
49
|
preserveRawValues = shouldDismiss,
|
|
@@ -58,6 +60,7 @@ export const resetPanGestureValues = ({
|
|
|
58
60
|
gestures.dragging.set(FALSE);
|
|
59
61
|
gestures.dismissing.set(shouldDismiss ? TRUE : FALSE);
|
|
60
62
|
gestures.settling.set(shouldDismiss ? FALSE : TRUE);
|
|
63
|
+
gestures.velocity.set(shouldDismiss ? (releaseVelocity ?? 0) : 0);
|
|
61
64
|
|
|
62
65
|
animateResetValue(gestures.x, 0, getGestureResetSpec(spec, velocityX), () =>
|
|
63
66
|
clearPanSettlingIfResting(gestures),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCallback } from "react";
|
|
1
|
+
import { useCallback, useMemo } from "react";
|
|
2
2
|
import type { SharedValue } from "react-native-reanimated";
|
|
3
3
|
import { useNavigationHelpers } from "../../../../hooks/navigation/use-navigation-helpers";
|
|
4
4
|
import type { ScreenOptionsContextValue } from "../../options";
|
|
@@ -81,9 +81,12 @@ export const usePanBehavior = (
|
|
|
81
81
|
[runtime, screenOptions, dimensions, dismissScreen, withSensitivity],
|
|
82
82
|
);
|
|
83
83
|
|
|
84
|
-
return
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
return useMemo(
|
|
85
|
+
() => ({
|
|
86
|
+
onStart,
|
|
87
|
+
onUpdate,
|
|
88
|
+
onEnd,
|
|
89
|
+
}),
|
|
90
|
+
[onStart, onUpdate, onEnd],
|
|
91
|
+
);
|
|
89
92
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCallback } from "react";
|
|
1
|
+
import { useCallback, useMemo } from "react";
|
|
2
2
|
import type {
|
|
3
3
|
GestureStateManager,
|
|
4
4
|
GestureTouchEvent,
|
|
@@ -68,5 +68,8 @@ export const usePinchActivation = ({
|
|
|
68
68
|
[runtime, screenOptions],
|
|
69
69
|
);
|
|
70
70
|
|
|
71
|
-
return
|
|
71
|
+
return useMemo(
|
|
72
|
+
() => ({ onTouchesDown, onTouchesMove }),
|
|
73
|
+
[onTouchesDown, onTouchesMove],
|
|
74
|
+
);
|
|
72
75
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCallback } from "react";
|
|
1
|
+
import { useCallback, useMemo } from "react";
|
|
2
2
|
import type { SharedValue } from "react-native-reanimated";
|
|
3
3
|
import { useNavigationHelpers } from "../../../../hooks/navigation/use-navigation-helpers";
|
|
4
4
|
import type { ScreenOptionsContextValue } from "../../options";
|
|
@@ -74,9 +74,12 @@ export const usePinchBehavior = (
|
|
|
74
74
|
[runtime, screenOptions, dismissScreen, withSensitivity],
|
|
75
75
|
);
|
|
76
76
|
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
return useMemo(
|
|
78
|
+
() => ({
|
|
79
|
+
onStart,
|
|
80
|
+
onUpdate,
|
|
81
|
+
onEnd,
|
|
82
|
+
}),
|
|
83
|
+
[onStart, onUpdate, onEnd],
|
|
84
|
+
);
|
|
82
85
|
};
|
|
@@ -18,6 +18,8 @@ type GestureAxisCandidate = {
|
|
|
18
18
|
velocityContribution: number;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
const FULL_GESTURE_VELOCITY_PROGRESS_PER_SECOND = 4;
|
|
22
|
+
|
|
21
23
|
/**
|
|
22
24
|
* Converts a pan velocity from pixels/second into progress/second.
|
|
23
25
|
*/
|
|
@@ -29,6 +31,29 @@ export const toProgressVelocity = (
|
|
|
29
31
|
return velocityPixelsPerSecond / Math.max(1, screenSize);
|
|
30
32
|
};
|
|
31
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Converts normalized pan velocity into a 0-1 scalar for interpolators.
|
|
36
|
+
*
|
|
37
|
+
* `1` means the velocity reached or exceeded the library's full-velocity
|
|
38
|
+
* threshold, not a physical maximum for the device.
|
|
39
|
+
*/
|
|
40
|
+
export const resolveGestureVelocity = (
|
|
41
|
+
velocityNormX: number,
|
|
42
|
+
velocityNormY: number,
|
|
43
|
+
) => {
|
|
44
|
+
"worklet";
|
|
45
|
+
|
|
46
|
+
const dominantVelocity = Math.max(
|
|
47
|
+
Math.abs(velocityNormX),
|
|
48
|
+
Math.abs(velocityNormY),
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
return Math.min(
|
|
52
|
+
1,
|
|
53
|
+
dominantVelocity / FULL_GESTURE_VELOCITY_PROGRESS_PER_SECOND,
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
|
|
32
57
|
/**
|
|
33
58
|
* Converts pan release velocity into a spring handoff in progress units/second.
|
|
34
59
|
*/
|
|
@@ -62,9 +62,7 @@ const resolveGestureDirection = (options: GesturePolicyOptions) => {
|
|
|
62
62
|
return options.gestureDirection ?? DEFAULT_GESTURE_DIRECTION;
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
options: GesturePolicyOptions,
|
|
67
|
-
) {
|
|
65
|
+
function resolveGestureProgressModePolicy(options: GesturePolicyOptions) {
|
|
68
66
|
"worklet";
|
|
69
67
|
return resolveGestureProgressMode({
|
|
70
68
|
gestureProgressMode: options.gestureProgressMode,
|
|
@@ -131,7 +129,7 @@ const resolvePinchDirections = (
|
|
|
131
129
|
};
|
|
132
130
|
};
|
|
133
131
|
|
|
134
|
-
|
|
132
|
+
const resolveGestureCanDismiss = ({
|
|
135
133
|
isFirstKey,
|
|
136
134
|
gestureEnabled,
|
|
137
135
|
}: {
|
|
@@ -215,7 +213,7 @@ export const resolvePinchPolicy = (
|
|
|
215
213
|
};
|
|
216
214
|
};
|
|
217
215
|
|
|
218
|
-
|
|
216
|
+
const resolveGestureParticipation = ({
|
|
219
217
|
options,
|
|
220
218
|
isFirstKey,
|
|
221
219
|
gestureContext,
|
|
@@ -160,6 +160,7 @@ export interface PanTrackState {
|
|
|
160
160
|
y: number;
|
|
161
161
|
normX: number;
|
|
162
162
|
normY: number;
|
|
163
|
+
velocity: number;
|
|
163
164
|
}
|
|
164
165
|
|
|
165
166
|
export interface PinchTrackState {
|
|
@@ -185,6 +186,7 @@ export interface PanReleasePlan {
|
|
|
185
186
|
resetVelocityY: number;
|
|
186
187
|
resetVelocityNormX: number;
|
|
187
188
|
resetVelocityNormY: number;
|
|
189
|
+
releaseVelocity: number;
|
|
188
190
|
resetNormalizedValues: boolean;
|
|
189
191
|
resetNormalizedValuesImmediately: boolean;
|
|
190
192
|
preserveRawValues: boolean;
|
|
@@ -8,7 +8,6 @@ import type {
|
|
|
8
8
|
import { logger } from "../../../../utils/logger";
|
|
9
9
|
import { useScreenAnimationContext } from "../../animation";
|
|
10
10
|
import { useBuildBoundsAccessor } from "../../animation/helpers/accessors/use-build-bounds-accessor";
|
|
11
|
-
import { useBuildTransitionAccessor } from "../../animation/helpers/accessors/use-build-transition-accessor";
|
|
12
11
|
import { syncSelectedInterpolatorOptions } from "../../animation/helpers/selected-interpolator-options";
|
|
13
12
|
import { useDescriptorDerivations } from "../../descriptors";
|
|
14
13
|
import {
|
|
@@ -55,7 +54,6 @@ export const useInterpolatedStylesMap = () => {
|
|
|
55
54
|
currentInterpolator,
|
|
56
55
|
} = useScreenAnimationContext();
|
|
57
56
|
const boundsAccessor = useBuildBoundsAccessor();
|
|
58
|
-
const transition = useBuildTransitionAccessor();
|
|
59
57
|
const pendingLifecycleStartBlockCount = SystemStore.getValue(
|
|
60
58
|
currentScreenKey,
|
|
61
59
|
"pendingLifecycleStartBlockCount",
|
|
@@ -126,7 +124,6 @@ export const useInterpolatedStylesMap = () => {
|
|
|
126
124
|
progress: effectiveProgress,
|
|
127
125
|
next: effectiveNext,
|
|
128
126
|
bounds: boundsAccessor,
|
|
129
|
-
transition,
|
|
130
127
|
});
|
|
131
128
|
|
|
132
129
|
const rawStyleMap: TransitionInterpolatedStyle | undefined =
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
GroupKey,
|
|
3
|
+
LinkGroupState,
|
|
4
|
+
LinkKey,
|
|
5
|
+
LinkPairState,
|
|
6
|
+
LinkPairsState,
|
|
7
|
+
ScreenIdentifier,
|
|
8
|
+
ScreenPairKey,
|
|
9
|
+
TagLink,
|
|
10
|
+
} from "../types";
|
|
11
|
+
|
|
12
|
+
const PAIR_SEPARATOR = "<>";
|
|
13
|
+
|
|
14
|
+
export const createScreenPairKey = (
|
|
15
|
+
sourceScreenKey: ScreenIdentifier["screenKey"],
|
|
16
|
+
destinationScreenKey: ScreenIdentifier["screenKey"] | "",
|
|
17
|
+
): ScreenPairKey => {
|
|
18
|
+
"worklet";
|
|
19
|
+
return `${sourceScreenKey}${PAIR_SEPARATOR}${destinationScreenKey}`;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const createPendingPairKey = (
|
|
23
|
+
sourceScreenKey: ScreenIdentifier["screenKey"],
|
|
24
|
+
): ScreenPairKey => {
|
|
25
|
+
"worklet";
|
|
26
|
+
return createScreenPairKey(sourceScreenKey, "");
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const getSourceScreenKeyFromPairKey = (
|
|
30
|
+
pairKey: ScreenPairKey,
|
|
31
|
+
): ScreenIdentifier["screenKey"] => {
|
|
32
|
+
"worklet";
|
|
33
|
+
const separatorIndex = pairKey.indexOf(PAIR_SEPARATOR);
|
|
34
|
+
if (separatorIndex === -1) return pairKey;
|
|
35
|
+
return pairKey.slice(0, separatorIndex);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const getDestinationScreenKeyFromPairKey = (
|
|
39
|
+
pairKey: ScreenPairKey,
|
|
40
|
+
): ScreenIdentifier["screenKey"] | "" => {
|
|
41
|
+
"worklet";
|
|
42
|
+
const separatorIndex = pairKey.indexOf(PAIR_SEPARATOR);
|
|
43
|
+
if (separatorIndex === -1) return "";
|
|
44
|
+
return pairKey.slice(separatorIndex + PAIR_SEPARATOR.length);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const isScreenPairKeyForScreen = (
|
|
48
|
+
pairKey: ScreenPairKey,
|
|
49
|
+
screenKey: ScreenIdentifier["screenKey"],
|
|
50
|
+
): boolean => {
|
|
51
|
+
"worklet";
|
|
52
|
+
return (
|
|
53
|
+
pairKey === createPendingPairKey(screenKey) ||
|
|
54
|
+
pairKey.startsWith(`${screenKey}${PAIR_SEPARATOR}`) ||
|
|
55
|
+
pairKey.endsWith(`${PAIR_SEPARATOR}${screenKey}`)
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const getLinkKeyFromTag = (tag: string): LinkKey => {
|
|
60
|
+
"worklet";
|
|
61
|
+
const separatorIndex = tag.indexOf(":");
|
|
62
|
+
if (separatorIndex === -1) return tag;
|
|
63
|
+
return tag.slice(separatorIndex + 1);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const getGroupKeyFromTag = (tag: string): GroupKey | null => {
|
|
67
|
+
"worklet";
|
|
68
|
+
const separatorIndex = tag.indexOf(":");
|
|
69
|
+
if (separatorIndex === -1) return null;
|
|
70
|
+
return tag.slice(0, separatorIndex);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const createGroupTag = (group: GroupKey, linkKey: LinkKey): string => {
|
|
74
|
+
"worklet";
|
|
75
|
+
return `${group}:${linkKey}`;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const ensurePairState = (
|
|
79
|
+
state: LinkPairsState,
|
|
80
|
+
pairKey: ScreenPairKey,
|
|
81
|
+
): LinkPairState => {
|
|
82
|
+
"worklet";
|
|
83
|
+
if (!state[pairKey]) {
|
|
84
|
+
state[pairKey] = {
|
|
85
|
+
links: {},
|
|
86
|
+
groups: {},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
state[pairKey].groups ??= {};
|
|
90
|
+
return state[pairKey];
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export const ensurePairLinks = (
|
|
94
|
+
state: LinkPairsState,
|
|
95
|
+
pairKey: ScreenPairKey,
|
|
96
|
+
): Record<LinkKey, TagLink> => {
|
|
97
|
+
"worklet";
|
|
98
|
+
return ensurePairState(state, pairKey).links;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export const ensurePairGroups = (
|
|
102
|
+
state: LinkPairsState,
|
|
103
|
+
pairKey: ScreenPairKey,
|
|
104
|
+
): Record<GroupKey, LinkGroupState> => {
|
|
105
|
+
"worklet";
|
|
106
|
+
return ensurePairState(state, pairKey).groups;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export const removePairLink = (
|
|
110
|
+
state: LinkPairsState,
|
|
111
|
+
pairKey: ScreenPairKey,
|
|
112
|
+
linkKey: LinkKey,
|
|
113
|
+
) => {
|
|
114
|
+
"worklet";
|
|
115
|
+
const pair = state[pairKey];
|
|
116
|
+
if (!pair) return;
|
|
117
|
+
|
|
118
|
+
delete pair.links[linkKey];
|
|
119
|
+
|
|
120
|
+
for (const key in pair.links) {
|
|
121
|
+
if (pair.links[key]) return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
delete state[pairKey];
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export const getLink = (
|
|
128
|
+
state: LinkPairsState,
|
|
129
|
+
pairKey: ScreenPairKey,
|
|
130
|
+
linkKey: LinkKey,
|
|
131
|
+
): TagLink | null => {
|
|
132
|
+
"worklet";
|
|
133
|
+
return state[pairKey]?.links[linkKey] ?? null;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export const getSource = (
|
|
137
|
+
state: LinkPairsState,
|
|
138
|
+
pairKey: ScreenPairKey,
|
|
139
|
+
linkKey: LinkKey,
|
|
140
|
+
): TagLink["source"] | null => {
|
|
141
|
+
"worklet";
|
|
142
|
+
return getLink(state, pairKey, linkKey)?.source ?? null;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export const getDestination = (
|
|
146
|
+
state: LinkPairsState,
|
|
147
|
+
pairKey: ScreenPairKey,
|
|
148
|
+
linkKey: LinkKey,
|
|
149
|
+
): TagLink["destination"] | null => {
|
|
150
|
+
"worklet";
|
|
151
|
+
return getLink(state, pairKey, linkKey)?.destination ?? null;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export const getActiveGroupId = (
|
|
155
|
+
state: LinkPairsState,
|
|
156
|
+
pairKey: ScreenPairKey,
|
|
157
|
+
group: GroupKey,
|
|
158
|
+
): LinkKey | null => {
|
|
159
|
+
"worklet";
|
|
160
|
+
return state[pairKey]?.groups?.[group]?.activeId ?? null;
|
|
161
|
+
};
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { clear } from "./internals/clear";
|
|
2
2
|
import { getEntry, removeEntry, setEntry } from "./internals/entries";
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
getMatchedLink,
|
|
11
|
-
getPendingLink,
|
|
12
|
-
hasDestinationLink,
|
|
13
|
-
hasSourceLink,
|
|
4
|
+
getActiveGroupId,
|
|
5
|
+
getDestination,
|
|
6
|
+
getLink,
|
|
7
|
+
getSource,
|
|
8
|
+
setActiveGroupId,
|
|
14
9
|
setDestination,
|
|
15
10
|
setSource,
|
|
16
11
|
} from "./internals/links";
|
|
@@ -37,17 +32,12 @@ export const BoundStore = {
|
|
|
37
32
|
link: {
|
|
38
33
|
setSource,
|
|
39
34
|
setDestination,
|
|
40
|
-
|
|
35
|
+
setActiveGroupId,
|
|
36
|
+
getLink,
|
|
37
|
+
getSource,
|
|
38
|
+
getDestination,
|
|
39
|
+
getActiveGroupId,
|
|
41
40
|
getPair: resolveTransitionPair,
|
|
42
|
-
getPending: getPendingLink,
|
|
43
|
-
hasSource: hasSourceLink,
|
|
44
|
-
hasDestination: hasDestinationLink,
|
|
45
|
-
},
|
|
46
|
-
group: {
|
|
47
|
-
setActiveId: setGroupActiveId,
|
|
48
|
-
setInitialId: setGroupInitialId,
|
|
49
|
-
getActiveId: getGroupActiveId,
|
|
50
|
-
getInitialId: getGroupInitialId,
|
|
51
41
|
},
|
|
52
42
|
cleanup: {
|
|
53
43
|
byScreen: clear,
|
|
@@ -1,59 +1,35 @@
|
|
|
1
1
|
import { hasAnyKeys } from "../helpers/keys";
|
|
2
|
-
import {
|
|
3
|
-
import type {
|
|
4
|
-
import { type
|
|
2
|
+
import { isScreenPairKeyForScreen } from "../helpers/link-pairs.helpers";
|
|
3
|
+
import type { LinkPairsState, ScreenKey } from "../types";
|
|
4
|
+
import { type BoundaryEntriesState, boundaryRegistry, pairs } from "./state";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type ScreenPredicate = (
|
|
9
|
-
screenKey: ScreenKey,
|
|
10
|
-
screenEntry: ScreenEntry,
|
|
11
|
-
) => boolean;
|
|
12
|
-
|
|
13
|
-
const clearRegistry = (
|
|
14
|
-
shouldClearScreen: ScreenPredicate,
|
|
15
|
-
shouldClearLink: LinkPredicate,
|
|
16
|
-
) => {
|
|
6
|
+
function clear(screenKey: ScreenKey) {
|
|
17
7
|
"worklet";
|
|
18
|
-
|
|
8
|
+
|
|
9
|
+
boundaryRegistry.modify(<T extends BoundaryEntriesState>(state: T): T => {
|
|
19
10
|
"worklet";
|
|
20
11
|
for (const tag in state) {
|
|
21
12
|
const tagState = state[tag];
|
|
13
|
+
delete tagState.screens[screenKey];
|
|
22
14
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (shouldClearScreen(entryScreenKey, screenEntry)) {
|
|
26
|
-
delete tagState.screens[entryScreenKey];
|
|
27
|
-
}
|
|
15
|
+
if (!hasAnyKeys(tagState.screens)) {
|
|
16
|
+
delete state[tag];
|
|
28
17
|
}
|
|
18
|
+
}
|
|
29
19
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (shouldClearLink(link)) {
|
|
33
|
-
tagState.linkStack.splice(i, 1);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
20
|
+
return state;
|
|
21
|
+
});
|
|
36
22
|
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
pairs.modify(<T extends LinkPairsState>(state: T): T => {
|
|
24
|
+
"worklet";
|
|
25
|
+
for (const pairKey in state) {
|
|
26
|
+
if (isScreenPairKeyForScreen(pairKey, screenKey)) {
|
|
27
|
+
delete state[pairKey];
|
|
39
28
|
}
|
|
40
29
|
}
|
|
41
30
|
|
|
42
31
|
return state;
|
|
43
32
|
});
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
function clear(screenKey: ScreenKey) {
|
|
47
|
-
"worklet";
|
|
48
|
-
clearRegistry(
|
|
49
|
-
(entryScreenKey) => entryScreenKey === screenKey,
|
|
50
|
-
(link) => {
|
|
51
|
-
return (
|
|
52
|
-
matchesScreenKey(link.source, screenKey) ||
|
|
53
|
-
matchesScreenKey(link.destination, screenKey)
|
|
54
|
-
);
|
|
55
|
-
},
|
|
56
|
-
);
|
|
57
33
|
}
|
|
58
34
|
|
|
59
35
|
export { clear };
|