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
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ComponentScreen = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
8
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
9
|
-
var _layoutAnchor = require("../../shared/providers/layout-anchor.provider");
|
|
10
9
|
var _animation = require("../../shared/stores/animation.store");
|
|
11
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
11
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
@@ -17,7 +16,6 @@ const ComponentScreen = ({
|
|
|
17
16
|
children
|
|
18
17
|
}) => {
|
|
19
18
|
const sceneClosing = _animation.AnimationStore.getValue(routeKey, "closing");
|
|
20
|
-
const screenRef = (0, _reactNativeReanimated.useAnimatedRef)();
|
|
21
19
|
const animatedProps = (0, _reactNativeReanimated.useAnimatedProps)(() => {
|
|
22
20
|
return {
|
|
23
21
|
pointerEvents: sceneClosing.get() ? POINT_NONE : POINT_BOX_NONE
|
|
@@ -25,13 +23,9 @@ const ComponentScreen = ({
|
|
|
25
23
|
});
|
|
26
24
|
const ComponentScreenComponent = _reactNativeReanimated.default.View;
|
|
27
25
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ComponentScreenComponent, {
|
|
28
|
-
ref: screenRef,
|
|
29
26
|
style: _reactNative.StyleSheet.absoluteFill,
|
|
30
27
|
animatedProps: animatedProps,
|
|
31
|
-
children:
|
|
32
|
-
anchorRef: screenRef,
|
|
33
|
-
children: children
|
|
34
|
-
})
|
|
28
|
+
children: children
|
|
35
29
|
});
|
|
36
30
|
};
|
|
37
31
|
exports.ComponentScreen = ComponentScreen;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_reactNativeReanimated","_interopRequireWildcard","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativeReanimated","_interopRequireWildcard","_animation","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","POINT_NONE","POINT_BOX_NONE","ComponentScreen","routeKey","children","sceneClosing","AnimationStore","getValue","animatedProps","useAnimatedProps","pointerEvents","ComponentScreenComponent","Animated","View","jsx","style","StyleSheet","absoluteFill","exports"],"sourceRoot":"../../../../src","sources":["component-stack/components/component-screen.tsx"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAAqE,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAE,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAA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CAAC,CAAC;EAEF,MAAMU,wBAAwB,GAAGC,8BAAQ,CAACC,IAAI;EAE9C,oBACC,IAAAjC,WAAA,CAAAkC,GAAA,EAACH,wBAAwB;IACxBI,KAAK,EAAEC,uBAAU,CAACC,YAAa;IAC/BT,aAAa,EAAEA,aAAc;IAAAJ,QAAA,EAE5BA;EAAQ,CACgB,CAAC;AAE7B,CAAC;AAACc,OAAA,CAAAhB,eAAA,GAAAA,eAAA","ignoreList":[]}
|
package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js
CHANGED
|
@@ -9,7 +9,7 @@ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reani
|
|
|
9
9
|
var _constants = require("../../constants");
|
|
10
10
|
var _descriptors = require("../../providers/screen/descriptors");
|
|
11
11
|
var _styles = require("../../providers/screen/styles");
|
|
12
|
-
var
|
|
12
|
+
var _linkPairs = require("../../stores/bounds/helpers/link-pairs.helpers");
|
|
13
13
|
var _styles2 = require("../../utils/bounds/helpers/styles/styles");
|
|
14
14
|
var _useBoundaryPresence = require("./hooks/use-boundary-presence");
|
|
15
15
|
var _useInitialDestinationMeasurement = require("./hooks/use-initial-destination-measurement");
|
|
@@ -17,12 +17,12 @@ var _useInitialSourceMeasurement = require("./hooks/use-initial-source-measureme
|
|
|
17
17
|
var _useMeasurer = require("./hooks/use-measurer");
|
|
18
18
|
var _useRefreshBoundary = require("./hooks/use-refresh-boundary");
|
|
19
19
|
var _boundaryOwner = require("./providers/boundary-owner.provider");
|
|
20
|
-
var _buildBoundaryMatchKey = require("./utils/build-boundary-match-key");
|
|
21
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
23
22
|
function createBoundaryComponent(Wrapped, options = {}) {
|
|
24
23
|
const {
|
|
25
|
-
alreadyAnimated = false
|
|
24
|
+
alreadyAnimated = false,
|
|
25
|
+
shouldAutoMeasure = false
|
|
26
26
|
} = options;
|
|
27
27
|
const AnimatedComponent = alreadyAnimated ? Wrapped : _reactNativeReanimated.default.createAnimatedComponent(Wrapped);
|
|
28
28
|
const Inner = /*#__PURE__*/(0, _react.forwardRef)((props, forwardedRef) => {
|
|
@@ -39,14 +39,13 @@ function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
39
39
|
onPress,
|
|
40
40
|
...rest
|
|
41
41
|
} = props;
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
id
|
|
45
|
-
});
|
|
42
|
+
const linkId = String(id);
|
|
43
|
+
const entryTag = group ? `${group}:${linkId}` : linkId;
|
|
46
44
|
const {
|
|
47
45
|
previousScreenKey: preferredSourceScreenKey,
|
|
48
46
|
currentScreenKey,
|
|
49
47
|
nextScreenKey,
|
|
48
|
+
ancestorKeys,
|
|
50
49
|
hasConfiguredInterpolator
|
|
51
50
|
} = (0, _descriptors.useDescriptorDerivations)();
|
|
52
51
|
const runtimeEnabled = enabled && hasConfiguredInterpolator;
|
|
@@ -69,12 +68,12 @@ function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
69
68
|
const associatedStyles = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
70
69
|
"worklet";
|
|
71
70
|
|
|
72
|
-
return stylesMap.get()[
|
|
71
|
+
return stylesMap.get()[entryTag]?.style ?? _constants.NO_STYLES;
|
|
73
72
|
});
|
|
74
73
|
const associatedStackingStyles = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
75
74
|
"worklet";
|
|
76
75
|
|
|
77
|
-
const baseStyle = stylesMap.get()[
|
|
76
|
+
const baseStyle = stylesMap.get()[entryTag]?.style;
|
|
78
77
|
const zIndex = baseStyle?.zIndex ?? 0;
|
|
79
78
|
const elevation = baseStyle?.elevation ?? 0;
|
|
80
79
|
if (zIndex === 0 && elevation === 0) {
|
|
@@ -97,8 +96,9 @@ function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
97
96
|
const preparedStyles = targetPreparedStyles ?? ownerPreparedStyles;
|
|
98
97
|
const measureBoundary = (0, _useMeasurer.useMeasurer)({
|
|
99
98
|
enabled,
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
entryTag,
|
|
100
|
+
linkId,
|
|
101
|
+
group,
|
|
102
102
|
currentScreenKey,
|
|
103
103
|
preparedStyles,
|
|
104
104
|
measuredAnimatedRef: measuredRef
|
|
@@ -109,55 +109,48 @@ function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
109
109
|
// matching can resolve across concrete screen keys.
|
|
110
110
|
(0, _useBoundaryPresence.useBoundaryPresence)({
|
|
111
111
|
enabled: runtimeEnabled,
|
|
112
|
-
|
|
112
|
+
entryTag,
|
|
113
113
|
currentScreenKey,
|
|
114
114
|
boundaryConfig
|
|
115
115
|
});
|
|
116
|
-
|
|
117
|
-
// Initial source measurement: capture source bounds when a matching
|
|
118
|
-
// destination appears on the next screen.
|
|
116
|
+
const shouldPassivelyMeasureSource = shouldAutoMeasure && typeof onPress !== "function";
|
|
119
117
|
(0, _useInitialSourceMeasurement.useInitialSourceMeasurement)({
|
|
120
118
|
enabled: runtimeEnabled,
|
|
121
119
|
nextScreenKey,
|
|
122
|
-
measureBoundary
|
|
120
|
+
measureBoundary,
|
|
121
|
+
currentScreenKey,
|
|
122
|
+
linkId,
|
|
123
|
+
group,
|
|
124
|
+
shouldAutoMeasure: shouldPassivelyMeasureSource
|
|
123
125
|
});
|
|
124
|
-
|
|
125
|
-
// Initial destination measurement: hold lifecycle start until the first
|
|
126
|
-
// valid destination measurement attaches, then release the pending transition.
|
|
127
126
|
(0, _useInitialDestinationMeasurement.useInitialDestinationMeasurement)({
|
|
128
|
-
|
|
127
|
+
linkId,
|
|
129
128
|
enabled: shouldRunDestinationEffects,
|
|
130
129
|
currentScreenKey,
|
|
131
130
|
preferredSourceScreenKey,
|
|
131
|
+
ancestorScreenKeys: ancestorKeys,
|
|
132
132
|
measureBoundary
|
|
133
133
|
});
|
|
134
|
-
|
|
135
|
-
// Pre-transition measurement path: when this route or its next sibling is
|
|
136
|
-
// about to animate, capture or refresh the measurements needed before
|
|
137
|
-
// progress or transform state mutates. Grouped sources refresh existing
|
|
138
|
-
// links; plain sources only backfill when missing.
|
|
139
134
|
(0, _useRefreshBoundary.useRefreshBoundary)({
|
|
140
135
|
enabled: runtimeEnabled,
|
|
141
|
-
sharedBoundTag,
|
|
142
|
-
id,
|
|
143
|
-
group,
|
|
144
136
|
currentScreenKey,
|
|
137
|
+
preferredSourceScreenKey,
|
|
145
138
|
nextScreenKey,
|
|
146
|
-
|
|
139
|
+
linkId,
|
|
140
|
+
group,
|
|
141
|
+
ancestorScreenKeys: ancestorKeys,
|
|
147
142
|
measureBoundary
|
|
148
143
|
});
|
|
149
144
|
const handlePress = (0, _react.useCallback)((...args) => {
|
|
150
145
|
// Press path has priority: capture source before user onPress/navigation.
|
|
151
|
-
if (group) {
|
|
152
|
-
(0, _reactNativeReanimated.runOnUI)(_groups.setGroupInitialId)(group, String(id));
|
|
153
|
-
}
|
|
154
146
|
(0, _reactNativeReanimated.runOnUI)(measureBoundary)({
|
|
155
|
-
|
|
147
|
+
type: "source",
|
|
148
|
+
pairKey: (0, _linkPairs.createPendingPairKey)(currentScreenKey)
|
|
156
149
|
});
|
|
157
150
|
if (typeof onPress === "function") {
|
|
158
151
|
onPress(...args);
|
|
159
152
|
}
|
|
160
|
-
}, [
|
|
153
|
+
}, [measureBoundary, onPress, currentScreenKey]);
|
|
161
154
|
const resolvedOnPress = typeof onPress === "function" ? handlePress : undefined;
|
|
162
155
|
(0, _react.useImperativeHandle)(forwardedRef, () => ownerRef.current, [ownerRef]);
|
|
163
156
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_boundaryOwner.BoundaryOwnerProvider, {
|
package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_constants","_descriptors","_styles","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_constants","_descriptors","_styles","_linkPairs","_styles2","_useBoundaryPresence","_useInitialDestinationMeasurement","_useInitialSourceMeasurement","_useMeasurer","_useRefreshBoundary","_boundaryOwner","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","createBoundaryComponent","Wrapped","options","alreadyAnimated","shouldAutoMeasure","AnimatedComponent","Animated","createAnimatedComponent","Inner","forwardRef","props","forwardedRef","ownerRef","useAnimatedRef","enabled","group","id","anchor","scaleMode","target","method","style","onPress","rest","linkId","String","entryTag","previousScreenKey","preferredSourceScreenKey","currentScreenKey","nextScreenKey","ancestorKeys","hasConfiguredInterpolator","useDescriptorDerivations","runtimeEnabled","hasNextScreen","boundaryConfig","useMemo","undefined","ownerPreparedStyles","prepareStyleForBounds","stylesMap","useScreenStyles","associatedStyles","useAnimatedStyle","NO_STYLES","associatedStackingStyles","baseStyle","zIndex","elevation","contextValue","measuredRef","hasActiveTarget","targetPreparedStyles","useBoundaryOwner","associatedTargetStyles","preparedStyles","measureBoundary","useMeasurer","measuredAnimatedRef","shouldRunDestinationEffects","useBoundaryPresence","shouldPassivelyMeasureSource","useInitialSourceMeasurement","useInitialDestinationMeasurement","ancestorScreenKeys","useRefreshBoundary","handlePress","useCallback","args","runOnUI","type","pairKey","createPendingPairKey","resolvedOnPress","useImperativeHandle","current","jsx","BoundaryOwnerProvider","value","children","ref","collapsable","memo"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C,CAAC;MAEF,IAAI,OAAOP,OAAO,KAAK,UAAU,EAAE;QAClCA,OAAO,CAAC,GAAG+C,IAAI,CAAC;MACjB;IACD,CAAC,EACD,CAACZ,eAAe,EAAEnC,OAAO,EAAEO,gBAAgB,CAC5C,CAAC;IAED,MAAM6C,eAAe,GACpB,OAAOpD,OAAO,KAAK,UAAU,GAAG6C,WAAW,GAAG7B,SAAS;IAExD,IAAAqC,0BAAmB,EAAChE,YAAY,EAAE,MAAMC,QAAQ,CAACgE,OAAc,EAAE,CAChEhE,QAAQ,CACR,CAAC;IAEF,oBACC,IAAAhC,WAAA,CAAAiG,GAAA,EAAClG,cAAA,CAAAmG,qBAAqB;MAACC,KAAK,EAAE7B,YAAa;MAAA8B,QAAA,eAC1C,IAAApG,WAAA,CAAAiG,GAAA,EAACxE,iBAAiB;QAAA,GACbkB,IAAI;QACR0D,GAAG,EAAErE,QAAS;QACdS,KAAK,EAAE,CACNA,KAAK,EACLa,cAAc,GACXkB,eAAe,GACdN,wBAAwB,GACxBH,gBAAgB,GACjBL,SAAS,CACX;QACFhB,OAAO,EAAEoD,eAAgB;QACzBQ,WAAW,EAAE;MAAM,CACnB;IAAC,CACoB,CAAC;EAE1B,CAAC,CAAC;EAEF,oBAAO,IAAAC,WAAI,EACV7E,8BAAQ,CAACC,uBAAuB,CAACC,KAAK,CACvC,CAAC;AAMF","ignoreList":[]}
|
package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js
CHANGED
|
@@ -10,19 +10,19 @@ var _entries = require("../../../stores/bounds/internals/entries");
|
|
|
10
10
|
const useBoundaryPresence = params => {
|
|
11
11
|
const {
|
|
12
12
|
enabled,
|
|
13
|
-
|
|
13
|
+
entryTag,
|
|
14
14
|
currentScreenKey,
|
|
15
15
|
boundaryConfig
|
|
16
16
|
} = params;
|
|
17
17
|
(0, _react.useLayoutEffect)(() => {
|
|
18
18
|
if (!enabled) return;
|
|
19
|
-
(0, _reactNativeReanimated.runOnUI)(_entries.setEntry)(
|
|
19
|
+
(0, _reactNativeReanimated.runOnUI)(_entries.setEntry)(entryTag, currentScreenKey, {
|
|
20
20
|
boundaryConfig
|
|
21
21
|
});
|
|
22
22
|
return () => {
|
|
23
|
-
(0, _reactNativeReanimated.runOnUI)(_entries.removeEntry)(
|
|
23
|
+
(0, _reactNativeReanimated.runOnUI)(_entries.removeEntry)(entryTag, currentScreenKey);
|
|
24
24
|
};
|
|
25
|
-
}, [enabled,
|
|
25
|
+
}, [enabled, entryTag, currentScreenKey, boundaryConfig]);
|
|
26
26
|
};
|
|
27
27
|
exports.useBoundaryPresence = useBoundaryPresence;
|
|
28
28
|
//# sourceMappingURL=use-boundary-presence.js.map
|
package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_entries","useBoundaryPresence","params","enabled","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_entries","useBoundaryPresence","params","enabled","entryTag","currentScreenKey","boundaryConfig","useLayoutEffect","runOnUI","setEntry","removeEntry","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-boundary-presence.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAMO,MAAMG,mBAAmB,GAAIC,MAKnC,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,QAAQ;IAAEC,gBAAgB;IAAEC;EAAe,CAAC,GAAGJ,MAAM;EAEtE,IAAAK,sBAAe,EAAC,MAAM;IACrB,IAAI,CAACJ,OAAO,EAAE;IAEd,IAAAK,8BAAO,EAACC,iBAAQ,CAAC,CAACL,QAAQ,EAAEC,gBAAgB,EAAE;MAC7CC;IACD,CAAC,CAAC;IAEF,OAAO,MAAM;MACZ,IAAAE,8BAAO,EAACE,oBAAW,CAAC,CAACN,QAAQ,EAAEC,gBAAgB,CAAC;IACjD,CAAC;EACF,CAAC,EAAE,CAACF,OAAO,EAAEC,QAAQ,EAAEC,gBAAgB,EAAEC,cAAc,CAAC,CAAC;AAC1D,CAAC;AAACK,OAAA,CAAAV,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -7,15 +7,16 @@ exports.useInitialDestinationMeasurement = void 0;
|
|
|
7
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
8
|
var _animation = require("../../../stores/animation.store");
|
|
9
9
|
var _links = require("../../../stores/bounds/internals/links");
|
|
10
|
+
var _state = require("../../../stores/bounds/internals/state");
|
|
10
11
|
var _system = require("../../../stores/system.store");
|
|
11
|
-
var
|
|
12
|
-
var _measurementRules = require("./helpers/measurement-rules");
|
|
12
|
+
var _destinationSignals = require("../utils/destination-signals");
|
|
13
13
|
const VIEWPORT_RETRY_DELAY_MS = 16;
|
|
14
14
|
const useInitialDestinationMeasurement = ({
|
|
15
|
-
|
|
15
|
+
linkId,
|
|
16
16
|
enabled,
|
|
17
17
|
currentScreenKey,
|
|
18
18
|
preferredSourceScreenKey,
|
|
19
|
+
ancestorScreenKeys,
|
|
19
20
|
measureBoundary
|
|
20
21
|
}) => {
|
|
21
22
|
const progress = _animation.AnimationStore.getValue(currentScreenKey, "progress");
|
|
@@ -65,32 +66,29 @@ const useInitialDestinationMeasurement = ({
|
|
|
65
66
|
if (!hasPendingOpenRequest || !isWaitingForOpenToStart) {
|
|
66
67
|
return [0, retryTick];
|
|
67
68
|
}
|
|
68
|
-
const
|
|
69
|
-
sharedBoundTag,
|
|
70
|
-
currentScreenKey,
|
|
71
|
-
preferredSourceScreenKey
|
|
72
|
-
});
|
|
73
|
-
const shouldBlock = (0, _measurementRules.shouldBlockInitialDestinationMeasurement)({
|
|
69
|
+
const destinationPairKey = (0, _destinationSignals.getInitialDestinationMeasurePairKey)({
|
|
74
70
|
enabled,
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
currentScreenKey,
|
|
72
|
+
preferredSourceScreenKey,
|
|
73
|
+
ancestorScreenKeys,
|
|
74
|
+
linkId,
|
|
75
|
+
linkState: ancestorScreenKeys.length ? _state.pairs.get() : undefined
|
|
77
76
|
});
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
return [1, retryTick];
|
|
82
|
-
}, ([shouldBlock]) => {
|
|
77
|
+
return [destinationPairKey, retryTick];
|
|
78
|
+
}, ([destinationPairKey]) => {
|
|
83
79
|
"worklet";
|
|
84
80
|
|
|
85
|
-
if (!
|
|
81
|
+
if (!destinationPairKey) {
|
|
86
82
|
releaseLifecycleStartBlock();
|
|
87
83
|
return;
|
|
88
84
|
}
|
|
89
85
|
ensureLifecycleStartBlocked();
|
|
90
86
|
measureBoundary({
|
|
91
|
-
|
|
87
|
+
type: "destination",
|
|
88
|
+
pairKey: destinationPairKey
|
|
92
89
|
});
|
|
93
|
-
|
|
90
|
+
const destinationAttached = (0, _links.getDestination)(destinationPairKey, linkId) !== null;
|
|
91
|
+
if (destinationAttached) {
|
|
94
92
|
releaseLifecycleStartBlock();
|
|
95
93
|
return;
|
|
96
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_animation","_links","
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_animation","_links","_state","_system","_destinationSignals","VIEWPORT_RETRY_DELAY_MS","useInitialDestinationMeasurement","linkId","enabled","currentScreenKey","preferredSourceScreenKey","ancestorScreenKeys","measureBoundary","progress","AnimationStore","getValue","system","SystemStore","getBag","pendingLifecycleRequestKind","blockLifecycleStart","unblockLifecycleStart","actions","isBlockingLifecycleStart","useSharedValue","retryToken","ensureLifecycleStartBlocked","get","set","releaseLifecycleStartBlock","cancelAnimation","scheduleViewportRetry","withDelay","withTiming","duration","useAnimatedReaction","retryTick","hasPendingOpenRequest","LifecycleTransitionRequestKind","Open","isWaitingForOpenToStart","destinationPairKey","getInitialDestinationMeasurePairKey","linkState","length","pairs","undefined","type","pairKey","destinationAttached","getDestination","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAOA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAKA,IAAAK,mBAAA,GAAAL,OAAA;AAEA,MAAMM,uBAAuB,GAAG,EAAE;AAW3B,MAAMC,gCAAgC,GAAGA,CAAC;EAChDC,MAAM;EACNC,OAAO;EACPC,gBAAgB;EAChBC,wBAAwB;EACxBC,kBAAkB;EAClBC;AACuC,CAAC,KAAK;EAC7C,MAAMC,QAAQ,GAAGC,yBAAc,CAACC,QAAQ,CAACN,gBAAgB,EAAE,UAAU,CAAC;EACtE,MAAMO,MAAM,GAAGC,mBAAW,CAACC,MAAM,CAACT,gBAAgB,CAAC;EACnD,MAAM;IAAEU;EAA4B,CAAC,GAAGH,MAAM;EAC9C,MAAM;IAAEI,mBAAmB;IAAEC;EAAsB,CAAC,GAAGL,MAAM,CAACM,OAAO;EACrE,MAAMC,wBAAwB,GAAG,IAAAC,qCAAc,EAAC,CAAC,CAAC;EAClD,MAAMC,UAAU,GAAG,IAAAD,qCAAc,EAAC,CAAC,CAAC;EAEpC,MAAME,2BAA2B,GAAGA,CAAA,KAAM;IACzC,SAAS;;IACT,IAAIH,wBAAwB,CAACI,GAAG,CAAC,CAAC,EAAE;MACnC;IACD;IAEAP,mBAAmB,CAAC,CAAC;IACrBG,wBAAwB,CAACK,GAAG,CAAC,CAAC,CAAC;EAChC,CAAC;EAED,MAAMC,0BAA0B,GAAGA,CAAA,KAAM;IACxC,SAAS;;IACT,IAAAC,sCAAe,EAACL,UAAU,CAAC;IAE3B,IAAI,CAACF,wBAAwB,CAACI,GAAG,CAAC,CAAC,EAAE;MACpC;IACD;IAE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nBC,OAAO,EAAEP;IACV,CAAC,CAAC;IAEF,MAAMQ,mBAAmB,GACxB,IAAAC,qBAAc,EAACT,kBAAkB,EAAElC,MAAM,CAAC,KAAK,IAAI;IAEpD,IAAI0C,mBAAmB,EAAE;MACxBpB,0BAA0B,CAAC,CAAC;MAC5B;IACD;IAEAE,qBAAqB,CAAC,CAAC;EACxB,CACD,CAAC;AACF,CAAC;AAACoB,OAAA,CAAA7C,gCAAA,GAAAA,gCAAA","ignoreList":[]}
|
|
@@ -5,25 +5,45 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useInitialSourceMeasurement = void 0;
|
|
7
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
+
var _state = require("../../../stores/bounds/internals/state");
|
|
9
|
+
var _sourceSignals = require("../utils/source-signals");
|
|
8
10
|
const useInitialSourceMeasurement = params => {
|
|
9
11
|
const {
|
|
10
12
|
enabled,
|
|
11
13
|
nextScreenKey,
|
|
12
|
-
measureBoundary
|
|
14
|
+
measureBoundary,
|
|
15
|
+
linkId,
|
|
16
|
+
currentScreenKey,
|
|
17
|
+
group,
|
|
18
|
+
shouldAutoMeasure
|
|
13
19
|
} = params;
|
|
20
|
+
const lastSourceCaptureSignal = (0, _reactNativeReanimated.useSharedValue)(null);
|
|
14
21
|
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
15
22
|
"worklet";
|
|
16
23
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
return (0, _sourceSignals.getInitialSourceCaptureSignal)({
|
|
25
|
+
enabled,
|
|
26
|
+
nextScreenKey,
|
|
27
|
+
currentScreenKey,
|
|
28
|
+
linkId,
|
|
29
|
+
group,
|
|
30
|
+
shouldAutoMeasure,
|
|
31
|
+
linkState: group ? _state.pairs.get() : undefined
|
|
32
|
+
});
|
|
21
33
|
}, captureSignal => {
|
|
22
34
|
"worklet";
|
|
23
35
|
|
|
24
|
-
if (!enabled || !captureSignal)
|
|
36
|
+
if (!enabled || !captureSignal) {
|
|
37
|
+
lastSourceCaptureSignal.set(null);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (lastSourceCaptureSignal.get() === captureSignal.signal) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
lastSourceCaptureSignal.set(captureSignal.signal);
|
|
25
44
|
measureBoundary({
|
|
26
|
-
|
|
45
|
+
type: "source",
|
|
46
|
+
pairKey: captureSignal.pairKey
|
|
27
47
|
});
|
|
28
48
|
});
|
|
29
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","useInitialSourceMeasurement","params","enabled","nextScreenKey","measureBoundary","useAnimatedReaction","captureSignal","
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_state","_sourceSignals","useInitialSourceMeasurement","params","enabled","nextScreenKey","measureBoundary","linkId","currentScreenKey","group","shouldAutoMeasure","lastSourceCaptureSignal","useSharedValue","useAnimatedReaction","getInitialSourceCaptureSignal","linkState","pairs","get","undefined","captureSignal","set","signal","type","pairKey","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-initial-source-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,cAAA,GAAAF,OAAA;AAEO,MAAMG,2BAA2B,GAAIC,MAQ3C,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,aAAa;IACbC,eAAe;IACfC,MAAM;IACNC,gBAAgB;IAChBC,KAAK;IACLC;EACD,CAAC,GAAGP,MAAM;EACV,MAAMQ,uBAAuB,GAAG,IAAAC,qCAAc,EAAgB,IAAI,CAAC;EAEnE,IAAAC,0CAAmB,EAClB,MAAM;IACL,SAAS;;IACT,OAAO,IAAAC,4CAA6B,EAAC;MACpCV,OAAO;MACPC,aAAa;MACbG,gBAAgB;MAChBD,MAAM;MACNE,KAAK;MACLC,iBAAiB;MACjBK,SAAS,EAAEN,KAAK,GAAGO,YAAK,CAACC,GAAG,CAAC,CAAC,GAAGC;IAClC,CAAC,CAAC;EACH,CAAC,EACAC,aAAa,IAAK;IAClB,SAAS;;IACT,IAAI,CAACf,OAAO,IAAI,CAACe,aAAa,EAAE;MAC/BR,uBAAuB,CAACS,GAAG,CAAC,IAAI,CAAC;MACjC;IACD;IAEA,IAAIT,uBAAuB,CAACM,GAAG,CAAC,CAAC,KAAKE,aAAa,CAACE,MAAM,EAAE;MAC3D;IACD;IAEAV,uBAAuB,CAACS,GAAG,CAACD,aAAa,CAACE,MAAM,CAAC;IACjDf,eAAe,CAAC;MACfgB,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAAtB,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -6,17 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useMeasurer = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _entries = require("../../../stores/bounds/internals/entries");
|
|
10
|
+
var _links = require("../../../stores/bounds/internals/links");
|
|
9
11
|
var _scroll = require("../../../stores/scroll.store");
|
|
10
12
|
var _system = require("../../../stores/system.store");
|
|
11
|
-
var
|
|
12
|
-
var _boundaryLinkContext = require("./helpers/boundary-link-context");
|
|
13
|
-
var _measurement = require("./helpers/measurement");
|
|
14
|
-
var _measurementRules = require("./helpers/measurement-rules");
|
|
15
|
-
var _scrollMeasurement = require("./helpers/scroll-measurement");
|
|
13
|
+
var _measuredBounds = require("../utils/measured-bounds");
|
|
16
14
|
const useMeasurer = ({
|
|
17
15
|
enabled,
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
entryTag,
|
|
17
|
+
linkId,
|
|
18
|
+
group,
|
|
20
19
|
currentScreenKey,
|
|
21
20
|
preparedStyles,
|
|
22
21
|
measuredAnimatedRef
|
|
@@ -27,38 +26,13 @@ const useMeasurer = ({
|
|
|
27
26
|
} = (0, _reactNative.useWindowDimensions)();
|
|
28
27
|
const scrollState = _scroll.ScrollStore.getValue(currentScreenKey, "state");
|
|
29
28
|
const pendingLifecycleStartBlockCount = _system.SystemStore.getValue(currentScreenKey, "pendingLifecycleStartBlockCount");
|
|
30
|
-
return (0, _react.useCallback)(
|
|
31
|
-
intent
|
|
32
|
-
} = {}) => {
|
|
29
|
+
return (0, _react.useCallback)(target => {
|
|
33
30
|
"worklet";
|
|
34
31
|
|
|
35
32
|
if (!enabled) return;
|
|
36
|
-
const
|
|
37
|
-
const currentLink = (0, _boundaryLinkContext.createLinkContext)({
|
|
38
|
-
sharedBoundTag,
|
|
39
|
-
currentScreenKey,
|
|
40
|
-
preferredSourceScreenKey
|
|
41
|
-
});
|
|
42
|
-
const writePlan = (0, _measurementRules.buildMeasurementWritePlan)({
|
|
43
|
-
intents,
|
|
44
|
-
hasPendingLink: currentLink.hasPendingLink,
|
|
45
|
-
hasSourceLink: currentLink.hasSourceLink,
|
|
46
|
-
hasDestinationLink: currentLink.hasDestinationLink,
|
|
47
|
-
hasAttachableSourceLink: currentLink.hasAttachableSourceLink
|
|
48
|
-
});
|
|
49
|
-
if (!writePlan.writesAny) return;
|
|
50
|
-
const measured = (0, _scrollMeasurement.measureWithOverscrollAwareness)(measuredAnimatedRef, scrollState.get());
|
|
33
|
+
const measured = (0, _measuredBounds.measureWithOverscrollAwareness)(measuredAnimatedRef, scrollState.get());
|
|
51
34
|
if (!measured) return;
|
|
52
35
|
|
|
53
|
-
/**
|
|
54
|
-
* Source Pass
|
|
55
|
-
* Source intents are intentionally used & kept unguarded.
|
|
56
|
-
*/
|
|
57
|
-
const sourceWrites = {
|
|
58
|
-
shouldSetSource: writePlan.captureSource,
|
|
59
|
-
shouldUpdateSource: writePlan.refreshSource
|
|
60
|
-
};
|
|
61
|
-
|
|
62
36
|
/**
|
|
63
37
|
* - Destination Pass -
|
|
64
38
|
* Be strict while lifecycle start is blocked for destination capture.
|
|
@@ -66,24 +40,22 @@ const useMeasurer = ({
|
|
|
66
40
|
* and malformed off-screen destination measurements should keep the
|
|
67
41
|
* lifecycle blocked until a valid retry lands.
|
|
68
42
|
*/
|
|
69
|
-
const shouldGuardDestinationViewport = pendingLifecycleStartBlockCount.get() > 0;
|
|
70
|
-
const viewportAllowsDestinationWrite = !shouldGuardDestinationViewport || (0,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
(0, _applyMeasuredBoundsWrites.applyMeasuredBoundsWrites)({
|
|
78
|
-
sharedBoundTag,
|
|
79
|
-
currentScreenKey,
|
|
80
|
-
measured,
|
|
81
|
-
preparedStyles,
|
|
82
|
-
expectedSourceScreenKey: currentLink.expectedSourceScreenKey,
|
|
83
|
-
...sourceWrites,
|
|
84
|
-
...destinationWrites
|
|
43
|
+
const shouldGuardDestinationViewport = pendingLifecycleStartBlockCount.get() > 0 || !!group;
|
|
44
|
+
const viewportAllowsDestinationWrite = target.type !== "destination" || !shouldGuardDestinationViewport || (0, _measuredBounds.isMeasurementInViewport)(measured, viewportWidth, viewportHeight);
|
|
45
|
+
if (!viewportAllowsDestinationWrite) return;
|
|
46
|
+
|
|
47
|
+
// Set the bounds entry on every measure to avoid any stale measurements
|
|
48
|
+
// for the public read API.
|
|
49
|
+
(0, _entries.setEntry)(entryTag, currentScreenKey, {
|
|
50
|
+
bounds: measured
|
|
85
51
|
});
|
|
86
|
-
|
|
52
|
+
if (target.type === "source") {
|
|
53
|
+
(0, _links.setSource)(target.pairKey, linkId, currentScreenKey, measured, preparedStyles, group);
|
|
54
|
+
}
|
|
55
|
+
if (target.type === "destination") {
|
|
56
|
+
(0, _links.setDestination)(target.pairKey, linkId, currentScreenKey, measured, preparedStyles, group);
|
|
57
|
+
}
|
|
58
|
+
}, [enabled, entryTag, linkId, group, currentScreenKey, preparedStyles, measuredAnimatedRef, viewportWidth, viewportHeight, scrollState, pendingLifecycleStartBlockCount]);
|
|
87
59
|
};
|
|
88
60
|
exports.useMeasurer = useMeasurer;
|
|
89
61
|
//# sourceMappingURL=use-measurer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_entries","_links","_scroll","_system","_measuredBounds","useMeasurer","enabled","entryTag","linkId","group","currentScreenKey","preparedStyles","measuredAnimatedRef","width","viewportWidth","height","viewportHeight","useWindowDimensions","scrollState","ScrollStore","getValue","pendingLifecycleStartBlockCount","SystemStore","useCallback","target","measured","measureWithOverscrollAwareness","get","shouldGuardDestinationViewport","viewportAllowsDestinationWrite","type","isMeasurementInViewport","setEntry","bounds","setSource","pairKey","setDestination","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-measurer.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAIA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAEA,IAAAM,eAAA,GAAAN,OAAA;AAeO,MAAMO,WAAW,GAAGA,CAAC;EAC3BC,OAAO;EACPC,QAAQ;EACRC,MAAM;EACNC,KAAK;EACLC,gBAAgB;EAChBC,cAAc;EACdC;AACkB,CAAC,KAAsB;EACzC,MAAM;IAAEC,KAAK,EAAEC,aAAa;IAAEC,MAAM,EAAEC;EAAe,CAAC,GACrD,IAAAC,gCAAmB,EAAC,CAAC;EAEtB,MAAMC,WAAW,GAAGC,mBAAW,CAACC,QAAQ,CAACV,gBAAgB,EAAE,OAAO,CAAC;EACnE,MAAMW,+BAA+B,GAAGC,mBAAW,CAACF,QAAQ,CAC3DV,gBAAgB,EAChB,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