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,25 +1,241 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import type { MeasuredDimensions } from "react-native-reanimated";
|
|
2
|
+
import { EPSILON } from "../../../../constants";
|
|
3
|
+
import type { Layout } from "../../../../types/screen.types";
|
|
4
|
+
import { computeContentTransformGeometry } from "../../helpers/geometry";
|
|
5
|
+
import {
|
|
6
|
+
DISMISS_SCALE_ORBIT_DEPTH,
|
|
7
|
+
DRAG_DIRECTIONAL_SCALE_EXPONENT,
|
|
8
|
+
DRAG_DIRECTIONAL_SCALE_MAX,
|
|
9
|
+
DRAG_DIRECTIONAL_SCALE_MIN,
|
|
10
|
+
} from "./config";
|
|
11
|
+
|
|
12
|
+
function clampUnit(value: number) {
|
|
13
|
+
"worklet";
|
|
14
|
+
return Math.min(1, Math.max(0, value));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function mixUnit(from: number, to: number, progress: number) {
|
|
18
|
+
"worklet";
|
|
19
|
+
return from + (to - from) * clampUnit(progress);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function interpolateClamped(
|
|
23
|
+
value: number,
|
|
24
|
+
inputStart: number,
|
|
25
|
+
inputEnd: number,
|
|
26
|
+
outputStart: number,
|
|
27
|
+
outputEnd: number,
|
|
28
|
+
) {
|
|
29
|
+
"worklet";
|
|
30
|
+
return mixUnit(
|
|
31
|
+
outputStart,
|
|
32
|
+
outputEnd,
|
|
33
|
+
(value - inputStart) / (inputEnd - inputStart),
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function resolveSafeScale(scale: number) {
|
|
38
|
+
"worklet";
|
|
39
|
+
return Math.abs(scale) > EPSILON ? scale : 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const resolveUnitDragTranslation = (
|
|
43
|
+
translation: number,
|
|
44
|
+
dimension: number,
|
|
45
|
+
) => {
|
|
14
46
|
"worklet";
|
|
15
47
|
|
|
16
48
|
const baseDistance = Math.max(1, dimension);
|
|
17
|
-
const clampedMagnitude = Math.min(1, Math.abs(translation) / baseDistance);
|
|
18
|
-
const curvedMagnitude = clampedMagnitude ** Math.max(1, exponent);
|
|
19
49
|
|
|
20
|
-
if (translation <
|
|
21
|
-
return -baseDistance
|
|
50
|
+
if (translation < -baseDistance) {
|
|
51
|
+
return -baseDistance;
|
|
22
52
|
}
|
|
23
53
|
|
|
24
|
-
|
|
54
|
+
if (translation > baseDistance) {
|
|
55
|
+
return baseDistance;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return translation;
|
|
25
59
|
};
|
|
60
|
+
|
|
61
|
+
export function resolveRevealDirectionalDragScale(
|
|
62
|
+
normalized: number,
|
|
63
|
+
inverted: boolean,
|
|
64
|
+
) {
|
|
65
|
+
"worklet";
|
|
66
|
+
|
|
67
|
+
const dismissalRelative = inverted ? -normalized : normalized;
|
|
68
|
+
|
|
69
|
+
if (dismissalRelative >= 0) {
|
|
70
|
+
const rawScale = mixUnit(1, DRAG_DIRECTIONAL_SCALE_MIN, dismissalRelative);
|
|
71
|
+
return rawScale ** DRAG_DIRECTIONAL_SCALE_EXPONENT;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const oppositeDrag = Math.min(1, Math.abs(dismissalRelative));
|
|
75
|
+
return mixUnit(1, DRAG_DIRECTIONAL_SCALE_MAX, oppositeDrag);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function resolveUniformScale({
|
|
79
|
+
sourceWidth,
|
|
80
|
+
sourceHeight,
|
|
81
|
+
destinationWidth,
|
|
82
|
+
destinationHeight,
|
|
83
|
+
}: {
|
|
84
|
+
sourceWidth: number;
|
|
85
|
+
sourceHeight: number;
|
|
86
|
+
destinationWidth: number;
|
|
87
|
+
destinationHeight: number;
|
|
88
|
+
}) {
|
|
89
|
+
"worklet";
|
|
90
|
+
|
|
91
|
+
const sx = sourceWidth / destinationWidth;
|
|
92
|
+
const sy = sourceHeight / destinationHeight;
|
|
93
|
+
|
|
94
|
+
const sourceAspect = sourceWidth / sourceHeight;
|
|
95
|
+
const destinationAspect = destinationWidth / destinationHeight;
|
|
96
|
+
const aspectDifference = Math.abs(sourceAspect - destinationAspect);
|
|
97
|
+
|
|
98
|
+
return aspectDifference < 0.1 ? Math.max(sx, sy) : Math.min(sx, sy);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function resolveRevealGestureHandoff(rawDrag: number) {
|
|
102
|
+
"worklet";
|
|
103
|
+
|
|
104
|
+
const clampedRawDrag = clampUnit(rawDrag);
|
|
105
|
+
const gestureSensitivity = mixUnit(0.8, 0.1, clampedRawDrag);
|
|
106
|
+
|
|
107
|
+
const releaseBoost = mixUnit(1, 1.1, clampedRawDrag);
|
|
108
|
+
|
|
109
|
+
const releaseSensitivity = interpolateClamped(
|
|
110
|
+
gestureSensitivity,
|
|
111
|
+
0.28,
|
|
112
|
+
0.9,
|
|
113
|
+
0.7,
|
|
114
|
+
1,
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
return {
|
|
118
|
+
gestureSensitivity,
|
|
119
|
+
gestureReleaseVelocityScale: releaseBoost * releaseSensitivity,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function resolveDismissScaleHandoff({
|
|
124
|
+
progress,
|
|
125
|
+
releaseScale,
|
|
126
|
+
targetScale,
|
|
127
|
+
velocity,
|
|
128
|
+
}: {
|
|
129
|
+
progress: number;
|
|
130
|
+
releaseScale: number;
|
|
131
|
+
targetScale: number;
|
|
132
|
+
velocity: number;
|
|
133
|
+
}) {
|
|
134
|
+
"worklet";
|
|
135
|
+
|
|
136
|
+
const closeProgress = 1 - progress;
|
|
137
|
+
const scaleProgress = Math.sin((Math.PI / 2) * closeProgress);
|
|
138
|
+
const baseScale = releaseScale + (targetScale - releaseScale) * scaleProgress;
|
|
139
|
+
|
|
140
|
+
const orbitDepth = DISMISS_SCALE_ORBIT_DEPTH * velocity;
|
|
141
|
+
const orbitScale = 1 - orbitDepth * Math.sin(Math.PI * closeProgress);
|
|
142
|
+
|
|
143
|
+
return baseScale * orbitScale;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function getBoundsCenterX(bounds: MeasuredDimensions) {
|
|
147
|
+
"worklet";
|
|
148
|
+
return bounds.pageX + bounds.width / 2;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function getBoundsCenterY(bounds: MeasuredDimensions) {
|
|
152
|
+
"worklet";
|
|
153
|
+
return bounds.pageY + bounds.height / 2;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function resolveRevealContentBaseTransform({
|
|
157
|
+
progress,
|
|
158
|
+
sourceBounds,
|
|
159
|
+
destinationBounds,
|
|
160
|
+
screenLayout,
|
|
161
|
+
}: {
|
|
162
|
+
progress: number;
|
|
163
|
+
sourceBounds: MeasuredDimensions;
|
|
164
|
+
destinationBounds: MeasuredDimensions;
|
|
165
|
+
screenLayout: Layout;
|
|
166
|
+
}) {
|
|
167
|
+
"worklet";
|
|
168
|
+
|
|
169
|
+
const geometry = computeContentTransformGeometry({
|
|
170
|
+
start: sourceBounds,
|
|
171
|
+
end: destinationBounds,
|
|
172
|
+
entering: true,
|
|
173
|
+
dimensions: screenLayout,
|
|
174
|
+
scaleMode: "uniform",
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
return {
|
|
178
|
+
translateX: mixUnit(geometry.tx, 0, progress),
|
|
179
|
+
translateY: mixUnit(geometry.ty, 0, progress),
|
|
180
|
+
scale: mixUnit(geometry.s, 1, progress),
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export function resolveTrackedSourceElementTransform({
|
|
185
|
+
sourceBounds,
|
|
186
|
+
destinationBounds,
|
|
187
|
+
contentTranslateX,
|
|
188
|
+
contentTranslateY,
|
|
189
|
+
contentScale,
|
|
190
|
+
parentScale,
|
|
191
|
+
screenWidth,
|
|
192
|
+
screenHeight,
|
|
193
|
+
}: {
|
|
194
|
+
sourceBounds: MeasuredDimensions;
|
|
195
|
+
destinationBounds: MeasuredDimensions;
|
|
196
|
+
contentTranslateX: number;
|
|
197
|
+
contentTranslateY: number;
|
|
198
|
+
contentScale: number;
|
|
199
|
+
parentScale: number;
|
|
200
|
+
screenWidth: number;
|
|
201
|
+
screenHeight: number;
|
|
202
|
+
}) {
|
|
203
|
+
"worklet";
|
|
204
|
+
|
|
205
|
+
const screenCenterX = screenWidth / 2;
|
|
206
|
+
const screenCenterY = screenHeight / 2;
|
|
207
|
+
const safeParentScale = Math.max(Math.abs(parentScale), EPSILON);
|
|
208
|
+
const safeSourceWidth = Math.max(Math.abs(sourceBounds.width), EPSILON);
|
|
209
|
+
const safeSourceHeight = Math.max(Math.abs(sourceBounds.height), EPSILON);
|
|
210
|
+
|
|
211
|
+
const sourceCenterX = getBoundsCenterX(sourceBounds);
|
|
212
|
+
const sourceCenterY = getBoundsCenterY(sourceBounds);
|
|
213
|
+
const destinationCenterX = getBoundsCenterX(destinationBounds);
|
|
214
|
+
const destinationCenterY = getBoundsCenterY(destinationBounds);
|
|
215
|
+
|
|
216
|
+
const trackedCenterX =
|
|
217
|
+
screenCenterX +
|
|
218
|
+
(destinationCenterX - screenCenterX) * contentScale +
|
|
219
|
+
contentTranslateX;
|
|
220
|
+
const trackedCenterY =
|
|
221
|
+
screenCenterY +
|
|
222
|
+
(destinationCenterY - screenCenterY) * contentScale +
|
|
223
|
+
contentTranslateY;
|
|
224
|
+
|
|
225
|
+
return {
|
|
226
|
+
translateX:
|
|
227
|
+
(trackedCenterX - screenCenterX) / safeParentScale +
|
|
228
|
+
screenCenterX -
|
|
229
|
+
sourceCenterX,
|
|
230
|
+
translateY:
|
|
231
|
+
(trackedCenterY - screenCenterY) / safeParentScale +
|
|
232
|
+
screenCenterY -
|
|
233
|
+
sourceCenterY,
|
|
234
|
+
scaleX:
|
|
235
|
+
(destinationBounds.width * contentScale) /
|
|
236
|
+
(safeSourceWidth * safeParentScale),
|
|
237
|
+
scaleY:
|
|
238
|
+
(destinationBounds.height * contentScale) /
|
|
239
|
+
(safeSourceHeight * safeParentScale),
|
|
240
|
+
};
|
|
241
|
+
}
|
|
@@ -87,9 +87,8 @@ export type BoundsOptions = {
|
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* Optional group name for collection/list scenarios.
|
|
90
|
-
* When provided,
|
|
91
|
-
*
|
|
92
|
-
* Without this, `id` is used directly as the tag (backward compatible).
|
|
90
|
+
* When provided, concrete boundary entries use `group:id`, while transition
|
|
91
|
+
* links stay keyed by the member `id` inside the active screen pair.
|
|
93
92
|
*/
|
|
94
93
|
group?: string;
|
|
95
94
|
|
|
@@ -5,13 +5,37 @@ interface SceneWithKey {
|
|
|
5
5
|
|
|
6
6
|
type IsRouteClosing = (routeKey: string) => boolean;
|
|
7
7
|
|
|
8
|
+
const findPreviousDescriptor = <T extends SceneWithKey>(
|
|
9
|
+
scenes: T[],
|
|
10
|
+
sceneIndex: number,
|
|
11
|
+
isRouteClosing: IsRouteClosing,
|
|
12
|
+
): T["descriptor"] | undefined => {
|
|
13
|
+
let firstClosingBelow: T["descriptor"] | undefined;
|
|
14
|
+
|
|
15
|
+
for (let i = sceneIndex - 1; i >= 0; i--) {
|
|
16
|
+
const candidate = scenes[i];
|
|
17
|
+
if (!candidate) continue;
|
|
18
|
+
|
|
19
|
+
if (!isRouteClosing(candidate.route.key)) {
|
|
20
|
+
return candidate.descriptor;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (firstClosingBelow === undefined) {
|
|
24
|
+
firstClosingBelow = candidate.descriptor;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return firstClosingBelow;
|
|
29
|
+
};
|
|
30
|
+
|
|
8
31
|
/**
|
|
9
32
|
* Resolves previous/next descriptors while accounting for routes that are
|
|
10
33
|
* visually closing.
|
|
11
34
|
*
|
|
12
35
|
* Rules:
|
|
13
|
-
* - Closing scenes
|
|
14
|
-
*
|
|
36
|
+
* - Closing scenes keep their previous descriptor so their original pair can
|
|
37
|
+
* keep resolving while they remain mounted, but they never receive a next
|
|
38
|
+
* descriptor.
|
|
15
39
|
* - Non-closing scenes skip over closing neighbors to find the actual active
|
|
16
40
|
* neighbor.
|
|
17
41
|
* - If there is no non-closing neighbor above/below, we fall back to the first
|
|
@@ -35,7 +59,11 @@ export function resolveSceneNeighbors<T extends SceneWithKey>(
|
|
|
35
59
|
|
|
36
60
|
if (isRouteClosing(current.route.key)) {
|
|
37
61
|
return {
|
|
38
|
-
previousDescriptor:
|
|
62
|
+
previousDescriptor: findPreviousDescriptor(
|
|
63
|
+
scenes,
|
|
64
|
+
sceneIndex,
|
|
65
|
+
isRouteClosing,
|
|
66
|
+
),
|
|
39
67
|
nextDescriptor: undefined,
|
|
40
68
|
};
|
|
41
69
|
}
|
|
@@ -61,26 +89,11 @@ export function resolveSceneNeighbors<T extends SceneWithKey>(
|
|
|
61
89
|
nextDescriptor = firstClosingAbove;
|
|
62
90
|
}
|
|
63
91
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
if (!candidate) continue;
|
|
70
|
-
|
|
71
|
-
if (!isRouteClosing(candidate.route.key)) {
|
|
72
|
-
previousDescriptor = candidate.descriptor;
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (firstClosingBelow === undefined) {
|
|
77
|
-
firstClosingBelow = candidate.descriptor;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if (previousDescriptor === undefined) {
|
|
82
|
-
previousDescriptor = firstClosingBelow;
|
|
83
|
-
}
|
|
92
|
+
const previousDescriptor = findPreviousDescriptor(
|
|
93
|
+
scenes,
|
|
94
|
+
sceneIndex,
|
|
95
|
+
isRouteClosing,
|
|
96
|
+
);
|
|
84
97
|
|
|
85
98
|
return {
|
|
86
99
|
previousDescriptor,
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.applyMeasuredBoundsWrites = void 0;
|
|
7
|
-
var _entries = require("../../../stores/bounds/internals/entries");
|
|
8
|
-
var _links = require("../../../stores/bounds/internals/links");
|
|
9
|
-
const applyMeasuredBoundsWrites = params => {
|
|
10
|
-
"worklet";
|
|
11
|
-
|
|
12
|
-
const {
|
|
13
|
-
sharedBoundTag,
|
|
14
|
-
currentScreenKey,
|
|
15
|
-
measured,
|
|
16
|
-
preparedStyles,
|
|
17
|
-
shouldSetSource,
|
|
18
|
-
shouldUpdateSource,
|
|
19
|
-
shouldSetDestination,
|
|
20
|
-
shouldUpdateDestination,
|
|
21
|
-
expectedSourceScreenKey
|
|
22
|
-
} = params;
|
|
23
|
-
|
|
24
|
-
// Set the bounds entry on every measure to avoid any stale measurements
|
|
25
|
-
// for the public read API.
|
|
26
|
-
(0, _entries.setEntry)(sharedBoundTag, currentScreenKey, {
|
|
27
|
-
bounds: measured
|
|
28
|
-
});
|
|
29
|
-
if (shouldSetSource) {
|
|
30
|
-
(0, _links.setSource)("capture", sharedBoundTag, currentScreenKey, measured, preparedStyles);
|
|
31
|
-
}
|
|
32
|
-
if (shouldUpdateSource) {
|
|
33
|
-
(0, _links.setSource)("refresh", sharedBoundTag, currentScreenKey, measured, preparedStyles);
|
|
34
|
-
}
|
|
35
|
-
if (shouldUpdateDestination) {
|
|
36
|
-
(0, _links.setDestination)("refresh", sharedBoundTag, currentScreenKey, measured, preparedStyles, expectedSourceScreenKey);
|
|
37
|
-
}
|
|
38
|
-
if (shouldSetDestination) {
|
|
39
|
-
(0, _links.setDestination)("attach", sharedBoundTag, currentScreenKey, measured, preparedStyles, expectedSourceScreenKey);
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
exports.applyMeasuredBoundsWrites = applyMeasuredBoundsWrites;
|
|
43
|
-
//# sourceMappingURL=apply-measured-bounds-writes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_entries","require","_links","applyMeasuredBoundsWrites","params","sharedBoundTag","currentScreenKey","measured","preparedStyles","shouldSetSource","shouldUpdateSource","shouldSetDestination","shouldUpdateDestination","expectedSourceScreenKey","setEntry","bounds","setSource","setDestination","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.ts"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAiBO,MAAME,yBAAyB,GACrCC,MAAuC,IACnC;EACJ,SAAS;;EACT,MAAM;IACLC,cAAc;IACdC,gBAAgB;IAChBC,QAAQ;IACRC,cAAc;IACdC,eAAe;IACfC,kBAAkB;IAClBC,oBAAoB;IACpBC,uBAAuB;IACvBC;EACD,CAAC,GAAGT,MAAM;;EAEV;EACA;EACA,IAAAU,iBAAQ,EAACT,cAAc,EAAEC,gBAAgB,EAAE;IAC1CS,MAAM,EAAER;EACT,CAAC,CAAC;EAEF,IAAIE,eAAe,EAAE;IACpB,IAAAO,gBAAS,EACR,SAAS,EACTX,cAAc,EACdC,gBAAgB,EAChBC,QAAQ,EACRC,cACD,CAAC;EACF;EAEA,IAAIE,kBAAkB,EAAE;IACvB,IAAAM,gBAAS,EACR,SAAS,EACTX,cAAc,EACdC,gBAAgB,EAChBC,QAAQ,EACRC,cACD,CAAC;EACF;EAEA,IAAII,uBAAuB,EAAE;IAC5B,IAAAK,qBAAc,EACb,SAAS,EACTZ,cAAc,EACdC,gBAAgB,EAChBC,QAAQ,EACRC,cAAc,EACdK,uBACD,CAAC;EACF;EAEA,IAAIF,oBAAoB,EAAE;IACzB,IAAAM,qBAAc,EACb,QAAQ,EACRZ,cAAc,EACdC,gBAAgB,EAChBC,QAAQ,EACRC,cAAc,EACdK,uBACD,CAAC;EACF;AACD,CAAC;AAACK,OAAA,CAAAf,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.resolvePendingSourceKey = void 0;
|
|
7
|
-
var _links = require("../../../stores/bounds/internals/links");
|
|
8
|
-
const resolvePendingSourceKey = (sharedBoundTag, expectedSourceScreenKey) => {
|
|
9
|
-
"worklet";
|
|
10
|
-
|
|
11
|
-
if (expectedSourceScreenKey && ((0, _links.getPendingLink)(sharedBoundTag, expectedSourceScreenKey) || (0, _links.hasSourceLink)(sharedBoundTag, expectedSourceScreenKey))) {
|
|
12
|
-
return expectedSourceScreenKey;
|
|
13
|
-
}
|
|
14
|
-
return (0, _links.getPendingLink)(sharedBoundTag)?.source.screenKey ?? null;
|
|
15
|
-
};
|
|
16
|
-
exports.resolvePendingSourceKey = resolvePendingSourceKey;
|
|
17
|
-
//# sourceMappingURL=resolve-pending-source-key.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_links","require","resolvePendingSourceKey","sharedBoundTag","expectedSourceScreenKey","getPendingLink","hasSourceLink","source","screenKey","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKO,MAAMC,uBAAuB,GAAGA,CACtCC,cAAsB,EACtBC,uBAAgC,KACb;EACnB,SAAS;;EACT,IACCA,uBAAuB,KACtB,IAAAC,qBAAc,EAACF,cAAc,EAAEC,uBAAuB,CAAC,IACvD,IAAAE,oBAAa,EAACH,cAAc,EAAEC,uBAAuB,CAAC,CAAC,EACvD;IACD,OAAOA,uBAAuB;EAC/B;EAEA,OAAO,IAAAC,qBAAc,EAACF,cAAc,CAAC,EAAEI,MAAM,CAACC,SAAS,IAAI,IAAI;AAChE,CAAC;AAACC,OAAA,CAAAP,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createLinkContext = void 0;
|
|
7
|
-
var _links = require("../../../../stores/bounds/internals/links");
|
|
8
|
-
var _resolvePendingSourceKey = require("../../helpers/resolve-pending-source-key");
|
|
9
|
-
const createLinkContext = params => {
|
|
10
|
-
"worklet";
|
|
11
|
-
|
|
12
|
-
const {
|
|
13
|
-
sharedBoundTag,
|
|
14
|
-
currentScreenKey,
|
|
15
|
-
preferredSourceScreenKey
|
|
16
|
-
} = params;
|
|
17
|
-
const expectedSourceScreenKey = (0, _resolvePendingSourceKey.resolvePendingSourceKey)(sharedBoundTag, preferredSourceScreenKey) ?? undefined;
|
|
18
|
-
const hasPendingLink = (0, _links.getPendingLink)(sharedBoundTag, expectedSourceScreenKey) !== null;
|
|
19
|
-
return {
|
|
20
|
-
expectedSourceScreenKey,
|
|
21
|
-
hasPendingLink,
|
|
22
|
-
hasAttachableSourceLink: expectedSourceScreenKey ? (0, _links.hasSourceLink)(sharedBoundTag, expectedSourceScreenKey) : false,
|
|
23
|
-
hasSourceLink: (0, _links.hasSourceLink)(sharedBoundTag, currentScreenKey),
|
|
24
|
-
hasDestinationLink: (0, _links.hasDestinationLink)(sharedBoundTag, currentScreenKey)
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
exports.createLinkContext = createLinkContext;
|
|
28
|
-
//# sourceMappingURL=boundary-link-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_links","require","_resolvePendingSourceKey","createLinkContext","params","sharedBoundTag","currentScreenKey","preferredSourceScreenKey","expectedSourceScreenKey","resolvePendingSourceKey","undefined","hasPendingLink","getPendingLink","hasAttachableSourceLink","hasSourceLink","hasDestinationLink","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/create-boundary-component/hooks/helpers/boundary-link-context.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,wBAAA,GAAAD,OAAA;AAmBO,MAAME,iBAAiB,GAAIC,MAIjC,IAAkB;EAClB,SAAS;;EACT,MAAM;IAAEC,cAAc;IAAEC,gBAAgB;IAAEC;EAAyB,CAAC,GAAGH,MAAM;EAE7E,MAAMI,uBAAuB,GAC5B,IAAAC,gDAAuB,EAACJ,cAAc,EAAEE,wBAAwB,CAAC,IACjEG,SAAS;EACV,MAAMC,cAAc,GACnB,IAAAC,qBAAc,EAACP,cAAc,EAAEG,uBAAuB,CAAC,KAAK,IAAI;EAEjE,OAAO;IACNA,uBAAuB;IACvBG,cAAc;IACdE,uBAAuB,EAAEL,uBAAuB,GAC7C,IAAAM,oBAAa,EAACT,cAAc,EAAEG,uBAAuB,CAAC,GACtD,KAAK;IACRM,aAAa,EAAE,IAAAA,oBAAa,EAACT,cAAc,EAAEC,gBAAgB,CAAC;IAC9DS,kBAAkB,EAAE,IAAAA,yBAAkB,EAACV,cAAc,EAAEC,gBAAgB;EACxE,CAAC;AACF,CAAC;AAACU,OAAA,CAAAb,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.shouldBlockInitialDestinationMeasurement = exports.getMeasureIntentFlags = exports.buildMeasurementWritePlan = void 0;
|
|
7
|
-
const shouldBlockInitialDestinationMeasurement = params => {
|
|
8
|
-
"worklet";
|
|
9
|
-
|
|
10
|
-
const {
|
|
11
|
-
enabled,
|
|
12
|
-
hasDestinationLink,
|
|
13
|
-
hasAttachableSourceLink
|
|
14
|
-
} = params;
|
|
15
|
-
return enabled && hasAttachableSourceLink && !hasDestinationLink;
|
|
16
|
-
};
|
|
17
|
-
exports.shouldBlockInitialDestinationMeasurement = shouldBlockInitialDestinationMeasurement;
|
|
18
|
-
const getMeasureIntentFlags = intent => {
|
|
19
|
-
"worklet";
|
|
20
|
-
|
|
21
|
-
const flags = {
|
|
22
|
-
captureSource: false,
|
|
23
|
-
completeDestination: false,
|
|
24
|
-
refreshSource: false,
|
|
25
|
-
refreshDestination: false
|
|
26
|
-
};
|
|
27
|
-
if (!intent) {
|
|
28
|
-
return flags;
|
|
29
|
-
}
|
|
30
|
-
const intents = Array.isArray(intent) ? intent : [intent];
|
|
31
|
-
for (let i = 0; i < intents.length; i++) {
|
|
32
|
-
switch (intents[i]) {
|
|
33
|
-
case "capture-source":
|
|
34
|
-
flags.captureSource = true;
|
|
35
|
-
break;
|
|
36
|
-
case "complete-destination":
|
|
37
|
-
flags.completeDestination = true;
|
|
38
|
-
break;
|
|
39
|
-
case "refresh-source":
|
|
40
|
-
flags.refreshSource = true;
|
|
41
|
-
break;
|
|
42
|
-
case "refresh-destination":
|
|
43
|
-
flags.refreshDestination = true;
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return flags;
|
|
48
|
-
};
|
|
49
|
-
exports.getMeasureIntentFlags = getMeasureIntentFlags;
|
|
50
|
-
const buildMeasurementWritePlan = params => {
|
|
51
|
-
"worklet";
|
|
52
|
-
|
|
53
|
-
const {
|
|
54
|
-
intents,
|
|
55
|
-
hasPendingLink,
|
|
56
|
-
hasSourceLink,
|
|
57
|
-
hasDestinationLink,
|
|
58
|
-
hasAttachableSourceLink
|
|
59
|
-
} = params;
|
|
60
|
-
const captureSource = intents.captureSource;
|
|
61
|
-
const completeDestination = intents.completeDestination && (hasPendingLink || hasAttachableSourceLink);
|
|
62
|
-
const refreshSource = intents.refreshSource && hasSourceLink;
|
|
63
|
-
const refreshDestination = intents.refreshDestination && (hasDestinationLink || hasPendingLink || hasAttachableSourceLink);
|
|
64
|
-
const writesAny = captureSource || completeDestination || refreshSource || refreshDestination;
|
|
65
|
-
return {
|
|
66
|
-
captureSource,
|
|
67
|
-
completeDestination,
|
|
68
|
-
refreshSource,
|
|
69
|
-
refreshDestination,
|
|
70
|
-
writesAny,
|
|
71
|
-
wantsDestinationWrite: completeDestination || refreshDestination
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
exports.buildMeasurementWritePlan = buildMeasurementWritePlan;
|
|
75
|
-
//# sourceMappingURL=measurement-rules.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["shouldBlockInitialDestinationMeasurement","params","enabled","hasDestinationLink","hasAttachableSourceLink","exports","getMeasureIntentFlags","intent","flags","captureSource","completeDestination","refreshSource","refreshDestination","intents","Array","isArray","i","length","buildMeasurementWritePlan","hasPendingLink","hasSourceLink","writesAny","wantsDestinationWrite"],"sourceRoot":"../../../../../../../src","sources":["shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts"],"mappings":";;;;;;AAkBO,MAAMA,wCAAwC,GAAIC,MAIxD,IAAc;EACd,SAAS;;EACT,MAAM;IAAEC,OAAO;IAAEC,kBAAkB;IAAEC;EAAwB,CAAC,GAAGH,MAAM;EAEvE,OAAOC,OAAO,IAAIE,uBAAuB,IAAI,CAACD,kBAAkB;AACjE,CAAC;AAACE,OAAA,CAAAL,wCAAA,GAAAA,wCAAA;AAEK,MAAMM,qBAAqB,GACjCC,MAAiD,IACzB;EACxB,SAAS;;EACT,MAAMC,KAAyB,GAAG;IACjCC,aAAa,EAAE,KAAK;IACpBC,mBAAmB,EAAE,KAAK;IAC1BC,aAAa,EAAE,KAAK;IACpBC,kBAAkB,EAAE;EACrB,CAAC;EAED,IAAI,CAACL,MAAM,EAAE;IACZ,OAAOC,KAAK;EACb;EAEA,MAAMK,OAAO,GAAGC,KAAK,CAACC,OAAO,CAACR,MAAM,CAAC,GAAGA,MAAM,GAAG,CAACA,MAAM,CAAC;EAEzD,KAAK,IAAIS,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,OAAO,CAACI,MAAM,EAAED,CAAC,EAAE,EAAE;IACxC,QAAQH,OAAO,CAACG,CAAC,CAAC;MACjB,KAAK,gBAAgB;QACpBR,KAAK,CAACC,aAAa,GAAG,IAAI;QAC1B;MACD,KAAK,sBAAsB;QAC1BD,KAAK,CAACE,mBAAmB,GAAG,IAAI;QAChC;MACD,KAAK,gBAAgB;QACpBF,KAAK,CAACG,aAAa,GAAG,IAAI;QAC1B;MACD,KAAK,qBAAqB;QACzBH,KAAK,CAACI,kBAAkB,GAAG,IAAI;QAC/B;IACF;EACD;EAEA,OAAOJ,KAAK;AACb,CAAC;AAACH,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAEK,MAAMY,yBAAyB,GAAIjB,MAMzC,IAAuB;EACvB,SAAS;;EACT,MAAM;IACLY,OAAO;IACPM,cAAc;IACdC,aAAa;IACbjB,kBAAkB;IAClBC;EACD,CAAC,GAAGH,MAAM;EAEV,MAAMQ,aAAa,GAAGI,OAAO,CAACJ,aAAa;EAC3C,MAAMC,mBAAmB,GACxBG,OAAO,CAACH,mBAAmB,KAAKS,cAAc,IAAIf,uBAAuB,CAAC;EAC3E,MAAMO,aAAa,GAAGE,OAAO,CAACF,aAAa,IAAIS,aAAa;EAC5D,MAAMR,kBAAkB,GACvBC,OAAO,CAACD,kBAAkB,KACzBT,kBAAkB,IAAIgB,cAAc,IAAIf,uBAAuB,CAAC;EAClE,MAAMiB,SAAS,GACdZ,aAAa,IAAIC,mBAAmB,IAAIC,aAAa,IAAIC,kBAAkB;EAE5E,OAAO;IACNH,aAAa;IACbC,mBAAmB;IACnBC,aAAa;IACbC,kBAAkB;IAClBS,SAAS;IACTC,qBAAqB,EAAEZ,mBAAmB,IAAIE;EAC/C,CAAC;AACF,CAAC;AAACP,OAAA,CAAAa,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isMeasurementInViewport = void 0;
|
|
7
|
-
const isMeasurementInViewport = (measured, viewportWidth, viewportHeight) => {
|
|
8
|
-
"worklet";
|
|
9
|
-
|
|
10
|
-
if (measured.width <= 0 || measured.height <= 0) {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
const toleranceX = viewportWidth * 0.15;
|
|
14
|
-
const toleranceY = viewportHeight * 0.15;
|
|
15
|
-
const centerX = measured.pageX + measured.width / 2;
|
|
16
|
-
const centerY = measured.pageY + measured.height / 2;
|
|
17
|
-
return centerX >= -toleranceX && centerX <= viewportWidth + toleranceX && centerY >= -toleranceY && centerY <= viewportHeight + toleranceY;
|
|
18
|
-
};
|
|
19
|
-
exports.isMeasurementInViewport = isMeasurementInViewport;
|
|
20
|
-
//# sourceMappingURL=measurement.js.map
|
package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["isMeasurementInViewport","measured","viewportWidth","viewportHeight","width","height","toleranceX","toleranceY","centerX","pageX","centerY","pageY","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/create-boundary-component/hooks/helpers/measurement.ts"],"mappings":";;;;;;AAEO,MAAMA,uBAAuB,GAAGA,CACtCC,QAA4B,EAC5BC,aAAqB,EACrBC,cAAsB,KACT;EACb,SAAS;;EAET,IAAIF,QAAQ,CAACG,KAAK,IAAI,CAAC,IAAIH,QAAQ,CAACI,MAAM,IAAI,CAAC,EAAE;IAChD,OAAO,KAAK;EACb;EAEA,MAAMC,UAAU,GAAGJ,aAAa,GAAG,IAAI;EACvC,MAAMK,UAAU,GAAGJ,cAAc,GAAG,IAAI;EACxC,MAAMK,OAAO,GAAGP,QAAQ,CAACQ,KAAK,GAAGR,QAAQ,CAACG,KAAK,GAAG,CAAC;EACnD,MAAMM,OAAO,GAAGT,QAAQ,CAACU,KAAK,GAAGV,QAAQ,CAACI,MAAM,GAAG,CAAC;EAEpD,OACCG,OAAO,IAAI,CAACF,UAAU,IACtBE,OAAO,IAAIN,aAAa,GAAGI,UAAU,IACrCI,OAAO,IAAI,CAACH,UAAU,IACtBG,OAAO,IAAIP,cAAc,GAAGI,UAAU;AAExC,CAAC;AAACK,OAAA,CAAAZ,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","SCROLL_MEASUREMENT_EPSILON","getOverscrollDelta","axisState","maxOffset","Math","max","contentSize","layoutSize","clampedOffset","min","offset","delta","abs","adjustedMeasuredBoundsForOverscrollDeltas","measured","scrollState","deltaX","horizontal","deltaY","vertical","x","y","pageX","pageY","exports","measureWithOverscrollAwareness","ref","measure"],"sourceRoot":"../../../../../../../src","sources":["shared/components/create-boundary-component/hooks/helpers/scroll-measurement.ts"],"mappings":";;;;;;AACA,IAAAA,sBAAA,GAAAC,OAAA;AAUA,MAAMC,0BAA0B,GAAG,CAAC;AAEpC,MAAMC,kBAAkB,GAAIC,SAAiC,IAAa;EACzE,SAAS;;EACT,MAAMC,SAAS,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,SAAS,CAACI,WAAW,GAAGJ,SAAS,CAACK,UAAU,CAAC;EAC3E,MAAMC,aAAa,GAAGJ,IAAI,CAACK,GAAG,CAACL,IAAI,CAACC,GAAG,CAACH,SAAS,CAACQ,MAAM,EAAE,CAAC,CAAC,EAAEP,SAAS,CAAC;EACxE,MAAMQ,KAAK,GAAGT,SAAS,CAACQ,MAAM,GAAGF,aAAa;EAE9C,OAAOJ,IAAI,CAACQ,GAAG,CAACD,KAAK,CAAC,GAAGX,0BAA0B,GAAGW,KAAK,GAAG,CAAC;AAChE,CAAC;AAEM,MAAME,yCAAyC,GAAGA,CACxDC,QAA4B,EAC5BC,WAAsC,KACd;EACxB,SAAS;;EAET,IAAI,CAACA,WAAW,EAAE;IACjB,OAAOD,QAAQ;EAChB;EAEA,MAAME,MAAM,GAAGf,kBAAkB,CAACc,WAAW,CAACE,UAAU,CAAC;EACzD,MAAMC,MAAM,GAAGjB,kBAAkB,CAACc,WAAW,CAACI,QAAQ,CAAC;EAEvD,IAAIH,MAAM,KAAK,CAAC,IAAIE,MAAM,KAAK,CAAC,EAAE;IACjC,OAAOJ,QAAQ;EAChB;EAEA,OAAO;IACN,GAAGA,QAAQ;IACXM,CAAC,EAAEN,QAAQ,CAACM,CAAC,GAAGJ,MAAM;IACtBK,CAAC,EAAEP,QAAQ,CAACO,CAAC,GAAGH,MAAM;IACtBI,KAAK,EAAER,QAAQ,CAACQ,KAAK,GAAGN,MAAM;IAC9BO,KAAK,EAAET,QAAQ,CAACS,KAAK,GAAGL;EACzB,CAAC;AACF,CAAC;AAACM,OAAA,CAAAX,yCAAA,GAAAA,yCAAA;AAEK,MAAMY,8BAA8B,GAAGA,CAC7CC,GAAsB,EACtBX,WAAsC,KACP;EAC/B,SAAS;;EACT,MAAMD,QAAQ,GAAG,IAAAa,8BAAO,EAACD,GAAG,CAAC;EAC7B,IAAI,CAACZ,QAAQ,EAAE,OAAO,IAAI;EAE1B,OAAOD,yCAAyC,CAACC,QAAQ,EAAEC,WAAW,CAAC;AACxE,CAAC;AAACS,OAAA,CAAAC,8BAAA,GAAAA,8BAAA","ignoreList":[]}
|
package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.buildBoundaryMatchKey = buildBoundaryMatchKey;
|
|
7
|
-
function buildBoundaryMatchKey(params) {
|
|
8
|
-
"worklet";
|
|
9
|
-
|
|
10
|
-
const {
|
|
11
|
-
group,
|
|
12
|
-
id
|
|
13
|
-
} = params;
|
|
14
|
-
return group ? `${group}:${id}` : String(id);
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=build-boundary-match-key.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["buildBoundaryMatchKey","params","group","id","String"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/utils/build-boundary-match-key.ts"],"mappings":";;;;;;AAOO,SAASA,qBAAqBA,CACpCC,MAAmC,EAC1B;EACT,SAAS;;EACT,MAAM;IAAEC,KAAK;IAAEC;EAAG,CAAC,GAAGF,MAAM;EAC5B,OAAOC,KAAK,GAAG,GAAGA,KAAK,IAAIC,EAAE,EAAE,GAAGC,MAAM,CAACD,EAAE,CAAC;AAC7C","ignoreList":[]}
|