react-native-screen-transitions 3.6.0-alpha.1 → 3.6.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/component-stack/components/component-screen.js +1 -7
- package/lib/commonjs/component-stack/components/component-screen.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js +27 -34
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js +4 -4
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +17 -19
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +27 -7
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js +23 -51
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js +3 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js +75 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +15 -2
- package/lib/commonjs/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js +103 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js +52 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
- package/lib/commonjs/shared/components/native-screen.js +2 -13
- package/lib/commonjs/shared/components/native-screen.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js +11 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/constants.js +5 -12
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +35 -0
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
- package/lib/commonjs/shared/providers/register-bounds.provider.js +48 -55
- package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +26 -8
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +1 -2
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -4
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js +9 -2
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js +19 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js +18 -2
- package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +1 -5
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/options/helpers.js +3 -1
- package/lib/commonjs/shared/providers/screen/options/helpers.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +125 -0
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/index.js +6 -12
- package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/clear.js +13 -21
- package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/entries.js +49 -9
- package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +143 -82
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +17 -43
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/state.js +26 -3
- package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/commonjs/shared/stores/gesture.store.js +2 -0
- package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
- package/lib/commonjs/shared/types/gesture.types.js +2 -2
- package/lib/commonjs/shared/types/gesture.types.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +21 -8
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +23 -0
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/index.js +3 -2
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +120 -205
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js +15 -2
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +175 -14
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +2 -2
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
- package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
- package/lib/module/component-stack/components/component-screen.js +2 -8
- package/lib/module/component-stack/components/component-screen.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +27 -34
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +4 -4
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +18 -20
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +28 -8
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js +22 -50
- package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
- package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/index.js +3 -1
- package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js +70 -0
- package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +13 -1
- package/lib/module/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js +98 -0
- package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/utils/source-signals.js +47 -0
- package/lib/module/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
- package/lib/module/shared/components/native-screen.js +3 -14
- package/lib/module/shared/components/native-screen.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js +13 -3
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/constants.js +4 -11
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +30 -0
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
- package/lib/module/shared/providers/register-bounds.provider.js +48 -55
- package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +26 -3
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +1 -2
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -4
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
- package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js +10 -3
- package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-release.js +20 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
- package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js +3 -3
- package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js +3 -3
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +3 -3
- package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/physics.js +15 -0
- package/lib/module/shared/providers/screen/gestures/shared/physics.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/policy.js +3 -3
- package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/module/shared/providers/screen/options/helpers.js +3 -1
- package/lib/module/shared/providers/screen/options/helpers.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/managed.provider.js.map +1 -1
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +105 -0
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
- package/lib/module/shared/stores/bounds/index.js +7 -13
- package/lib/module/shared/stores/bounds/index.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/clear.js +14 -22
- package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/entries.js +49 -9
- package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +139 -80
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +17 -43
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/state.js +25 -2
- package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/module/shared/stores/gesture.store.js +2 -0
- package/lib/module/shared/stores/gesture.store.js.map +1 -1
- package/lib/module/shared/types/animation.types.js +0 -4
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/types/bounds.types.js.map +1 -1
- package/lib/module/shared/types/gesture.types.js +0 -1
- package/lib/module/shared/types/gesture.types.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
- package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +21 -8
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +18 -0
- package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
- package/lib/module/shared/utils/bounds/index.js +3 -2
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js +120 -205
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/config.js +14 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js +163 -12
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js +2 -2
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
- package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
- package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts +4 -207
- package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts +1 -0
- package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts +5 -4
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts +6 -2
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts +5 -4
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +7 -7
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts +2 -2
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts +11 -7
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts +10 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.d.ts → utils/measured-bounds.d.ts} +3 -2
- package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts +22 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts +16 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +2 -2
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +1 -6
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +3 -3
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +21 -0
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -0
- package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/build-screen-transition-options.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts +1 -2
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/selected-interpolator-options.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-release.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/use-pan-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/use-pinch-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts +7 -0
- package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +0 -10
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts +2 -0
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/options/helpers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/options/types.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/options/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts +1 -1
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/managed.provider.d.ts +1 -1
- package/lib/typescript/shared/providers/stack/managed.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +18 -0
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/index.d.ts +6 -12
- package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts +13 -10
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts +26 -5
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +14 -7
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/stores/gesture.store.d.ts +1 -0
- package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +4 -19
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +69 -1
- package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/gesture.types.d.ts +8 -1
- package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +2 -2
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +4 -14
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts +4 -0
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts +14 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts +58 -7
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/types.d.ts +2 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/options.d.ts +2 -3
- package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
- package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts +3 -2
- package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/component-stack/components/component-screen.tsx +3 -11
- package/src/shared/components/create-boundary-component/create-boundary-component.tsx +30 -27
- package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +5 -5
- package/src/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts +25 -24
- package/src/shared/components/create-boundary-component/hooks/use-initial-source-measurement.ts +41 -11
- package/src/shared/components/create-boundary-component/hooks/use-measurer.ts +49 -64
- package/src/shared/components/create-boundary-component/hooks/use-refresh-boundary.ts +44 -83
- package/src/shared/components/create-boundary-component/index.tsx +3 -1
- package/src/shared/components/create-boundary-component/types.ts +13 -11
- package/src/shared/components/create-boundary-component/utils/destination-signals.ts +129 -0
- package/src/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.ts → utils/measured-bounds.ts} +25 -1
- package/src/shared/components/create-boundary-component/utils/refresh-signals.ts +164 -0
- package/src/shared/components/create-boundary-component/utils/source-signals.ts +72 -0
- package/src/shared/components/native-screen.tsx +3 -12
- package/src/shared/components/screen-container/layers/content.tsx +21 -2
- package/src/shared/constants.ts +1 -9
- package/src/shared/index.ts +0 -3
- package/src/shared/providers/helpers/measured-bounds-writes.ts +67 -0
- package/src/shared/providers/register-bounds.provider.tsx +68 -91
- package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +0 -14
- package/src/shared/providers/screen/animation/helpers/build-screen-transition-options.ts +1 -0
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +49 -4
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/types.ts +1 -1
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +2 -5
- package/src/shared/providers/screen/animation/helpers/selected-interpolator-options.ts +1 -0
- package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +3 -12
- package/src/shared/providers/screen/gestures/pan/pan-activation.ts +4 -1
- package/src/shared/providers/screen/gestures/pan/pan-lifecycle.ts +18 -2
- package/src/shared/providers/screen/gestures/pan/pan-release.ts +33 -0
- package/src/shared/providers/screen/gestures/pan/pan-reset.ts +3 -0
- package/src/shared/providers/screen/gestures/pan/use-pan-behavior.ts +9 -6
- package/src/shared/providers/screen/gestures/pinch/pinch-activation.ts +5 -2
- package/src/shared/providers/screen/gestures/pinch/pinch-lifecycle.ts +1 -0
- package/src/shared/providers/screen/gestures/pinch/use-pinch-behavior.ts +9 -6
- package/src/shared/providers/screen/gestures/shared/physics.ts +25 -0
- package/src/shared/providers/screen/gestures/shared/policy.ts +3 -5
- package/src/shared/providers/screen/gestures/types.ts +2 -0
- package/src/shared/providers/screen/options/helpers.ts +9 -0
- package/src/shared/providers/screen/options/types.ts +1 -0
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +0 -3
- package/src/shared/providers/stack/direct.provider.tsx +1 -1
- package/src/shared/providers/stack/managed.provider.tsx +1 -1
- package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +161 -0
- package/src/shared/stores/bounds/index.ts +10 -20
- package/src/shared/stores/bounds/internals/clear.ts +17 -41
- package/src/shared/stores/bounds/internals/entries.ts +56 -13
- package/src/shared/stores/bounds/internals/links.ts +222 -113
- package/src/shared/stores/bounds/internals/resolver.ts +23 -87
- package/src/shared/stores/bounds/internals/state.ts +27 -5
- package/src/shared/stores/bounds/types.ts +17 -7
- package/src/shared/stores/gesture.store.ts +3 -0
- package/src/shared/types/animation.types.ts +4 -23
- package/src/shared/types/bounds.types.ts +72 -1
- package/src/shared/types/gesture.types.ts +8 -2
- package/src/shared/types/index.ts +1 -4
- package/src/shared/types/screen.types.ts +4 -14
- package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +1 -0
- package/src/shared/utils/bounds/helpers/create-link-accessor.ts +6 -6
- package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +20 -11
- package/src/shared/utils/bounds/helpers/resolve-bounds-pair-key.ts +22 -0
- package/src/shared/utils/bounds/index.ts +3 -1
- package/src/shared/utils/bounds/navigation/reveal/build.ts +198 -308
- package/src/shared/utils/bounds/navigation/reveal/config.ts +20 -1
- package/src/shared/utils/bounds/navigation/reveal/math.ts +264 -18
- package/src/shared/utils/bounds/navigation/reveal/types.ts +2 -0
- package/src/shared/utils/bounds/navigation/zoom/build.ts +2 -2
- package/src/shared/utils/bounds/types/options.ts +2 -3
- package/src/shared/utils/navigation/resolve-scene-neighbors.ts +36 -23
- package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -43
- package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -17
- package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -28
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -75
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -20
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -16
- package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
- package/lib/commonjs/shared/providers/layout-anchor.provider.js +0 -86
- package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js +0 -49
- package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js +0 -25
- package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js +0 -30
- package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js +0 -79
- package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/matching.js +0 -13
- package/lib/commonjs/shared/stores/bounds/helpers/matching.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js +0 -30
- package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/internals/groups.js +0 -102
- package/lib/commonjs/shared/stores/bounds/internals/groups.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -38
- package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -12
- package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -23
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -68
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -15
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -12
- package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
- package/lib/module/shared/providers/layout-anchor.provider.js +0 -80
- package/lib/module/shared/providers/layout-anchor.provider.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/entries.helpers.js +0 -42
- package/lib/module/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/find-latest.js +0 -19
- package/lib/module/shared/stores/bounds/helpers/find-latest.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/groups.helpers.js +0 -23
- package/lib/module/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/link.helpers.js +0 -69
- package/lib/module/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/matching.js +0 -9
- package/lib/module/shared/stores/bounds/helpers/matching.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js +0 -24
- package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/internals/groups.js +0 -95
- package/lib/module/shared/stores/bounds/internals/groups.js.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts +0 -15
- package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts +0 -2
- package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts +0 -22
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +0 -29
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts +0 -3
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +0 -8
- package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +0 -1
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +0 -39
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts +0 -5
- package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts +0 -3
- package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts +0 -10
- package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts +0 -14
- package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts +0 -3
- package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts +0 -5
- package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/internals/groups.d.ts +0 -16
- package/lib/typescript/shared/stores/bounds/internals/groups.d.ts.map +0 -1
- package/src/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.ts +0 -83
- package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +0 -20
- package/src/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.ts +0 -48
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +0 -101
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement.ts +0 -25
- package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +0 -14
- package/src/shared/providers/layout-anchor.provider.tsx +0 -112
- package/src/shared/stores/bounds/helpers/entries.helpers.ts +0 -55
- package/src/shared/stores/bounds/helpers/find-latest.ts +0 -22
- package/src/shared/stores/bounds/helpers/groups.helpers.ts +0 -27
- package/src/shared/stores/bounds/helpers/link.helpers.ts +0 -131
- package/src/shared/stores/bounds/helpers/matching.ts +0 -11
- package/src/shared/stores/bounds/helpers/tag-state.helpers.ts +0 -24
- package/src/shared/stores/bounds/internals/groups.ts +0 -116
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createPendingPairKey,
|
|
3
|
+
createScreenPairKey,
|
|
4
|
+
getDestinationScreenKeyFromPairKey,
|
|
5
|
+
} from "../../../stores/bounds/helpers/link-pairs.helpers";
|
|
6
|
+
import type {
|
|
7
|
+
LinkPairsState,
|
|
8
|
+
ScreenPairKey,
|
|
9
|
+
} from "../../../stores/bounds/types";
|
|
10
|
+
import type { MeasureTarget } from "../types";
|
|
11
|
+
|
|
12
|
+
const SOURCE_SIGNAL_PREFIX = "source|";
|
|
13
|
+
const DESTINATION_SIGNAL_PREFIX = "destination|";
|
|
14
|
+
|
|
15
|
+
type RefreshBoundarySignal = MeasureTarget & {
|
|
16
|
+
signal: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const findNestedDestinationPairKey = (
|
|
20
|
+
linkState: LinkPairsState | undefined,
|
|
21
|
+
linkId: string,
|
|
22
|
+
ancestorScreenKeys: readonly string[] | undefined,
|
|
23
|
+
): ScreenPairKey | null => {
|
|
24
|
+
"worklet";
|
|
25
|
+
const destinationScreenKey = ancestorScreenKeys?.[0];
|
|
26
|
+
if (!linkState || !destinationScreenKey) return null;
|
|
27
|
+
|
|
28
|
+
for (const pairKey in linkState) {
|
|
29
|
+
if (getDestinationScreenKeyFromPairKey(pairKey) !== destinationScreenKey) {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (linkState[pairKey]?.links?.[linkId]?.destination) {
|
|
34
|
+
return pairKey;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return null;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const buildRefreshSignal = (
|
|
42
|
+
type: MeasureTarget["type"],
|
|
43
|
+
pairKey: ScreenPairKey,
|
|
44
|
+
key: string,
|
|
45
|
+
): RefreshBoundarySignal => {
|
|
46
|
+
"worklet";
|
|
47
|
+
const prefix =
|
|
48
|
+
type === "source" ? SOURCE_SIGNAL_PREFIX : DESTINATION_SIGNAL_PREFIX;
|
|
49
|
+
return {
|
|
50
|
+
type,
|
|
51
|
+
pairKey,
|
|
52
|
+
signal: `${prefix}${pairKey}|${key}`,
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const getRefreshBoundarySignal = (params: {
|
|
57
|
+
enabled: boolean;
|
|
58
|
+
currentScreenKey: string;
|
|
59
|
+
preferredSourceScreenKey?: string;
|
|
60
|
+
nextScreenKey?: string;
|
|
61
|
+
linkId: string;
|
|
62
|
+
group?: string;
|
|
63
|
+
ancestorScreenKeys?: readonly string[];
|
|
64
|
+
shouldRefresh: boolean;
|
|
65
|
+
closing: boolean;
|
|
66
|
+
entering: boolean;
|
|
67
|
+
animating: boolean;
|
|
68
|
+
progress: number;
|
|
69
|
+
linkState?: LinkPairsState;
|
|
70
|
+
}): RefreshBoundarySignal | null => {
|
|
71
|
+
"worklet";
|
|
72
|
+
const {
|
|
73
|
+
enabled,
|
|
74
|
+
currentScreenKey,
|
|
75
|
+
preferredSourceScreenKey,
|
|
76
|
+
nextScreenKey,
|
|
77
|
+
linkId,
|
|
78
|
+
group,
|
|
79
|
+
ancestorScreenKeys,
|
|
80
|
+
shouldRefresh,
|
|
81
|
+
closing,
|
|
82
|
+
entering,
|
|
83
|
+
animating,
|
|
84
|
+
progress,
|
|
85
|
+
linkState,
|
|
86
|
+
} = params;
|
|
87
|
+
|
|
88
|
+
if (!enabled) return null;
|
|
89
|
+
|
|
90
|
+
const canRefreshPreCloseDestination =
|
|
91
|
+
shouldRefresh && closing && !entering && !animating && progress >= 1;
|
|
92
|
+
const canRefreshSettledDestination = shouldRefresh && !closing && !entering;
|
|
93
|
+
|
|
94
|
+
if (!canRefreshPreCloseDestination && !canRefreshSettledDestination) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Non-group refresh only rewrites destination bounds. Source refresh is a
|
|
99
|
+
// grouped-only fallback for active ids that do not have source bounds yet.
|
|
100
|
+
if (!group) {
|
|
101
|
+
if (nextScreenKey) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Nested initial screens have no previous screen in their own navigator,
|
|
106
|
+
// so recover the pair by looking for a destination on the ancestor route.
|
|
107
|
+
const pairKey = preferredSourceScreenKey
|
|
108
|
+
? createScreenPairKey(preferredSourceScreenKey, currentScreenKey)
|
|
109
|
+
: findNestedDestinationPairKey(linkState, linkId, ancestorScreenKeys);
|
|
110
|
+
|
|
111
|
+
if (!pairKey) return null;
|
|
112
|
+
|
|
113
|
+
return buildRefreshSignal(
|
|
114
|
+
"destination",
|
|
115
|
+
pairKey,
|
|
116
|
+
[currentScreenKey, closing ? "closing" : "settled"].join("|"),
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Source-side grouped refresh: a new active id may not have source bounds yet,
|
|
121
|
+
// so the next screen's lifecycle pulse gives that source one chance to capture.
|
|
122
|
+
if (nextScreenKey) {
|
|
123
|
+
const pairKey = createScreenPairKey(currentScreenKey, nextScreenKey);
|
|
124
|
+
const pendingPairKey = createPendingPairKey(currentScreenKey);
|
|
125
|
+
const activeId = linkState?.[pairKey]?.groups?.[group]?.activeId;
|
|
126
|
+
const hasSource =
|
|
127
|
+
!!linkState?.[pairKey]?.links?.[linkId]?.source ||
|
|
128
|
+
!!linkState?.[pendingPairKey]?.links?.[linkId]?.source;
|
|
129
|
+
|
|
130
|
+
if (activeId !== linkId || hasSource) {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return buildRefreshSignal(
|
|
135
|
+
"source",
|
|
136
|
+
pairKey,
|
|
137
|
+
[group, linkId, closing ? "closing" : "settled"].join("|"),
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (!preferredSourceScreenKey) return null;
|
|
142
|
+
|
|
143
|
+
// Destination-side grouped refresh: only the active member rewrites the
|
|
144
|
+
// destination side, keeping inactive grouped members from stealing the link.
|
|
145
|
+
const pairKey = createScreenPairKey(
|
|
146
|
+
preferredSourceScreenKey,
|
|
147
|
+
currentScreenKey,
|
|
148
|
+
);
|
|
149
|
+
const activeId = linkState?.[pairKey]?.groups?.[group]?.activeId;
|
|
150
|
+
const hasSource = !!linkState?.[pairKey]?.links?.[linkId]?.source;
|
|
151
|
+
const hasDestination = !!linkState?.[pairKey]?.links?.[linkId]?.destination;
|
|
152
|
+
|
|
153
|
+
// Destination retargeting should only measure a concrete member that already
|
|
154
|
+
// participates in the pair. Missing members fall back to initialId at resolve.
|
|
155
|
+
if (activeId !== linkId || (!hasSource && !hasDestination)) {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return buildRefreshSignal(
|
|
160
|
+
"destination",
|
|
161
|
+
pairKey,
|
|
162
|
+
[group, linkId, closing ? "closing" : "settled"].join("|"),
|
|
163
|
+
);
|
|
164
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { createScreenPairKey } from "../../../stores/bounds/helpers/link-pairs.helpers";
|
|
2
|
+
import type {
|
|
3
|
+
LinkPairsState,
|
|
4
|
+
ScreenPairKey,
|
|
5
|
+
} from "../../../stores/bounds/types";
|
|
6
|
+
|
|
7
|
+
const SOURCE_SIGNAL_PREFIX = "source|";
|
|
8
|
+
|
|
9
|
+
type SourceCaptureSignal = {
|
|
10
|
+
pairKey: ScreenPairKey;
|
|
11
|
+
signal: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const buildSourceSignal = (
|
|
15
|
+
pairKey: ScreenPairKey,
|
|
16
|
+
key: string,
|
|
17
|
+
): SourceCaptureSignal => {
|
|
18
|
+
"worklet";
|
|
19
|
+
return {
|
|
20
|
+
pairKey,
|
|
21
|
+
signal: `${SOURCE_SIGNAL_PREFIX}${pairKey}|${key}`,
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const getInitialSourceCaptureSignal = (params: {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
nextScreenKey?: string;
|
|
28
|
+
currentScreenKey?: string;
|
|
29
|
+
linkId: string;
|
|
30
|
+
group?: string;
|
|
31
|
+
shouldAutoMeasure: boolean;
|
|
32
|
+
linkState?: LinkPairsState;
|
|
33
|
+
}): SourceCaptureSignal | null => {
|
|
34
|
+
"worklet";
|
|
35
|
+
const {
|
|
36
|
+
enabled,
|
|
37
|
+
nextScreenKey,
|
|
38
|
+
currentScreenKey,
|
|
39
|
+
linkId,
|
|
40
|
+
group,
|
|
41
|
+
shouldAutoMeasure,
|
|
42
|
+
linkState,
|
|
43
|
+
} = params;
|
|
44
|
+
|
|
45
|
+
if (!enabled || !nextScreenKey || !currentScreenKey) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Trigger components capture on press. This passive path is for Boundary.View
|
|
50
|
+
// slots that need a source before navigation starts.
|
|
51
|
+
if (!shouldAutoMeasure) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const pairKey = createScreenPairKey(currentScreenKey, nextScreenKey);
|
|
56
|
+
|
|
57
|
+
if (group) {
|
|
58
|
+
const activeId = linkState?.[pairKey]?.groups?.[group]?.activeId;
|
|
59
|
+
|
|
60
|
+
// Passive grouped sources should not measure every mounted item. Once a
|
|
61
|
+
// group has an active id, only that concrete member can auto-capture.
|
|
62
|
+
if (activeId && activeId !== linkId) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const signalParts = group
|
|
68
|
+
? [currentScreenKey, nextScreenKey, group, linkId]
|
|
69
|
+
: [currentScreenKey, nextScreenKey, linkId];
|
|
70
|
+
|
|
71
|
+
return buildSourceSignal(pairKey, signalParts.join("|"));
|
|
72
|
+
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import type * as React from "react";
|
|
2
|
-
import { StyleSheet
|
|
2
|
+
import { StyleSheet } from "react-native";
|
|
3
3
|
import Animated, {
|
|
4
4
|
Extrapolation,
|
|
5
5
|
interpolate,
|
|
6
6
|
useAnimatedProps,
|
|
7
|
-
useAnimatedRef,
|
|
8
7
|
useDerivedValue,
|
|
9
8
|
useSharedValue,
|
|
10
9
|
} from "react-native-reanimated";
|
|
11
10
|
import { Screen as RNSScreen } from "react-native-screens";
|
|
12
11
|
import { EPSILON } from "../constants";
|
|
13
12
|
import { useStack } from "../hooks/navigation/use-stack";
|
|
14
|
-
import { LayoutAnchorProvider } from "../providers/layout-anchor.provider";
|
|
15
13
|
import { useManagedStackContext } from "../providers/stack/managed.provider";
|
|
16
14
|
import { AnimationStore } from "../stores/animation.store";
|
|
17
15
|
|
|
@@ -54,7 +52,6 @@ export const NativeScreen = ({
|
|
|
54
52
|
const routesLength = routes.length;
|
|
55
53
|
const topIndex = routesLength - 1;
|
|
56
54
|
const topRouteKey = routes[topIndex]?.key ?? routeKey;
|
|
57
|
-
const screenRef = useAnimatedRef<View>();
|
|
58
55
|
|
|
59
56
|
const sceneClosing = AnimationStore.getValue(routeKey, "closing");
|
|
60
57
|
const topSceneProgress = AnimationStore.getValue(topRouteKey, "progress");
|
|
@@ -155,16 +152,13 @@ export const NativeScreen = ({
|
|
|
155
152
|
if (DISABLE_NATIVE_SCREENS) {
|
|
156
153
|
return (
|
|
157
154
|
<Animated.View
|
|
158
|
-
ref={screenRef}
|
|
159
155
|
// Keep a native boundary per screen when falling back to plain views.
|
|
160
156
|
// Android release builds can otherwise flatten sibling screens together.
|
|
161
157
|
collapsable={false}
|
|
162
158
|
style={StyleSheet.absoluteFill}
|
|
163
159
|
animatedProps={animatedProps}
|
|
164
160
|
>
|
|
165
|
-
|
|
166
|
-
{children}
|
|
167
|
-
</LayoutAnchorProvider>
|
|
161
|
+
{children}
|
|
168
162
|
</Animated.View>
|
|
169
163
|
);
|
|
170
164
|
}
|
|
@@ -172,14 +166,11 @@ export const NativeScreen = ({
|
|
|
172
166
|
return (
|
|
173
167
|
<AnimatedNativeScreen
|
|
174
168
|
enabled
|
|
175
|
-
ref={screenRef}
|
|
176
169
|
style={StyleSheet.absoluteFill}
|
|
177
170
|
freezeOnBlur={freezeOnBlur}
|
|
178
171
|
animatedProps={animatedProps}
|
|
179
172
|
>
|
|
180
|
-
|
|
181
|
-
{children}
|
|
182
|
-
</LayoutAnchorProvider>
|
|
173
|
+
{children}
|
|
183
174
|
</AnimatedNativeScreen>
|
|
184
175
|
);
|
|
185
176
|
};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
/** biome-ignore-all lint/style/noNonNullAssertion: <Screen gesture is under the gesture context, so this will always exist.> */
|
|
2
|
-
import { memo } from "react";
|
|
2
|
+
import { memo, useState } from "react";
|
|
3
3
|
import { StyleSheet, View } from "react-native";
|
|
4
4
|
import { GestureDetector } from "react-native-gesture-handler";
|
|
5
5
|
import Animated, {
|
|
6
|
+
runOnJS,
|
|
6
7
|
useAnimatedProps,
|
|
8
|
+
useAnimatedReaction,
|
|
7
9
|
useAnimatedStyle,
|
|
8
10
|
} from "react-native-reanimated";
|
|
9
11
|
import { NO_PROPS, NO_STYLES } from "../../../constants";
|
|
10
12
|
import { useDescriptors } from "../../../providers/screen/descriptors";
|
|
11
13
|
import { useGestureContext } from "../../../providers/screen/gestures";
|
|
14
|
+
import { useScreenOptionsContext } from "../../../providers/screen/options";
|
|
12
15
|
import { useScreenStyles } from "../../../providers/screen/styles";
|
|
13
16
|
import { useContentLayout } from "../hooks/use-content-layout";
|
|
14
17
|
import { MaybeMaskedNavigationContainer } from "./maybe-masked-navigation-container";
|
|
@@ -26,7 +29,23 @@ export const ContentLayer = memo(
|
|
|
26
29
|
const { current } = useDescriptors();
|
|
27
30
|
|
|
28
31
|
const gestureContext = useGestureContext();
|
|
29
|
-
const
|
|
32
|
+
const screenOptions = useScreenOptionsContext();
|
|
33
|
+
const [runtimeNavigationMaskEnabled, setRuntimeNavigationMaskEnabled] =
|
|
34
|
+
useState<boolean | undefined>(undefined);
|
|
35
|
+
useAnimatedReaction(
|
|
36
|
+
() => screenOptions.get().navigationMaskEnabled,
|
|
37
|
+
(next, previous) => {
|
|
38
|
+
"worklet";
|
|
39
|
+
if (next !== previous) {
|
|
40
|
+
runOnJS(setRuntimeNavigationMaskEnabled)(next);
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
[screenOptions],
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const isNavigationMaskEnabled = !!(
|
|
47
|
+
runtimeNavigationMaskEnabled ?? current.options.navigationMaskEnabled
|
|
48
|
+
);
|
|
30
49
|
const contentPointerEvents = isBackdropActive ? "box-none" : pointerEvents;
|
|
31
50
|
|
|
32
51
|
const hasAutoSnapPoint =
|
package/src/shared/constants.ts
CHANGED
|
@@ -48,6 +48,7 @@ const DEFAULT_RAW_GESTURE_VALUES = {
|
|
|
48
48
|
|
|
49
49
|
const DEFAULT_GESTURE_VALUES = {
|
|
50
50
|
...DEFAULT_RAW_GESTURE_VALUES,
|
|
51
|
+
velocity: 0,
|
|
51
52
|
focalX: 0,
|
|
52
53
|
focalY: 0,
|
|
53
54
|
raw: DEFAULT_RAW_GESTURE_VALUES,
|
|
@@ -78,7 +79,6 @@ export const DEFAULT_SCREEN_TRANSITION_OPTIONS: ScreenTransitionOptions =
|
|
|
78
79
|
export const createScreenTransitionState = (
|
|
79
80
|
route: BaseStackRoute,
|
|
80
81
|
meta?: Record<string, unknown>,
|
|
81
|
-
navigationMaskEnabled = false,
|
|
82
82
|
options: ScreenTransitionOptions = DEFAULT_SCREEN_TRANSITION_OPTIONS,
|
|
83
83
|
): ScreenTransitionState => ({
|
|
84
84
|
progress: 0,
|
|
@@ -97,7 +97,6 @@ export const createScreenTransitionState = (
|
|
|
97
97
|
width: 0,
|
|
98
98
|
height: 0,
|
|
99
99
|
},
|
|
100
|
-
navigationMaskEnabled,
|
|
101
100
|
},
|
|
102
101
|
animatedSnapIndex: -1,
|
|
103
102
|
snapIndex: -1,
|
|
@@ -123,7 +122,6 @@ export const DEFAULT_SCREEN_TRANSITION_STATE: ScreenTransitionState =
|
|
|
123
122
|
width: 0,
|
|
124
123
|
height: 0,
|
|
125
124
|
},
|
|
126
|
-
navigationMaskEnabled: false,
|
|
127
125
|
},
|
|
128
126
|
animatedSnapIndex: -1,
|
|
129
127
|
snapIndex: -1,
|
|
@@ -180,12 +178,6 @@ export const FALSE = 0;
|
|
|
180
178
|
*/
|
|
181
179
|
export const EPSILON = 1e-5;
|
|
182
180
|
|
|
183
|
-
/**
|
|
184
|
-
* Threshold for snapping animations to target when "close enough" (1% of range).
|
|
185
|
-
* Prevents micro-jitter/oscillation near animation endpoints.
|
|
186
|
-
*/
|
|
187
|
-
export const ANIMATION_SNAP_THRESHOLD = 0.01;
|
|
188
|
-
|
|
189
181
|
/**
|
|
190
182
|
* Number of consecutive frames progress must remain near its target before it
|
|
191
183
|
* is treated as logically settled.
|
package/src/shared/index.ts
CHANGED
|
@@ -56,10 +56,7 @@ export type {
|
|
|
56
56
|
OverlayProps,
|
|
57
57
|
ScreenInterpolationProps,
|
|
58
58
|
ScreenStyleInterpolator,
|
|
59
|
-
ScreenTransitionAccessor,
|
|
60
59
|
ScreenTransitionConfig,
|
|
61
|
-
ScreenTransitionDepthTarget,
|
|
62
|
-
ScreenTransitionTarget,
|
|
63
60
|
TransitionInterpolatedStyle,
|
|
64
61
|
TransitionSlotStyle,
|
|
65
62
|
TransitionSpec,
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
|
|
2
|
+
import { setEntry } from "../../stores/bounds/internals/entries";
|
|
3
|
+
import { setDestination, setSource } from "../../stores/bounds/internals/links";
|
|
4
|
+
import type { ScreenPairKey } from "../../stores/bounds/types";
|
|
5
|
+
|
|
6
|
+
type LinkWrite =
|
|
7
|
+
| {
|
|
8
|
+
type: "source";
|
|
9
|
+
pairKey: ScreenPairKey;
|
|
10
|
+
}
|
|
11
|
+
| {
|
|
12
|
+
type: "destination";
|
|
13
|
+
pairKey: ScreenPairKey;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
type ApplyMeasuredBoundsWritesParams = {
|
|
17
|
+
entryTag: string;
|
|
18
|
+
linkId: string;
|
|
19
|
+
group?: string;
|
|
20
|
+
currentScreenKey: string;
|
|
21
|
+
measured: MeasuredDimensions;
|
|
22
|
+
preparedStyles: StyleProps;
|
|
23
|
+
linkWrite?: LinkWrite;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const applyMeasuredBoundsWrites = (
|
|
27
|
+
params: ApplyMeasuredBoundsWritesParams,
|
|
28
|
+
) => {
|
|
29
|
+
"worklet";
|
|
30
|
+
const {
|
|
31
|
+
entryTag,
|
|
32
|
+
linkId,
|
|
33
|
+
group,
|
|
34
|
+
currentScreenKey,
|
|
35
|
+
measured,
|
|
36
|
+
preparedStyles,
|
|
37
|
+
linkWrite,
|
|
38
|
+
} = params;
|
|
39
|
+
|
|
40
|
+
// Set the bounds entry on every measure to avoid any stale measurements
|
|
41
|
+
// for the public read API.
|
|
42
|
+
setEntry(entryTag, currentScreenKey, {
|
|
43
|
+
bounds: measured,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
if (linkWrite?.type === "source") {
|
|
47
|
+
setSource(
|
|
48
|
+
linkWrite.pairKey,
|
|
49
|
+
linkId,
|
|
50
|
+
currentScreenKey,
|
|
51
|
+
measured,
|
|
52
|
+
preparedStyles,
|
|
53
|
+
group,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (linkWrite?.type === "destination") {
|
|
58
|
+
setDestination(
|
|
59
|
+
linkWrite.pairKey,
|
|
60
|
+
linkId,
|
|
61
|
+
currentScreenKey,
|
|
62
|
+
measured,
|
|
63
|
+
preparedStyles,
|
|
64
|
+
group,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
};
|