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
package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js
CHANGED
|
@@ -6,18 +6,18 @@ import { removeEntry, setEntry } from "../../../stores/bounds/internals/entries"
|
|
|
6
6
|
export const useBoundaryPresence = params => {
|
|
7
7
|
const {
|
|
8
8
|
enabled,
|
|
9
|
-
|
|
9
|
+
entryTag,
|
|
10
10
|
currentScreenKey,
|
|
11
11
|
boundaryConfig
|
|
12
12
|
} = params;
|
|
13
13
|
useLayoutEffect(() => {
|
|
14
14
|
if (!enabled) return;
|
|
15
|
-
runOnUI(setEntry)(
|
|
15
|
+
runOnUI(setEntry)(entryTag, currentScreenKey, {
|
|
16
16
|
boundaryConfig
|
|
17
17
|
});
|
|
18
18
|
return () => {
|
|
19
|
-
runOnUI(removeEntry)(
|
|
19
|
+
runOnUI(removeEntry)(entryTag, currentScreenKey);
|
|
20
20
|
};
|
|
21
|
-
}, [enabled,
|
|
21
|
+
}, [enabled, entryTag, currentScreenKey, boundaryConfig]);
|
|
22
22
|
};
|
|
23
23
|
//# sourceMappingURL=use-boundary-presence.js.map
|
package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useLayoutEffect","runOnUI","removeEntry","setEntry","useBoundaryPresence","params","enabled","
|
|
1
|
+
{"version":3,"names":["useLayoutEffect","runOnUI","removeEntry","setEntry","useBoundaryPresence","params","enabled","entryTag","currentScreenKey","boundaryConfig"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-boundary-presence.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,OAAO;AACvC,SAASC,OAAO,QAAQ,yBAAyB;AACjD,SACCC,WAAW,EACXC,QAAQ,QACF,0CAA0C;AAGjD,OAAO,MAAMC,mBAAmB,GAAIC,MAKnC,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,QAAQ;IAAEC,gBAAgB;IAAEC;EAAe,CAAC,GAAGJ,MAAM;EAEtEL,eAAe,CAAC,MAAM;IACrB,IAAI,CAACM,OAAO,EAAE;IAEdL,OAAO,CAACE,QAAQ,CAAC,CAACI,QAAQ,EAAEC,gBAAgB,EAAE;MAC7CC;IACD,CAAC,CAAC;IAEF,OAAO,MAAM;MACZR,OAAO,CAACC,WAAW,CAAC,CAACK,QAAQ,EAAEC,gBAAgB,CAAC;IACjD,CAAC;EACF,CAAC,EAAE,CAACF,OAAO,EAAEC,QAAQ,EAAEC,gBAAgB,EAAEC,cAAc,CAAC,CAAC;AAC1D,CAAC","ignoreList":[]}
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
import { cancelAnimation, useAnimatedReaction, useSharedValue, withDelay, withTiming } from "react-native-reanimated";
|
|
4
4
|
import { AnimationStore } from "../../../stores/animation.store";
|
|
5
|
-
import {
|
|
5
|
+
import { getDestination } from "../../../stores/bounds/internals/links";
|
|
6
|
+
import { pairs } from "../../../stores/bounds/internals/state";
|
|
6
7
|
import { LifecycleTransitionRequestKind, SystemStore } from "../../../stores/system.store";
|
|
7
|
-
import {
|
|
8
|
-
import { shouldBlockInitialDestinationMeasurement } from "./helpers/measurement-rules";
|
|
8
|
+
import { getInitialDestinationMeasurePairKey } from "../utils/destination-signals";
|
|
9
9
|
const VIEWPORT_RETRY_DELAY_MS = 16;
|
|
10
10
|
export const useInitialDestinationMeasurement = ({
|
|
11
|
-
|
|
11
|
+
linkId,
|
|
12
12
|
enabled,
|
|
13
13
|
currentScreenKey,
|
|
14
14
|
preferredSourceScreenKey,
|
|
15
|
+
ancestorScreenKeys,
|
|
15
16
|
measureBoundary
|
|
16
17
|
}) => {
|
|
17
18
|
const progress = AnimationStore.getValue(currentScreenKey, "progress");
|
|
@@ -61,32 +62,29 @@ export const useInitialDestinationMeasurement = ({
|
|
|
61
62
|
if (!hasPendingOpenRequest || !isWaitingForOpenToStart) {
|
|
62
63
|
return [0, retryTick];
|
|
63
64
|
}
|
|
64
|
-
const
|
|
65
|
-
sharedBoundTag,
|
|
66
|
-
currentScreenKey,
|
|
67
|
-
preferredSourceScreenKey
|
|
68
|
-
});
|
|
69
|
-
const shouldBlock = shouldBlockInitialDestinationMeasurement({
|
|
65
|
+
const destinationPairKey = getInitialDestinationMeasurePairKey({
|
|
70
66
|
enabled,
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
currentScreenKey,
|
|
68
|
+
preferredSourceScreenKey,
|
|
69
|
+
ancestorScreenKeys,
|
|
70
|
+
linkId,
|
|
71
|
+
linkState: ancestorScreenKeys.length ? pairs.get() : undefined
|
|
73
72
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
return [1, retryTick];
|
|
78
|
-
}, ([shouldBlock]) => {
|
|
73
|
+
return [destinationPairKey, retryTick];
|
|
74
|
+
}, ([destinationPairKey]) => {
|
|
79
75
|
"worklet";
|
|
80
76
|
|
|
81
|
-
if (!
|
|
77
|
+
if (!destinationPairKey) {
|
|
82
78
|
releaseLifecycleStartBlock();
|
|
83
79
|
return;
|
|
84
80
|
}
|
|
85
81
|
ensureLifecycleStartBlocked();
|
|
86
82
|
measureBoundary({
|
|
87
|
-
|
|
83
|
+
type: "destination",
|
|
84
|
+
pairKey: destinationPairKey
|
|
88
85
|
});
|
|
89
|
-
|
|
86
|
+
const destinationAttached = getDestination(destinationPairKey, linkId) !== null;
|
|
87
|
+
if (destinationAttached) {
|
|
90
88
|
releaseLifecycleStartBlock();
|
|
91
89
|
return;
|
|
92
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cancelAnimation","useAnimatedReaction","useSharedValue","withDelay","withTiming","AnimationStore","
|
|
1
|
+
{"version":3,"names":["cancelAnimation","useAnimatedReaction","useSharedValue","withDelay","withTiming","AnimationStore","getDestination","pairs","LifecycleTransitionRequestKind","SystemStore","getInitialDestinationMeasurePairKey","VIEWPORT_RETRY_DELAY_MS","useInitialDestinationMeasurement","linkId","enabled","currentScreenKey","preferredSourceScreenKey","ancestorScreenKeys","measureBoundary","progress","getValue","system","getBag","pendingLifecycleRequestKind","blockLifecycleStart","unblockLifecycleStart","actions","isBlockingLifecycleStart","retryToken","ensureLifecycleStartBlocked","get","set","releaseLifecycleStartBlock","scheduleViewportRetry","duration","retryTick","hasPendingOpenRequest","Open","isWaitingForOpenToStart","destinationPairKey","linkState","length","undefined","type","pairKey","destinationAttached"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts"],"mappings":";;AAAA,SACCA,eAAe,EACfC,mBAAmB,EACnBC,cAAc,EACdC,SAAS,EACTC,UAAU,QACJ,yBAAyB;AAChC,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,cAAc,QAAQ,wCAAwC;AACvE,SAASC,KAAK,QAAQ,wCAAwC;AAC9D,SACCC,8BAA8B,EAC9BC,WAAW,QACL,8BAA8B;AAErC,SAASC,mCAAmC,QAAQ,8BAA8B;AAElF,MAAMC,uBAAuB,GAAG,EAAE;AAWlC,OAAO,MAAM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MAAM;IACL,SAAS;;IACT,MAAMkC,SAAS,GAAGP,UAAU,CAACE,GAAG,CAAC,CAAC;IAElC,MAAMM,qBAAqB,GAC1Bb,2BAA2B,CAACO,GAAG,CAAC,CAAC,KACjCtB,8BAA8B,CAAC6B,IAAI;IAEpC,MAAMC,uBAAuB,GAAGnB,QAAQ,CAACW,GAAG,CAAC,CAAC,IAAI,CAAC;IAEnD,IAAI,CAACM,qBAAqB,IAAI,CAACE,uBAAuB,EAAE;MACvD,OAAO,CAAC,CAAC,EAAEH,SAAS,CAAC;IACtB;IAEA,MAAMI,kBAAkB,GAAG7B,mCAAmC,CAAC;MAC9DI,OAAO;MACPC,gBAAgB;MAChBC,wBAAwB;MACxBC,kBAAkB;MAClBJ,MAAM;MACN2B,SAAS,EAAEvB,kBAAkB,CAACwB,MAAM,GAAGlC,KAAK,CAACuB,GAAG,CAAC,CAAC,GAAGY;IACtD,CAAC,CAAC;IAEF,OAAO,CAACH,kBAAkB,EAAEJ,SAAS,CAAC;EACvC,CAAC,EACD,CAAC,CAACI,kBAAkB,CAAC,KAAK;IACzB,SAAS;;IACT,IAAI,CAACA,kBAAkB,EAAE;MACxBP,0BAA0B,CAAC,CAAC;MAC5B;IACD;IAEAH,2BAA2B,CAAC,CAAC;IAC7BX,eAAe,CAAC;MACfyB,IAAI,EAAE,aAAa;MACnBC,OAAO,EAAEL;IACV,CAAC,CAAC;IAEF,MAAMM,mBAAmB,GACxBvC,cAAc,CAACiC,kBAAkB,EAAE1B,MAAM,CAAC,KAAK,IAAI;IAEpD,IAAIgC,mBAAmB,EAAE;MACxBb,0BAA0B,CAAC,CAAC;MAC5B;IACD;IAEAC,qBAAqB,CAAC,CAAC;EACxB,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,25 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useAnimatedReaction } from "react-native-reanimated";
|
|
3
|
+
import { useAnimatedReaction, useSharedValue } from "react-native-reanimated";
|
|
4
|
+
import { pairs } from "../../../stores/bounds/internals/state";
|
|
5
|
+
import { getInitialSourceCaptureSignal } from "../utils/source-signals";
|
|
4
6
|
export const useInitialSourceMeasurement = params => {
|
|
5
7
|
const {
|
|
6
8
|
enabled,
|
|
7
9
|
nextScreenKey,
|
|
8
|
-
measureBoundary
|
|
10
|
+
measureBoundary,
|
|
11
|
+
linkId,
|
|
12
|
+
currentScreenKey,
|
|
13
|
+
group,
|
|
14
|
+
shouldAutoMeasure
|
|
9
15
|
} = params;
|
|
16
|
+
const lastSourceCaptureSignal = useSharedValue(null);
|
|
10
17
|
useAnimatedReaction(() => {
|
|
11
18
|
"worklet";
|
|
12
19
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
return getInitialSourceCaptureSignal({
|
|
21
|
+
enabled,
|
|
22
|
+
nextScreenKey,
|
|
23
|
+
currentScreenKey,
|
|
24
|
+
linkId,
|
|
25
|
+
group,
|
|
26
|
+
shouldAutoMeasure,
|
|
27
|
+
linkState: group ? pairs.get() : undefined
|
|
28
|
+
});
|
|
17
29
|
}, captureSignal => {
|
|
18
30
|
"worklet";
|
|
19
31
|
|
|
20
|
-
if (!enabled || !captureSignal)
|
|
32
|
+
if (!enabled || !captureSignal) {
|
|
33
|
+
lastSourceCaptureSignal.set(null);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (lastSourceCaptureSignal.get() === captureSignal.signal) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
lastSourceCaptureSignal.set(captureSignal.signal);
|
|
21
40
|
measureBoundary({
|
|
22
|
-
|
|
41
|
+
type: "source",
|
|
42
|
+
pairKey: captureSignal.pairKey
|
|
23
43
|
});
|
|
24
44
|
});
|
|
25
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedReaction","useInitialSourceMeasurement","params","enabled","nextScreenKey","measureBoundary","captureSignal","
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","useSharedValue","pairs","getInitialSourceCaptureSignal","useInitialSourceMeasurement","params","enabled","nextScreenKey","measureBoundary","linkId","currentScreenKey","group","shouldAutoMeasure","lastSourceCaptureSignal","linkState","get","undefined","captureSignal","set","signal","type","pairKey"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-initial-source-measurement.ts"],"mappings":";;AAAA,SAASA,mBAAmB,EAAEC,cAAc,QAAQ,yBAAyB;AAC7E,SAASC,KAAK,QAAQ,wCAAwC;AAE9D,SAASC,6BAA6B,QAAQ,yBAAyB;AAEvE,OAAO,MAAMC,2BAA2B,GAAIC,MAQ3C,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,aAAa;IACbC,eAAe;IACfC,MAAM;IACNC,gBAAgB;IAChBC,KAAK;IACLC;EACD,CAAC,GAAGP,MAAM;EACV,MAAMQ,uBAAuB,GAAGZ,cAAc,CAAgB,IAAI,CAAC;EAEnED,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,OAAOG,6BAA6B,CAAC;MACpCG,OAAO;MACPC,aAAa;MACbG,gBAAgB;MAChBD,MAAM;MACNE,KAAK;MACLC,iBAAiB;MACjBE,SAAS,EAAEH,KAAK,GAAGT,KAAK,CAACa,GAAG,CAAC,CAAC,GAAGC;IAClC,CAAC,CAAC;EACH,CAAC,EACAC,aAAa,IAAK;IAClB,SAAS;;IACT,IAAI,CAACX,OAAO,IAAI,CAACW,aAAa,EAAE;MAC/BJ,uBAAuB,CAACK,GAAG,CAAC,IAAI,CAAC;MACjC;IACD;IAEA,IAAIL,uBAAuB,CAACE,GAAG,CAAC,CAAC,KAAKE,aAAa,CAACE,MAAM,EAAE;MAC3D;IACD;IAEAN,uBAAuB,CAACK,GAAG,CAACD,aAAa,CAACE,MAAM,CAAC;IACjDX,eAAe,CAAC;MACfY,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
import { useCallback } from "react";
|
|
4
4
|
import { useWindowDimensions } from "react-native";
|
|
5
|
+
import { setEntry } from "../../../stores/bounds/internals/entries";
|
|
6
|
+
import { setDestination, setSource } from "../../../stores/bounds/internals/links";
|
|
5
7
|
import { ScrollStore } from "../../../stores/scroll.store";
|
|
6
8
|
import { SystemStore } from "../../../stores/system.store";
|
|
7
|
-
import {
|
|
8
|
-
import { createLinkContext } from "./helpers/boundary-link-context";
|
|
9
|
-
import { isMeasurementInViewport } from "./helpers/measurement";
|
|
10
|
-
import { buildMeasurementWritePlan, getMeasureIntentFlags } from "./helpers/measurement-rules";
|
|
11
|
-
import { measureWithOverscrollAwareness } from "./helpers/scroll-measurement";
|
|
9
|
+
import { isMeasurementInViewport, measureWithOverscrollAwareness } from "../utils/measured-bounds";
|
|
12
10
|
export const useMeasurer = ({
|
|
13
11
|
enabled,
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
entryTag,
|
|
13
|
+
linkId,
|
|
14
|
+
group,
|
|
16
15
|
currentScreenKey,
|
|
17
16
|
preparedStyles,
|
|
18
17
|
measuredAnimatedRef
|
|
@@ -23,38 +22,13 @@ export const useMeasurer = ({
|
|
|
23
22
|
} = useWindowDimensions();
|
|
24
23
|
const scrollState = ScrollStore.getValue(currentScreenKey, "state");
|
|
25
24
|
const pendingLifecycleStartBlockCount = SystemStore.getValue(currentScreenKey, "pendingLifecycleStartBlockCount");
|
|
26
|
-
return useCallback(
|
|
27
|
-
intent
|
|
28
|
-
} = {}) => {
|
|
25
|
+
return useCallback(target => {
|
|
29
26
|
"worklet";
|
|
30
27
|
|
|
31
28
|
if (!enabled) return;
|
|
32
|
-
const intents = getMeasureIntentFlags(intent);
|
|
33
|
-
const currentLink = createLinkContext({
|
|
34
|
-
sharedBoundTag,
|
|
35
|
-
currentScreenKey,
|
|
36
|
-
preferredSourceScreenKey
|
|
37
|
-
});
|
|
38
|
-
const writePlan = buildMeasurementWritePlan({
|
|
39
|
-
intents,
|
|
40
|
-
hasPendingLink: currentLink.hasPendingLink,
|
|
41
|
-
hasSourceLink: currentLink.hasSourceLink,
|
|
42
|
-
hasDestinationLink: currentLink.hasDestinationLink,
|
|
43
|
-
hasAttachableSourceLink: currentLink.hasAttachableSourceLink
|
|
44
|
-
});
|
|
45
|
-
if (!writePlan.writesAny) return;
|
|
46
29
|
const measured = measureWithOverscrollAwareness(measuredAnimatedRef, scrollState.get());
|
|
47
30
|
if (!measured) return;
|
|
48
31
|
|
|
49
|
-
/**
|
|
50
|
-
* Source Pass
|
|
51
|
-
* Source intents are intentionally used & kept unguarded.
|
|
52
|
-
*/
|
|
53
|
-
const sourceWrites = {
|
|
54
|
-
shouldSetSource: writePlan.captureSource,
|
|
55
|
-
shouldUpdateSource: writePlan.refreshSource
|
|
56
|
-
};
|
|
57
|
-
|
|
58
32
|
/**
|
|
59
33
|
* - Destination Pass -
|
|
60
34
|
* Be strict while lifecycle start is blocked for destination capture.
|
|
@@ -62,23 +36,21 @@ export const useMeasurer = ({
|
|
|
62
36
|
* and malformed off-screen destination measurements should keep the
|
|
63
37
|
* lifecycle blocked until a valid retry lands.
|
|
64
38
|
*/
|
|
65
|
-
const shouldGuardDestinationViewport = pendingLifecycleStartBlockCount.get() > 0;
|
|
66
|
-
const viewportAllowsDestinationWrite = !shouldGuardDestinationViewport || isMeasurementInViewport(measured, viewportWidth, viewportHeight);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
applyMeasuredBoundsWrites({
|
|
74
|
-
sharedBoundTag,
|
|
75
|
-
currentScreenKey,
|
|
76
|
-
measured,
|
|
77
|
-
preparedStyles,
|
|
78
|
-
expectedSourceScreenKey: currentLink.expectedSourceScreenKey,
|
|
79
|
-
...sourceWrites,
|
|
80
|
-
...destinationWrites
|
|
39
|
+
const shouldGuardDestinationViewport = pendingLifecycleStartBlockCount.get() > 0 || !!group;
|
|
40
|
+
const viewportAllowsDestinationWrite = target.type !== "destination" || !shouldGuardDestinationViewport || isMeasurementInViewport(measured, viewportWidth, viewportHeight);
|
|
41
|
+
if (!viewportAllowsDestinationWrite) return;
|
|
42
|
+
|
|
43
|
+
// Set the bounds entry on every measure to avoid any stale measurements
|
|
44
|
+
// for the public read API.
|
|
45
|
+
setEntry(entryTag, currentScreenKey, {
|
|
46
|
+
bounds: measured
|
|
81
47
|
});
|
|
82
|
-
|
|
48
|
+
if (target.type === "source") {
|
|
49
|
+
setSource(target.pairKey, linkId, currentScreenKey, measured, preparedStyles, group);
|
|
50
|
+
}
|
|
51
|
+
if (target.type === "destination") {
|
|
52
|
+
setDestination(target.pairKey, linkId, currentScreenKey, measured, preparedStyles, group);
|
|
53
|
+
}
|
|
54
|
+
}, [enabled, entryTag, linkId, group, currentScreenKey, preparedStyles, measuredAnimatedRef, viewportWidth, viewportHeight, scrollState, pendingLifecycleStartBlockCount]);
|
|
83
55
|
};
|
|
84
56
|
//# sourceMappingURL=use-measurer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useWindowDimensions","
|
|
1
|
+
{"version":3,"names":["useCallback","useWindowDimensions","setEntry","setDestination","setSource","ScrollStore","SystemStore","isMeasurementInViewport","measureWithOverscrollAwareness","useMeasurer","enabled","entryTag","linkId","group","currentScreenKey","preparedStyles","measuredAnimatedRef","width","viewportWidth","height","viewportHeight","scrollState","getValue","pendingLifecycleStartBlockCount","target","measured","get","shouldGuardDestinationViewport","viewportAllowsDestinationWrite","type","bounds","pairKey"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-measurer.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,OAAO;AAEnC,SAASC,mBAAmB,QAAQ,cAAc;AAElD,SAASC,QAAQ,QAAQ,0CAA0C;AACnE,SACCC,cAAc,EACdC,SAAS,QACH,wCAAwC;AAC/C,SAASC,WAAW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nB,MAAM,EACNE,gBAAgB,EAChBW,QAAQ,EACRV,cAAc,EACdF,KACD,CAAC;IACF;IAEA,IAAIW,MAAM,CAACK,IAAI,KAAK,aAAa,EAAE;MAClC1B,cAAc,CACbqB,MAAM,CAACO,OAAO,EACdnB,MAAM,EACNE,gBAAgB,EAChBW,QAAQ,EACRV,cAAc,EACdF,KACD,CAAC;IACF;EACD,CAAC,EACD,CACCH,OAAO,EACPC,QAAQ,EACRC,MAAM,EACNC,KAAK,EACLC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,EACnBE,aAAa,EACbE,cAAc,EACdC,WAAW,EACXE,+BAA+B,CAEjC,CAAC;AACF,CAAC","ignoreList":[]}
|
package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js
CHANGED
|
@@ -2,60 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
import { useAnimatedReaction } from "react-native-reanimated";
|
|
4
4
|
import { AnimationStore } from "../../../stores/animation.store";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { pairs } from "../../../stores/bounds/internals/state";
|
|
6
|
+
import { getRefreshBoundarySignal } from "../utils/refresh-signals";
|
|
7
7
|
export const useRefreshBoundary = ({
|
|
8
8
|
enabled,
|
|
9
|
-
sharedBoundTag,
|
|
10
|
-
id,
|
|
11
|
-
group,
|
|
12
9
|
currentScreenKey,
|
|
10
|
+
preferredSourceScreenKey,
|
|
13
11
|
nextScreenKey,
|
|
14
|
-
|
|
12
|
+
linkId,
|
|
13
|
+
group,
|
|
14
|
+
ancestorScreenKeys,
|
|
15
15
|
measureBoundary
|
|
16
16
|
}) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
17
|
+
// Source-side boundaries refresh from the next screen's lifecycle pulse.
|
|
18
|
+
// Destination-side boundaries have no next screen, so they refresh from self.
|
|
19
|
+
const refreshScreenKey = nextScreenKey ?? currentScreenKey;
|
|
20
|
+
const refreshWillAnimate = AnimationStore.getValue(refreshScreenKey, "willAnimate");
|
|
21
|
+
const refreshClosing = AnimationStore.getValue(refreshScreenKey, "closing");
|
|
22
|
+
const refreshEntering = AnimationStore.getValue(refreshScreenKey, "entering");
|
|
23
|
+
const refreshAnimating = AnimationStore.getValue(refreshScreenKey, "progressAnimating");
|
|
24
|
+
const refreshProgress = AnimationStore.getValue(refreshScreenKey, "progress");
|
|
25
25
|
useAnimatedReaction(() => {
|
|
26
26
|
"worklet";
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
return getRefreshBoundarySignal({
|
|
29
|
+
enabled,
|
|
30
|
+
currentScreenKey,
|
|
31
|
+
preferredSourceScreenKey,
|
|
32
|
+
nextScreenKey,
|
|
33
|
+
linkId,
|
|
34
|
+
group,
|
|
35
|
+
ancestorScreenKeys,
|
|
36
|
+
shouldRefresh: !!refreshWillAnimate.get(),
|
|
37
|
+
closing: !!refreshClosing.get(),
|
|
38
|
+
entering: !!refreshEntering.get(),
|
|
39
|
+
animating: !!refreshAnimating.get(),
|
|
40
|
+
progress: refreshProgress.get(),
|
|
41
|
+
linkState: group || ancestorScreenKeys.length ? pairs.get() : undefined
|
|
42
|
+
});
|
|
43
|
+
}, (refreshSignal, prevRefreshSignal) => {
|
|
41
44
|
"worklet";
|
|
42
45
|
|
|
43
|
-
if (!
|
|
44
|
-
const currentGroupActiveId = group ? getGroupActiveId(group) : null;
|
|
45
|
-
if (group && currentGroupActiveId !== String(id)) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (hasNextScreen) {
|
|
49
|
-
if (!nextScreenKey || !hasSourceLink(sharedBoundTag, currentScreenKey) || !hasDestinationLink(sharedBoundTag, nextScreenKey)) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
measureBoundary({
|
|
53
|
-
intent: "refresh-source"
|
|
54
|
-
});
|
|
46
|
+
if (!refreshSignal || refreshSignal.signal === prevRefreshSignal?.signal) {
|
|
55
47
|
return;
|
|
56
48
|
}
|
|
57
49
|
measureBoundary({
|
|
58
|
-
|
|
50
|
+
type: refreshSignal.type,
|
|
51
|
+
pairKey: refreshSignal.pairKey
|
|
59
52
|
});
|
|
60
53
|
});
|
|
61
54
|
};
|
package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedReaction","AnimationStore","
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","AnimationStore","pairs","getRefreshBoundarySignal","useRefreshBoundary","enabled","currentScreenKey","preferredSourceScreenKey","nextScreenKey","linkId","group","ancestorScreenKeys","measureBoundary","refreshScreenKey","refreshWillAnimate","getValue","refreshClosing","refreshEntering","refreshAnimating","refreshProgress","shouldRefresh","get","closing","entering","animating","progress","linkState","length","undefined","refreshSignal","prevRefreshSignal","signal","type","pairKey"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-refresh-boundary.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,KAAK,QAAQ,wCAAwC;AAE9D,SAASC,wBAAwB,QAAQ,0BAA0B;AAanE,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EAClCC,OAAO;EACPC,gBAAgB;EAChBC,wBAAwB;EACxBC,aAAa;EACbC,MAAM;EACNC,KAAK;EACLC,kBAAkB;EAClBC;AACyB,CAAC,KAAK;EAC/B;EACA;EACA,MAAMC,gBAAgB,GAAGL,aAAa,IAAIF,gBAAgB;EAC1D,MAAMQ,kBAAkB,GAAGb,cAAc,CAACc,QAAQ,CACjDF,gBAAgB,EAChB,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@@ -4,7 +4,9 @@ import { Pressable, View } from "react-native";
|
|
|
4
4
|
import { BoundaryTarget } from "./components/boundary-target";
|
|
5
5
|
import { createBoundaryComponent } from "./create-boundary-component";
|
|
6
6
|
export { createBoundaryComponent };
|
|
7
|
-
const BoundaryView = createBoundaryComponent(View
|
|
7
|
+
const BoundaryView = createBoundaryComponent(View, {
|
|
8
|
+
shouldAutoMeasure: true
|
|
9
|
+
});
|
|
8
10
|
const BoundaryTrigger = createBoundaryComponent(Pressable);
|
|
9
11
|
BoundaryView.displayName = "Transition.Boundary.View";
|
|
10
12
|
BoundaryTrigger.displayName = "Transition.Boundary.Trigger";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Pressable","View","BoundaryTarget","createBoundaryComponent","BoundaryView","BoundaryTrigger","displayName","Boundary","Trigger","Target"],"sourceRoot":"../../../../../src","sources":["shared/components/create-boundary-component/index.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAC9C,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,uBAAuB,QAAQ,6BAA6B;AAErE,SAASA,uBAAuB;AAEhC,MAAMC,YAAY,GAAGD,uBAAuB,CAACF,IAAI,CAAC;
|
|
1
|
+
{"version":3,"names":["Pressable","View","BoundaryTarget","createBoundaryComponent","BoundaryView","shouldAutoMeasure","BoundaryTrigger","displayName","Boundary","Trigger","Target"],"sourceRoot":"../../../../../src","sources":["shared/components/create-boundary-component/index.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAC9C,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,uBAAuB,QAAQ,6BAA6B;AAErE,SAASA,uBAAuB;AAEhC,MAAMC,YAAY,GAAGD,uBAAuB,CAACF,IAAI,EAAE;EAClDI,iBAAiB,EAAE;AACpB,CAAC,CAAC;AACF,MAAMC,eAAe,GAAGH,uBAAuB,CAACH,SAAS,CAAC;AAC1DI,YAAY,CAACG,WAAW,GAAG,0BAA0B;AACrDD,eAAe,CAACC,WAAW,GAAG,6BAA6B;AAC3DL,cAAc,CAACK,WAAW,GAAG,4BAA4B;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,QAAQ,GAAG;EACvB;AACD;AACA;EACCP,IAAI,EAAEG,YAAY;EAClB;AACD;AACA;EACCK,OAAO,EAAEH,eAAe;EACxB;AACD;AACA;EACCI,MAAM,EAAER;AACT,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createPendingPairKey, createScreenPairKey, getDestinationScreenKeyFromPairKey, getSourceScreenKeyFromPairKey } from "../../../stores/bounds/helpers/link-pairs.helpers";
|
|
4
|
+
import { getDestination, getSource } from "../../../stores/bounds/internals/links";
|
|
5
|
+
const findPendingSourcePairKey = (linkState, linkId) => {
|
|
6
|
+
"worklet";
|
|
7
|
+
|
|
8
|
+
if (!linkState) return null;
|
|
9
|
+
for (const pairKey in linkState) {
|
|
10
|
+
const sourceScreenKey = getSourceScreenKeyFromPairKey(pairKey);
|
|
11
|
+
if (pairKey !== createPendingPairKey(sourceScreenKey)) {
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
if (linkState[pairKey]?.links?.[linkId]?.source) {
|
|
15
|
+
return pairKey;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return null;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// Passive Boundary.View sources in nested routes can already live in the final
|
|
22
|
+
// ancestor pair, even before the destination side has attached.
|
|
23
|
+
const findAncestorSourcePairKey = (linkState, linkId, destinationScreenKey) => {
|
|
24
|
+
"worklet";
|
|
25
|
+
|
|
26
|
+
if (!linkState || !destinationScreenKey) return null;
|
|
27
|
+
for (const pairKey in linkState) {
|
|
28
|
+
if (getDestinationScreenKeyFromPairKey(pairKey) !== destinationScreenKey) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if (linkState[pairKey]?.links?.[linkId]?.source) {
|
|
32
|
+
return pairKey;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
36
|
+
};
|
|
37
|
+
export const getInitialDestinationMeasurePairKey = params => {
|
|
38
|
+
"worklet";
|
|
39
|
+
|
|
40
|
+
const {
|
|
41
|
+
enabled,
|
|
42
|
+
currentScreenKey,
|
|
43
|
+
preferredSourceScreenKey,
|
|
44
|
+
ancestorScreenKeys,
|
|
45
|
+
linkId,
|
|
46
|
+
linkState
|
|
47
|
+
} = params;
|
|
48
|
+
if (!enabled) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Initial screens inside nested navigators measure concrete child views, but
|
|
53
|
+
// the transition pair belongs to the nearest animated ancestor route.
|
|
54
|
+
const ancestorPairKey = findAncestorSourcePairKey(linkState, linkId, ancestorScreenKeys?.[0]);
|
|
55
|
+
|
|
56
|
+
// Trigger sources start as pending screen<> links. Boundary.View sources may
|
|
57
|
+
// already be in the ancestor pair, so only scan pending when needed.
|
|
58
|
+
const pendingSourcePairKey = preferredSourceScreenKey ? createPendingPairKey(preferredSourceScreenKey) : ancestorPairKey ? null : findPendingSourcePairKey(linkState, linkId);
|
|
59
|
+
const sourceScreenKey = preferredSourceScreenKey ? preferredSourceScreenKey : getSourceScreenKeyFromPairKey(ancestorPairKey ?? pendingSourcePairKey ?? "");
|
|
60
|
+
if (!sourceScreenKey) return null;
|
|
61
|
+
|
|
62
|
+
// Non-nested destinations attach to their own route. Nested initial screens
|
|
63
|
+
// attach to the animated ancestor route unless that pair already exists.
|
|
64
|
+
const destinationScreenKey = ancestorPairKey || preferredSourceScreenKey || !ancestorScreenKeys?.[0] ? currentScreenKey : ancestorScreenKeys[0];
|
|
65
|
+
const destinationPairKey = ancestorPairKey ?? createScreenPairKey(sourceScreenKey, destinationScreenKey);
|
|
66
|
+
const hasDestinationLink = getDestination(destinationPairKey, linkId) !== null;
|
|
67
|
+
const hasAttachableSourceLink = getSource(destinationPairKey, linkId) !== null || !!pendingSourcePairKey && getSource(pendingSourcePairKey, linkId) !== null;
|
|
68
|
+
return hasAttachableSourceLink && !hasDestinationLink ? destinationPairKey : null;
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=destination-signals.js.map
|
package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createPendingPairKey","createScreenPairKey","getDestinationScreenKeyFromPairKey","getSourceScreenKeyFromPairKey","getDestination","getSource","findPendingSourcePairKey","linkState","linkId","pairKey","sourceScreenKey","links","source","findAncestorSourcePairKey","destinationScreenKey","getInitialDestinationMeasurePairKey","params","enabled","currentScreenKey","preferredSourceScreenKey","ancestorScreenKeys","ancestorPairKey","pendingSourcePairKey","destinationPairKey","hasDestinationLink","hasAttachableSourceLink"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/utils/destination-signals.ts"],"mappings":";;AAAA,SACCA,oBAAoB,EACpBC,mBAAmB,EACnBC,kCAAkC,EAClCC,6BAA6B,QACvB,mDAAmD;AAC1D,SACCC,cAAc,EACdC,SAAS,QACH,wCAAwC;AAM/C,MAAMC,wBAAwB,GAAGA,CAChCC,SAAqC,EACrCC,MAAc,KACY;EAC1B,SAAS;;EACT,IAAI,CAACD,SAAS,EAAE,OAAO,IAAI;EAE3B,KAAK,MAAME,OAAO,IAAIF,SAAS,EAAE;IAChC,MAAMG,eAAe,GAAGP,6BAA6B,CAACM,OAAO,CAAC;IAE9D,IAAIA,OAAO,KAAKT,oBAAoB,CAACU,eAAe,CAAC,EAAE;MACtD;IACD;IAEA,IAAIH,SAAS,CAACE,OAAO,CAAC,EAAEE,KAAK,GAAGH,MAAM,CAAC,EAAEI,MAAM,EAAE;MAChD,OAAOH,OAAO;IACf;EACD;EAEA,OAAO,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AAC,CAAC,CAAC;EAEzB,MAAMG,kBAAkB,GACvBF,eAAe,IACfpB,mBAAmB,CAACS,eAAe,EAAEI,oBAAoB,CAAC;EAE3D,MAAMU,kBAAkB,GACvBpB,cAAc,CAACmB,kBAAkB,EAAEf,MAAM,CAAC,KAAK,IAAI;EAEpD,MAAMiB,uBAAuB,GAC5BpB,SAAS,CAACkB,kBAAkB,EAAEf,MAAM,CAAC,KAAK,IAAI,IAC7C,CAAC,CAACc,oBAAoB,IACtBjB,SAAS,CAACiB,oBAAoB,EAAEd,MAAM,CAAC,KAAK,IAAK;EAEnD,OAAOiB,uBAAuB,IAAI,CAACD,kBAAkB,GAClDD,kBAAkB,GAClB,IAAI;AACR,CAAC","ignoreList":[]}
|
|
@@ -29,6 +29,18 @@ export const adjustedMeasuredBoundsForOverscrollDeltas = (measured, scrollState)
|
|
|
29
29
|
pageY: measured.pageY + deltaY
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
+
export const isMeasurementInViewport = (measured, viewportWidth, viewportHeight) => {
|
|
33
|
+
"worklet";
|
|
34
|
+
|
|
35
|
+
if (measured.width <= 0 || measured.height <= 0) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
const toleranceX = viewportWidth * 0.15;
|
|
39
|
+
const toleranceY = viewportHeight * 0.15;
|
|
40
|
+
const centerX = measured.pageX + measured.width / 2;
|
|
41
|
+
const centerY = measured.pageY + measured.height / 2;
|
|
42
|
+
return centerX >= -toleranceX && centerX <= viewportWidth + toleranceX && centerY >= -toleranceY && centerY <= viewportHeight + toleranceY;
|
|
43
|
+
};
|
|
32
44
|
export const measureWithOverscrollAwareness = (ref, scrollState) => {
|
|
33
45
|
"worklet";
|
|
34
46
|
|
|
@@ -36,4 +48,4 @@ export const measureWithOverscrollAwareness = (ref, scrollState) => {
|
|
|
36
48
|
if (!measured) return null;
|
|
37
49
|
return adjustedMeasuredBoundsForOverscrollDeltas(measured, scrollState);
|
|
38
50
|
};
|
|
39
|
-
//# sourceMappingURL=
|
|
51
|
+
//# sourceMappingURL=measured-bounds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["measure","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","isMeasurementInViewport","viewportWidth","viewportHeight","width","height","toleranceX","toleranceY","centerX","centerY","measureWithOverscrollAwareness","ref"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/utils/measured-bounds.ts"],"mappings":";;AACA,SAGCA,OAAO,QACD,yBAAyB;AAMhC,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;AAED,OAAO,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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