react-native-screen-transitions 3.6.0-alpha.1 → 3.6.0-alpha.3
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/components/screen-container/layers/content.js +11 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/constants.js +5 -12
- 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/build-screen-transition-options.js +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +26 -8
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +1 -2
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -4
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.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/options/helpers.js +3 -1
- package/lib/commonjs/shared/providers/screen/options/helpers.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/index.js +3 -2
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +120 -205
- 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 +175 -14
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +2 -2
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.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/components/screen-container/layers/content.js +13 -3
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/constants.js +4 -11
- 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/build-screen-transition-options.js +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +26 -3
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +1 -2
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -4
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.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/options/helpers.js +3 -1
- package/lib/module/shared/providers/screen/options/helpers.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/providers/stack/direct.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/managed.provider.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/bounds.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/index.js +3 -2
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js +120 -205
- 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 +163 -12
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js +2 -2
- package/lib/module/shared/utils/bounds/navigation/zoom/build.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/components/boundary-target.d.ts +4 -207
- package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.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 +2 -2
- 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/components/overlay/variations/overlay-host.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +2 -2
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +1 -6
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +3 -3
- 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/build-screen-transition-options.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts +1 -2
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/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/animation/helpers/selected-interpolator-options.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/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/options/helpers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/options/types.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/options/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.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/providers/stack/direct.provider.d.ts +1 -1
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/managed.provider.d.ts +1 -1
- package/lib/typescript/shared/providers/stack/managed.provider.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 +4 -19
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +69 -1
- package/lib/typescript/shared/types/bounds.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 +2 -2
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +4 -14
- package/lib/typescript/shared/types/screen.types.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/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts +1 -1
- 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 +58 -7
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/types.d.ts +2 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/types.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 +4 -3
- 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/components/screen-container/layers/content.tsx +21 -2
- package/src/shared/constants.ts +1 -9
- 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/build-screen-transition-options.ts +1 -0
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +49 -4
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/types.ts +1 -1
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +2 -5
- package/src/shared/providers/screen/animation/helpers/selected-interpolator-options.ts +1 -0
- package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +3 -12
- 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/options/helpers.ts +9 -0
- package/src/shared/providers/screen/options/types.ts +1 -0
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +0 -3
- package/src/shared/providers/stack/direct.provider.tsx +1 -1
- package/src/shared/providers/stack/managed.provider.tsx +1 -1
- 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 +4 -23
- package/src/shared/types/bounds.types.ts +72 -1
- package/src/shared/types/gesture.types.ts +8 -2
- package/src/shared/types/index.ts +1 -4
- package/src/shared/types/screen.types.ts +4 -14
- 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/index.ts +3 -1
- package/src/shared/utils/bounds/navigation/reveal/build.ts +198 -308
- package/src/shared/utils/bounds/navigation/reveal/config.ts +20 -1
- package/src/shared/utils/bounds/navigation/reveal/math.ts +264 -18
- package/src/shared/utils/bounds/navigation/reveal/types.ts +2 -0
- package/src/shared/utils/bounds/navigation/zoom/build.ts +2 -2
- 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,39 @@
|
|
|
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,
|
|
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,
|
|
12
12
|
DISMISS_SCALE_ORBIT_DEPTH,
|
|
13
|
-
DRAG_DIRECTIONAL_SCALE_EXPONENT,
|
|
14
|
-
DRAG_DIRECTIONAL_SCALE_MAX,
|
|
15
|
-
DRAG_DIRECTIONAL_SCALE_MIN,
|
|
16
13
|
DRAG_MASK_HEIGHT_COLLAPSE_END,
|
|
17
14
|
HORIZONTAL_DRAG_MASK_COLLAPSE_SCALE,
|
|
15
|
+
IDENTITY_DRAG_SCALE_OUTPUT,
|
|
18
16
|
REVEAL_BORDER_RADIUS,
|
|
17
|
+
REVEAL_SHADOW_OFFSET,
|
|
18
|
+
REVEAL_USES_TRANSFORM_MASK,
|
|
19
|
+
UNFOCUSED_ELEMENT_OPACITY_OUTPUT,
|
|
20
|
+
ZERO_TO_ONE_RANGE,
|
|
19
21
|
} from "./config";
|
|
20
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
interpolateClamped,
|
|
24
|
+
mixUnit,
|
|
25
|
+
resolveAspectRatioMaskHeight,
|
|
26
|
+
resolveDismissScaleHandoff,
|
|
27
|
+
resolveRevealContentBaseTransform,
|
|
28
|
+
resolveRevealDirectionalDragScale,
|
|
29
|
+
resolveRevealGestureHandoff,
|
|
30
|
+
resolveSafeScale,
|
|
31
|
+
resolveTrackedSourceElementTransform,
|
|
32
|
+
resolveUniformScale,
|
|
33
|
+
resolveUnitDragTranslation,
|
|
34
|
+
} from "./math";
|
|
21
35
|
import type { BuildRevealStylesParams, RevealInterpolatedStyle } from "./types";
|
|
22
36
|
|
|
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
37
|
/* -------------------------------------------------------------------------- */
|
|
193
38
|
/* BUILD REVEAL STYLES */
|
|
194
39
|
/* -------------------------------------------------------------------------- */
|
|
@@ -196,6 +41,7 @@ function resolveTrackedSourceElementTransform({
|
|
|
196
41
|
export function buildRevealStyles({
|
|
197
42
|
tag,
|
|
198
43
|
props,
|
|
44
|
+
revealOptions,
|
|
199
45
|
}: BuildRevealStylesParams): RevealInterpolatedStyle {
|
|
200
46
|
"worklet";
|
|
201
47
|
|
|
@@ -210,11 +56,19 @@ export function buildRevealStyles({
|
|
|
210
56
|
progress,
|
|
211
57
|
layouts: { screen: screenLayout },
|
|
212
58
|
} = props;
|
|
213
|
-
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
59
|
+
const borderRadius = revealOptions?.borderRadius ?? REVEAL_BORDER_RADIUS;
|
|
60
|
+
const borderContinuous = revealOptions?.borderContinuous ?? true;
|
|
61
|
+
const maxSensitivity = revealOptions?.maxSensitivity ?? 0.8;
|
|
62
|
+
const velocityDepth =
|
|
63
|
+
revealOptions?.velocityDepth ?? DISMISS_SCALE_ORBIT_DEPTH;
|
|
64
|
+
const gestureProgressMode = revealOptions?.gestureProgressMode ?? "freeform";
|
|
65
|
+
const disablePointerEventsTillElementTransition =
|
|
66
|
+
revealOptions?.disablePointerEventsTillElementTransition ?? true;
|
|
67
|
+
const maskSizingMode = revealOptions?.maskSizingMode ?? "auto";
|
|
68
|
+
const usesTransformMask =
|
|
69
|
+
maskSizingMode === "auto"
|
|
70
|
+
? REVEAL_USES_TRANSFORM_MASK
|
|
71
|
+
: maskSizingMode === "transform";
|
|
218
72
|
|
|
219
73
|
const boundsAccessor = createLinkAccessor(() => props);
|
|
220
74
|
const link = boundsAccessor.getLink(tag);
|
|
@@ -230,8 +84,10 @@ export function buildRevealStyles({
|
|
|
230
84
|
const initialGesture =
|
|
231
85
|
props.active.gesture.active ?? props.active.gesture.direction;
|
|
232
86
|
|
|
233
|
-
const isHorizontalDismiss =
|
|
234
|
-
|
|
87
|
+
const isHorizontalDismiss =
|
|
88
|
+
initialGesture === "horizontal" || initialGesture === "horizontal-inverted";
|
|
89
|
+
const isVerticalDismiss =
|
|
90
|
+
initialGesture === "vertical" || initialGesture === "vertical-inverted";
|
|
235
91
|
|
|
236
92
|
const rawDrag = isHorizontalDismiss
|
|
237
93
|
? Math.abs(props.active.gesture.raw.normX)
|
|
@@ -239,45 +95,31 @@ export function buildRevealStyles({
|
|
|
239
95
|
? Math.abs(props.active.gesture.raw.normY)
|
|
240
96
|
: 0;
|
|
241
97
|
|
|
242
|
-
const dragX =
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
positiveMax: 1,
|
|
247
|
-
exponent: 1,
|
|
248
|
-
});
|
|
98
|
+
const dragX = resolveUnitDragTranslation(
|
|
99
|
+
props.active.gesture.x,
|
|
100
|
+
screenLayout.width,
|
|
101
|
+
);
|
|
249
102
|
|
|
250
|
-
const dragY =
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
positiveMax: 1,
|
|
255
|
-
exponent: 1,
|
|
256
|
-
});
|
|
103
|
+
const dragY = resolveUnitDragTranslation(
|
|
104
|
+
props.active.gesture.y,
|
|
105
|
+
screenLayout.height,
|
|
106
|
+
);
|
|
257
107
|
|
|
258
108
|
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
|
-
})
|
|
109
|
+
? resolveRevealDirectionalDragScale(
|
|
110
|
+
props.active.gesture.normX,
|
|
111
|
+
initialGesture === "horizontal-inverted",
|
|
112
|
+
)
|
|
267
113
|
: IDENTITY_DRAG_SCALE_OUTPUT[0];
|
|
268
114
|
|
|
269
115
|
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
|
-
})
|
|
116
|
+
? resolveRevealDirectionalDragScale(
|
|
117
|
+
props.active.gesture.normY,
|
|
118
|
+
initialGesture === "vertical-inverted",
|
|
119
|
+
)
|
|
278
120
|
: IDENTITY_DRAG_SCALE_OUTPUT[1];
|
|
279
121
|
|
|
280
|
-
const dragScale =
|
|
122
|
+
const dragScale = dragXScale * dragYScale;
|
|
281
123
|
|
|
282
124
|
const initialDestinationTarget =
|
|
283
125
|
props.active.closing && link.initialDestination?.bounds
|
|
@@ -288,52 +130,60 @@ export function buildRevealStyles({
|
|
|
288
130
|
|
|
289
131
|
if (focused) {
|
|
290
132
|
const contentRaw = link.compute({
|
|
291
|
-
|
|
133
|
+
raw: true,
|
|
134
|
+
scaleMode: "uniform",
|
|
292
135
|
method: "content",
|
|
293
136
|
target: initialDestinationTarget,
|
|
294
|
-
});
|
|
137
|
+
} as const);
|
|
295
138
|
|
|
296
139
|
const maskRaw = link.compute({
|
|
297
|
-
|
|
140
|
+
raw: true,
|
|
141
|
+
scaleMode: "uniform",
|
|
298
142
|
method: "size",
|
|
299
143
|
space: "absolute",
|
|
300
144
|
target: "fullscreen",
|
|
301
|
-
});
|
|
145
|
+
} as const);
|
|
302
146
|
|
|
303
|
-
const maskBorderRadius =
|
|
147
|
+
const maskBorderRadius = mixUnit(
|
|
148
|
+
sourceBorderRadius,
|
|
149
|
+
borderRadius,
|
|
304
150
|
progress,
|
|
305
|
-
[0, 1],
|
|
306
|
-
[sourceBorderRadius, REVEAL_BORDER_RADIUS],
|
|
307
|
-
"clamp",
|
|
308
151
|
);
|
|
152
|
+
const maskBorderCurve = borderContinuous
|
|
153
|
+
? ("continuous" as const)
|
|
154
|
+
: undefined;
|
|
309
155
|
|
|
310
156
|
const maskSizeMultiplier = props.active.closing
|
|
311
|
-
?
|
|
157
|
+
? mixUnit(0.9, 1, props.active.progress)
|
|
312
158
|
: 1;
|
|
313
159
|
|
|
314
160
|
const maskWidth = Math.max(1, maskRaw.width * maskSizeMultiplier);
|
|
315
161
|
const maskHeight = Math.max(1, maskRaw.height * maskSizeMultiplier);
|
|
316
162
|
|
|
317
163
|
const contentBaseScale = contentRaw.scale;
|
|
318
|
-
const
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
164
|
+
const safeContentBaseScale = resolveSafeScale(contentBaseScale);
|
|
165
|
+
|
|
166
|
+
let contentScale = contentBaseScale * dragScale;
|
|
167
|
+
if (props.active.gesture.dismissing) {
|
|
168
|
+
const contentTargetBounds =
|
|
169
|
+
initialDestinationTarget ?? link.destination.bounds;
|
|
170
|
+
|
|
171
|
+
const sourceContentScale = resolveUniformScale({
|
|
172
|
+
sourceWidth: link.source.bounds.width,
|
|
173
|
+
sourceHeight: link.source.bounds.height,
|
|
174
|
+
destinationWidth: contentTargetBounds.width,
|
|
175
|
+
destinationHeight: contentTargetBounds.height,
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
contentScale = resolveDismissScaleHandoff({
|
|
179
|
+
progress: props.active.progress,
|
|
180
|
+
releaseScale: dragScale,
|
|
181
|
+
targetScale: sourceContentScale,
|
|
182
|
+
velocity: props.active.gesture.velocity,
|
|
183
|
+
velocityDepth,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
337
187
|
const contentTranslateX = contentRaw.translateX + dragX;
|
|
338
188
|
const contentTranslateY = contentRaw.translateY + dragY;
|
|
339
189
|
|
|
@@ -363,16 +213,20 @@ export function buildRevealStyles({
|
|
|
363
213
|
)
|
|
364
214
|
: 0;
|
|
365
215
|
|
|
366
|
-
const
|
|
216
|
+
const maskAspectBounds = link.initialSource?.bounds ?? link.source.bounds;
|
|
217
|
+
const minMaskHeight = resolveAspectRatioMaskHeight({
|
|
218
|
+
maskWidth,
|
|
367
219
|
maskHeight,
|
|
368
|
-
|
|
369
|
-
|
|
220
|
+
targetWidth: maskAspectBounds.width,
|
|
221
|
+
targetHeight: maskAspectBounds.height,
|
|
222
|
+
});
|
|
370
223
|
|
|
371
|
-
const renderedMaskHeight =
|
|
224
|
+
const renderedMaskHeight = interpolateClamped(
|
|
372
225
|
maskHeightCollapseDrag,
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
226
|
+
0,
|
|
227
|
+
DRAG_MASK_HEIGHT_COLLAPSE_END,
|
|
228
|
+
maskHeight,
|
|
229
|
+
minMaskHeight,
|
|
376
230
|
);
|
|
377
231
|
|
|
378
232
|
const maskCenterX = maskWidth / 2;
|
|
@@ -406,6 +260,38 @@ export function buildRevealStyles({
|
|
|
406
260
|
safeContentBaseScale;
|
|
407
261
|
|
|
408
262
|
const compensatedMaskScale = 1 / safeContentBaseScale;
|
|
263
|
+
const maskBaseWidth = Math.max(1, screenLayout.width);
|
|
264
|
+
const maskBaseHeight = Math.max(1, screenLayout.height);
|
|
265
|
+
const maskScaleX = maskWidth / maskBaseWidth;
|
|
266
|
+
const maskScaleY = renderedMaskHeight / maskBaseHeight;
|
|
267
|
+
const transformMaskTranslateX =
|
|
268
|
+
compensatedMaskTranslateX + (maskWidth - maskBaseWidth) / 2;
|
|
269
|
+
const transformMaskTranslateY =
|
|
270
|
+
compensatedMaskTranslateY + (renderedMaskHeight - maskBaseHeight) / 2;
|
|
271
|
+
const maskElementStyle = usesTransformMask
|
|
272
|
+
? {
|
|
273
|
+
width: maskBaseWidth,
|
|
274
|
+
height: maskBaseHeight,
|
|
275
|
+
borderRadius: props.active.settled ? 0 : maskBorderRadius,
|
|
276
|
+
borderCurve: maskBorderCurve,
|
|
277
|
+
transform: [
|
|
278
|
+
{ translateX: transformMaskTranslateX },
|
|
279
|
+
{ translateY: transformMaskTranslateY },
|
|
280
|
+
{ scaleX: maskScaleX * compensatedMaskScale },
|
|
281
|
+
{ scaleY: maskScaleY * compensatedMaskScale },
|
|
282
|
+
],
|
|
283
|
+
}
|
|
284
|
+
: {
|
|
285
|
+
width: maskWidth,
|
|
286
|
+
height: renderedMaskHeight,
|
|
287
|
+
borderRadius: props.active.settled ? 0 : maskBorderRadius,
|
|
288
|
+
borderCurve: maskBorderCurve,
|
|
289
|
+
transform: [
|
|
290
|
+
{ translateX: compensatedMaskTranslateX },
|
|
291
|
+
{ translateY: compensatedMaskTranslateY },
|
|
292
|
+
{ scale: compensatedMaskScale },
|
|
293
|
+
],
|
|
294
|
+
};
|
|
409
295
|
|
|
410
296
|
const elementOffsetX = initialDestinationTarget
|
|
411
297
|
? initialDestinationTarget.pageX - link.destination.bounds.pageX
|
|
@@ -416,28 +302,34 @@ export function buildRevealStyles({
|
|
|
416
302
|
: 0;
|
|
417
303
|
|
|
418
304
|
const elementTX = props.active.closing
|
|
419
|
-
?
|
|
305
|
+
? interpolateClamped(
|
|
420
306
|
props.active.progress,
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
307
|
+
CLOSE_SOURCE_HANDOFF_PROGRESS,
|
|
308
|
+
1,
|
|
309
|
+
elementOffsetX,
|
|
310
|
+
0,
|
|
424
311
|
)
|
|
425
312
|
: 0;
|
|
426
313
|
const elementY = props.active.closing
|
|
427
|
-
?
|
|
314
|
+
? interpolateClamped(
|
|
428
315
|
props.active.progress,
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
316
|
+
CLOSE_SOURCE_HANDOFF_PROGRESS,
|
|
317
|
+
1,
|
|
318
|
+
elementOffsetY,
|
|
319
|
+
0,
|
|
432
320
|
)
|
|
433
321
|
: 0;
|
|
434
322
|
|
|
435
323
|
const { gestureSensitivity, gestureReleaseVelocityScale } =
|
|
436
|
-
resolveRevealGestureHandoff(
|
|
324
|
+
resolveRevealGestureHandoff({
|
|
325
|
+
rawDrag,
|
|
326
|
+
maxSensitivity,
|
|
327
|
+
});
|
|
437
328
|
|
|
438
329
|
return {
|
|
439
330
|
options: {
|
|
440
|
-
|
|
331
|
+
navigationMaskEnabled: true,
|
|
332
|
+
gestureProgressMode,
|
|
441
333
|
gestureSensitivity,
|
|
442
334
|
gestureReleaseVelocityScale,
|
|
443
335
|
},
|
|
@@ -449,35 +341,29 @@ export function buildRevealStyles({
|
|
|
449
341
|
{ scale: contentScale },
|
|
450
342
|
],
|
|
451
343
|
shadowColor: "#000",
|
|
452
|
-
shadowOffset:
|
|
453
|
-
shadowOpacity: interpolate(
|
|
344
|
+
shadowOffset: REVEAL_SHADOW_OFFSET,
|
|
345
|
+
shadowOpacity: interpolate(
|
|
346
|
+
props.active.progress,
|
|
347
|
+
ZERO_TO_ONE_RANGE,
|
|
348
|
+
CONTENT_SHADOW_OPACITY_OUTPUT,
|
|
349
|
+
),
|
|
454
350
|
shadowRadius: 32,
|
|
455
351
|
elevation: 5,
|
|
456
352
|
opacity: props.active.entering
|
|
457
353
|
? interpolate(
|
|
458
354
|
props.active.progress,
|
|
459
|
-
|
|
460
|
-
|
|
355
|
+
CONTENT_ENTERING_OPACITY_RANGE,
|
|
356
|
+
CONTENT_ENTERING_OPACITY_OUTPUT,
|
|
461
357
|
)
|
|
462
358
|
: interpolate(
|
|
463
359
|
props.active.progress,
|
|
464
|
-
|
|
465
|
-
|
|
360
|
+
CONTENT_CLOSING_OPACITY_RANGE,
|
|
361
|
+
CONTENT_CLOSING_OPACITY_OUTPUT,
|
|
466
362
|
),
|
|
467
363
|
},
|
|
468
364
|
},
|
|
469
365
|
[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
|
-
},
|
|
366
|
+
style: maskElementStyle,
|
|
481
367
|
},
|
|
482
368
|
[link.id]: {
|
|
483
369
|
style: {
|
|
@@ -491,12 +377,7 @@ export function buildRevealStyles({
|
|
|
491
377
|
|
|
492
378
|
/* ---------------------------- Unfocused Screen ---------------------------- */
|
|
493
379
|
|
|
494
|
-
const unfocusedScale =
|
|
495
|
-
props.active.progress,
|
|
496
|
-
[0, 1],
|
|
497
|
-
[1, 0.9375],
|
|
498
|
-
"clamp",
|
|
499
|
-
);
|
|
380
|
+
const unfocusedScale = mixUnit(1, 0.9375, props.active.progress);
|
|
500
381
|
const unfocusedContentScale = props.active.logicallySettled
|
|
501
382
|
? 1
|
|
502
383
|
: unfocusedScale;
|
|
@@ -510,20 +391,22 @@ export function buildRevealStyles({
|
|
|
510
391
|
destinationBounds: trackingContentTarget,
|
|
511
392
|
screenLayout,
|
|
512
393
|
});
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
394
|
+
let trackingContentScale = trackingContentBaseTransform.scale * dragScale;
|
|
395
|
+
if (props.active.gesture.dismissing) {
|
|
396
|
+
const trackingTargetScale = resolveUniformScale({
|
|
397
|
+
sourceWidth: link.source.bounds.width,
|
|
398
|
+
sourceHeight: link.source.bounds.height,
|
|
399
|
+
destinationWidth: trackingContentTarget.width,
|
|
400
|
+
destinationHeight: trackingContentTarget.height,
|
|
401
|
+
});
|
|
402
|
+
trackingContentScale = resolveDismissScaleHandoff({
|
|
403
|
+
progress: props.active.progress,
|
|
404
|
+
releaseScale: dragScale,
|
|
405
|
+
targetScale: trackingTargetScale,
|
|
406
|
+
velocity: props.active.gesture.velocity,
|
|
407
|
+
velocityDepth,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
527
410
|
const trackingContentTranslateX =
|
|
528
411
|
trackingContentBaseTransform.translateX + dragX;
|
|
529
412
|
const trackingContentTranslateY =
|
|
@@ -541,24 +424,31 @@ export function buildRevealStyles({
|
|
|
541
424
|
|
|
542
425
|
return {
|
|
543
426
|
options: {
|
|
544
|
-
|
|
427
|
+
navigationMaskEnabled: true,
|
|
428
|
+
gestureProgressMode,
|
|
545
429
|
},
|
|
546
430
|
content: {
|
|
547
431
|
style: {
|
|
548
432
|
transform: [{ scale: unfocusedContentScale }],
|
|
549
433
|
},
|
|
550
|
-
props:
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
434
|
+
props: disablePointerEventsTillElementTransition
|
|
435
|
+
? {
|
|
436
|
+
pointerEvents:
|
|
437
|
+
props.active.progress <= CLOSE_SOURCE_HANDOFF_PROGRESS
|
|
438
|
+
? "auto"
|
|
439
|
+
: "none",
|
|
440
|
+
}
|
|
441
|
+
: undefined,
|
|
556
442
|
},
|
|
557
443
|
[link.id]: {
|
|
558
444
|
style: {
|
|
559
445
|
opacity: props.active.closing
|
|
560
446
|
? 1
|
|
561
|
-
: interpolate(
|
|
447
|
+
: interpolate(
|
|
448
|
+
props.active.progress,
|
|
449
|
+
ZERO_TO_ONE_RANGE,
|
|
450
|
+
UNFOCUSED_ELEMENT_OPACITY_OUTPUT,
|
|
451
|
+
),
|
|
562
452
|
|
|
563
453
|
zIndex: 9999,
|
|
564
454
|
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;
|