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
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createPendingPairKey,
|
|
3
|
+
createScreenPairKey,
|
|
4
|
+
getDestinationScreenKeyFromPairKey,
|
|
5
|
+
} from "../../../stores/bounds/helpers/link-pairs.helpers";
|
|
6
|
+
import type {
|
|
7
|
+
LinkPairsState,
|
|
8
|
+
ScreenPairKey,
|
|
9
|
+
} from "../../../stores/bounds/types";
|
|
10
|
+
import type { MeasureTarget } from "../types";
|
|
11
|
+
|
|
12
|
+
const SOURCE_SIGNAL_PREFIX = "source|";
|
|
13
|
+
const DESTINATION_SIGNAL_PREFIX = "destination|";
|
|
14
|
+
|
|
15
|
+
type RefreshBoundarySignal = MeasureTarget & {
|
|
16
|
+
signal: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const findNestedDestinationPairKey = (
|
|
20
|
+
linkState: LinkPairsState | undefined,
|
|
21
|
+
linkId: string,
|
|
22
|
+
ancestorScreenKeys: readonly string[] | undefined,
|
|
23
|
+
): ScreenPairKey | null => {
|
|
24
|
+
"worklet";
|
|
25
|
+
const destinationScreenKey = ancestorScreenKeys?.[0];
|
|
26
|
+
if (!linkState || !destinationScreenKey) return null;
|
|
27
|
+
|
|
28
|
+
for (const pairKey in linkState) {
|
|
29
|
+
if (getDestinationScreenKeyFromPairKey(pairKey) !== destinationScreenKey) {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (linkState[pairKey]?.links?.[linkId]?.destination) {
|
|
34
|
+
return pairKey;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return null;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const buildRefreshSignal = (
|
|
42
|
+
type: MeasureTarget["type"],
|
|
43
|
+
pairKey: ScreenPairKey,
|
|
44
|
+
key: string,
|
|
45
|
+
): RefreshBoundarySignal => {
|
|
46
|
+
"worklet";
|
|
47
|
+
const prefix =
|
|
48
|
+
type === "source" ? SOURCE_SIGNAL_PREFIX : DESTINATION_SIGNAL_PREFIX;
|
|
49
|
+
return {
|
|
50
|
+
type,
|
|
51
|
+
pairKey,
|
|
52
|
+
signal: `${prefix}${pairKey}|${key}`,
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const getRefreshBoundarySignal = (params: {
|
|
57
|
+
enabled: boolean;
|
|
58
|
+
currentScreenKey: string;
|
|
59
|
+
preferredSourceScreenKey?: string;
|
|
60
|
+
nextScreenKey?: string;
|
|
61
|
+
linkId: string;
|
|
62
|
+
group?: string;
|
|
63
|
+
ancestorScreenKeys?: readonly string[];
|
|
64
|
+
shouldRefresh: boolean;
|
|
65
|
+
closing: boolean;
|
|
66
|
+
entering: boolean;
|
|
67
|
+
animating: boolean;
|
|
68
|
+
progress: number;
|
|
69
|
+
linkState?: LinkPairsState;
|
|
70
|
+
}): RefreshBoundarySignal | null => {
|
|
71
|
+
"worklet";
|
|
72
|
+
const {
|
|
73
|
+
enabled,
|
|
74
|
+
currentScreenKey,
|
|
75
|
+
preferredSourceScreenKey,
|
|
76
|
+
nextScreenKey,
|
|
77
|
+
linkId,
|
|
78
|
+
group,
|
|
79
|
+
ancestorScreenKeys,
|
|
80
|
+
shouldRefresh,
|
|
81
|
+
closing,
|
|
82
|
+
entering,
|
|
83
|
+
animating,
|
|
84
|
+
progress,
|
|
85
|
+
linkState,
|
|
86
|
+
} = params;
|
|
87
|
+
|
|
88
|
+
if (!enabled) return null;
|
|
89
|
+
|
|
90
|
+
const canRefreshPreCloseDestination =
|
|
91
|
+
shouldRefresh && closing && !entering && !animating && progress >= 1;
|
|
92
|
+
const canRefreshSettledDestination = shouldRefresh && !closing && !entering;
|
|
93
|
+
|
|
94
|
+
if (!canRefreshPreCloseDestination && !canRefreshSettledDestination) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Non-group refresh only rewrites destination bounds. Source refresh is a
|
|
99
|
+
// grouped-only fallback for active ids that do not have source bounds yet.
|
|
100
|
+
if (!group) {
|
|
101
|
+
if (nextScreenKey) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Nested initial screens have no previous screen in their own navigator,
|
|
106
|
+
// so recover the pair by looking for a destination on the ancestor route.
|
|
107
|
+
const pairKey = preferredSourceScreenKey
|
|
108
|
+
? createScreenPairKey(preferredSourceScreenKey, currentScreenKey)
|
|
109
|
+
: findNestedDestinationPairKey(linkState, linkId, ancestorScreenKeys);
|
|
110
|
+
|
|
111
|
+
if (!pairKey) return null;
|
|
112
|
+
|
|
113
|
+
return buildRefreshSignal(
|
|
114
|
+
"destination",
|
|
115
|
+
pairKey,
|
|
116
|
+
[currentScreenKey, closing ? "closing" : "settled"].join("|"),
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Source-side grouped refresh: a new active id may not have source bounds yet,
|
|
121
|
+
// so the next screen's lifecycle pulse gives that source one chance to capture.
|
|
122
|
+
if (nextScreenKey) {
|
|
123
|
+
const pairKey = createScreenPairKey(currentScreenKey, nextScreenKey);
|
|
124
|
+
const pendingPairKey = createPendingPairKey(currentScreenKey);
|
|
125
|
+
const activeId = linkState?.[pairKey]?.groups?.[group]?.activeId;
|
|
126
|
+
const hasSource =
|
|
127
|
+
!!linkState?.[pairKey]?.links?.[linkId]?.source ||
|
|
128
|
+
!!linkState?.[pendingPairKey]?.links?.[linkId]?.source;
|
|
129
|
+
|
|
130
|
+
if (activeId !== linkId || hasSource) {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return buildRefreshSignal(
|
|
135
|
+
"source",
|
|
136
|
+
pairKey,
|
|
137
|
+
[group, linkId, closing ? "closing" : "settled"].join("|"),
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (!preferredSourceScreenKey) return null;
|
|
142
|
+
|
|
143
|
+
// Destination-side grouped refresh: only the active member rewrites the
|
|
144
|
+
// destination side, keeping inactive grouped members from stealing the link.
|
|
145
|
+
const pairKey = createScreenPairKey(
|
|
146
|
+
preferredSourceScreenKey,
|
|
147
|
+
currentScreenKey,
|
|
148
|
+
);
|
|
149
|
+
const activeId = linkState?.[pairKey]?.groups?.[group]?.activeId;
|
|
150
|
+
const hasSource = !!linkState?.[pairKey]?.links?.[linkId]?.source;
|
|
151
|
+
const hasDestination = !!linkState?.[pairKey]?.links?.[linkId]?.destination;
|
|
152
|
+
|
|
153
|
+
// Destination retargeting should only measure a concrete member that already
|
|
154
|
+
// participates in the pair. Missing members fall back to initialId at resolve.
|
|
155
|
+
if (activeId !== linkId || (!hasSource && !hasDestination)) {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return buildRefreshSignal(
|
|
160
|
+
"destination",
|
|
161
|
+
pairKey,
|
|
162
|
+
[group, linkId, closing ? "closing" : "settled"].join("|"),
|
|
163
|
+
);
|
|
164
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { createScreenPairKey } from "../../../stores/bounds/helpers/link-pairs.helpers";
|
|
2
|
+
import type {
|
|
3
|
+
LinkPairsState,
|
|
4
|
+
ScreenPairKey,
|
|
5
|
+
} from "../../../stores/bounds/types";
|
|
6
|
+
|
|
7
|
+
const SOURCE_SIGNAL_PREFIX = "source|";
|
|
8
|
+
|
|
9
|
+
type SourceCaptureSignal = {
|
|
10
|
+
pairKey: ScreenPairKey;
|
|
11
|
+
signal: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const buildSourceSignal = (
|
|
15
|
+
pairKey: ScreenPairKey,
|
|
16
|
+
key: string,
|
|
17
|
+
): SourceCaptureSignal => {
|
|
18
|
+
"worklet";
|
|
19
|
+
return {
|
|
20
|
+
pairKey,
|
|
21
|
+
signal: `${SOURCE_SIGNAL_PREFIX}${pairKey}|${key}`,
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const getInitialSourceCaptureSignal = (params: {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
nextScreenKey?: string;
|
|
28
|
+
currentScreenKey?: string;
|
|
29
|
+
linkId: string;
|
|
30
|
+
group?: string;
|
|
31
|
+
shouldAutoMeasure: boolean;
|
|
32
|
+
linkState?: LinkPairsState;
|
|
33
|
+
}): SourceCaptureSignal | null => {
|
|
34
|
+
"worklet";
|
|
35
|
+
const {
|
|
36
|
+
enabled,
|
|
37
|
+
nextScreenKey,
|
|
38
|
+
currentScreenKey,
|
|
39
|
+
linkId,
|
|
40
|
+
group,
|
|
41
|
+
shouldAutoMeasure,
|
|
42
|
+
linkState,
|
|
43
|
+
} = params;
|
|
44
|
+
|
|
45
|
+
if (!enabled || !nextScreenKey || !currentScreenKey) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Trigger components capture on press. This passive path is for Boundary.View
|
|
50
|
+
// slots that need a source before navigation starts.
|
|
51
|
+
if (!shouldAutoMeasure) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const pairKey = createScreenPairKey(currentScreenKey, nextScreenKey);
|
|
56
|
+
|
|
57
|
+
if (group) {
|
|
58
|
+
const activeId = linkState?.[pairKey]?.groups?.[group]?.activeId;
|
|
59
|
+
|
|
60
|
+
// Passive grouped sources should not measure every mounted item. Once a
|
|
61
|
+
// group has an active id, only that concrete member can auto-capture.
|
|
62
|
+
if (activeId && activeId !== linkId) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const signalParts = group
|
|
68
|
+
? [currentScreenKey, nextScreenKey, group, linkId]
|
|
69
|
+
: [currentScreenKey, nextScreenKey, linkId];
|
|
70
|
+
|
|
71
|
+
return buildSourceSignal(pairKey, signalParts.join("|"));
|
|
72
|
+
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import type * as React from "react";
|
|
2
|
-
import { StyleSheet
|
|
2
|
+
import { StyleSheet } from "react-native";
|
|
3
3
|
import Animated, {
|
|
4
4
|
Extrapolation,
|
|
5
5
|
interpolate,
|
|
6
6
|
useAnimatedProps,
|
|
7
|
-
useAnimatedRef,
|
|
8
7
|
useDerivedValue,
|
|
9
8
|
useSharedValue,
|
|
10
9
|
} from "react-native-reanimated";
|
|
11
10
|
import { Screen as RNSScreen } from "react-native-screens";
|
|
12
11
|
import { EPSILON } from "../constants";
|
|
13
12
|
import { useStack } from "../hooks/navigation/use-stack";
|
|
14
|
-
import { LayoutAnchorProvider } from "../providers/layout-anchor.provider";
|
|
15
13
|
import { useManagedStackContext } from "../providers/stack/managed.provider";
|
|
16
14
|
import { AnimationStore } from "../stores/animation.store";
|
|
17
15
|
|
|
@@ -54,7 +52,6 @@ export const NativeScreen = ({
|
|
|
54
52
|
const routesLength = routes.length;
|
|
55
53
|
const topIndex = routesLength - 1;
|
|
56
54
|
const topRouteKey = routes[topIndex]?.key ?? routeKey;
|
|
57
|
-
const screenRef = useAnimatedRef<View>();
|
|
58
55
|
|
|
59
56
|
const sceneClosing = AnimationStore.getValue(routeKey, "closing");
|
|
60
57
|
const topSceneProgress = AnimationStore.getValue(topRouteKey, "progress");
|
|
@@ -155,16 +152,13 @@ export const NativeScreen = ({
|
|
|
155
152
|
if (DISABLE_NATIVE_SCREENS) {
|
|
156
153
|
return (
|
|
157
154
|
<Animated.View
|
|
158
|
-
ref={screenRef}
|
|
159
155
|
// Keep a native boundary per screen when falling back to plain views.
|
|
160
156
|
// Android release builds can otherwise flatten sibling screens together.
|
|
161
157
|
collapsable={false}
|
|
162
158
|
style={StyleSheet.absoluteFill}
|
|
163
159
|
animatedProps={animatedProps}
|
|
164
160
|
>
|
|
165
|
-
|
|
166
|
-
{children}
|
|
167
|
-
</LayoutAnchorProvider>
|
|
161
|
+
{children}
|
|
168
162
|
</Animated.View>
|
|
169
163
|
);
|
|
170
164
|
}
|
|
@@ -172,14 +166,11 @@ export const NativeScreen = ({
|
|
|
172
166
|
return (
|
|
173
167
|
<AnimatedNativeScreen
|
|
174
168
|
enabled
|
|
175
|
-
ref={screenRef}
|
|
176
169
|
style={StyleSheet.absoluteFill}
|
|
177
170
|
freezeOnBlur={freezeOnBlur}
|
|
178
171
|
animatedProps={animatedProps}
|
|
179
172
|
>
|
|
180
|
-
|
|
181
|
-
{children}
|
|
182
|
-
</LayoutAnchorProvider>
|
|
173
|
+
{children}
|
|
183
174
|
</AnimatedNativeScreen>
|
|
184
175
|
);
|
|
185
176
|
};
|
package/src/shared/constants.ts
CHANGED
|
@@ -48,6 +48,7 @@ const DEFAULT_RAW_GESTURE_VALUES = {
|
|
|
48
48
|
|
|
49
49
|
const DEFAULT_GESTURE_VALUES = {
|
|
50
50
|
...DEFAULT_RAW_GESTURE_VALUES,
|
|
51
|
+
velocity: 0,
|
|
51
52
|
focalX: 0,
|
|
52
53
|
focalY: 0,
|
|
53
54
|
raw: DEFAULT_RAW_GESTURE_VALUES,
|
|
@@ -180,12 +181,6 @@ export const FALSE = 0;
|
|
|
180
181
|
*/
|
|
181
182
|
export const EPSILON = 1e-5;
|
|
182
183
|
|
|
183
|
-
/**
|
|
184
|
-
* Threshold for snapping animations to target when "close enough" (1% of range).
|
|
185
|
-
* Prevents micro-jitter/oscillation near animation endpoints.
|
|
186
|
-
*/
|
|
187
|
-
export const ANIMATION_SNAP_THRESHOLD = 0.01;
|
|
188
|
-
|
|
189
184
|
/**
|
|
190
185
|
* Number of consecutive frames progress must remain near its target before it
|
|
191
186
|
* is treated as logically settled.
|
package/src/shared/index.ts
CHANGED
|
@@ -56,10 +56,7 @@ export type {
|
|
|
56
56
|
OverlayProps,
|
|
57
57
|
ScreenInterpolationProps,
|
|
58
58
|
ScreenStyleInterpolator,
|
|
59
|
-
ScreenTransitionAccessor,
|
|
60
59
|
ScreenTransitionConfig,
|
|
61
|
-
ScreenTransitionDepthTarget,
|
|
62
|
-
ScreenTransitionTarget,
|
|
63
60
|
TransitionInterpolatedStyle,
|
|
64
61
|
TransitionSlotStyle,
|
|
65
62
|
TransitionSpec,
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
|
|
2
|
+
import { setEntry } from "../../stores/bounds/internals/entries";
|
|
3
|
+
import { setDestination, setSource } from "../../stores/bounds/internals/links";
|
|
4
|
+
import type { ScreenPairKey } from "../../stores/bounds/types";
|
|
5
|
+
|
|
6
|
+
type LinkWrite =
|
|
7
|
+
| {
|
|
8
|
+
type: "source";
|
|
9
|
+
pairKey: ScreenPairKey;
|
|
10
|
+
}
|
|
11
|
+
| {
|
|
12
|
+
type: "destination";
|
|
13
|
+
pairKey: ScreenPairKey;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
type ApplyMeasuredBoundsWritesParams = {
|
|
17
|
+
entryTag: string;
|
|
18
|
+
linkId: string;
|
|
19
|
+
group?: string;
|
|
20
|
+
currentScreenKey: string;
|
|
21
|
+
measured: MeasuredDimensions;
|
|
22
|
+
preparedStyles: StyleProps;
|
|
23
|
+
linkWrite?: LinkWrite;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const applyMeasuredBoundsWrites = (
|
|
27
|
+
params: ApplyMeasuredBoundsWritesParams,
|
|
28
|
+
) => {
|
|
29
|
+
"worklet";
|
|
30
|
+
const {
|
|
31
|
+
entryTag,
|
|
32
|
+
linkId,
|
|
33
|
+
group,
|
|
34
|
+
currentScreenKey,
|
|
35
|
+
measured,
|
|
36
|
+
preparedStyles,
|
|
37
|
+
linkWrite,
|
|
38
|
+
} = params;
|
|
39
|
+
|
|
40
|
+
// Set the bounds entry on every measure to avoid any stale measurements
|
|
41
|
+
// for the public read API.
|
|
42
|
+
setEntry(entryTag, currentScreenKey, {
|
|
43
|
+
bounds: measured,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
if (linkWrite?.type === "source") {
|
|
47
|
+
setSource(
|
|
48
|
+
linkWrite.pairKey,
|
|
49
|
+
linkId,
|
|
50
|
+
currentScreenKey,
|
|
51
|
+
measured,
|
|
52
|
+
preparedStyles,
|
|
53
|
+
group,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (linkWrite?.type === "destination") {
|
|
58
|
+
setDestination(
|
|
59
|
+
linkWrite.pairKey,
|
|
60
|
+
linkId,
|
|
61
|
+
currentScreenKey,
|
|
62
|
+
measured,
|
|
63
|
+
preparedStyles,
|
|
64
|
+
group,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
@@ -11,25 +11,24 @@ import {
|
|
|
11
11
|
useSharedValue,
|
|
12
12
|
} from "react-native-reanimated";
|
|
13
13
|
import type { SharedValue } from "react-native-reanimated/lib/typescript/commonTypes";
|
|
14
|
-
import { applyMeasuredBoundsWrites } from "../components/create-boundary-component/helpers/apply-measured-bounds-writes";
|
|
15
14
|
import useStableCallback from "../hooks/use-stable-callback";
|
|
16
15
|
import useStableCallbackValue from "../hooks/use-stable-callback-value";
|
|
17
16
|
import { AnimationStore } from "../stores/animation.store";
|
|
18
|
-
import { getEntry } from "../stores/bounds/internals/entries";
|
|
19
17
|
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} from "../stores/bounds/internals/
|
|
18
|
+
createPendingPairKey,
|
|
19
|
+
createScreenPairKey,
|
|
20
|
+
} from "../stores/bounds/helpers/link-pairs.helpers";
|
|
21
|
+
import { getEntry } from "../stores/bounds/internals/entries";
|
|
22
|
+
import { getDestination, getSource } from "../stores/bounds/internals/links";
|
|
24
23
|
import { prepareStyleForBounds } from "../utils/bounds/helpers/styles/styles";
|
|
25
24
|
import createProvider from "../utils/create-provider";
|
|
25
|
+
import { applyMeasuredBoundsWrites } from "./helpers/measured-bounds-writes";
|
|
26
26
|
import { useDescriptorDerivations, useDescriptors } from "./screen/descriptors";
|
|
27
27
|
|
|
28
28
|
interface MaybeMeasureAndStoreParams {
|
|
29
29
|
onPress?: ((...args: unknown[]) => void) | undefined;
|
|
30
30
|
shouldSetSource?: boolean;
|
|
31
31
|
shouldSetDestination?: boolean;
|
|
32
|
-
shouldUpdateSource?: boolean;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
interface RegisterBoundsRenderProps {
|
|
@@ -208,48 +207,14 @@ const useParentSyncReaction = (params: {
|
|
|
208
207
|
);
|
|
209
208
|
};
|
|
210
209
|
|
|
211
|
-
const CloseRemeasureReactionEffect = (params: {
|
|
212
|
-
sharedBoundTag: string;
|
|
213
|
-
remeasureOnFocus: boolean;
|
|
214
|
-
nextClosing: SharedValue<number>;
|
|
215
|
-
maybeMeasureAndStore: (options: MaybeMeasureAndStoreParams) => void;
|
|
216
|
-
}) => {
|
|
217
|
-
const {
|
|
218
|
-
sharedBoundTag,
|
|
219
|
-
remeasureOnFocus,
|
|
220
|
-
nextClosing,
|
|
221
|
-
maybeMeasureAndStore,
|
|
222
|
-
} = params;
|
|
223
|
-
|
|
224
|
-
useAnimatedReaction(
|
|
225
|
-
() => nextClosing.get(),
|
|
226
|
-
(closing, prevClosing) => {
|
|
227
|
-
"worklet";
|
|
228
|
-
if (closing === 1 && (prevClosing === 0 || prevClosing === null)) {
|
|
229
|
-
maybeMeasureAndStore({ shouldUpdateSource: true });
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
[sharedBoundTag, remeasureOnFocus, nextClosing],
|
|
233
|
-
);
|
|
234
|
-
|
|
235
|
-
return null;
|
|
236
|
-
};
|
|
237
|
-
|
|
238
210
|
let useRegisterBoundsContext: () => RegisterBoundsContextValue | null;
|
|
239
211
|
|
|
240
212
|
const registerBoundsBundle = createProvider("RegisterBounds", {
|
|
241
213
|
guarded: false,
|
|
242
214
|
})<RegisterBoundsProviderProps, RegisterBoundsContextValue>(
|
|
243
|
-
({
|
|
244
|
-
style,
|
|
245
|
-
onPress,
|
|
246
|
-
sharedBoundTag,
|
|
247
|
-
animatedRef,
|
|
248
|
-
remeasureOnFocus,
|
|
249
|
-
children,
|
|
250
|
-
}) => {
|
|
215
|
+
({ style, onPress, sharedBoundTag, animatedRef, children }) => {
|
|
251
216
|
const { current, next } = useDescriptors();
|
|
252
|
-
const { ancestorKeys } = useDescriptorDerivations();
|
|
217
|
+
const { ancestorKeys, previousScreenKey } = useDescriptorDerivations();
|
|
253
218
|
const currentScreenKey = current.route.key;
|
|
254
219
|
const selectedNextRouteId = getRouteParamId(next?.route);
|
|
255
220
|
|
|
@@ -277,7 +242,6 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
|
|
|
277
242
|
onPress,
|
|
278
243
|
shouldSetSource,
|
|
279
244
|
shouldSetDestination,
|
|
280
|
-
shouldUpdateSource,
|
|
281
245
|
}: MaybeMeasureAndStoreParams = {}) => {
|
|
282
246
|
"worklet";
|
|
283
247
|
if (!sharedBoundTag) {
|
|
@@ -285,15 +249,27 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
|
|
|
285
249
|
return;
|
|
286
250
|
}
|
|
287
251
|
|
|
252
|
+
const sourcePairKey = createPendingPairKey(currentScreenKey);
|
|
253
|
+
const destinationPairKey = previousScreenKey
|
|
254
|
+
? createScreenPairKey(previousScreenKey, currentScreenKey)
|
|
255
|
+
: undefined;
|
|
256
|
+
const pendingSourcePairKey = previousScreenKey
|
|
257
|
+
? createPendingPairKey(previousScreenKey)
|
|
258
|
+
: undefined;
|
|
259
|
+
|
|
288
260
|
if (shouldSetSource && isAnimating.get()) {
|
|
289
261
|
const existing = getEntry(sharedBoundTag, currentScreenKey);
|
|
290
262
|
if (existing?.bounds) {
|
|
291
263
|
applyMeasuredBoundsWrites({
|
|
292
|
-
sharedBoundTag,
|
|
264
|
+
entryTag: sharedBoundTag,
|
|
265
|
+
linkId: sharedBoundTag,
|
|
293
266
|
currentScreenKey,
|
|
294
267
|
measured: existing.bounds,
|
|
295
268
|
preparedStyles,
|
|
296
|
-
|
|
269
|
+
linkWrite: {
|
|
270
|
+
type: "source",
|
|
271
|
+
pairKey: sourcePairKey,
|
|
272
|
+
},
|
|
297
273
|
});
|
|
298
274
|
}
|
|
299
275
|
|
|
@@ -301,31 +277,30 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
|
|
|
301
277
|
return;
|
|
302
278
|
}
|
|
303
279
|
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
280
|
+
const hasPendingSource = pendingSourcePairKey
|
|
281
|
+
? getSource(pendingSourcePairKey, sharedBoundTag) !== null
|
|
282
|
+
: false;
|
|
283
|
+
const hasSource =
|
|
284
|
+
getSource(sourcePairKey, sharedBoundTag) !== null ||
|
|
285
|
+
(destinationPairKey
|
|
286
|
+
? getSource(destinationPairKey, sharedBoundTag) !== null
|
|
287
|
+
: false);
|
|
288
|
+
const hasDestination = destinationPairKey
|
|
289
|
+
? getDestination(destinationPairKey, sharedBoundTag) !== null
|
|
290
|
+
: false;
|
|
310
291
|
|
|
311
292
|
const wantsSetSource = !!shouldSetSource;
|
|
312
293
|
const wantsSetDestination = !!shouldSetDestination;
|
|
313
|
-
const
|
|
314
|
-
const wantsSnapshotOnly =
|
|
315
|
-
!wantsSetSource && !wantsSetDestination && !wantsUpdateSource;
|
|
294
|
+
const wantsSnapshotOnly = !wantsSetSource && !wantsSetDestination;
|
|
316
295
|
|
|
317
296
|
const canSetSource = wantsSetSource;
|
|
318
|
-
const canSetDestination =
|
|
319
|
-
|
|
297
|
+
const canSetDestination =
|
|
298
|
+
wantsSetDestination && (hasPendingSource || hasSource);
|
|
320
299
|
const canSnapshotOnly =
|
|
321
|
-
wantsSnapshotOnly &&
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
!canSetDestination &&
|
|
326
|
-
!canUpdateSource &&
|
|
327
|
-
!canSnapshotOnly
|
|
328
|
-
) {
|
|
300
|
+
wantsSnapshotOnly &&
|
|
301
|
+
(hasPendingSource || hasSource || hasDestination);
|
|
302
|
+
|
|
303
|
+
if (!canSetSource && !canSetDestination && !canSnapshotOnly) {
|
|
329
304
|
if (onPress) runOnJS(onPress)();
|
|
330
305
|
return;
|
|
331
306
|
}
|
|
@@ -339,15 +314,38 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
|
|
|
339
314
|
emitUpdate();
|
|
340
315
|
|
|
341
316
|
applyMeasuredBoundsWrites({
|
|
342
|
-
sharedBoundTag,
|
|
317
|
+
entryTag: sharedBoundTag,
|
|
318
|
+
linkId: sharedBoundTag,
|
|
343
319
|
currentScreenKey,
|
|
344
320
|
measured,
|
|
345
321
|
preparedStyles,
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
322
|
+
linkWrite: canSetSource
|
|
323
|
+
? {
|
|
324
|
+
type: "source",
|
|
325
|
+
pairKey: sourcePairKey,
|
|
326
|
+
}
|
|
327
|
+
: canSetDestination && destinationPairKey
|
|
328
|
+
? {
|
|
329
|
+
type: "destination",
|
|
330
|
+
pairKey: destinationPairKey,
|
|
331
|
+
}
|
|
332
|
+
: undefined,
|
|
349
333
|
});
|
|
350
334
|
|
|
335
|
+
if (canSetSource && canSetDestination && destinationPairKey) {
|
|
336
|
+
applyMeasuredBoundsWrites({
|
|
337
|
+
entryTag: sharedBoundTag,
|
|
338
|
+
linkId: sharedBoundTag,
|
|
339
|
+
currentScreenKey,
|
|
340
|
+
measured,
|
|
341
|
+
preparedStyles,
|
|
342
|
+
linkWrite: {
|
|
343
|
+
type: "destination",
|
|
344
|
+
pairKey: destinationPairKey,
|
|
345
|
+
},
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
|
|
351
349
|
if (onPress) runOnJS(onPress)();
|
|
352
350
|
},
|
|
353
351
|
);
|
|
@@ -368,15 +366,6 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
|
|
|
368
366
|
ancestorKeys,
|
|
369
367
|
});
|
|
370
368
|
|
|
371
|
-
// Re-measure source bounds when the destination screen (next in stack)
|
|
372
|
-
// starts closing. This fires at the instant the back animation begins,
|
|
373
|
-
// unlike useFocusEffect which fires too late (after the screen is removed
|
|
374
|
-
// from state).
|
|
375
|
-
const nextScreenKey = next?.route.key;
|
|
376
|
-
const nextClosing = nextScreenKey
|
|
377
|
-
? AnimationStore.getValue(nextScreenKey, "closing")
|
|
378
|
-
: null;
|
|
379
|
-
|
|
380
369
|
useParentSyncReaction({ parentContext, maybeMeasureAndStore });
|
|
381
370
|
|
|
382
371
|
const captureActiveOnPress = useStableCallback(() => {
|
|
@@ -390,19 +379,7 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
|
|
|
390
379
|
|
|
391
380
|
return {
|
|
392
381
|
value: { updateSignal },
|
|
393
|
-
children: (
|
|
394
|
-
<>
|
|
395
|
-
{sharedBoundTag && remeasureOnFocus && nextClosing ? (
|
|
396
|
-
<CloseRemeasureReactionEffect
|
|
397
|
-
sharedBoundTag={sharedBoundTag}
|
|
398
|
-
remeasureOnFocus={remeasureOnFocus}
|
|
399
|
-
nextClosing={nextClosing}
|
|
400
|
-
maybeMeasureAndStore={maybeMeasureAndStore}
|
|
401
|
-
/>
|
|
402
|
-
) : null}
|
|
403
|
-
{children({ handleInitialLayout, captureActiveOnPress })}
|
|
404
|
-
</>
|
|
405
|
-
),
|
|
382
|
+
children: <>{children({ handleInitialLayout, captureActiveOnPress })}</>,
|
|
406
383
|
};
|
|
407
384
|
},
|
|
408
385
|
);
|
package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts
CHANGED
|
@@ -72,20 +72,6 @@ export const createTransitionAccessor = (
|
|
|
72
72
|
return {
|
|
73
73
|
...frame,
|
|
74
74
|
bounds: source.boundsAccessor,
|
|
75
|
-
transition: (target?: ScreenTransitionTarget) => {
|
|
76
|
-
"worklet";
|
|
77
|
-
const targetIndex = resolveTargetIndex(
|
|
78
|
-
target,
|
|
79
|
-
sourceIndex,
|
|
80
|
-
currentSources.length,
|
|
81
|
-
);
|
|
82
|
-
|
|
83
|
-
if (targetIndex === -1) {
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return buildScope(targetIndex);
|
|
88
|
-
},
|
|
89
75
|
};
|
|
90
76
|
};
|
|
91
77
|
|
|
@@ -18,8 +18,6 @@ import {
|
|
|
18
18
|
} from "./snap-points";
|
|
19
19
|
import type { BuiltState } from "./types";
|
|
20
20
|
|
|
21
|
-
export { computeLogicallySettled } from "./settle";
|
|
22
|
-
|
|
23
21
|
const LOGICAL_SETTLE_STICKY_PROGRESS_THRESHOLD =
|
|
24
22
|
LOGICAL_SETTLE_PROGRESS_THRESHOLD * 10;
|
|
25
23
|
|
|
@@ -38,6 +36,7 @@ export const hydrateTransitionState = (
|
|
|
38
36
|
out.gesture.y = s.gesture.y.get();
|
|
39
37
|
out.gesture.normX = s.gesture.normX.get();
|
|
40
38
|
out.gesture.normY = s.gesture.normY.get();
|
|
39
|
+
out.gesture.velocity = s.gesture.velocity.get();
|
|
41
40
|
out.gesture.scale = s.gesture.scale.get();
|
|
42
41
|
out.gesture.normScale = s.gesture.normScale.get();
|
|
43
42
|
out.gesture.focalX = s.gesture.focalX.get();
|
|
@@ -20,10 +20,7 @@ import { hydrateTransitionState } from "./hydrate-transition-state";
|
|
|
20
20
|
import type { SelectedInterpolatorOptions } from "./selected-interpolator-options";
|
|
21
21
|
import { useBuildTransitionState } from "./use-build-transition-state";
|
|
22
22
|
|
|
23
|
-
export type ScreenInterpolatorFrame = Omit<
|
|
24
|
-
ScreenInterpolationProps,
|
|
25
|
-
"bounds" | "transition"
|
|
26
|
-
>;
|
|
23
|
+
export type ScreenInterpolatorFrame = Omit<ScreenInterpolationProps, "bounds">;
|
|
27
24
|
|
|
28
25
|
interface ScreenAnimationPipeline {
|
|
29
26
|
screenInterpolatorProps: SharedValue<ScreenInterpolatorFrame>;
|