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
|
@@ -5,7 +5,7 @@ import Animated, { runOnUI, useAnimatedRef, useAnimatedStyle } from "react-nativ
|
|
|
5
5
|
import { NO_STYLES } from "../../constants";
|
|
6
6
|
import { useDescriptorDerivations } from "../../providers/screen/descriptors";
|
|
7
7
|
import { useScreenStyles } from "../../providers/screen/styles";
|
|
8
|
-
import {
|
|
8
|
+
import { createPendingPairKey } from "../../stores/bounds/helpers/link-pairs.helpers";
|
|
9
9
|
import { prepareStyleForBounds } from "../../utils/bounds/helpers/styles/styles";
|
|
10
10
|
import { useBoundaryPresence } from "./hooks/use-boundary-presence";
|
|
11
11
|
import { useInitialDestinationMeasurement } from "./hooks/use-initial-destination-measurement";
|
|
@@ -13,11 +13,11 @@ import { useInitialSourceMeasurement } from "./hooks/use-initial-source-measurem
|
|
|
13
13
|
import { useMeasurer } from "./hooks/use-measurer";
|
|
14
14
|
import { useRefreshBoundary } from "./hooks/use-refresh-boundary";
|
|
15
15
|
import { BoundaryOwnerProvider, useBoundaryOwner } from "./providers/boundary-owner.provider";
|
|
16
|
-
import { buildBoundaryMatchKey } from "./utils/build-boundary-match-key";
|
|
17
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
17
|
export function createBoundaryComponent(Wrapped, options = {}) {
|
|
19
18
|
const {
|
|
20
|
-
alreadyAnimated = false
|
|
19
|
+
alreadyAnimated = false,
|
|
20
|
+
shouldAutoMeasure = false
|
|
21
21
|
} = options;
|
|
22
22
|
const AnimatedComponent = alreadyAnimated ? Wrapped : Animated.createAnimatedComponent(Wrapped);
|
|
23
23
|
const Inner = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
@@ -34,14 +34,13 @@ export function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
34
34
|
onPress,
|
|
35
35
|
...rest
|
|
36
36
|
} = props;
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
id
|
|
40
|
-
});
|
|
37
|
+
const linkId = String(id);
|
|
38
|
+
const entryTag = group ? `${group}:${linkId}` : linkId;
|
|
41
39
|
const {
|
|
42
40
|
previousScreenKey: preferredSourceScreenKey,
|
|
43
41
|
currentScreenKey,
|
|
44
42
|
nextScreenKey,
|
|
43
|
+
ancestorKeys,
|
|
45
44
|
hasConfiguredInterpolator
|
|
46
45
|
} = useDescriptorDerivations();
|
|
47
46
|
const runtimeEnabled = enabled && hasConfiguredInterpolator;
|
|
@@ -64,12 +63,12 @@ export function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
64
63
|
const associatedStyles = useAnimatedStyle(() => {
|
|
65
64
|
"worklet";
|
|
66
65
|
|
|
67
|
-
return stylesMap.get()[
|
|
66
|
+
return stylesMap.get()[entryTag]?.style ?? NO_STYLES;
|
|
68
67
|
});
|
|
69
68
|
const associatedStackingStyles = useAnimatedStyle(() => {
|
|
70
69
|
"worklet";
|
|
71
70
|
|
|
72
|
-
const baseStyle = stylesMap.get()[
|
|
71
|
+
const baseStyle = stylesMap.get()[entryTag]?.style;
|
|
73
72
|
const zIndex = baseStyle?.zIndex ?? 0;
|
|
74
73
|
const elevation = baseStyle?.elevation ?? 0;
|
|
75
74
|
if (zIndex === 0 && elevation === 0) {
|
|
@@ -92,8 +91,9 @@ export function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
92
91
|
const preparedStyles = targetPreparedStyles ?? ownerPreparedStyles;
|
|
93
92
|
const measureBoundary = useMeasurer({
|
|
94
93
|
enabled,
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
entryTag,
|
|
95
|
+
linkId,
|
|
96
|
+
group,
|
|
97
97
|
currentScreenKey,
|
|
98
98
|
preparedStyles,
|
|
99
99
|
measuredAnimatedRef: measuredRef
|
|
@@ -104,55 +104,48 @@ export function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
104
104
|
// matching can resolve across concrete screen keys.
|
|
105
105
|
useBoundaryPresence({
|
|
106
106
|
enabled: runtimeEnabled,
|
|
107
|
-
|
|
107
|
+
entryTag,
|
|
108
108
|
currentScreenKey,
|
|
109
109
|
boundaryConfig
|
|
110
110
|
});
|
|
111
|
-
|
|
112
|
-
// Initial source measurement: capture source bounds when a matching
|
|
113
|
-
// destination appears on the next screen.
|
|
111
|
+
const shouldPassivelyMeasureSource = shouldAutoMeasure && typeof onPress !== "function";
|
|
114
112
|
useInitialSourceMeasurement({
|
|
115
113
|
enabled: runtimeEnabled,
|
|
116
114
|
nextScreenKey,
|
|
117
|
-
measureBoundary
|
|
115
|
+
measureBoundary,
|
|
116
|
+
currentScreenKey,
|
|
117
|
+
linkId,
|
|
118
|
+
group,
|
|
119
|
+
shouldAutoMeasure: shouldPassivelyMeasureSource
|
|
118
120
|
});
|
|
119
|
-
|
|
120
|
-
// Initial destination measurement: hold lifecycle start until the first
|
|
121
|
-
// valid destination measurement attaches, then release the pending transition.
|
|
122
121
|
useInitialDestinationMeasurement({
|
|
123
|
-
|
|
122
|
+
linkId,
|
|
124
123
|
enabled: shouldRunDestinationEffects,
|
|
125
124
|
currentScreenKey,
|
|
126
125
|
preferredSourceScreenKey,
|
|
126
|
+
ancestorScreenKeys: ancestorKeys,
|
|
127
127
|
measureBoundary
|
|
128
128
|
});
|
|
129
|
-
|
|
130
|
-
// Pre-transition measurement path: when this route or its next sibling is
|
|
131
|
-
// about to animate, capture or refresh the measurements needed before
|
|
132
|
-
// progress or transform state mutates. Grouped sources refresh existing
|
|
133
|
-
// links; plain sources only backfill when missing.
|
|
134
129
|
useRefreshBoundary({
|
|
135
130
|
enabled: runtimeEnabled,
|
|
136
|
-
sharedBoundTag,
|
|
137
|
-
id,
|
|
138
|
-
group,
|
|
139
131
|
currentScreenKey,
|
|
132
|
+
preferredSourceScreenKey,
|
|
140
133
|
nextScreenKey,
|
|
141
|
-
|
|
134
|
+
linkId,
|
|
135
|
+
group,
|
|
136
|
+
ancestorScreenKeys: ancestorKeys,
|
|
142
137
|
measureBoundary
|
|
143
138
|
});
|
|
144
139
|
const handlePress = useCallback((...args) => {
|
|
145
140
|
// Press path has priority: capture source before user onPress/navigation.
|
|
146
|
-
if (group) {
|
|
147
|
-
runOnUI(setGroupInitialId)(group, String(id));
|
|
148
|
-
}
|
|
149
141
|
runOnUI(measureBoundary)({
|
|
150
|
-
|
|
142
|
+
type: "source",
|
|
143
|
+
pairKey: createPendingPairKey(currentScreenKey)
|
|
151
144
|
});
|
|
152
145
|
if (typeof onPress === "function") {
|
|
153
146
|
onPress(...args);
|
|
154
147
|
}
|
|
155
|
-
}, [
|
|
148
|
+
}, [measureBoundary, onPress, currentScreenKey]);
|
|
156
149
|
const resolvedOnPress = typeof onPress === "function" ? handlePress : undefined;
|
|
157
150
|
useImperativeHandle(forwardedRef, () => ownerRef.current, [ownerRef]);
|
|
158
151
|
return /*#__PURE__*/_jsx(BoundaryOwnerProvider, {
|
package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","memo","useCallback","useImperativeHandle","useMemo","Animated","runOnUI","useAnimatedRef","useAnimatedStyle","NO_STYLES","useDescriptorDerivations","useScreenStyles","
|
|
1
|
+
{"version":3,"names":["forwardRef","memo","useCallback","useImperativeHandle","useMemo","Animated","runOnUI","useAnimatedRef","useAnimatedStyle","NO_STYLES","useDescriptorDerivations","useScreenStyles","createPendingPairKey","prepareStyleForBounds","useBoundaryPresence","useInitialDestinationMeasurement","useInitialSourceMeasurement","useMeasurer","useRefreshBoundary","BoundaryOwnerProvider","useBoundaryOwner","jsx","_jsx","createBoundaryComponent","Wrapped","options","alreadyAnimated","shouldAutoMeasure","AnimatedComponent","createAnimatedComponent","Inner","props","forwardedRef","ownerRef","enabled","group","id","anchor","scaleMode","target","method","style","onPress","rest","linkId","String","entryTag","previousScreenKey","preferredSourceScreenKey","currentScreenKey","nextScreenKey","ancestorKeys","hasConfiguredInterpolator","runtimeEnabled","hasNextScreen","boundaryConfig","undefined","ownerPreparedStyles","stylesMap","associatedStyles","get","associatedStackingStyles","baseStyle","zIndex","elevation","contextValue","measuredRef","hasActiveTarget","targetPreparedStyles","associatedTargetStyles","preparedStyles","measureBoundary","measuredAnimatedRef","shouldRunDestinationEffects","shouldPassivelyMeasureSource","ancestorScreenKeys","handlePress","args","type","pairKey","resolvedOnPress","current","value","children","ref","collapsable"],"sourceRoot":"../../../../../src","sources":["shared/components/create-boundary-component/create-boundary-component.tsx"],"mappings":";;AAAA,SAECA,UAAU,EACVC,IAAI,EACJC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,QACD,OAAO;AAEd,OAAOC,QAAQ,IACdC,OAAO,EACPC,cAAc,EACdC,gBAAgB,QACV,yBAAyB;AAChC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,wBAAwB,QAAQ,oCAAoC;AAC7E,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,SAASC,oBAAoB,QAAQ,gDAAgD;AACrF,SAASC,qBAAqB,QAAQ,0CAA0C;AAChF,SAASC,mBAAmB,QAAQ,+BAA+B;AACnE,SAASC,gCAAgC,QAAQ,6CAA6C;AAC9F,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,SAASC,WAAW,QAAQ,sBAAsB;AAClD,SAASC,kBAAkB,QAAQ,8BAA8B;AACjE,SACCC,qBAAqB,EACrBC,gBAAgB,QACV,qCAAqC;AAAC,SAAAC,GAAA,IAAAC,IAAA;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R,CAAC;IAEF,oBACCX,IAAA,CAACH,qBAAqB;MAAC+D,KAAK,EAAEjB,YAAa;MAAAkB,QAAA,eAC1C7D,IAAA,CAACM,iBAAiB;QAAA,GACbe,IAAI;QACRyC,GAAG,EAAEnD,QAAS;QACdQ,KAAK,EAAE,CACNA,KAAK,EACLY,cAAc,GACXc,eAAe,GACdN,wBAAwB,GACxBF,gBAAgB,GACjBH,SAAS,CACX;QACFd,OAAO,EAAEsC,eAAgB;QACzBK,WAAW,EAAE;MAAM,CACnB;IAAC,CACoB,CAAC;EAE1B,CAAC,CAAC;EAEF,oBAAOpF,IAAI,CACVI,QAAQ,CAACwB,uBAAuB,CAACC,KAAK,CACvC,CAAC;AAMF","ignoreList":[]}
|
package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js
CHANGED
|
@@ -6,18 +6,18 @@ import { removeEntry, setEntry } from "../../../stores/bounds/internals/entries"
|
|
|
6
6
|
export const useBoundaryPresence = params => {
|
|
7
7
|
const {
|
|
8
8
|
enabled,
|
|
9
|
-
|
|
9
|
+
entryTag,
|
|
10
10
|
currentScreenKey,
|
|
11
11
|
boundaryConfig
|
|
12
12
|
} = params;
|
|
13
13
|
useLayoutEffect(() => {
|
|
14
14
|
if (!enabled) return;
|
|
15
|
-
runOnUI(setEntry)(
|
|
15
|
+
runOnUI(setEntry)(entryTag, currentScreenKey, {
|
|
16
16
|
boundaryConfig
|
|
17
17
|
});
|
|
18
18
|
return () => {
|
|
19
|
-
runOnUI(removeEntry)(
|
|
19
|
+
runOnUI(removeEntry)(entryTag, currentScreenKey);
|
|
20
20
|
};
|
|
21
|
-
}, [enabled,
|
|
21
|
+
}, [enabled, entryTag, currentScreenKey, boundaryConfig]);
|
|
22
22
|
};
|
|
23
23
|
//# sourceMappingURL=use-boundary-presence.js.map
|
package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useLayoutEffect","runOnUI","removeEntry","setEntry","useBoundaryPresence","params","enabled","
|
|
1
|
+
{"version":3,"names":["useLayoutEffect","runOnUI","removeEntry","setEntry","useBoundaryPresence","params","enabled","entryTag","currentScreenKey","boundaryConfig"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-boundary-presence.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,OAAO;AACvC,SAASC,OAAO,QAAQ,yBAAyB;AACjD,SACCC,WAAW,EACXC,QAAQ,QACF,0CAA0C;AAGjD,OAAO,MAAMC,mBAAmB,GAAIC,MAKnC,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,QAAQ;IAAEC,gBAAgB;IAAEC;EAAe,CAAC,GAAGJ,MAAM;EAEtEL,eAAe,CAAC,MAAM;IACrB,IAAI,CAACM,OAAO,EAAE;IAEdL,OAAO,CAACE,QAAQ,CAAC,CAACI,QAAQ,EAAEC,gBAAgB,EAAE;MAC7CC;IACD,CAAC,CAAC;IAEF,OAAO,MAAM;MACZR,OAAO,CAACC,WAAW,CAAC,CAACK,QAAQ,EAAEC,gBAAgB,CAAC;IACjD,CAAC;EACF,CAAC,EAAE,CAACF,OAAO,EAAEC,QAAQ,EAAEC,gBAAgB,EAAEC,cAAc,CAAC,CAAC;AAC1D,CAAC","ignoreList":[]}
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
import { cancelAnimation, useAnimatedReaction, useSharedValue, withDelay, withTiming } from "react-native-reanimated";
|
|
4
4
|
import { AnimationStore } from "../../../stores/animation.store";
|
|
5
|
-
import {
|
|
5
|
+
import { getDestination } from "../../../stores/bounds/internals/links";
|
|
6
|
+
import { pairs } from "../../../stores/bounds/internals/state";
|
|
6
7
|
import { LifecycleTransitionRequestKind, SystemStore } from "../../../stores/system.store";
|
|
7
|
-
import {
|
|
8
|
-
import { shouldBlockInitialDestinationMeasurement } from "./helpers/measurement-rules";
|
|
8
|
+
import { getInitialDestinationMeasurePairKey } from "../utils/destination-signals";
|
|
9
9
|
const VIEWPORT_RETRY_DELAY_MS = 16;
|
|
10
10
|
export const useInitialDestinationMeasurement = ({
|
|
11
|
-
|
|
11
|
+
linkId,
|
|
12
12
|
enabled,
|
|
13
13
|
currentScreenKey,
|
|
14
14
|
preferredSourceScreenKey,
|
|
15
|
+
ancestorScreenKeys,
|
|
15
16
|
measureBoundary
|
|
16
17
|
}) => {
|
|
17
18
|
const progress = AnimationStore.getValue(currentScreenKey, "progress");
|
|
@@ -61,32 +62,29 @@ export const useInitialDestinationMeasurement = ({
|
|
|
61
62
|
if (!hasPendingOpenRequest || !isWaitingForOpenToStart) {
|
|
62
63
|
return [0, retryTick];
|
|
63
64
|
}
|
|
64
|
-
const
|
|
65
|
-
sharedBoundTag,
|
|
66
|
-
currentScreenKey,
|
|
67
|
-
preferredSourceScreenKey
|
|
68
|
-
});
|
|
69
|
-
const shouldBlock = shouldBlockInitialDestinationMeasurement({
|
|
65
|
+
const destinationPairKey = getInitialDestinationMeasurePairKey({
|
|
70
66
|
enabled,
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
currentScreenKey,
|
|
68
|
+
preferredSourceScreenKey,
|
|
69
|
+
ancestorScreenKeys,
|
|
70
|
+
linkId,
|
|
71
|
+
linkState: ancestorScreenKeys.length ? pairs.get() : undefined
|
|
73
72
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
return [1, retryTick];
|
|
78
|
-
}, ([shouldBlock]) => {
|
|
73
|
+
return [destinationPairKey, retryTick];
|
|
74
|
+
}, ([destinationPairKey]) => {
|
|
79
75
|
"worklet";
|
|
80
76
|
|
|
81
|
-
if (!
|
|
77
|
+
if (!destinationPairKey) {
|
|
82
78
|
releaseLifecycleStartBlock();
|
|
83
79
|
return;
|
|
84
80
|
}
|
|
85
81
|
ensureLifecycleStartBlocked();
|
|
86
82
|
measureBoundary({
|
|
87
|
-
|
|
83
|
+
type: "destination",
|
|
84
|
+
pairKey: destinationPairKey
|
|
88
85
|
});
|
|
89
|
-
|
|
86
|
+
const destinationAttached = getDestination(destinationPairKey, linkId) !== null;
|
|
87
|
+
if (destinationAttached) {
|
|
90
88
|
releaseLifecycleStartBlock();
|
|
91
89
|
return;
|
|
92
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cancelAnimation","useAnimatedReaction","useSharedValue","withDelay","withTiming","AnimationStore","
|
|
1
|
+
{"version":3,"names":["cancelAnimation","useAnimatedReaction","useSharedValue","withDelay","withTiming","AnimationStore","getDestination","pairs","LifecycleTransitionRequestKind","SystemStore","getInitialDestinationMeasurePairKey","VIEWPORT_RETRY_DELAY_MS","useInitialDestinationMeasurement","linkId","enabled","currentScreenKey","preferredSourceScreenKey","ancestorScreenKeys","measureBoundary","progress","getValue","system","getBag","pendingLifecycleRequestKind","blockLifecycleStart","unblockLifecycleStart","actions","isBlockingLifecycleStart","retryToken","ensureLifecycleStartBlocked","get","set","releaseLifecycleStartBlock","scheduleViewportRetry","duration","retryTick","hasPendingOpenRequest","Open","isWaitingForOpenToStart","destinationPairKey","linkState","length","undefined","type","pairKey","destinationAttached"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts"],"mappings":";;AAAA,SACCA,eAAe,EACfC,mBAAmB,EACnBC,cAAc,EACdC,SAAS,EACTC,UAAU,QACJ,yBAAyB;AAChC,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,cAAc,QAAQ,wCAAwC;AACvE,SAASC,KAAK,QAAQ,wCAAwC;AAC9D,SACCC,8BAA8B,EAC9BC,WAAW,QACL,8BAA8B;AAErC,SAASC,mCAAmC,QAAQ,8BAA8B;AAElF,MAAMC,uBAAuB,GAAG,EAAE;AAWlC,OAAO,MAAMC,gCAAgC,GAAGA,CAAC;EAChDC,MAAM;EACNC,OAAO;EACPC,gBAAgB;EAChBC,wBAAwB;EACxBC,kBAAkB;EAClBC;AACuC,CAAC,KAAK;EAC7C,MAAMC,QAAQ,GA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B,8BAA8B,CAAC6B,IAAI;IAEpC,MAAMC,uBAAuB,GAAGnB,QAAQ,CAACW,GAAG,CAAC,CAAC,IAAI,CAAC;IAEnD,IAAI,CAACM,qBAAqB,IAAI,CAACE,uBAAuB,EAAE;MACvD,OAAO,CAAC,CAAC,EAAEH,SAAS,CAAC;IACtB;IAEA,MAAMI,kBAAkB,GAAG7B,mCAAmC,CAAC;MAC9DI,OAAO;MACPC,gBAAgB;MAChBC,wBAAwB;MACxBC,kBAAkB;MAClBJ,MAAM;MACN2B,SAAS,EAAEvB,kBAAkB,CAACwB,MAAM,GAAGlC,KAAK,CAACuB,GAAG,CAAC,CAAC,GAAGY;IACtD,CAAC,CAAC;IAEF,OAAO,CAACH,kBAAkB,EAAEJ,SAAS,CAAC;EACvC,CAAC,EACD,CAAC,CAACI,kBAAkB,CAAC,KAAK;IACzB,SAAS;;IACT,IAAI,CAACA,kBAAkB,EAAE;MACxBP,0BAA0B,CAAC,CAAC;MAC5B;IACD;IAEAH,2BAA2B,CAAC,CAAC;IAC7BX,eAAe,CAAC;MACfyB,IAAI,EAAE,aAAa;MACnBC,OAAO,EAAEL;IACV,CAAC,CAAC;IAEF,MAAMM,mBAAmB,GACxBvC,cAAc,CAACiC,kBAAkB,EAAE1B,MAAM,CAAC,KAAK,IAAI;IAEpD,IAAIgC,mBAAmB,EAAE;MACxBb,0BAA0B,CAAC,CAAC;MAC5B;IACD;IAEAC,qBAAqB,CAAC,CAAC;EACxB,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,25 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useAnimatedReaction } from "react-native-reanimated";
|
|
3
|
+
import { useAnimatedReaction, useSharedValue } from "react-native-reanimated";
|
|
4
|
+
import { pairs } from "../../../stores/bounds/internals/state";
|
|
5
|
+
import { getInitialSourceCaptureSignal } from "../utils/source-signals";
|
|
4
6
|
export const useInitialSourceMeasurement = params => {
|
|
5
7
|
const {
|
|
6
8
|
enabled,
|
|
7
9
|
nextScreenKey,
|
|
8
|
-
measureBoundary
|
|
10
|
+
measureBoundary,
|
|
11
|
+
linkId,
|
|
12
|
+
currentScreenKey,
|
|
13
|
+
group,
|
|
14
|
+
shouldAutoMeasure
|
|
9
15
|
} = params;
|
|
16
|
+
const lastSourceCaptureSignal = useSharedValue(null);
|
|
10
17
|
useAnimatedReaction(() => {
|
|
11
18
|
"worklet";
|
|
12
19
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
return getInitialSourceCaptureSignal({
|
|
21
|
+
enabled,
|
|
22
|
+
nextScreenKey,
|
|
23
|
+
currentScreenKey,
|
|
24
|
+
linkId,
|
|
25
|
+
group,
|
|
26
|
+
shouldAutoMeasure,
|
|
27
|
+
linkState: group ? pairs.get() : undefined
|
|
28
|
+
});
|
|
17
29
|
}, captureSignal => {
|
|
18
30
|
"worklet";
|
|
19
31
|
|
|
20
|
-
if (!enabled || !captureSignal)
|
|
32
|
+
if (!enabled || !captureSignal) {
|
|
33
|
+
lastSourceCaptureSignal.set(null);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (lastSourceCaptureSignal.get() === captureSignal.signal) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
lastSourceCaptureSignal.set(captureSignal.signal);
|
|
21
40
|
measureBoundary({
|
|
22
|
-
|
|
41
|
+
type: "source",
|
|
42
|
+
pairKey: captureSignal.pairKey
|
|
23
43
|
});
|
|
24
44
|
});
|
|
25
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedReaction","useInitialSourceMeasurement","params","enabled","nextScreenKey","measureBoundary","captureSignal","
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","useSharedValue","pairs","getInitialSourceCaptureSignal","useInitialSourceMeasurement","params","enabled","nextScreenKey","measureBoundary","linkId","currentScreenKey","group","shouldAutoMeasure","lastSourceCaptureSignal","linkState","get","undefined","captureSignal","set","signal","type","pairKey"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-initial-source-measurement.ts"],"mappings":";;AAAA,SAASA,mBAAmB,EAAEC,cAAc,QAAQ,yBAAyB;AAC7E,SAASC,KAAK,QAAQ,wCAAwC;AAE9D,SAASC,6BAA6B,QAAQ,yBAAyB;AAEvE,OAAO,MAAMC,2BAA2B,GAAIC,MAQ3C,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,aAAa;IACbC,eAAe;IACfC,MAAM;IACNC,gBAAgB;IAChBC,KAAK;IACLC;EACD,CAAC,GAAGP,MAAM;EACV,MAAMQ,uBAAuB,GAAGZ,cAAc,CAAgB,IAAI,CAAC;EAEnED,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,OAAOG,6BAA6B,CAAC;MACpCG,OAAO;MACPC,aAAa;MACbG,gBAAgB;MAChBD,MAAM;MACNE,KAAK;MACLC,iBAAiB;MACjBE,SAAS,EAAEH,KAAK,GAAGT,KAAK,CAACa,GAAG,CAAC,CAAC,GAAGC;IAClC,CAAC,CAAC;EACH,CAAC,EACAC,aAAa,IAAK;IAClB,SAAS;;IACT,IAAI,CAACX,OAAO,IAAI,CAACW,aAAa,EAAE;MAC/BJ,uBAAuB,CAACK,GAAG,CAAC,IAAI,CAAC;MACjC;IACD;IAEA,IAAIL,uBAAuB,CAACE,GAAG,CAAC,CAAC,KAAKE,aAAa,CAACE,MAAM,EAAE;MAC3D;IACD;IAEAN,uBAAuB,CAACK,GAAG,CAACD,aAAa,CAACE,MAAM,CAAC;IACjDX,eAAe,CAAC;MACfY,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
import { useCallback } from "react";
|
|
4
4
|
import { useWindowDimensions } from "react-native";
|
|
5
|
+
import { setEntry } from "../../../stores/bounds/internals/entries";
|
|
6
|
+
import { setDestination, setSource } from "../../../stores/bounds/internals/links";
|
|
5
7
|
import { ScrollStore } from "../../../stores/scroll.store";
|
|
6
8
|
import { SystemStore } from "../../../stores/system.store";
|
|
7
|
-
import {
|
|
8
|
-
import { createLinkContext } from "./helpers/boundary-link-context";
|
|
9
|
-
import { isMeasurementInViewport } from "./helpers/measurement";
|
|
10
|
-
import { buildMeasurementWritePlan, getMeasureIntentFlags } from "./helpers/measurement-rules";
|
|
11
|
-
import { measureWithOverscrollAwareness } from "./helpers/scroll-measurement";
|
|
9
|
+
import { isMeasurementInViewport, measureWithOverscrollAwareness } from "../utils/measured-bounds";
|
|
12
10
|
export const useMeasurer = ({
|
|
13
11
|
enabled,
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
entryTag,
|
|
13
|
+
linkId,
|
|
14
|
+
group,
|
|
16
15
|
currentScreenKey,
|
|
17
16
|
preparedStyles,
|
|
18
17
|
measuredAnimatedRef
|
|
@@ -23,38 +22,13 @@ export const useMeasurer = ({
|
|
|
23
22
|
} = useWindowDimensions();
|
|
24
23
|
const scrollState = ScrollStore.getValue(currentScreenKey, "state");
|
|
25
24
|
const pendingLifecycleStartBlockCount = SystemStore.getValue(currentScreenKey, "pendingLifecycleStartBlockCount");
|
|
26
|
-
return useCallback(
|
|
27
|
-
intent
|
|
28
|
-
} = {}) => {
|
|
25
|
+
return useCallback(target => {
|
|
29
26
|
"worklet";
|
|
30
27
|
|
|
31
28
|
if (!enabled) return;
|
|
32
|
-
const intents = getMeasureIntentFlags(intent);
|
|
33
|
-
const currentLink = createLinkContext({
|
|
34
|
-
sharedBoundTag,
|
|
35
|
-
currentScreenKey,
|
|
36
|
-
preferredSourceScreenKey
|
|
37
|
-
});
|
|
38
|
-
const writePlan = buildMeasurementWritePlan({
|
|
39
|
-
intents,
|
|
40
|
-
hasPendingLink: currentLink.hasPendingLink,
|
|
41
|
-
hasSourceLink: currentLink.hasSourceLink,
|
|
42
|
-
hasDestinationLink: currentLink.hasDestinationLink,
|
|
43
|
-
hasAttachableSourceLink: currentLink.hasAttachableSourceLink
|
|
44
|
-
});
|
|
45
|
-
if (!writePlan.writesAny) return;
|
|
46
29
|
const measured = measureWithOverscrollAwareness(measuredAnimatedRef, scrollState.get());
|
|
47
30
|
if (!measured) return;
|
|
48
31
|
|
|
49
|
-
/**
|
|
50
|
-
* Source Pass
|
|
51
|
-
* Source intents are intentionally used & kept unguarded.
|
|
52
|
-
*/
|
|
53
|
-
const sourceWrites = {
|
|
54
|
-
shouldSetSource: writePlan.captureSource,
|
|
55
|
-
shouldUpdateSource: writePlan.refreshSource
|
|
56
|
-
};
|
|
57
|
-
|
|
58
32
|
/**
|
|
59
33
|
* - Destination Pass -
|
|
60
34
|
* Be strict while lifecycle start is blocked for destination capture.
|
|
@@ -62,23 +36,21 @@ export const useMeasurer = ({
|
|
|
62
36
|
* and malformed off-screen destination measurements should keep the
|
|
63
37
|
* lifecycle blocked until a valid retry lands.
|
|
64
38
|
*/
|
|
65
|
-
const shouldGuardDestinationViewport = pendingLifecycleStartBlockCount.get() > 0;
|
|
66
|
-
const viewportAllowsDestinationWrite = !shouldGuardDestinationViewport || isMeasurementInViewport(measured, viewportWidth, viewportHeight);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
applyMeasuredBoundsWrites({
|
|
74
|
-
sharedBoundTag,
|
|
75
|
-
currentScreenKey,
|
|
76
|
-
measured,
|
|
77
|
-
preparedStyles,
|
|
78
|
-
expectedSourceScreenKey: currentLink.expectedSourceScreenKey,
|
|
79
|
-
...sourceWrites,
|
|
80
|
-
...destinationWrites
|
|
39
|
+
const shouldGuardDestinationViewport = pendingLifecycleStartBlockCount.get() > 0 || !!group;
|
|
40
|
+
const viewportAllowsDestinationWrite = target.type !== "destination" || !shouldGuardDestinationViewport || isMeasurementInViewport(measured, viewportWidth, viewportHeight);
|
|
41
|
+
if (!viewportAllowsDestinationWrite) return;
|
|
42
|
+
|
|
43
|
+
// Set the bounds entry on every measure to avoid any stale measurements
|
|
44
|
+
// for the public read API.
|
|
45
|
+
setEntry(entryTag, currentScreenKey, {
|
|
46
|
+
bounds: measured
|
|
81
47
|
});
|
|
82
|
-
|
|
48
|
+
if (target.type === "source") {
|
|
49
|
+
setSource(target.pairKey, linkId, currentScreenKey, measured, preparedStyles, group);
|
|
50
|
+
}
|
|
51
|
+
if (target.type === "destination") {
|
|
52
|
+
setDestination(target.pairKey, linkId, currentScreenKey, measured, preparedStyles, group);
|
|
53
|
+
}
|
|
54
|
+
}, [enabled, entryTag, linkId, group, currentScreenKey, preparedStyles, measuredAnimatedRef, viewportWidth, viewportHeight, scrollState, pendingLifecycleStartBlockCount]);
|
|
83
55
|
};
|
|
84
56
|
//# sourceMappingURL=use-measurer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useWindowDimensions","
|
|
1
|
+
{"version":3,"names":["useCallback","useWindowDimensions","setEntry","setDestination","setSource","ScrollStore","SystemStore","isMeasurementInViewport","measureWithOverscrollAwareness","useMeasurer","enabled","entryTag","linkId","group","currentScreenKey","preparedStyles","measuredAnimatedRef","width","viewportWidth","height","viewportHeight","scrollState","getValue","pendingLifecycleStartBlockCount","target","measured","get","shouldGuardDestinationViewport","viewportAllowsDestinationWrite","type","bounds","pairKey"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-measurer.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,OAAO;AAEnC,SAASC,mBAAmB,QAAQ,cAAc;AAElD,SAASC,QAAQ,QAAQ,0CAA0C;AACnE,SACCC,cAAc,EACdC,SAAS,QACH,wCAAwC;AAC/C,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,WAAW,QAAQ,8BAA8B;AAE1D,SACCC,uBAAuB,EACvBC,8BAA8B,QACxB,0BAA0B;AAYjC,OAAO,MAAMC,WAAW,GAAGA,CAAC;E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AAM,CAACO,OAAO,EACdnB,MAAM,EACNE,gBAAgB,EAChBW,QAAQ,EACRV,cAAc,EACdF,KACD,CAAC;IACF;EACD,CAAC,EACD,CACCH,OAAO,EACPC,QAAQ,EACRC,MAAM,EACNC,KAAK,EACLC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,EACnBE,aAAa,EACbE,cAAc,EACdC,WAAW,EACXE,+BAA+B,CAEjC,CAAC;AACF,CAAC","ignoreList":[]}
|
package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js
CHANGED
|
@@ -2,60 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
import { useAnimatedReaction } from "react-native-reanimated";
|
|
4
4
|
import { AnimationStore } from "../../../stores/animation.store";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { pairs } from "../../../stores/bounds/internals/state";
|
|
6
|
+
import { getRefreshBoundarySignal } from "../utils/refresh-signals";
|
|
7
7
|
export const useRefreshBoundary = ({
|
|
8
8
|
enabled,
|
|
9
|
-
sharedBoundTag,
|
|
10
|
-
id,
|
|
11
|
-
group,
|
|
12
9
|
currentScreenKey,
|
|
10
|
+
preferredSourceScreenKey,
|
|
13
11
|
nextScreenKey,
|
|
14
|
-
|
|
12
|
+
linkId,
|
|
13
|
+
group,
|
|
14
|
+
ancestorScreenKeys,
|
|
15
15
|
measureBoundary
|
|
16
16
|
}) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
17
|
+
// Source-side boundaries refresh from the next screen's lifecycle pulse.
|
|
18
|
+
// Destination-side boundaries have no next screen, so they refresh from self.
|
|
19
|
+
const refreshScreenKey = nextScreenKey ?? currentScreenKey;
|
|
20
|
+
const refreshWillAnimate = AnimationStore.getValue(refreshScreenKey, "willAnimate");
|
|
21
|
+
const refreshClosing = AnimationStore.getValue(refreshScreenKey, "closing");
|
|
22
|
+
const refreshEntering = AnimationStore.getValue(refreshScreenKey, "entering");
|
|
23
|
+
const refreshAnimating = AnimationStore.getValue(refreshScreenKey, "progressAnimating");
|
|
24
|
+
const refreshProgress = AnimationStore.getValue(refreshScreenKey, "progress");
|
|
25
25
|
useAnimatedReaction(() => {
|
|
26
26
|
"worklet";
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
return getRefreshBoundarySignal({
|
|
29
|
+
enabled,
|
|
30
|
+
currentScreenKey,
|
|
31
|
+
preferredSourceScreenKey,
|
|
32
|
+
nextScreenKey,
|
|
33
|
+
linkId,
|
|
34
|
+
group,
|
|
35
|
+
ancestorScreenKeys,
|
|
36
|
+
shouldRefresh: !!refreshWillAnimate.get(),
|
|
37
|
+
closing: !!refreshClosing.get(),
|
|
38
|
+
entering: !!refreshEntering.get(),
|
|
39
|
+
animating: !!refreshAnimating.get(),
|
|
40
|
+
progress: refreshProgress.get(),
|
|
41
|
+
linkState: group || ancestorScreenKeys.length ? pairs.get() : undefined
|
|
42
|
+
});
|
|
43
|
+
}, (refreshSignal, prevRefreshSignal) => {
|
|
41
44
|
"worklet";
|
|
42
45
|
|
|
43
|
-
if (!
|
|
44
|
-
const currentGroupActiveId = group ? getGroupActiveId(group) : null;
|
|
45
|
-
if (group && currentGroupActiveId !== String(id)) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (hasNextScreen) {
|
|
49
|
-
if (!nextScreenKey || !hasSourceLink(sharedBoundTag, currentScreenKey) || !hasDestinationLink(sharedBoundTag, nextScreenKey)) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
measureBoundary({
|
|
53
|
-
intent: "refresh-source"
|
|
54
|
-
});
|
|
46
|
+
if (!refreshSignal || refreshSignal.signal === prevRefreshSignal?.signal) {
|
|
55
47
|
return;
|
|
56
48
|
}
|
|
57
49
|
measureBoundary({
|
|
58
|
-
|
|
50
|
+
type: refreshSignal.type,
|
|
51
|
+
pairKey: refreshSignal.pairKey
|
|
59
52
|
});
|
|
60
53
|
});
|
|
61
54
|
};
|
package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedReaction","AnimationStore","
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","AnimationStore","pairs","getRefreshBoundarySignal","useRefreshBoundary","enabled","currentScreenKey","preferredSourceScreenKey","nextScreenKey","linkId","group","ancestorScreenKeys","measureBoundary","refreshScreenKey","refreshWillAnimate","getValue","refreshClosing","refreshEntering","refreshAnimating","refreshProgress","shouldRefresh","get","closing","entering","animating","progress","linkState","length","undefined","refreshSignal","prevRefreshSignal","signal","type","pairKey"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-refresh-boundary.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,KAAK,QAAQ,wCAAwC;AAE9D,SAASC,wBAAwB,QAAQ,0BAA0B;AAanE,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EAClCC,OAAO;EACPC,gBAAgB;EAChBC,wBAAwB;EACxBC,aAAa;EACbC,MAAM;EACNC,KAAK;EACLC,kBAAkB;EAClBC;AACyB,CAAC,KAAK;EAC/B;EACA;EACA,MAAMC,gBAAgB,GAAGL,aAAa,IAAIF,gBAAgB;EAC1D,MAAMQ,kBAAkB,GAAGb,cAAc,CAACc,QAAQ,CACjDF,gBAAgB,EAChB,aACD,CAAC;EACD,MAAMG,cAAc,GAAGf,cAAc,CAACc,QAAQ,CAACF,gBAAgB,EAAE,SAAS,CAAC;EAC3E,MAAMI,eAAe,GAAGhB,cAAc,CAACc,QAAQ,CAACF,gBAAgB,EAAE,UAAU,CAAC;EAC7E,MAAMK,gBAAgB,GAAGjB,cAAc,CAACc,QAAQ,CAC/CF,gBAAgB,EAChB,mBACD,CAAC;EACD,MAAMM,eAAe,GAAGlB,cAAc,CAACc,QAAQ,CAACF,gBAAgB,EAAE,UAAU,CAAC;EAE7Eb,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,OAAOG,wBAAwB,CAAC;MAC/BE,OAAO;MACPC,gBAAgB;MAChBC,wBAAwB;MACxBC,aAAa;MACbC,MAAM;MACNC,KAAK;MACLC,kBAAkB;MAClBS,aAAa,EAAE,CAAC,CAACN,kBAAkB,CAACO,GAAG,CAAC,CAAC;MACzCC,OAAO,EAAE,CAAC,CAACN,cAAc,CAACK,GAAG,CAAC,CAAC;MAC/BE,QAAQ,EAAE,CAAC,CAACN,eAAe,CAACI,GAAG,CAAC,CAAC;MACjCG,SAAS,EAAE,CAAC,CAACN,gBAAgB,CAACG,GAAG,CAAC,CAAC;MACnCI,QAAQ,EAAEN,eAAe,CAACE,GAAG,CAAC,CAAC;MAC/BK,SAAS,EAAEhB,KAAK,IAAIC,kBAAkB,CAACgB,MAAM,GAAGzB,KAAK,CAACmB,GAAG,CAAC,CAAC,GAAGO;IAC/D,CAAC,CAAC;EACH,CAAC,EACD,CAACC,aAAa,EAAEC,iBAAiB,KAAK;IACrC,SAAS;;IAET,IACC,CAACD,aAAa,IACdA,aAAa,CAACE,MAAM,KAAKD,iBAAiB,EAAEC,MAAM,EACjD;MACD;IACD;IAEAnB,eAAe,CAAC;MACfoB,IAAI,EAAEH,aAAa,CAACG,IAAI;MACxBC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -4,7 +4,9 @@ import { Pressable, View } from "react-native";
|
|
|
4
4
|
import { BoundaryTarget } from "./components/boundary-target";
|
|
5
5
|
import { createBoundaryComponent } from "./create-boundary-component";
|
|
6
6
|
export { createBoundaryComponent };
|
|
7
|
-
const BoundaryView = createBoundaryComponent(View
|
|
7
|
+
const BoundaryView = createBoundaryComponent(View, {
|
|
8
|
+
shouldAutoMeasure: true
|
|
9
|
+
});
|
|
8
10
|
const BoundaryTrigger = createBoundaryComponent(Pressable);
|
|
9
11
|
BoundaryView.displayName = "Transition.Boundary.View";
|
|
10
12
|
BoundaryTrigger.displayName = "Transition.Boundary.Trigger";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Pressable","View","BoundaryTarget","createBoundaryComponent","BoundaryView","BoundaryTrigger","displayName","Boundary","Trigger","Target"],"sourceRoot":"../../../../../src","sources":["shared/components/create-boundary-component/index.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAC9C,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,uBAAuB,QAAQ,6BAA6B;AAErE,SAASA,uBAAuB;AAEhC,MAAMC,YAAY,GAAGD,uBAAuB,CAACF,IAAI,CAAC;
|
|
1
|
+
{"version":3,"names":["Pressable","View","BoundaryTarget","createBoundaryComponent","BoundaryView","shouldAutoMeasure","BoundaryTrigger","displayName","Boundary","Trigger","Target"],"sourceRoot":"../../../../../src","sources":["shared/components/create-boundary-component/index.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAC9C,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,uBAAuB,QAAQ,6BAA6B;AAErE,SAASA,uBAAuB;AAEhC,MAAMC,YAAY,GAAGD,uBAAuB,CAACF,IAAI,EAAE;EAClDI,iBAAiB,EAAE;AACpB,CAAC,CAAC;AACF,MAAMC,eAAe,GAAGH,uBAAuB,CAACH,SAAS,CAAC;AAC1DI,YAAY,CAACG,WAAW,GAAG,0BAA0B;AACrDD,eAAe,CAACC,WAAW,GAAG,6BAA6B;AAC3DL,cAAc,CAACK,WAAW,GAAG,4BAA4B;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,QAAQ,GAAG;EACvB;AACD;AACA;EACCP,IAAI,EAAEG,YAAY;EAClB;AACD;AACA;EACCK,OAAO,EAAEH,eAAe;EACxB;AACD;AACA;EACCI,MAAM,EAAER;AACT,CAAC","ignoreList":[]}
|