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
|
@@ -1,194 +1,37 @@
|
|
|
1
|
-
import { interpolate
|
|
2
|
-
import {
|
|
3
|
-
EPSILON,
|
|
4
|
-
NAVIGATION_MASK_ELEMENT_STYLE_ID,
|
|
5
|
-
} from "../../../../constants";
|
|
1
|
+
import { interpolate } from "react-native-reanimated";
|
|
2
|
+
import { NAVIGATION_MASK_ELEMENT_STYLE_ID } from "../../../../constants";
|
|
6
3
|
import { createLinkAccessor } from "../../helpers/create-link-accessor";
|
|
7
|
-
import { computeContentTransformGeometry } from "../../helpers/geometry";
|
|
8
4
|
import { getSourceBorderRadius } from "../helpers";
|
|
9
|
-
import { combineScales, resolveDirectionalDragScale } from "../math";
|
|
10
5
|
import {
|
|
11
6
|
CLOSE_SOURCE_HANDOFF_PROGRESS,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
CONTENT_CLOSING_OPACITY_OUTPUT,
|
|
8
|
+
CONTENT_CLOSING_OPACITY_RANGE,
|
|
9
|
+
CONTENT_ENTERING_OPACITY_OUTPUT,
|
|
10
|
+
CONTENT_ENTERING_OPACITY_RANGE,
|
|
11
|
+
CONTENT_SHADOW_OPACITY_OUTPUT,
|
|
16
12
|
DRAG_MASK_HEIGHT_COLLAPSE_END,
|
|
17
13
|
HORIZONTAL_DRAG_MASK_COLLAPSE_SCALE,
|
|
14
|
+
IDENTITY_DRAG_SCALE_OUTPUT,
|
|
18
15
|
REVEAL_BORDER_RADIUS,
|
|
16
|
+
REVEAL_SHADOW_OFFSET,
|
|
17
|
+
REVEAL_USES_TRANSFORM_MASK,
|
|
18
|
+
UNFOCUSED_ELEMENT_OPACITY_OUTPUT,
|
|
19
|
+
ZERO_TO_ONE_RANGE,
|
|
19
20
|
} from "./config";
|
|
20
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
interpolateClamped,
|
|
23
|
+
mixUnit,
|
|
24
|
+
resolveDismissScaleHandoff,
|
|
25
|
+
resolveRevealContentBaseTransform,
|
|
26
|
+
resolveRevealDirectionalDragScale,
|
|
27
|
+
resolveRevealGestureHandoff,
|
|
28
|
+
resolveSafeScale,
|
|
29
|
+
resolveTrackedSourceElementTransform,
|
|
30
|
+
resolveUniformScale,
|
|
31
|
+
resolveUnitDragTranslation,
|
|
32
|
+
} from "./math";
|
|
21
33
|
import type { BuildRevealStylesParams, RevealInterpolatedStyle } from "./types";
|
|
22
34
|
|
|
23
|
-
const IDENTITY_DRAG_SCALE_OUTPUT = [1, 1] as const;
|
|
24
|
-
|
|
25
|
-
function resolveUniformScale({
|
|
26
|
-
sourceWidth,
|
|
27
|
-
sourceHeight,
|
|
28
|
-
destinationWidth,
|
|
29
|
-
destinationHeight,
|
|
30
|
-
}: {
|
|
31
|
-
sourceWidth: number;
|
|
32
|
-
sourceHeight: number;
|
|
33
|
-
destinationWidth: number;
|
|
34
|
-
destinationHeight: number;
|
|
35
|
-
}) {
|
|
36
|
-
"worklet";
|
|
37
|
-
|
|
38
|
-
const sx = sourceWidth / destinationWidth;
|
|
39
|
-
const sy = sourceHeight / destinationHeight;
|
|
40
|
-
|
|
41
|
-
const sourceAspect = sourceWidth / sourceHeight;
|
|
42
|
-
const destinationAspect = destinationWidth / destinationHeight;
|
|
43
|
-
const aspectDifference = Math.abs(sourceAspect - destinationAspect);
|
|
44
|
-
|
|
45
|
-
return aspectDifference < 0.1 ? Math.max(sx, sy) : Math.min(sx, sy);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function resolveRevealGestureHandoff(rawDrag: number) {
|
|
49
|
-
"worklet";
|
|
50
|
-
|
|
51
|
-
const gestureSensitivity = interpolate(rawDrag, [0, 1], [0.8, 0.1], "clamp");
|
|
52
|
-
|
|
53
|
-
const releaseBoost = interpolate(rawDrag, [0, 1], [1, 1.4], "clamp");
|
|
54
|
-
|
|
55
|
-
const releaseSensitivity = interpolate(
|
|
56
|
-
gestureSensitivity,
|
|
57
|
-
[0.28, 0.9],
|
|
58
|
-
[0.7, 1],
|
|
59
|
-
"clamp",
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
return {
|
|
63
|
-
gestureSensitivity,
|
|
64
|
-
gestureReleaseVelocityScale: releaseBoost * releaseSensitivity,
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function resolveDismissScaleHandoff({
|
|
69
|
-
progress,
|
|
70
|
-
releaseScale,
|
|
71
|
-
targetScale,
|
|
72
|
-
rawDrag,
|
|
73
|
-
}: {
|
|
74
|
-
progress: number;
|
|
75
|
-
releaseScale: number;
|
|
76
|
-
targetScale: number;
|
|
77
|
-
rawDrag: number;
|
|
78
|
-
}) {
|
|
79
|
-
"worklet";
|
|
80
|
-
|
|
81
|
-
const closeProgress = 1 - progress;
|
|
82
|
-
const scaleProgress = Math.sin((Math.PI / 2) * closeProgress);
|
|
83
|
-
const baseScale = releaseScale + (targetScale - releaseScale) * scaleProgress;
|
|
84
|
-
const orbitDepth = interpolate(
|
|
85
|
-
rawDrag,
|
|
86
|
-
[0, 1],
|
|
87
|
-
[0, DISMISS_SCALE_ORBIT_DEPTH],
|
|
88
|
-
"clamp",
|
|
89
|
-
);
|
|
90
|
-
const orbitScale = 1 - orbitDepth * Math.sin(Math.PI * closeProgress);
|
|
91
|
-
|
|
92
|
-
return baseScale * orbitScale;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function getBoundsCenterX(bounds: MeasuredDimensions) {
|
|
96
|
-
"worklet";
|
|
97
|
-
return bounds.pageX + bounds.width / 2;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function getBoundsCenterY(bounds: MeasuredDimensions) {
|
|
101
|
-
"worklet";
|
|
102
|
-
return bounds.pageY + bounds.height / 2;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function resolveRevealContentBaseTransform({
|
|
106
|
-
progress,
|
|
107
|
-
sourceBounds,
|
|
108
|
-
destinationBounds,
|
|
109
|
-
screenLayout,
|
|
110
|
-
}: {
|
|
111
|
-
progress: number;
|
|
112
|
-
sourceBounds: MeasuredDimensions;
|
|
113
|
-
destinationBounds: MeasuredDimensions;
|
|
114
|
-
screenLayout: BuildRevealStylesParams["props"]["layouts"]["screen"];
|
|
115
|
-
}) {
|
|
116
|
-
"worklet";
|
|
117
|
-
|
|
118
|
-
const geometry = computeContentTransformGeometry({
|
|
119
|
-
start: sourceBounds,
|
|
120
|
-
end: destinationBounds,
|
|
121
|
-
entering: true,
|
|
122
|
-
dimensions: screenLayout,
|
|
123
|
-
scaleMode: "uniform",
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
return {
|
|
127
|
-
translateX: interpolate(progress, [0, 1], [geometry.tx, 0], "clamp"),
|
|
128
|
-
translateY: interpolate(progress, [0, 1], [geometry.ty, 0], "clamp"),
|
|
129
|
-
scale: interpolate(progress, [0, 1], [geometry.s, 1], "clamp"),
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
function resolveTrackedSourceElementTransform({
|
|
134
|
-
sourceBounds,
|
|
135
|
-
destinationBounds,
|
|
136
|
-
contentTranslateX,
|
|
137
|
-
contentTranslateY,
|
|
138
|
-
contentScale,
|
|
139
|
-
parentScale,
|
|
140
|
-
screenWidth,
|
|
141
|
-
screenHeight,
|
|
142
|
-
}: {
|
|
143
|
-
sourceBounds: MeasuredDimensions;
|
|
144
|
-
destinationBounds: MeasuredDimensions;
|
|
145
|
-
contentTranslateX: number;
|
|
146
|
-
contentTranslateY: number;
|
|
147
|
-
contentScale: number;
|
|
148
|
-
parentScale: number;
|
|
149
|
-
screenWidth: number;
|
|
150
|
-
screenHeight: number;
|
|
151
|
-
}) {
|
|
152
|
-
"worklet";
|
|
153
|
-
|
|
154
|
-
const screenCenterX = screenWidth / 2;
|
|
155
|
-
const screenCenterY = screenHeight / 2;
|
|
156
|
-
const safeParentScale = Math.max(Math.abs(parentScale), EPSILON);
|
|
157
|
-
const safeSourceWidth = Math.max(Math.abs(sourceBounds.width), EPSILON);
|
|
158
|
-
const safeSourceHeight = Math.max(Math.abs(sourceBounds.height), EPSILON);
|
|
159
|
-
|
|
160
|
-
const sourceCenterX = getBoundsCenterX(sourceBounds);
|
|
161
|
-
const sourceCenterY = getBoundsCenterY(sourceBounds);
|
|
162
|
-
const destinationCenterX = getBoundsCenterX(destinationBounds);
|
|
163
|
-
const destinationCenterY = getBoundsCenterY(destinationBounds);
|
|
164
|
-
|
|
165
|
-
const trackedCenterX =
|
|
166
|
-
screenCenterX +
|
|
167
|
-
(destinationCenterX - screenCenterX) * contentScale +
|
|
168
|
-
contentTranslateX;
|
|
169
|
-
const trackedCenterY =
|
|
170
|
-
screenCenterY +
|
|
171
|
-
(destinationCenterY - screenCenterY) * contentScale +
|
|
172
|
-
contentTranslateY;
|
|
173
|
-
|
|
174
|
-
return {
|
|
175
|
-
translateX:
|
|
176
|
-
(trackedCenterX - screenCenterX) / safeParentScale +
|
|
177
|
-
screenCenterX -
|
|
178
|
-
sourceCenterX,
|
|
179
|
-
translateY:
|
|
180
|
-
(trackedCenterY - screenCenterY) / safeParentScale +
|
|
181
|
-
screenCenterY -
|
|
182
|
-
sourceCenterY,
|
|
183
|
-
scaleX:
|
|
184
|
-
(destinationBounds.width * contentScale) /
|
|
185
|
-
(safeSourceWidth * safeParentScale),
|
|
186
|
-
scaleY:
|
|
187
|
-
(destinationBounds.height * contentScale) /
|
|
188
|
-
(safeSourceHeight * safeParentScale),
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
|
|
192
35
|
/* -------------------------------------------------------------------------- */
|
|
193
36
|
/* BUILD REVEAL STYLES */
|
|
194
37
|
/* -------------------------------------------------------------------------- */
|
|
@@ -211,11 +54,6 @@ export function buildRevealStyles({
|
|
|
211
54
|
layouts: { screen: screenLayout },
|
|
212
55
|
} = props;
|
|
213
56
|
|
|
214
|
-
const baseRawOptions = {
|
|
215
|
-
raw: true,
|
|
216
|
-
scaleMode: "uniform",
|
|
217
|
-
} as const;
|
|
218
|
-
|
|
219
57
|
const boundsAccessor = createLinkAccessor(() => props);
|
|
220
58
|
const link = boundsAccessor.getLink(tag);
|
|
221
59
|
|
|
@@ -230,8 +68,10 @@ export function buildRevealStyles({
|
|
|
230
68
|
const initialGesture =
|
|
231
69
|
props.active.gesture.active ?? props.active.gesture.direction;
|
|
232
70
|
|
|
233
|
-
const isHorizontalDismiss =
|
|
234
|
-
|
|
71
|
+
const isHorizontalDismiss =
|
|
72
|
+
initialGesture === "horizontal" || initialGesture === "horizontal-inverted";
|
|
73
|
+
const isVerticalDismiss =
|
|
74
|
+
initialGesture === "vertical" || initialGesture === "vertical-inverted";
|
|
235
75
|
|
|
236
76
|
const rawDrag = isHorizontalDismiss
|
|
237
77
|
? Math.abs(props.active.gesture.raw.normX)
|
|
@@ -239,45 +79,31 @@ export function buildRevealStyles({
|
|
|
239
79
|
? Math.abs(props.active.gesture.raw.normY)
|
|
240
80
|
: 0;
|
|
241
81
|
|
|
242
|
-
const dragX =
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
positiveMax: 1,
|
|
247
|
-
exponent: 1,
|
|
248
|
-
});
|
|
82
|
+
const dragX =
|
|
83
|
+
props.active.gesture.x === 0
|
|
84
|
+
? 0
|
|
85
|
+
: resolveUnitDragTranslation(props.active.gesture.x, screenLayout.width);
|
|
249
86
|
|
|
250
|
-
const dragY =
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
positiveMax: 1,
|
|
255
|
-
exponent: 1,
|
|
256
|
-
});
|
|
87
|
+
const dragY =
|
|
88
|
+
props.active.gesture.y === 0
|
|
89
|
+
? 0
|
|
90
|
+
: resolveUnitDragTranslation(props.active.gesture.y, screenLayout.height);
|
|
257
91
|
|
|
258
92
|
const dragXScale = isHorizontalDismiss
|
|
259
|
-
?
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
shrinkMin: DRAG_DIRECTIONAL_SCALE_MIN,
|
|
264
|
-
growMax: DRAG_DIRECTIONAL_SCALE_MAX,
|
|
265
|
-
exponent: DRAG_DIRECTIONAL_SCALE_EXPONENT,
|
|
266
|
-
})
|
|
93
|
+
? resolveRevealDirectionalDragScale(
|
|
94
|
+
props.active.gesture.normX,
|
|
95
|
+
initialGesture === "horizontal-inverted",
|
|
96
|
+
)
|
|
267
97
|
: IDENTITY_DRAG_SCALE_OUTPUT[0];
|
|
268
98
|
|
|
269
99
|
const dragYScale = isVerticalDismiss
|
|
270
|
-
?
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
shrinkMin: DRAG_DIRECTIONAL_SCALE_MIN,
|
|
275
|
-
growMax: DRAG_DIRECTIONAL_SCALE_MAX,
|
|
276
|
-
exponent: DRAG_DIRECTIONAL_SCALE_EXPONENT,
|
|
277
|
-
})
|
|
100
|
+
? resolveRevealDirectionalDragScale(
|
|
101
|
+
props.active.gesture.normY,
|
|
102
|
+
initialGesture === "vertical-inverted",
|
|
103
|
+
)
|
|
278
104
|
: IDENTITY_DRAG_SCALE_OUTPUT[1];
|
|
279
105
|
|
|
280
|
-
const dragScale =
|
|
106
|
+
const dragScale = dragXScale * dragYScale;
|
|
281
107
|
|
|
282
108
|
const initialDestinationTarget =
|
|
283
109
|
props.active.closing && link.initialDestination?.bounds
|
|
@@ -288,52 +114,53 @@ export function buildRevealStyles({
|
|
|
288
114
|
|
|
289
115
|
if (focused) {
|
|
290
116
|
const contentRaw = link.compute({
|
|
291
|
-
|
|
117
|
+
raw: true,
|
|
118
|
+
scaleMode: "uniform",
|
|
292
119
|
method: "content",
|
|
293
120
|
target: initialDestinationTarget,
|
|
294
|
-
});
|
|
121
|
+
} as const);
|
|
295
122
|
|
|
296
123
|
const maskRaw = link.compute({
|
|
297
|
-
|
|
124
|
+
raw: true,
|
|
125
|
+
scaleMode: "uniform",
|
|
298
126
|
method: "size",
|
|
299
127
|
space: "absolute",
|
|
300
128
|
target: "fullscreen",
|
|
301
|
-
});
|
|
129
|
+
} as const);
|
|
302
130
|
|
|
303
|
-
const maskBorderRadius =
|
|
131
|
+
const maskBorderRadius = mixUnit(
|
|
132
|
+
sourceBorderRadius,
|
|
133
|
+
REVEAL_BORDER_RADIUS,
|
|
304
134
|
progress,
|
|
305
|
-
[0, 1],
|
|
306
|
-
[sourceBorderRadius, REVEAL_BORDER_RADIUS],
|
|
307
|
-
"clamp",
|
|
308
135
|
);
|
|
309
136
|
|
|
310
137
|
const maskSizeMultiplier = props.active.closing
|
|
311
|
-
?
|
|
138
|
+
? mixUnit(0.9, 1, props.active.progress)
|
|
312
139
|
: 1;
|
|
313
140
|
|
|
314
141
|
const maskWidth = Math.max(1, maskRaw.width * maskSizeMultiplier);
|
|
315
142
|
const maskHeight = Math.max(1, maskRaw.height * maskSizeMultiplier);
|
|
316
143
|
|
|
317
144
|
const contentBaseScale = contentRaw.scale;
|
|
318
|
-
const
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
145
|
+
const safeContentBaseScale = resolveSafeScale(contentBaseScale);
|
|
146
|
+
|
|
147
|
+
let contentScale = contentBaseScale * dragScale;
|
|
148
|
+
if (props.active.gesture.dismissing) {
|
|
149
|
+
const contentTargetBounds =
|
|
150
|
+
initialDestinationTarget ?? link.destination.bounds;
|
|
151
|
+
const sourceContentScale = resolveUniformScale({
|
|
152
|
+
sourceWidth: link.source.bounds.width,
|
|
153
|
+
sourceHeight: link.source.bounds.height,
|
|
154
|
+
destinationWidth: contentTargetBounds.width,
|
|
155
|
+
destinationHeight: contentTargetBounds.height,
|
|
156
|
+
});
|
|
157
|
+
contentScale = resolveDismissScaleHandoff({
|
|
158
|
+
progress: props.active.progress,
|
|
159
|
+
releaseScale: dragScale,
|
|
160
|
+
targetScale: sourceContentScale,
|
|
161
|
+
velocity: props.active.gesture.velocity,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
337
164
|
const contentTranslateX = contentRaw.translateX + dragX;
|
|
338
165
|
const contentTranslateY = contentRaw.translateY + dragY;
|
|
339
166
|
|
|
@@ -368,11 +195,12 @@ export function buildRevealStyles({
|
|
|
368
195
|
Math.max(maskWidth, link.source.bounds.height),
|
|
369
196
|
);
|
|
370
197
|
|
|
371
|
-
const renderedMaskHeight =
|
|
198
|
+
const renderedMaskHeight = interpolateClamped(
|
|
372
199
|
maskHeightCollapseDrag,
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
200
|
+
0,
|
|
201
|
+
DRAG_MASK_HEIGHT_COLLAPSE_END,
|
|
202
|
+
maskHeight,
|
|
203
|
+
minMaskHeight,
|
|
376
204
|
);
|
|
377
205
|
|
|
378
206
|
const maskCenterX = maskWidth / 2;
|
|
@@ -406,6 +234,38 @@ export function buildRevealStyles({
|
|
|
406
234
|
safeContentBaseScale;
|
|
407
235
|
|
|
408
236
|
const compensatedMaskScale = 1 / safeContentBaseScale;
|
|
237
|
+
const maskBaseWidth = Math.max(1, screenLayout.width);
|
|
238
|
+
const maskBaseHeight = Math.max(1, screenLayout.height);
|
|
239
|
+
const maskScaleX = maskWidth / maskBaseWidth;
|
|
240
|
+
const maskScaleY = renderedMaskHeight / maskBaseHeight;
|
|
241
|
+
const transformMaskTranslateX =
|
|
242
|
+
compensatedMaskTranslateX + (maskWidth - maskBaseWidth) / 2;
|
|
243
|
+
const transformMaskTranslateY =
|
|
244
|
+
compensatedMaskTranslateY + (renderedMaskHeight - maskBaseHeight) / 2;
|
|
245
|
+
const maskElementStyle = REVEAL_USES_TRANSFORM_MASK
|
|
246
|
+
? {
|
|
247
|
+
width: maskBaseWidth,
|
|
248
|
+
height: maskBaseHeight,
|
|
249
|
+
borderRadius: props.active.settled ? 0 : maskBorderRadius,
|
|
250
|
+
borderCurve: "continuous" as const,
|
|
251
|
+
transform: [
|
|
252
|
+
{ translateX: transformMaskTranslateX },
|
|
253
|
+
{ translateY: transformMaskTranslateY },
|
|
254
|
+
{ scaleX: maskScaleX * compensatedMaskScale },
|
|
255
|
+
{ scaleY: maskScaleY * compensatedMaskScale },
|
|
256
|
+
],
|
|
257
|
+
}
|
|
258
|
+
: {
|
|
259
|
+
width: maskWidth,
|
|
260
|
+
height: renderedMaskHeight,
|
|
261
|
+
borderRadius: props.active.settled ? 0 : maskBorderRadius,
|
|
262
|
+
borderCurve: "continuous" as const,
|
|
263
|
+
transform: [
|
|
264
|
+
{ translateX: compensatedMaskTranslateX },
|
|
265
|
+
{ translateY: compensatedMaskTranslateY },
|
|
266
|
+
{ scale: compensatedMaskScale },
|
|
267
|
+
],
|
|
268
|
+
};
|
|
409
269
|
|
|
410
270
|
const elementOffsetX = initialDestinationTarget
|
|
411
271
|
? initialDestinationTarget.pageX - link.destination.bounds.pageX
|
|
@@ -416,19 +276,21 @@ export function buildRevealStyles({
|
|
|
416
276
|
: 0;
|
|
417
277
|
|
|
418
278
|
const elementTX = props.active.closing
|
|
419
|
-
?
|
|
279
|
+
? interpolateClamped(
|
|
420
280
|
props.active.progress,
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
281
|
+
CLOSE_SOURCE_HANDOFF_PROGRESS,
|
|
282
|
+
1,
|
|
283
|
+
elementOffsetX,
|
|
284
|
+
0,
|
|
424
285
|
)
|
|
425
286
|
: 0;
|
|
426
287
|
const elementY = props.active.closing
|
|
427
|
-
?
|
|
288
|
+
? interpolateClamped(
|
|
428
289
|
props.active.progress,
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
290
|
+
CLOSE_SOURCE_HANDOFF_PROGRESS,
|
|
291
|
+
1,
|
|
292
|
+
elementOffsetY,
|
|
293
|
+
0,
|
|
432
294
|
)
|
|
433
295
|
: 0;
|
|
434
296
|
|
|
@@ -449,35 +311,29 @@ export function buildRevealStyles({
|
|
|
449
311
|
{ scale: contentScale },
|
|
450
312
|
],
|
|
451
313
|
shadowColor: "#000",
|
|
452
|
-
shadowOffset:
|
|
453
|
-
shadowOpacity: interpolate(
|
|
314
|
+
shadowOffset: REVEAL_SHADOW_OFFSET,
|
|
315
|
+
shadowOpacity: interpolate(
|
|
316
|
+
props.active.progress,
|
|
317
|
+
ZERO_TO_ONE_RANGE,
|
|
318
|
+
CONTENT_SHADOW_OPACITY_OUTPUT,
|
|
319
|
+
),
|
|
454
320
|
shadowRadius: 32,
|
|
455
321
|
elevation: 5,
|
|
456
322
|
opacity: props.active.entering
|
|
457
323
|
? interpolate(
|
|
458
324
|
props.active.progress,
|
|
459
|
-
|
|
460
|
-
|
|
325
|
+
CONTENT_ENTERING_OPACITY_RANGE,
|
|
326
|
+
CONTENT_ENTERING_OPACITY_OUTPUT,
|
|
461
327
|
)
|
|
462
328
|
: interpolate(
|
|
463
329
|
props.active.progress,
|
|
464
|
-
|
|
465
|
-
|
|
330
|
+
CONTENT_CLOSING_OPACITY_RANGE,
|
|
331
|
+
CONTENT_CLOSING_OPACITY_OUTPUT,
|
|
466
332
|
),
|
|
467
333
|
},
|
|
468
334
|
},
|
|
469
335
|
[NAVIGATION_MASK_ELEMENT_STYLE_ID]: {
|
|
470
|
-
style:
|
|
471
|
-
width: maskWidth,
|
|
472
|
-
height: renderedMaskHeight,
|
|
473
|
-
borderRadius: props.active.settled ? 0 : maskBorderRadius,
|
|
474
|
-
borderCurve: "continuous",
|
|
475
|
-
transform: [
|
|
476
|
-
{ translateX: compensatedMaskTranslateX },
|
|
477
|
-
{ translateY: compensatedMaskTranslateY },
|
|
478
|
-
{ scale: compensatedMaskScale },
|
|
479
|
-
],
|
|
480
|
-
},
|
|
336
|
+
style: maskElementStyle,
|
|
481
337
|
},
|
|
482
338
|
[link.id]: {
|
|
483
339
|
style: {
|
|
@@ -491,12 +347,7 @@ export function buildRevealStyles({
|
|
|
491
347
|
|
|
492
348
|
/* ---------------------------- Unfocused Screen ---------------------------- */
|
|
493
349
|
|
|
494
|
-
const unfocusedScale =
|
|
495
|
-
props.active.progress,
|
|
496
|
-
[0, 1],
|
|
497
|
-
[1, 0.9375],
|
|
498
|
-
"clamp",
|
|
499
|
-
);
|
|
350
|
+
const unfocusedScale = mixUnit(1, 0.9375, props.active.progress);
|
|
500
351
|
const unfocusedContentScale = props.active.logicallySettled
|
|
501
352
|
? 1
|
|
502
353
|
: unfocusedScale;
|
|
@@ -510,20 +361,21 @@ export function buildRevealStyles({
|
|
|
510
361
|
destinationBounds: trackingContentTarget,
|
|
511
362
|
screenLayout,
|
|
512
363
|
});
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
364
|
+
let trackingContentScale = trackingContentBaseTransform.scale * dragScale;
|
|
365
|
+
if (props.active.gesture.dismissing) {
|
|
366
|
+
const trackingTargetScale = resolveUniformScale({
|
|
367
|
+
sourceWidth: link.source.bounds.width,
|
|
368
|
+
sourceHeight: link.source.bounds.height,
|
|
369
|
+
destinationWidth: trackingContentTarget.width,
|
|
370
|
+
destinationHeight: trackingContentTarget.height,
|
|
371
|
+
});
|
|
372
|
+
trackingContentScale = resolveDismissScaleHandoff({
|
|
373
|
+
progress: props.active.progress,
|
|
374
|
+
releaseScale: dragScale,
|
|
375
|
+
targetScale: trackingTargetScale,
|
|
376
|
+
velocity: props.active.gesture.velocity,
|
|
377
|
+
});
|
|
378
|
+
}
|
|
527
379
|
const trackingContentTranslateX =
|
|
528
380
|
trackingContentBaseTransform.translateX + dragX;
|
|
529
381
|
const trackingContentTranslateY =
|
|
@@ -558,7 +410,11 @@ export function buildRevealStyles({
|
|
|
558
410
|
style: {
|
|
559
411
|
opacity: props.active.closing
|
|
560
412
|
? 1
|
|
561
|
-
: interpolate(
|
|
413
|
+
: interpolate(
|
|
414
|
+
props.active.progress,
|
|
415
|
+
ZERO_TO_ONE_RANGE,
|
|
416
|
+
UNFOCUSED_ELEMENT_OPACITY_OUTPUT,
|
|
417
|
+
),
|
|
562
418
|
|
|
563
419
|
zIndex: 9999,
|
|
564
420
|
elevation: 9999,
|
|
@@ -6,10 +6,29 @@ export const REVEAL_BORDER_RADIUS = Platform.select({
|
|
|
6
6
|
default: 36,
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
+
export const REVEAL_USES_TRANSFORM_MASK = Platform.OS === "android";
|
|
10
|
+
|
|
9
11
|
export const DRAG_DIRECTIONAL_SCALE_MIN = 0.25;
|
|
10
12
|
export const DRAG_DIRECTIONAL_SCALE_MAX = 1.06;
|
|
11
13
|
export const DRAG_DIRECTIONAL_SCALE_EXPONENT = 2;
|
|
12
14
|
export const DRAG_MASK_HEIGHT_COLLAPSE_END = 0.7;
|
|
13
15
|
export const HORIZONTAL_DRAG_MASK_COLLAPSE_SCALE = 0.5;
|
|
14
|
-
export const DISMISS_SCALE_ORBIT_DEPTH = 0.
|
|
16
|
+
export const DISMISS_SCALE_ORBIT_DEPTH = 0.5;
|
|
15
17
|
export const CLOSE_SOURCE_HANDOFF_PROGRESS = 0.25;
|
|
18
|
+
|
|
19
|
+
export const IDENTITY_DRAG_SCALE_OUTPUT = [1, 1] as const;
|
|
20
|
+
export const ZERO_TO_ONE_RANGE = [0, 1] as const;
|
|
21
|
+
export const CONTENT_ENTERING_OPACITY_RANGE = [
|
|
22
|
+
0,
|
|
23
|
+
CLOSE_SOURCE_HANDOFF_PROGRESS,
|
|
24
|
+
] as const;
|
|
25
|
+
export const CONTENT_CLOSING_OPACITY_RANGE = [
|
|
26
|
+
0,
|
|
27
|
+
CLOSE_SOURCE_HANDOFF_PROGRESS,
|
|
28
|
+
1,
|
|
29
|
+
] as const;
|
|
30
|
+
export const CONTENT_ENTERING_OPACITY_OUTPUT = [0, 1] as const;
|
|
31
|
+
export const CONTENT_CLOSING_OPACITY_OUTPUT = [0, 1, 1] as const;
|
|
32
|
+
export const CONTENT_SHADOW_OPACITY_OUTPUT = [0, 0.25] as const;
|
|
33
|
+
export const UNFOCUSED_ELEMENT_OPACITY_OUTPUT = [1, 0] as const;
|
|
34
|
+
export const REVEAL_SHADOW_OFFSET = { width: 0, height: 2 } as const;
|