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,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,EA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BAAkB,GAAG,CAAC,CAAC,GACpEF,gBAAgB,GAChBE,kBAAkB,CAAC,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,GAA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AACC,QAAQ,EAAEC,WAAW,CAAC;AACxE,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createPendingPairKey, createScreenPairKey, getDestinationScreenKeyFromPairKey } from "../../../stores/bounds/helpers/link-pairs.helpers";
|
|
4
|
+
const SOURCE_SIGNAL_PREFIX = "source|";
|
|
5
|
+
const DESTINATION_SIGNAL_PREFIX = "destination|";
|
|
6
|
+
const findNestedDestinationPairKey = (linkState, linkId, ancestorScreenKeys) => {
|
|
7
|
+
"worklet";
|
|
8
|
+
|
|
9
|
+
const destinationScreenKey = ancestorScreenKeys?.[0];
|
|
10
|
+
if (!linkState || !destinationScreenKey) return null;
|
|
11
|
+
for (const pairKey in linkState) {
|
|
12
|
+
if (getDestinationScreenKeyFromPairKey(pairKey) !== destinationScreenKey) {
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
if (linkState[pairKey]?.links?.[linkId]?.destination) {
|
|
16
|
+
return pairKey;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
};
|
|
21
|
+
const buildRefreshSignal = (type, pairKey, key) => {
|
|
22
|
+
"worklet";
|
|
23
|
+
|
|
24
|
+
const prefix = type === "source" ? SOURCE_SIGNAL_PREFIX : DESTINATION_SIGNAL_PREFIX;
|
|
25
|
+
return {
|
|
26
|
+
type,
|
|
27
|
+
pairKey,
|
|
28
|
+
signal: `${prefix}${pairKey}|${key}`
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export const getRefreshBoundarySignal = params => {
|
|
32
|
+
"worklet";
|
|
33
|
+
|
|
34
|
+
const {
|
|
35
|
+
enabled,
|
|
36
|
+
currentScreenKey,
|
|
37
|
+
preferredSourceScreenKey,
|
|
38
|
+
nextScreenKey,
|
|
39
|
+
linkId,
|
|
40
|
+
group,
|
|
41
|
+
ancestorScreenKeys,
|
|
42
|
+
shouldRefresh,
|
|
43
|
+
closing,
|
|
44
|
+
entering,
|
|
45
|
+
animating,
|
|
46
|
+
progress,
|
|
47
|
+
linkState
|
|
48
|
+
} = params;
|
|
49
|
+
if (!enabled) return null;
|
|
50
|
+
const canRefreshPreCloseDestination = shouldRefresh && closing && !entering && !animating && progress >= 1;
|
|
51
|
+
const canRefreshSettledDestination = shouldRefresh && !closing && !entering;
|
|
52
|
+
if (!canRefreshPreCloseDestination && !canRefreshSettledDestination) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Non-group refresh only rewrites destination bounds. Source refresh is a
|
|
57
|
+
// grouped-only fallback for active ids that do not have source bounds yet.
|
|
58
|
+
if (!group) {
|
|
59
|
+
if (nextScreenKey) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Nested initial screens have no previous screen in their own navigator,
|
|
64
|
+
// so recover the pair by looking for a destination on the ancestor route.
|
|
65
|
+
const pairKey = preferredSourceScreenKey ? createScreenPairKey(preferredSourceScreenKey, currentScreenKey) : findNestedDestinationPairKey(linkState, linkId, ancestorScreenKeys);
|
|
66
|
+
if (!pairKey) return null;
|
|
67
|
+
return buildRefreshSignal("destination", pairKey, [currentScreenKey, closing ? "closing" : "settled"].join("|"));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Source-side grouped refresh: a new active id may not have source bounds yet,
|
|
71
|
+
// so the next screen's lifecycle pulse gives that source one chance to capture.
|
|
72
|
+
if (nextScreenKey) {
|
|
73
|
+
const pairKey = createScreenPairKey(currentScreenKey, nextScreenKey);
|
|
74
|
+
const pendingPairKey = createPendingPairKey(currentScreenKey);
|
|
75
|
+
const activeId = linkState?.[pairKey]?.groups?.[group]?.activeId;
|
|
76
|
+
const hasSource = !!linkState?.[pairKey]?.links?.[linkId]?.source || !!linkState?.[pendingPairKey]?.links?.[linkId]?.source;
|
|
77
|
+
if (activeId !== linkId || hasSource) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
return buildRefreshSignal("source", pairKey, [group, linkId, closing ? "closing" : "settled"].join("|"));
|
|
81
|
+
}
|
|
82
|
+
if (!preferredSourceScreenKey) return null;
|
|
83
|
+
|
|
84
|
+
// Destination-side grouped refresh: only the active member rewrites the
|
|
85
|
+
// destination side, keeping inactive grouped members from stealing the link.
|
|
86
|
+
const pairKey = createScreenPairKey(preferredSourceScreenKey, currentScreenKey);
|
|
87
|
+
const activeId = linkState?.[pairKey]?.groups?.[group]?.activeId;
|
|
88
|
+
const hasSource = !!linkState?.[pairKey]?.links?.[linkId]?.source;
|
|
89
|
+
const hasDestination = !!linkState?.[pairKey]?.links?.[linkId]?.destination;
|
|
90
|
+
|
|
91
|
+
// Destination retargeting should only measure a concrete member that already
|
|
92
|
+
// participates in the pair. Missing members fall back to initialId at resolve.
|
|
93
|
+
if (activeId !== linkId || !hasSource && !hasDestination) {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
return buildRefreshSignal("destination", pairKey, [group, linkId, closing ? "closing" : "settled"].join("|"));
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=refresh-signals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createPendingPairKey","createScreenPairKey","getDestinationScreenKeyFromPairKey","SOURCE_SIGNAL_PREFIX","DESTINATION_SIGNAL_PREFIX","findNestedDestinationPairKey","linkState","linkId","ancestorScreenKeys","destinationScreenKey","pairKey","links","destination","buildRefreshSignal","type","key","prefix","signal","getRefreshBoundarySignal","params","enabled","currentScreenKey","preferredSourceScreenKey","nextScreenKey","group","shouldRefresh","closing","entering","animating","progress","canRefreshPreCloseDestination","canRefreshSettledDestination","join","pendingPairKey","activeId","groups","hasSource","source","hasDestination"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/utils/refresh-signals.ts"],"mappings":";;AAAA,SACCA,oBAAoB,EACpBC,mBAAmB,EACnBC,kCAAkC,QAC5B,mDAAmD;AAO1D,MAAMC,oBAAoB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,EAAEmB,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC,CAACM,IAAI,CAAC,GAAG,CAC1D,CAAC;EACF;EAEA,IAAI,CAACV,wBAAwB,EAAE,OAAO,IAAI;;EAE1C;EACA;EACA,MAAMZ,OAAO,GAAGT,mBAAmB,CAClCqB,wBAAwB,EACxBD,gBACD,CAAC;EACD,MAAMa,QAAQ,GAAG5B,SAAS,GAAGI,OAAO,CAAC,EAAEyB,MAAM,GAAGX,KAAK,CAAC,EAAEU,QAAQ;EAChE,MAAME,SAAS,GAAG,CAAC,CAAC9B,SAAS,GAAGI,OAAO,CAAC,EAAEC,KAAK,GAAGJ,MAAM,CAAC,EAAE8B,MAAM;EACjE,MAAMC,cAAc,GAAG,CAAC,CAAChC,SAAS,GAAGI,OAAO,CAAC,EAAEC,KAAK,GAAGJ,MAAM,CAAC,EAAEK,WAAW;;EAE3E;EACA;EACA,IAAIsB,QAAQ,KAAK3B,MAAM,IAAK,CAAC6B,SAAS,IAAI,CAACE,cAAe,EAAE;IAC3D,OAAO,IAAI;EACZ;EAEA,OAAOzB,kBAAkB,CACxB,aAAa,EACbH,OAAO,EACP,CAACc,KAAK,EAAEjB,MAAM,EAAEmB,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC,CAACM,IAAI,CAAC,GAAG,CAC1D,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createScreenPairKey } from "../../../stores/bounds/helpers/link-pairs.helpers";
|
|
4
|
+
const SOURCE_SIGNAL_PREFIX = "source|";
|
|
5
|
+
const buildSourceSignal = (pairKey, key) => {
|
|
6
|
+
"worklet";
|
|
7
|
+
|
|
8
|
+
return {
|
|
9
|
+
pairKey,
|
|
10
|
+
signal: `${SOURCE_SIGNAL_PREFIX}${pairKey}|${key}`
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export const getInitialSourceCaptureSignal = params => {
|
|
14
|
+
"worklet";
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
enabled,
|
|
18
|
+
nextScreenKey,
|
|
19
|
+
currentScreenKey,
|
|
20
|
+
linkId,
|
|
21
|
+
group,
|
|
22
|
+
shouldAutoMeasure,
|
|
23
|
+
linkState
|
|
24
|
+
} = params;
|
|
25
|
+
if (!enabled || !nextScreenKey || !currentScreenKey) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Trigger components capture on press. This passive path is for Boundary.View
|
|
30
|
+
// slots that need a source before navigation starts.
|
|
31
|
+
if (!shouldAutoMeasure) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const pairKey = createScreenPairKey(currentScreenKey, nextScreenKey);
|
|
35
|
+
if (group) {
|
|
36
|
+
const activeId = linkState?.[pairKey]?.groups?.[group]?.activeId;
|
|
37
|
+
|
|
38
|
+
// Passive grouped sources should not measure every mounted item. Once a
|
|
39
|
+
// group has an active id, only that concrete member can auto-capture.
|
|
40
|
+
if (activeId && activeId !== linkId) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const signalParts = group ? [currentScreenKey, nextScreenKey, group, linkId] : [currentScreenKey, nextScreenKey, linkId];
|
|
45
|
+
return buildSourceSignal(pairKey, signalParts.join("|"));
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=source-signals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createScreenPairKey","SOURCE_SIGNAL_PREFIX","buildSourceSignal","pairKey","key","signal","getInitialSourceCaptureSignal","params","enabled","nextScreenKey","currentScreenKey","linkId","group","shouldAutoMeasure","linkState","activeId","groups","signalParts","join"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/utils/source-signals.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,mDAAmD;AAMvF,MAAMC,oBAAoB,GAAG,SAAS;AAOtC,MAAMC,iBAAiB,GAAGA,CACzBC,OAAsB,EACtBC,GAAW,KACc;EACzB,SAAS;;EACT,OAAO;IACND,OAAO;IACPE,MAAM,EAAE,GAAGJ,oBAAoB,GAAGE,OAAO,IAAIC,GAAG;EACjD,CAAC;AACF,CAAC;AAED,OAAO,MAAME,6BAA6B,GAAIC,MAQ7C,IAAiC;EACjC,SAAS;;EACT,MAAM;IACLC,OAAO;IACPC,aAAa;IACbC,gBAAgB;IAChBC,MAAM;IACNC,KAAK;IACLC,iBAAiB;IACjBC;EACD,CAAC,GAAGP,MAAM;EAEV,IAAI,CAACC,OAAO,IAAI,CAACC,aAAa,IAAI,CAACC,gBAAgB,EAAE;IACpD,OAAO,IAAI;EACZ;;EAEA;EACA;EACA,IAAI,CAACG,iBAAiB,EAAE;IACvB,OAAO,IAAI;EACZ;EAEA,MAAMV,OAAO,GAAGH,mBAAmB,CAACU,gBAAgB,EAAED,aAAa,CAAC;EAEpE,IAAIG,KAAK,EAAE;IACV,MAAMG,QAAQ,GAAGD,SAAS,GAAGX,OAAO,CAAC,EAAEa,MAAM,GAAGJ,KAAK,CAAC,EAAEG,QAAQ;;IAEhE;IACA;IACA,IAAIA,QAAQ,IAAIA,QAAQ,KAAKJ,MAAM,EAAE;MACpC,OAAO,IAAI;IACZ;EACD;EAEA,MAAMM,WAAW,GAAGL,KAAK,GACtB,CAACF,gBAAgB,EAAED,aAAa,EAAEG,KAAK,EAAED,MAAM,CAAC,GAChD,CAACD,gBAAgB,EAAED,aAAa,EAAEE,MAAM,CAAC;EAE5C,OAAOT,iBAAiB,CAACC,OAAO,EAAEc,WAAW,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzD,CAAC","ignoreList":[]}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { StyleSheet } from "react-native";
|
|
4
|
-
import Animated, { Extrapolation, interpolate, useAnimatedProps,
|
|
4
|
+
import Animated, { Extrapolation, interpolate, useAnimatedProps, useDerivedValue, useSharedValue } from "react-native-reanimated";
|
|
5
5
|
import { Screen as RNSScreen } from "react-native-screens";
|
|
6
6
|
import { EPSILON } from "../constants";
|
|
7
7
|
import { useStack } from "../hooks/navigation/use-stack";
|
|
8
|
-
import { LayoutAnchorProvider } from "../providers/layout-anchor.provider";
|
|
9
8
|
import { useManagedStackContext } from "../providers/stack/managed.provider";
|
|
10
9
|
import { AnimationStore } from "../stores/animation.store";
|
|
11
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -41,7 +40,6 @@ export const NativeScreen = ({
|
|
|
41
40
|
const routesLength = routes.length;
|
|
42
41
|
const topIndex = routesLength - 1;
|
|
43
42
|
const topRouteKey = routes[topIndex]?.key ?? routeKey;
|
|
44
|
-
const screenRef = useAnimatedRef();
|
|
45
43
|
const sceneClosing = AnimationStore.getValue(routeKey, "closing");
|
|
46
44
|
const topSceneProgress = AnimationStore.getValue(topRouteKey, "progress");
|
|
47
45
|
const topSceneClosing = AnimationStore.getValue(topRouteKey, "closing");
|
|
@@ -102,29 +100,20 @@ export const NativeScreen = ({
|
|
|
102
100
|
});
|
|
103
101
|
if (DISABLE_NATIVE_SCREENS) {
|
|
104
102
|
return /*#__PURE__*/_jsx(Animated.View, {
|
|
105
|
-
ref: screenRef
|
|
106
103
|
// Keep a native boundary per screen when falling back to plain views.
|
|
107
104
|
// Android release builds can otherwise flatten sibling screens together.
|
|
108
|
-
,
|
|
109
105
|
collapsable: false,
|
|
110
106
|
style: StyleSheet.absoluteFill,
|
|
111
107
|
animatedProps: animatedProps,
|
|
112
|
-
children:
|
|
113
|
-
anchorRef: screenRef,
|
|
114
|
-
children: children
|
|
115
|
-
})
|
|
108
|
+
children: children
|
|
116
109
|
});
|
|
117
110
|
}
|
|
118
111
|
return /*#__PURE__*/_jsx(AnimatedNativeScreen, {
|
|
119
112
|
enabled: true,
|
|
120
|
-
ref: screenRef,
|
|
121
113
|
style: StyleSheet.absoluteFill,
|
|
122
114
|
freezeOnBlur: freezeOnBlur,
|
|
123
115
|
animatedProps: animatedProps,
|
|
124
|
-
children:
|
|
125
|
-
anchorRef: screenRef,
|
|
126
|
-
children: children
|
|
127
|
-
})
|
|
116
|
+
children: children
|
|
128
117
|
});
|
|
129
118
|
};
|
|
130
119
|
//# sourceMappingURL=native-screen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","Animated","Extrapolation","interpolate","useAnimatedProps","
|
|
1
|
+
{"version":3,"names":["StyleSheet","Animated","Extrapolation","interpolate","useAnimatedProps","useDerivedValue","useSharedValue","Screen","RNSScreen","EPSILON","useStack","useManagedStackContext","AnimationStore","jsx","_jsx","PASSTHROUGH","ScreenActivity","POINT_NONE","POINT_BOX_NONE","AnimatedNativeScreen","createAnimatedComponent","NativeScreen","routeKey","index","isPreloaded","children","freezeOnBlur","shouldFreeze","flags","DISABLE_NATIVE_SCREENS","routes","optimisticFocusedIndex","activeScreensLimit","backdropBehaviors","routesLength","length","topIndex","topRouteKey","key","sceneClosing","getValue","topSceneProgress","topSceneClosing","screenActivity","TRANSITIONING_OR_BELOW_TOP","set","INACTIVE","focusedIndex","get","topIsClosing","postCloseActiveStart","Math","max","next","ON_TOP","outputValue","v","CLAMP","trunc","animatedProps","activity","isClosing","activeIndex","isActive","activeBackdrop","activeAllowsPassthrough","isAllowedPassthroughBelow","pointerEvents","activityState","View","collapsable","style","absoluteFill","enabled"],"sourceRoot":"../../../../src","sources":["shared/components/native-screen.tsx"],"mappings":";;AACA,SAASA,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,IACdC,aAAa,EACbC,WAAW,EACXC,gBAAgB,EAChBC,eAAe,EACfC,cAAc,QACR,yBAAyB;AAChC,SAASC,MAAM,IAAIC,SAAS,QAAQ,sBAAsB;AAC1D,SAASC,OAAO,QAAQ,cAAc;AACtC,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,sBAAsB,QAAQ,qCAAqC;AAC5E,SAASC,cAAc,QAAQ,2BAA2B;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a;MAC/Bb,aAAa,EAAEA,aAAc;MAAAlC,QAAA,EAE5BA;IAAQ,CACK,CAAC;EAElB;EAEA,oBACCX,IAAA,CAACK,oBAAoB;IACpBsD,OAAO;IACPF,KAAK,EAAEvE,UAAU,CAACwE,YAAa;IAC/B9C,YAAY,EAAEA,YAAa;IAC3BiC,aAAa,EAAEA,aAAc;IAAAlC,QAAA,EAE5BA;EAAQ,CACY,CAAC;AAEzB,CAAC","ignoreList":[]}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/** biome-ignore-all lint/style/noNonNullAssertion: <Screen gesture is under the gesture context, so this will always exist.> */
|
|
4
|
-
import { memo } from "react";
|
|
4
|
+
import { memo, useState } from "react";
|
|
5
5
|
import { StyleSheet, View } from "react-native";
|
|
6
6
|
import { GestureDetector } from "react-native-gesture-handler";
|
|
7
|
-
import Animated, { useAnimatedProps, useAnimatedStyle } from "react-native-reanimated";
|
|
7
|
+
import Animated, { runOnJS, useAnimatedProps, useAnimatedReaction, useAnimatedStyle } from "react-native-reanimated";
|
|
8
8
|
import { NO_PROPS, NO_STYLES } from "../../../constants";
|
|
9
9
|
import { useDescriptors } from "../../../providers/screen/descriptors";
|
|
10
10
|
import { useGestureContext } from "../../../providers/screen/gestures";
|
|
11
|
+
import { useScreenOptionsContext } from "../../../providers/screen/options";
|
|
11
12
|
import { useScreenStyles } from "../../../providers/screen/styles";
|
|
12
13
|
import { useContentLayout } from "../hooks/use-content-layout";
|
|
13
14
|
import { MaybeMaskedNavigationContainer } from "./maybe-masked-navigation-container";
|
|
@@ -25,7 +26,16 @@ export const ContentLayer = /*#__PURE__*/memo(({
|
|
|
25
26
|
current
|
|
26
27
|
} = useDescriptors();
|
|
27
28
|
const gestureContext = useGestureContext();
|
|
28
|
-
const
|
|
29
|
+
const screenOptions = useScreenOptionsContext();
|
|
30
|
+
const [runtimeNavigationMaskEnabled, setRuntimeNavigationMaskEnabled] = useState(undefined);
|
|
31
|
+
useAnimatedReaction(() => screenOptions.get().navigationMaskEnabled, (next, previous) => {
|
|
32
|
+
"worklet";
|
|
33
|
+
|
|
34
|
+
if (next !== previous) {
|
|
35
|
+
runOnJS(setRuntimeNavigationMaskEnabled)(next);
|
|
36
|
+
}
|
|
37
|
+
}, [screenOptions]);
|
|
38
|
+
const isNavigationMaskEnabled = !!(runtimeNavigationMaskEnabled ?? current.options.navigationMaskEnabled);
|
|
29
39
|
const contentPointerEvents = isBackdropActive ? "box-none" : pointerEvents;
|
|
30
40
|
const hasAutoSnapPoint = current.options.snapPoints?.includes("auto") ?? false;
|
|
31
41
|
const handleContentLayout = useContentLayout();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","StyleSheet","View","GestureDetector","Animated","useAnimatedProps","useAnimatedStyle","NO_PROPS","NO_STYLES","useDescriptors","useGestureContext","useScreenStyles","useContentLayout","MaybeMaskedNavigationContainer","SurfaceContainer","jsx","_jsx","ContentLayer","children","pointerEvents","isBackdropActive","stylesMap","current","gestureContext","
|
|
1
|
+
{"version":3,"names":["memo","useState","StyleSheet","View","GestureDetector","Animated","runOnJS","useAnimatedProps","useAnimatedReaction","useAnimatedStyle","NO_PROPS","NO_STYLES","useDescriptors","useGestureContext","useScreenOptionsContext","useScreenStyles","useContentLayout","MaybeMaskedNavigationContainer","SurfaceContainer","jsx","_jsx","ContentLayer","children","pointerEvents","isBackdropActive","stylesMap","current","gestureContext","screenOptions","runtimeNavigationMaskEnabled","setRuntimeNavigationMaskEnabled","undefined","get","navigationMaskEnabled","next","previous","isNavigationMaskEnabled","options","contentPointerEvents","hasAutoSnapPoint","snapPoints","includes","handleContentLayout","animatedContentStyle","content","style","animatedContentProps","props","gesture","detectorGesture","styles","animatedProps","enabled","collapsable","onLayout","create","flex"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-container/layers/content.tsx"],"mappings":";;AAAA;AACA,SAASA,IAAI,EAAEC,QAAQ,QAAQ,OAAO;AACtC,SAAS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CACD,CAAC;AAED,MAAM4B,MAAM,GAAGhD,UAAU,CAACqD,MAAM,CAAC;EAChCX,OAAO,EAAE;IACRY,IAAI,EAAE;EACP;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -36,6 +36,7 @@ const DEFAULT_RAW_GESTURE_VALUES = {
|
|
|
36
36
|
};
|
|
37
37
|
const DEFAULT_GESTURE_VALUES = {
|
|
38
38
|
...DEFAULT_RAW_GESTURE_VALUES,
|
|
39
|
+
velocity: 0,
|
|
39
40
|
focalX: 0,
|
|
40
41
|
focalY: 0,
|
|
41
42
|
raw: DEFAULT_RAW_GESTURE_VALUES,
|
|
@@ -61,7 +62,7 @@ export const DEFAULT_SCREEN_TRANSITION_OPTIONS = Object.freeze({});
|
|
|
61
62
|
/**
|
|
62
63
|
* Creates a new screen transition state object
|
|
63
64
|
*/
|
|
64
|
-
export const createScreenTransitionState = (route, meta,
|
|
65
|
+
export const createScreenTransitionState = (route, meta, options = DEFAULT_SCREEN_TRANSITION_OPTIONS) => ({
|
|
65
66
|
progress: 0,
|
|
66
67
|
closing: 0,
|
|
67
68
|
animating: 0,
|
|
@@ -77,8 +78,7 @@ export const createScreenTransitionState = (route, meta, navigationMaskEnabled =
|
|
|
77
78
|
screen: {
|
|
78
79
|
width: 0,
|
|
79
80
|
height: 0
|
|
80
|
-
}
|
|
81
|
-
navigationMaskEnabled
|
|
81
|
+
}
|
|
82
82
|
},
|
|
83
83
|
animatedSnapIndex: -1,
|
|
84
84
|
snapIndex: -1
|
|
@@ -102,8 +102,7 @@ export const DEFAULT_SCREEN_TRANSITION_STATE = Object.freeze({
|
|
|
102
102
|
screen: {
|
|
103
103
|
width: 0,
|
|
104
104
|
height: 0
|
|
105
|
-
}
|
|
106
|
-
navigationMaskEnabled: false
|
|
105
|
+
}
|
|
107
106
|
},
|
|
108
107
|
animatedSnapIndex: -1,
|
|
109
108
|
snapIndex: -1
|
|
@@ -157,12 +156,6 @@ export const FALSE = 0;
|
|
|
157
156
|
*/
|
|
158
157
|
export const EPSILON = 1e-5;
|
|
159
158
|
|
|
160
|
-
/**
|
|
161
|
-
* Threshold for snapping animations to target when "close enough" (1% of range).
|
|
162
|
-
* Prevents micro-jitter/oscillation near animation endpoints.
|
|
163
|
-
*/
|
|
164
|
-
export const ANIMATION_SNAP_THRESHOLD = 0.01;
|
|
165
|
-
|
|
166
159
|
/**
|
|
167
160
|
* Number of consecutive frames progress must remain near its target before it
|
|
168
161
|
* is treated as logically settled.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","MASK_STYLE_ID","CONTAINER_STYLE_ID","NAVIGATION_MASK_ELEMENT_STYLE_ID","NAVIGATION_MASK_CONTAINER_STYLE_ID","NO_STYLES","Object","freeze","VISIBLE_STYLE","opacity","NO_PROPS","DEFAULT_RAW_GESTURE_VALUES","x","y","normX","normY","scale","normScale","DEFAULT_GESTURE_VALUES","focalX","focalY","raw","dismissing","dragging","settling","active","direction","normalizedX","normalizedY","isDismissing","isDragging","createDefaultGestureValues","DEFAULT_SCREEN_TRANSITION_OPTIONS","createScreenTransitionState","route","meta","
|
|
1
|
+
{"version":3,"names":["Platform","MASK_STYLE_ID","CONTAINER_STYLE_ID","NAVIGATION_MASK_ELEMENT_STYLE_ID","NAVIGATION_MASK_CONTAINER_STYLE_ID","NO_STYLES","Object","freeze","VISIBLE_STYLE","opacity","NO_PROPS","DEFAULT_RAW_GESTURE_VALUES","x","y","normX","normY","scale","normScale","DEFAULT_GESTURE_VALUES","velocity","focalX","focalY","raw","dismissing","dragging","settling","active","direction","normalizedX","normalizedY","isDismissing","isDragging","createDefaultGestureValues","DEFAULT_SCREEN_TRANSITION_OPTIONS","createScreenTransitionState","route","meta","options","progress","closing","animating","willAnimate","settled","logicallySettled","entering","gesture","layouts","screen","width","height","animatedSnapIndex","snapIndex","DEFAULT_SCREEN_TRANSITION_STATE","TRANSFORM_RESET","transform","translateX","translateY","scaleX","scaleY","ENTER_RANGE","EXIT_RANGE","FULLSCREEN_DIMENSIONS","dimensions","pageX","pageY","DEFAULT_GESTURE_VELOCITY_IMPACT","DEFAULT_GESTURE_SNAP_VELOCITY_IMPACT","DEFAULT_GESTURE_SENSITIVITY","DEFAULT_GESTURE_RELEASE_VELOCITY_SCALE","DEFAULT_GESTURE_DIRECTION","DEFAULT_GESTURE_PROGRESS_MODE","DEFAULT_GESTURE_SNAP_LOCKED","DEFAULT_GESTURE_ACTIVATION_AREA","DEFAULT_SHEET_SCROLL_GESTURE_BEHAVIOR","IS_WEB","OS","TRUE","FALSE","EPSILON","LOGICAL_SETTLE_REQUIRED_FRAMES","LOGICAL_SETTLE_PROGRESS_THRESHOLD"],"sourceRoot":"../../../src","sources":["shared/constants.ts"],"mappings":";;AACA,SAASA,QAAQ,QAAQ,cAAc;AAavC;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3C,OAAO,MAAMC,kBAAkB,GAAG,iBAAiB;;AAEnD;AACA;AACA;AACA,OAAO,MAAMC,gCAAgC,GAC5C,kCAAkC;AACnC,OAAO,MAAMC,kCAAkC,GAC9C,oCAAoC;;AAErC;AACA;AACA;AACA,OAAO,MAAMC,SAAS,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC1C,OAAO,MAAMC,aAAa,GAAGF,MAAM,CAACC,MAAM,CAAC;EAAEE,OAAO,EAAE;AAAE,CAAC,CAAC;AAC1D,OAAO,MAAMC,QAAQ,GAAGJ,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,CAAC;;AAEzC;AACA;AACA;AACA,MAAMI,0BAA0B,GAAG;EAClCC,CAAC,EAAE,CAAC;EACJC,CAAC,EAAE,CAAC;EACJC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAE,CAAC;EACRC,SAAS,EAAE;AACZ,CAAU;AAEV,MAAMC,sBAAsB,GAAG;EAC9B,GAAGP,0BAA0B;EAC7BQ,QAAQ,EAAE,CAAC;EACXC,M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,MAAMC,6BAAkD,GAC9D,iBAAiB;AAClB,OAAO,MAAMC,2BAA2B,GAAG,KAAK;AAChD,OAAO,MAAMC,+BAA+C,GAAG,QAAQ;AACvE,OAAO,MAAMC,qCAAiE,GAC7E,qBAAqB;AAEtB,OAAO,MAAMC,MAAM,GAAG1E,QAAQ,CAAC2E,EAAE,KAAK,KAAK;AAE3C,OAAO,MAAMC,IAAI,GAAG,CAAC;AACrB,OAAO,MAAMC,KAAK,GAAG,CAAC;;AAEtB;AACA;AACA;AACA,OAAO,MAAMC,OAAO,GAAG,IAAI;;AAE3B;AACA;AACA;AACA;AACA,OAAO,MAAMC,8BAA8B,GAAG,CAAC;;AAE/C;AACA;AACA;AACA,OAAO,MAAMC,iCAAiC,GAAG,KAAK","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { setEntry } from "../../stores/bounds/internals/entries";
|
|
4
|
+
import { setDestination, setSource } from "../../stores/bounds/internals/links";
|
|
5
|
+
export const applyMeasuredBoundsWrites = params => {
|
|
6
|
+
"worklet";
|
|
7
|
+
|
|
8
|
+
const {
|
|
9
|
+
entryTag,
|
|
10
|
+
linkId,
|
|
11
|
+
group,
|
|
12
|
+
currentScreenKey,
|
|
13
|
+
measured,
|
|
14
|
+
preparedStyles,
|
|
15
|
+
linkWrite
|
|
16
|
+
} = params;
|
|
17
|
+
|
|
18
|
+
// Set the bounds entry on every measure to avoid any stale measurements
|
|
19
|
+
// for the public read API.
|
|
20
|
+
setEntry(entryTag, currentScreenKey, {
|
|
21
|
+
bounds: measured
|
|
22
|
+
});
|
|
23
|
+
if (linkWrite?.type === "source") {
|
|
24
|
+
setSource(linkWrite.pairKey, linkId, currentScreenKey, measured, preparedStyles, group);
|
|
25
|
+
}
|
|
26
|
+
if (linkWrite?.type === "destination") {
|
|
27
|
+
setDestination(linkWrite.pairKey, linkId, currentScreenKey, measured, preparedStyles, group);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=measured-bounds-writes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["setEntry","setDestination","setSource","applyMeasuredBoundsWrites","params","entryTag","linkId","group","currentScreenKey","measured","preparedStyles","linkWrite","bounds","type","pairKey"],"sourceRoot":"../../../../../src","sources":["shared/providers/helpers/measured-bounds-writes.ts"],"mappings":";;AACA,SAASA,QAAQ,QAAQ,uCAAuC;AAChE,SAASC,cAAc,EAAEC,SAAS,QAAQ,qCAAqC;AAuB/E,OAAO,MAAMC,yBAAyB,GACrCC,MAAuC,IACnC;EACJ,SAAS;;EACT,MAAM;IACLC,QAAQ;IACRC,MAAM;IACNC,KAAK;IACLC,gBAAgB;IAChBC,QAAQ;IACRC,cAAc;IACdC;EACD,CAAC,GAAGP,MAAM;;EAEV;EACA;EACAJ,QAAQ,CAACK,QAAQ,EAAEG,gBAAgB,EAAE;IACpCI,MAAM,EAAEH;EACT,CAAC,CAAC;EAEF,IAAIE,SAAS,EAAEE,IAAI,KAAK,QAAQ,EAAE;IACjCX,SAAS,CACRS,SAAS,CAACG,OAAO,EACjBR,MAAM,EACNE,gBAAgB,EAChBC,QAAQ,EACRC,cAAc,EACdH,KACD,CAAC;EACF;EAEA,IAAII,SAAS,EAAEE,IAAI,KAAK,aAAa,EAAE;IACtCZ,cAAc,CACbU,SAAS,CAACG,OAAO,EACjBR,MAAM,EACNE,gBAAgB,EAChBC,QAAQ,EACRC,cAAc,EACdH,KACD,CAAC;EACF;AACD,CAAC","ignoreList":[]}
|