react-native-screen-transitions 3.11.2 → 3.12.0
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/blank-stack/components/stack-view.js +1 -2
- package/lib/commonjs/blank-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/component-stack/components/stack-view.js +1 -2
- package/lib/commonjs/component-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.native.js +3 -4
- package/lib/commonjs/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/commonjs/shared/adapters/with-screen-transitions/stack-layout.js +1 -1
- package/lib/commonjs/shared/adapters/with-screen-transitions/stack-layout.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/components/boundary-lifecycle.js +36 -0
- package/lib/commonjs/shared/components/boundary/components/boundary-lifecycle.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +1 -13
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +9 -2
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +3 -2
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +9 -2
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +7 -4
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js +5 -12
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +25 -43
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +13 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +8 -31
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +14 -19
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +8 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +19 -47
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +19 -17
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +19 -5
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/helpers/create-overlay-interpolator-frame.js +30 -0
- package/lib/commonjs/shared/components/overlay/helpers/create-overlay-interpolator-frame.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js +40 -22
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/helpers/retain-ready-overlay-resources.js +21 -0
- package/lib/commonjs/shared/components/overlay/helpers/retain-ready-overlay-resources.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/helpers/run-overlay-slot-interpolator.js +41 -0
- package/lib/commonjs/shared/components/overlay/helpers/run-overlay-slot-interpolator.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/hooks/use-overlay-slot.js +85 -0
- package/lib/commonjs/shared/components/overlay/hooks/use-overlay-slot.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +14 -65
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js +89 -16
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +11 -7
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.js +31 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.js.map +1 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-completion.js +26 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-completion.js.map +1 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +64 -87
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +1 -5
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/index.js +9 -6
- package/lib/commonjs/shared/components/screen-lifecycle/index.js.map +1 -1
- package/lib/commonjs/shared/hooks/navigation/use-navigation-helpers.js +28 -6
- package/lib/commonjs/shared/hooks/navigation/use-navigation-helpers.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +1 -2
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +10 -7
- package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +6 -8
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js +8 -2
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js +9 -5
- package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js +10 -5
- package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/ownership/{use-walk-up-and-register-shadowing-claims.js → gesture-ownership-bridge.js} +36 -50
- package/lib/commonjs/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +4 -5
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +2 -3
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -5
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -3
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +9 -5
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/constants.js +1 -0
- package/lib/commonjs/shared/providers/screen/styles/constants.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/transition-visual-state.js +20 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/transition-visual-state.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js +14 -15
- package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +34 -11
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +18 -29
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/blank-stack-state/blank-stack-controller.js +5 -1
- package/lib/commonjs/shared/providers/stack/blank-stack-state/blank-stack-controller.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.js +18 -0
- package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/blank-stack.provider.js +2 -1
- package/lib/commonjs/shared/providers/stack/blank-stack.provider.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/system.store.js +1 -2
- package/lib/commonjs/shared/stores/system.store.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js +0 -22
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/commonjs/shared/utils/create-provider.js +119 -10
- package/lib/commonjs/shared/utils/create-provider.js.map +1 -1
- package/lib/commonjs/shared/utils/navigation/close-action-replay.js +22 -0
- package/lib/commonjs/shared/utils/navigation/close-action-replay.js.map +1 -0
- package/lib/module/blank-stack/components/stack-view.js +1 -2
- package/lib/module/blank-stack/components/stack-view.js.map +1 -1
- package/lib/module/component-stack/components/stack-view.js +1 -2
- package/lib/module/component-stack/components/stack-view.js.map +1 -1
- package/lib/module/native-stack/views/NativeStackView.native.js +3 -4
- package/lib/module/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/module/shared/adapters/with-screen-transitions/stack-layout.js +1 -1
- package/lib/module/shared/adapters/with-screen-transitions/stack-layout.js.map +1 -1
- package/lib/module/shared/components/boundary/components/boundary-lifecycle.js +32 -0
- package/lib/module/shared/components/boundary/components/boundary-lifecycle.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +1 -13
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +9 -2
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +3 -2
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-measurer.js +9 -2
- package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +7 -4
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js +5 -12
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +27 -45
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +8 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +8 -32
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +15 -20
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +8 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +20 -48
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +20 -18
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/refresh-signals.js +19 -5
- package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/module/shared/components/overlay/helpers/create-overlay-interpolator-frame.js +25 -0
- package/lib/module/shared/components/overlay/helpers/create-overlay-interpolator-frame.js.map +1 -0
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js +37 -21
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/module/shared/components/overlay/helpers/retain-ready-overlay-resources.js +17 -0
- package/lib/module/shared/components/overlay/helpers/retain-ready-overlay-resources.js.map +1 -0
- package/lib/module/shared/components/overlay/helpers/run-overlay-slot-interpolator.js +36 -0
- package/lib/module/shared/components/overlay/helpers/run-overlay-slot-interpolator.js.map +1 -0
- package/lib/module/shared/components/overlay/hooks/use-overlay-slot.js +80 -0
- package/lib/module/shared/components/overlay/hooks/use-overlay-slot.js.map +1 -0
- package/lib/module/shared/components/overlay/variations/float-overlay.js +15 -66
- package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/overlay-host.js +90 -18
- package/lib/module/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/backdrop.js +12 -8
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.js +25 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.js.map +1 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-completion.js +21 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-completion.js.map +1 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +64 -86
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +1 -5
- package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/index.js +9 -6
- package/lib/module/shared/components/screen-lifecycle/index.js.map +1 -1
- package/lib/module/shared/hooks/navigation/use-navigation-helpers.js +29 -7
- package/lib/module/shared/hooks/navigation/use-navigation-helpers.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +1 -2
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/animation.provider.js +10 -7
- package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +6 -8
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js +8 -2
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/gestures.provider.js +10 -6
- package/lib/module/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js +10 -5
- package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/ownership/{use-walk-up-and-register-shadowing-claims.js → gesture-ownership-bridge.js} +35 -49
- package/lib/module/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +4 -5
- package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +2 -3
- package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -5
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -3
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/policy.js +9 -5
- package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/constants.js +1 -0
- package/lib/module/shared/providers/screen/styles/constants.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/transition-visual-state.js +18 -0
- package/lib/module/shared/providers/screen/styles/helpers/transition-visual-state.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js +14 -15
- package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +35 -12
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/slot.provider.js +19 -30
- package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/blank-stack-state/blank-stack-controller.js +5 -1
- package/lib/module/shared/providers/stack/blank-stack-state/blank-stack-controller.js.map +1 -1
- package/lib/module/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.js +14 -0
- package/lib/module/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.js.map +1 -0
- package/lib/module/shared/providers/stack/blank-stack.provider.js +2 -1
- package/lib/module/shared/providers/stack/blank-stack.provider.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/system.store.js +1 -2
- package/lib/module/shared/stores/system.store.js.map +1 -1
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/utils/animation/animate-to-progress.js +0 -22
- package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/module/shared/utils/create-provider.js +119 -10
- package/lib/module/shared/utils/create-provider.js.map +1 -1
- package/lib/module/shared/utils/navigation/close-action-replay.js +16 -0
- package/lib/module/shared/utils/navigation/close-action-replay.js.map +1 -0
- package/lib/typescript/blank-stack/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/blank-stack/types.d.ts +1 -1
- package/lib/typescript/blank-stack/types.d.ts.map +1 -1
- package/lib/typescript/component-stack/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/component-stack/types.d.ts +1 -1
- package/lib/typescript/component-stack/types.d.ts.map +1 -1
- package/lib/typescript/native-stack/types.d.ts +1 -1
- package/lib/typescript/native-stack/types.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.native.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/components/boundary-lifecycle.d.ts +18 -0
- package/lib/typescript/shared/components/boundary/components/boundary-lifecycle.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts +1 -2
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +3 -2
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts +3 -2
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts +5 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts +4 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts +4 -17
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts +3 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts +5 -9
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +2 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +2 -1
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/types.d.ts +6 -0
- package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts +1 -0
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/helpers/create-overlay-interpolator-frame.d.ts +7 -0
- package/lib/typescript/shared/components/overlay/helpers/create-overlay-interpolator-frame.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts +17 -7
- package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/helpers/retain-ready-overlay-resources.d.ts +11 -0
- package/lib/typescript/shared/components/overlay/helpers/retain-ready-overlay-resources.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/helpers/run-overlay-slot-interpolator.d.ts +8 -0
- package/lib/typescript/shared/components/overlay/helpers/run-overlay-slot-interpolator.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/hooks/use-overlay-slot.d.ts +15 -0
- package/lib/typescript/shared/components/overlay/hooks/use-overlay-slot.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +7 -6
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.d.ts +27 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-completion.d.ts +7 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-completion.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts +2 -7
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts +1 -3
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/index.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-navigation-helpers.d.ts +1 -0
- package/lib/typescript/shared/hooks/navigation/use-navigation-helpers.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +12 -12
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts +4 -0
- package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts +4 -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/use-screen-animation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/gestures.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/hooks/use-screen-gesture-config.d.ts +2 -2
- package/lib/typescript/shared/providers/screen/gestures/hooks/use-screen-gesture-config.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.d.ts +3 -0
- package/lib/typescript/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts +2 -0
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/constants.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/transition-visual-state.d.ts +7 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/transition-visual-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +5 -5
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/blank-stack-state/blank-stack-controller.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.d.ts +3 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/blank-stack.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/system.store.d.ts +1 -2
- package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +8 -0
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +1 -1
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/types/overlay.types.d.ts +26 -11
- package/lib/typescript/shared/types/overlay.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +2 -2
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts +2 -3
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
- package/lib/typescript/shared/utils/create-provider.d.ts +21 -6
- package/lib/typescript/shared/utils/create-provider.d.ts.map +1 -1
- package/lib/typescript/shared/utils/navigation/close-action-replay.d.ts +4 -0
- package/lib/typescript/shared/utils/navigation/close-action-replay.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/blank-stack/components/stack-view.tsx +1 -4
- package/src/blank-stack/types.ts +8 -2
- package/src/component-stack/components/stack-view.tsx +1 -4
- package/src/component-stack/types.ts +8 -2
- package/src/native-stack/types.ts +8 -2
- package/src/native-stack/views/NativeStackView.native.tsx +6 -10
- package/src/shared/adapters/with-screen-transitions/stack-layout.tsx +1 -1
- package/src/shared/components/boundary/components/boundary-lifecycle.tsx +53 -0
- package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +0 -14
- package/src/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.ts +13 -2
- package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +7 -2
- package/src/shared/components/boundary/hooks/use-measurer.ts +11 -1
- package/src/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +9 -4
- package/src/shared/components/boundary/portal/components/boundary-portal/components/host.tsx +13 -11
- package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +44 -55
- package/src/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.ts +10 -0
- package/src/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.ts +11 -55
- package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts +20 -24
- package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +11 -0
- package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts +20 -67
- package/src/shared/components/boundary/portal/components/boundary-portal/index.tsx +1 -0
- package/src/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +3 -2
- package/src/shared/components/boundary/providers/boundary-root.provider.tsx +29 -20
- package/src/shared/components/boundary/types.ts +9 -0
- package/src/shared/components/boundary/utils/refresh-signals.ts +39 -6
- package/src/shared/components/overlay/helpers/create-overlay-interpolator-frame.ts +29 -0
- package/src/shared/components/overlay/helpers/get-active-overlay.ts +62 -20
- package/src/shared/components/overlay/helpers/retain-ready-overlay-resources.ts +38 -0
- package/src/shared/components/overlay/helpers/run-overlay-slot-interpolator.ts +48 -0
- package/src/shared/components/overlay/hooks/use-overlay-slot.ts +103 -0
- package/src/shared/components/overlay/variations/float-overlay.tsx +22 -64
- package/src/shared/components/overlay/variations/overlay-host.tsx +135 -28
- package/src/shared/components/screen-container/layers/backdrop.tsx +11 -7
- package/src/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.ts +64 -0
- package/src/shared/components/screen-lifecycle/hooks/use-close-completion.ts +28 -0
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition-intent.ts +72 -109
- package/src/shared/components/screen-lifecycle/hooks/use-transition-start-controller.ts +0 -12
- package/src/shared/components/screen-lifecycle/index.tsx +8 -4
- package/src/shared/hooks/navigation/use-navigation-helpers.ts +39 -7
- package/src/shared/index.ts +1 -0
- package/src/shared/providers/helpers/measured-bounds-writes.ts +1 -1
- package/src/shared/providers/screen/animation/animation.provider.tsx +24 -11
- package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +15 -9
- package/src/shared/providers/screen/animation/use-screen-animation.tsx +12 -2
- package/src/shared/providers/screen/gestures/gestures.provider.tsx +18 -7
- package/src/shared/providers/screen/gestures/hooks/use-screen-gesture-config.ts +13 -5
- package/src/shared/providers/screen/gestures/ownership/{use-walk-up-and-register-shadowing-claims.ts → gesture-ownership-bridge.tsx} +44 -54
- package/src/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.ts +4 -6
- package/src/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.ts +1 -3
- package/src/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.ts +4 -6
- package/src/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.ts +2 -8
- package/src/shared/providers/screen/gestures/shared/policy.ts +17 -6
- package/src/shared/providers/screen/gestures/types.ts +2 -0
- package/src/shared/providers/screen/styles/constants.ts +1 -0
- package/src/shared/providers/screen/styles/helpers/transition-visual-state.ts +26 -0
- package/src/shared/providers/screen/styles/hooks/slot-resolvers.tsx +17 -5
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +51 -12
- package/src/shared/providers/screen/styles/slot.provider.tsx +46 -70
- package/src/shared/providers/stack/blank-stack-state/blank-stack-controller.ts +5 -1
- package/src/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.ts +22 -0
- package/src/shared/providers/stack/blank-stack.provider.tsx +6 -1
- package/src/shared/stores/bounds/internals/links.ts +1 -1
- package/src/shared/stores/system.store.ts +1 -2
- package/src/shared/types/animation.types.ts +8 -0
- package/src/shared/types/index.ts +1 -1
- package/src/shared/types/overlay.types.ts +41 -14
- package/src/shared/types/screen.types.ts +2 -2
- package/src/shared/utils/animation/animate-to-progress.ts +1 -22
- package/src/shared/utils/create-provider.tsx +221 -19
- package/src/shared/utils/navigation/close-action-replay.ts +25 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.js +0 -30
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js +0 -47
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/components/floating-overlay-layer.js +0 -28
- package/lib/commonjs/shared/providers/screen/styles/components/floating-overlay-layer.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +0 -53
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.js +0 -25
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js +0 -40
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/components/floating-overlay-layer.js +0 -24
- package/lib/module/shared/providers/screen/styles/components/floating-overlay-layer.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +0 -47
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.d.ts +0 -9
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.d.ts +0 -9
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.d.ts +0 -14
- package/lib/typescript/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts +0 -7
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts +0 -6
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts.map +0 -1
- package/src/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.ts +0 -36
- package/src/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.ts +0 -45
- package/src/shared/providers/screen/styles/components/floating-overlay-layer.tsx +0 -29
- package/src/shared/providers/screen/styles/stores/slot-references.store.ts +0 -72
package/src/shared/components/boundary/portal/components/boundary-portal/components/host.tsx
CHANGED
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
} from "react-native";
|
|
9
9
|
import Animated from "react-native-reanimated";
|
|
10
10
|
import { useDescriptorsStore } from "../../../../../../providers/screen/descriptors";
|
|
11
|
-
import { useScreenSlots } from "../../../../../../providers/screen/styles";
|
|
12
11
|
import { PORTAL_POINTER_EVENTS } from "../../../teleport";
|
|
13
12
|
import { useHostMeasurement } from "../hooks/use-host-measurement";
|
|
14
13
|
import { registerHost, unregisterHost } from "../stores/host-registry.store";
|
|
@@ -34,20 +33,17 @@ function HostImpl({ fallback = false, style }: HostImplProps) {
|
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
const hostKey = fallback ? screenKey : generatedHostKeyRef.current;
|
|
37
|
-
const capturesScroll = !fallback;
|
|
38
36
|
const activeBoundaryHosts = useActivePortalBoundaryHosts(hostKey);
|
|
39
|
-
|
|
37
|
+
|
|
40
38
|
const { height: viewportHeight, width: viewportWidth } =
|
|
41
39
|
useWindowDimensions();
|
|
42
40
|
|
|
41
|
+
const measurementKey = activeBoundaryHosts.length
|
|
42
|
+
? activeBoundaryHosts.map((host) => host.portalHostName).join("|")
|
|
43
|
+
: null;
|
|
44
|
+
|
|
43
45
|
const measurement = useHostMeasurement({
|
|
44
|
-
|
|
45
|
-
enabled: activeBoundaryHosts.length > 0,
|
|
46
|
-
hostKey,
|
|
47
|
-
screenKey,
|
|
48
|
-
visibilityBlocked,
|
|
49
|
-
viewportHeight,
|
|
50
|
-
viewportWidth,
|
|
46
|
+
measurementKey,
|
|
51
47
|
});
|
|
52
48
|
|
|
53
49
|
useLayoutEffect(() => {
|
|
@@ -71,7 +67,13 @@ function HostImpl({ fallback = false, style }: HostImplProps) {
|
|
|
71
67
|
{ width: viewportWidth, height: viewportHeight },
|
|
72
68
|
]}
|
|
73
69
|
>
|
|
74
|
-
<PortalBoundaryHost
|
|
70
|
+
<PortalBoundaryHost
|
|
71
|
+
host={host}
|
|
72
|
+
hostBounds={measurement.hostBounds}
|
|
73
|
+
hostMeasurementKey={measurementKey}
|
|
74
|
+
measuredHostKey={measurement.measuredKey}
|
|
75
|
+
style={StyleSheet.absoluteFill}
|
|
76
|
+
/>
|
|
75
77
|
</View>
|
|
76
78
|
));
|
|
77
79
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { memo
|
|
1
|
+
import { memo } from "react";
|
|
2
2
|
import {
|
|
3
3
|
I18nManager,
|
|
4
4
|
type StyleProp,
|
|
@@ -6,97 +6,86 @@ import {
|
|
|
6
6
|
type ViewStyle,
|
|
7
7
|
} from "react-native";
|
|
8
8
|
import Animated, {
|
|
9
|
+
type MeasuredDimensions,
|
|
10
|
+
type SharedValue,
|
|
11
|
+
useAnimatedReaction,
|
|
9
12
|
useAnimatedStyle,
|
|
10
|
-
useFrameCallback,
|
|
11
|
-
useSharedValue,
|
|
12
13
|
} from "react-native-reanimated";
|
|
13
14
|
import { NO_STYLES } from "../../../../../../constants";
|
|
14
15
|
import { composeSlotStyleWithLocalTransform } from "../../../../../../providers/screen/styles/helpers/compose-slot-style";
|
|
15
|
-
import { getLink } from "../../../../../../stores/bounds/internals/links";
|
|
16
|
-
import { SystemStore } from "../../../../../../stores/system.store";
|
|
17
|
-
import type { ScrollMeasuredDimensions } from "../../../../utils/measured-bounds";
|
|
18
16
|
import { NativePortalHost, PORTAL_POINTER_EVENTS } from "../../../teleport";
|
|
17
|
+
import { resolveBoundaryLocalMeasurement } from "../helpers/local-measurement";
|
|
19
18
|
import { resolvePortalOffsetStyle } from "../helpers/offset-style";
|
|
20
|
-
import { getPortalHostBounds } from "../stores/host-bounds.store";
|
|
21
19
|
import type { ActivePortalBoundaryHost } from "../stores/portal-boundary-host.store";
|
|
22
20
|
|
|
23
21
|
const AnimatedPortalBoundaryHost = NativePortalHost
|
|
24
22
|
? Animated.createAnimatedComponent(NativePortalHost)
|
|
25
23
|
: null;
|
|
26
24
|
|
|
25
|
+
const getCurrentBoundaryBounds = (host: ActivePortalBoundaryHost) => {
|
|
26
|
+
"worklet";
|
|
27
|
+
return resolveBoundaryLocalMeasurement(
|
|
28
|
+
host.localMeasurement.get(),
|
|
29
|
+
host.pairKey,
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
27
33
|
type PortalBoundaryHostProps = {
|
|
28
34
|
host: ActivePortalBoundaryHost;
|
|
35
|
+
hostBounds: SharedValue<MeasuredDimensions | null>;
|
|
36
|
+
hostMeasurementKey: string | null;
|
|
37
|
+
measuredHostKey: SharedValue<string | null>;
|
|
29
38
|
style?: StyleProp<ViewStyle>;
|
|
30
39
|
};
|
|
31
40
|
|
|
32
41
|
export const PortalBoundaryHost = memo(function PortalBoundaryHost({
|
|
33
42
|
host,
|
|
43
|
+
hostBounds,
|
|
44
|
+
hostMeasurementKey,
|
|
45
|
+
measuredHostKey,
|
|
34
46
|
style,
|
|
35
47
|
}: PortalBoundaryHostProps) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (geometryReadyFrames.get() === 0) {
|
|
57
|
-
// Give the source frame, host offset, and slot style one UI frame to
|
|
58
|
-
// reach native before Teleport targets this receiver.
|
|
59
|
-
geometryReadyFrames.set(1);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
host.portalHostReady.set(true);
|
|
64
|
-
unblockLifecycleStart();
|
|
65
|
-
}, [geometryReadyFrames, host, unblockLifecycleStart]);
|
|
66
|
-
|
|
67
|
-
useFrameCallback(handleFrame, true);
|
|
48
|
+
useAnimatedReaction(
|
|
49
|
+
() => {
|
|
50
|
+
"worklet";
|
|
51
|
+
return (
|
|
52
|
+
getCurrentBoundaryBounds(host) !== null &&
|
|
53
|
+
hostBounds.get() !== null &&
|
|
54
|
+
!!hostMeasurementKey &&
|
|
55
|
+
measuredHostKey.get() === hostMeasurementKey
|
|
56
|
+
);
|
|
57
|
+
},
|
|
58
|
+
(ready) => {
|
|
59
|
+
"worklet";
|
|
60
|
+
if (ready) {
|
|
61
|
+
host.portalHostReady.set(true);
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
);
|
|
68
65
|
|
|
69
66
|
const hostStyle = useAnimatedStyle(() => {
|
|
70
67
|
"worklet";
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const link = getLink(host.pairKey, host.boundaryId);
|
|
74
|
-
if (!link?.source) {
|
|
68
|
+
const boundaryBounds = getCurrentBoundaryBounds(host);
|
|
69
|
+
if (!boundaryBounds) {
|
|
75
70
|
return NO_STYLES;
|
|
76
71
|
}
|
|
77
72
|
|
|
78
|
-
const sourceBounds = link.source.bounds as ScrollMeasuredDimensions;
|
|
79
|
-
const isCrossScreenPortal = link.source.screenKey !== host.screenKey;
|
|
80
|
-
|
|
81
73
|
return resolvePortalOffsetStyle({
|
|
82
|
-
bounds:
|
|
83
|
-
|
|
84
|
-
placement: isCrossScreenPortal ? "cross-screen" : "same-screen",
|
|
74
|
+
bounds: boundaryBounds,
|
|
75
|
+
hostBounds: hostBounds.get(),
|
|
85
76
|
});
|
|
86
77
|
});
|
|
87
78
|
|
|
88
79
|
const contentFrameStyle = useAnimatedStyle(() => {
|
|
89
80
|
"worklet";
|
|
90
|
-
const
|
|
91
|
-
if (!
|
|
81
|
+
const boundaryBounds = getCurrentBoundaryBounds(host);
|
|
82
|
+
if (!boundaryBounds) {
|
|
92
83
|
return NO_STYLES;
|
|
93
84
|
}
|
|
94
85
|
|
|
95
|
-
const sourceBounds = link.source.bounds as ScrollMeasuredDimensions;
|
|
96
|
-
|
|
97
86
|
return {
|
|
98
|
-
height:
|
|
99
|
-
width:
|
|
87
|
+
height: boundaryBounds.height,
|
|
88
|
+
width: boundaryBounds.width,
|
|
100
89
|
};
|
|
101
90
|
});
|
|
102
91
|
const slotStyle = useAnimatedStyle(() => {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ScreenPairKey } from "../../../../../../stores/bounds/types";
|
|
2
|
+
import type { BoundaryLocalMeasurement } from "../../../../types";
|
|
3
|
+
|
|
4
|
+
export const resolveBoundaryLocalMeasurement = (
|
|
5
|
+
measurement: BoundaryLocalMeasurement | null,
|
|
6
|
+
pairKey: ScreenPairKey,
|
|
7
|
+
) => {
|
|
8
|
+
"worklet";
|
|
9
|
+
return measurement?.pairKey === pairKey ? measurement.bounds : null;
|
|
10
|
+
};
|
package/src/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.ts
CHANGED
|
@@ -1,69 +1,25 @@
|
|
|
1
|
-
import type { StyleProps } from "react-native-reanimated";
|
|
2
|
-
import { getClampedScrollAxisDelta } from "../../../../../../stores/scroll.store";
|
|
3
|
-
import type { ScrollMeasuredDimensions } from "../../../../utils/measured-bounds";
|
|
4
|
-
import { getPortalHostBounds } from "../stores/host-bounds.store";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* The two portal coordinate cases we support:
|
|
8
|
-
*
|
|
9
|
-
* - same-screen: source and host live on the same screen; re-base the stored
|
|
10
|
-
* host frame onto the source measurement's scroll snapshot.
|
|
11
|
-
* - cross-screen: source and host live on different screens; the host is the
|
|
12
|
-
* replacement coordinate space, so destination scroll is inherited naturally
|
|
13
|
-
* from host placement instead of manually propagated.
|
|
14
|
-
*/
|
|
15
|
-
export type PortalOffsetPlacement = "same-screen" | "cross-screen";
|
|
1
|
+
import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
|
|
16
2
|
|
|
17
3
|
type ResolvePortalOffsetStyleParams = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
hostKey: string;
|
|
21
|
-
placement: PortalOffsetPlacement;
|
|
4
|
+
bounds: MeasuredDimensions;
|
|
5
|
+
hostBounds: MeasuredDimensions | null;
|
|
22
6
|
};
|
|
23
7
|
|
|
24
8
|
export const resolvePortalOffsetStyle = ({
|
|
25
9
|
bounds,
|
|
26
|
-
|
|
27
|
-
placement,
|
|
10
|
+
hostBounds,
|
|
28
11
|
}: ResolvePortalOffsetStyleParams): StyleProps => {
|
|
29
12
|
"worklet";
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
// Cross-screen hosts are the chosen replacement coordinate space, so their
|
|
36
|
-
// destination scroll is represented by where the host itself is mounted.
|
|
37
|
-
const alignHostToBoundsScroll = placement === "same-screen";
|
|
38
|
-
|
|
39
|
-
const hostSnapshotDeltaX = alignHostToBoundsScroll
|
|
40
|
-
? getClampedScrollAxisDelta(
|
|
41
|
-
boundsScrollSnapshot,
|
|
42
|
-
hostBoundsScrollSnapshot,
|
|
43
|
-
"horizontal",
|
|
44
|
-
)
|
|
45
|
-
: 0;
|
|
46
|
-
const hostSnapshotDeltaY = alignHostToBoundsScroll
|
|
47
|
-
? getClampedScrollAxisDelta(
|
|
48
|
-
boundsScrollSnapshot,
|
|
49
|
-
hostBoundsScrollSnapshot,
|
|
50
|
-
"vertical",
|
|
51
|
-
)
|
|
52
|
-
: 0;
|
|
53
|
-
|
|
54
|
-
// Without registered host bounds the host frame is the origin, so the source
|
|
55
|
-
// page position becomes the offset directly.
|
|
56
|
-
const adjustedHostPageX = hostBounds
|
|
57
|
-
? hostBounds.pageX - hostSnapshotDeltaX
|
|
58
|
-
: 0;
|
|
59
|
-
const adjustedHostPageY = hostBounds
|
|
60
|
-
? hostBounds.pageY - hostSnapshotDeltaY
|
|
61
|
-
: 0;
|
|
13
|
+
// Both values are measured in page coordinates. Subtracting the host origin
|
|
14
|
+
// gives the boundary's local position inside that host, independent of which
|
|
15
|
+
// scroll container owns either view.
|
|
16
|
+
const hostPageX = hostBounds?.pageX ?? 0;
|
|
17
|
+
const hostPageY = hostBounds?.pageY ?? 0;
|
|
62
18
|
|
|
63
19
|
return {
|
|
64
20
|
transform: [
|
|
65
|
-
{ translateY: bounds.pageY -
|
|
66
|
-
{ translateX: bounds.pageX -
|
|
21
|
+
{ translateY: bounds.pageY - hostPageY },
|
|
22
|
+
{ translateX: bounds.pageX - hostPageX },
|
|
67
23
|
],
|
|
68
24
|
};
|
|
69
25
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCallback, useLayoutEffect,
|
|
1
|
+
import { useCallback, useLayoutEffect, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
runOnJS,
|
|
4
4
|
type SharedValue,
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
import { getPairKeyForSource } from "../../../../../../stores/bounds/internals/links";
|
|
8
8
|
import type { ScreenPairKey } from "../../../../../../stores/bounds/types";
|
|
9
9
|
import type { NormalizedTransitionInterpolatedStyle } from "../../../../../../types/animation.types";
|
|
10
|
+
import type { BoundaryLocalMeasurementValue } from "../../../../types";
|
|
10
11
|
import { createBoundaryPortalHostName } from "../../../utils/naming";
|
|
11
12
|
import {
|
|
12
13
|
mountPortalBoundaryHost,
|
|
@@ -17,44 +18,39 @@ type UseActivePortalBoundaryHostParams = {
|
|
|
17
18
|
boundaryId: string;
|
|
18
19
|
currentScreenKey: string;
|
|
19
20
|
escapeHostKey?: string;
|
|
21
|
+
localMeasurement: BoundaryLocalMeasurementValue;
|
|
20
22
|
portalHostName: SharedValue<string | null>;
|
|
21
23
|
portalHostReady: SharedValue<boolean>;
|
|
22
24
|
slotsMap: SharedValue<NormalizedTransitionInterpolatedStyle>;
|
|
23
25
|
};
|
|
24
26
|
|
|
25
|
-
type ActivePortal = {
|
|
26
|
-
pairKey: ScreenPairKey;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
27
|
export const useActivePortalBoundaryHost = ({
|
|
30
28
|
boundaryId,
|
|
31
29
|
currentScreenKey,
|
|
32
30
|
escapeHostKey,
|
|
31
|
+
localMeasurement,
|
|
33
32
|
portalHostName,
|
|
34
33
|
portalHostReady,
|
|
35
34
|
slotsMap,
|
|
36
35
|
}: UseActivePortalBoundaryHostParams) => {
|
|
37
|
-
const [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const updateActivePortal = useCallback((pairKey: ScreenPairKey | null) => {
|
|
41
|
-
if (activePairKeyRef.current === pairKey) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
36
|
+
const [activePairKey, setActivePairKey] = useState<ScreenPairKey | null>(
|
|
37
|
+
null,
|
|
38
|
+
);
|
|
44
39
|
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
const updateActivePairKey = useCallback((pairKey: ScreenPairKey | null) => {
|
|
41
|
+
setActivePairKey(pairKey);
|
|
47
42
|
}, []);
|
|
48
43
|
|
|
49
44
|
useAnimatedReaction(
|
|
50
45
|
() => {
|
|
51
46
|
"worklet";
|
|
52
|
-
const
|
|
53
|
-
|
|
47
|
+
const pairKey = getPairKeyForSource(boundaryId, currentScreenKey);
|
|
48
|
+
const measurement = localMeasurement.get();
|
|
49
|
+
if (!pairKey || measurement?.pairKey !== pairKey) {
|
|
54
50
|
return null;
|
|
55
51
|
}
|
|
56
52
|
|
|
57
|
-
return
|
|
53
|
+
return pairKey;
|
|
58
54
|
},
|
|
59
55
|
(pairKey, previousPairKey) => {
|
|
60
56
|
"worklet";
|
|
@@ -62,12 +58,12 @@ export const useActivePortalBoundaryHost = ({
|
|
|
62
58
|
return;
|
|
63
59
|
}
|
|
64
60
|
|
|
65
|
-
runOnJS(
|
|
61
|
+
runOnJS(updateActivePairKey)(pairKey);
|
|
66
62
|
},
|
|
67
63
|
);
|
|
68
64
|
|
|
69
65
|
useLayoutEffect(() => {
|
|
70
|
-
if (!
|
|
66
|
+
if (!activePairKey || !escapeHostKey) {
|
|
71
67
|
portalHostName.set(null);
|
|
72
68
|
portalHostReady.set(false);
|
|
73
69
|
return;
|
|
@@ -76,16 +72,16 @@ export const useActivePortalBoundaryHost = ({
|
|
|
76
72
|
const nextPortalHostName = createBoundaryPortalHostName(
|
|
77
73
|
escapeHostKey,
|
|
78
74
|
boundaryId,
|
|
79
|
-
|
|
75
|
+
activePairKey,
|
|
80
76
|
);
|
|
81
77
|
|
|
82
78
|
mountPortalBoundaryHost({
|
|
83
79
|
boundaryId,
|
|
84
80
|
hostKey: escapeHostKey,
|
|
85
|
-
|
|
81
|
+
localMeasurement,
|
|
82
|
+
pairKey: activePairKey,
|
|
86
83
|
portalHostName: nextPortalHostName,
|
|
87
84
|
portalHostReady,
|
|
88
|
-
screenKey: currentScreenKey,
|
|
89
85
|
slotsMap,
|
|
90
86
|
});
|
|
91
87
|
portalHostName.set(nextPortalHostName);
|
|
@@ -96,10 +92,10 @@ export const useActivePortalBoundaryHost = ({
|
|
|
96
92
|
unmountPortalBoundaryHostByName(nextPortalHostName);
|
|
97
93
|
};
|
|
98
94
|
}, [
|
|
99
|
-
|
|
95
|
+
activePairKey,
|
|
100
96
|
boundaryId,
|
|
101
|
-
currentScreenKey,
|
|
102
97
|
escapeHostKey,
|
|
98
|
+
localMeasurement,
|
|
103
99
|
portalHostName,
|
|
104
100
|
portalHostReady,
|
|
105
101
|
slotsMap,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useAnimatedProps, useSharedValue } from "react-native-reanimated";
|
|
2
2
|
import { useDescriptorsStore } from "../../../../../../providers/screen/descriptors";
|
|
3
3
|
import { useScreenSlots } from "../../../../../../providers/screen/styles";
|
|
4
|
+
import { useBoundaryRootStore } from "../../../../providers/boundary-root.provider";
|
|
4
5
|
import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../utils/naming";
|
|
5
6
|
import { isTeleportEnabled } from "../../../utils/teleport-control";
|
|
6
7
|
import { useActiveHostKey } from "../stores/host-registry.store";
|
|
@@ -13,6 +14,13 @@ interface UseBoundaryPortalAttachmentParams {
|
|
|
13
14
|
export const useBoundaryPortalAttachment = ({
|
|
14
15
|
boundaryId,
|
|
15
16
|
}: UseBoundaryPortalAttachmentParams) => {
|
|
17
|
+
const localMeasurement = useBoundaryRootStore((root) => {
|
|
18
|
+
if (!root) {
|
|
19
|
+
throw new Error("Boundary portal attachment requires a boundary root.");
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return root.localMeasurement;
|
|
23
|
+
});
|
|
16
24
|
const currentScreenKey = useDescriptorsStore(
|
|
17
25
|
(s) => s.derivations.currentScreenKey,
|
|
18
26
|
);
|
|
@@ -25,6 +33,7 @@ export const useBoundaryPortalAttachment = ({
|
|
|
25
33
|
boundaryId,
|
|
26
34
|
currentScreenKey,
|
|
27
35
|
escapeHostKey,
|
|
36
|
+
localMeasurement,
|
|
28
37
|
portalHostName,
|
|
29
38
|
portalHostReady,
|
|
30
39
|
slotsMap,
|
|
@@ -39,10 +48,12 @@ export const useBoundaryPortalAttachment = ({
|
|
|
39
48
|
teleport,
|
|
40
49
|
...slotProps
|
|
41
50
|
} = slot?.props ?? {};
|
|
51
|
+
|
|
42
52
|
const shouldAttach =
|
|
43
53
|
slot !== undefined &&
|
|
44
54
|
isTeleportEnabled(teleport) &&
|
|
45
55
|
portalHostReady.get();
|
|
56
|
+
|
|
46
57
|
const hostName = shouldAttach
|
|
47
58
|
? portalHostName.get()
|
|
48
59
|
: PORTAL_HOST_NAME_RESET_VALUE;
|
|
@@ -1,61 +1,37 @@
|
|
|
1
|
-
import { useLayoutEffect } from "react";
|
|
2
1
|
import type { View } from "react-native";
|
|
3
2
|
import {
|
|
4
3
|
cancelAnimation,
|
|
4
|
+
type MeasuredDimensions,
|
|
5
5
|
measure,
|
|
6
|
-
runOnUI,
|
|
7
|
-
type SharedValue,
|
|
8
6
|
useAnimatedReaction,
|
|
9
7
|
useAnimatedRef,
|
|
10
8
|
useSharedValue,
|
|
11
9
|
withDelay,
|
|
12
10
|
withTiming,
|
|
13
11
|
} from "react-native-reanimated";
|
|
14
|
-
import { ScrollStore } from "../../../../../../stores/scroll.store";
|
|
15
|
-
import { getVisibilityBlockOffset } from "../../../../../../utils/visibility-block-offset";
|
|
16
|
-
import {
|
|
17
|
-
adjustedMeasuredBoundsForOverscrollDeltas,
|
|
18
|
-
correctMeasuredBoundsForVisibilityGate,
|
|
19
|
-
} from "../../../../utils/measured-bounds";
|
|
20
|
-
import {
|
|
21
|
-
clearPortalHostBounds,
|
|
22
|
-
setPortalHostBounds,
|
|
23
|
-
} from "../stores/host-bounds.store";
|
|
24
12
|
|
|
25
13
|
const HOST_MEASUREMENT_RETRY_DELAY_MS = 16;
|
|
26
14
|
|
|
27
15
|
type UseHostMeasurementParams = {
|
|
28
|
-
|
|
29
|
-
enabled: boolean;
|
|
30
|
-
hostKey: string;
|
|
31
|
-
screenKey: string;
|
|
32
|
-
visibilityBlocked: SharedValue<boolean>;
|
|
33
|
-
viewportHeight: number;
|
|
34
|
-
viewportWidth: number;
|
|
16
|
+
measurementKey: string | null;
|
|
35
17
|
};
|
|
36
18
|
|
|
37
19
|
export const useHostMeasurement = ({
|
|
38
|
-
|
|
39
|
-
enabled,
|
|
40
|
-
hostKey,
|
|
41
|
-
screenKey,
|
|
42
|
-
visibilityBlocked,
|
|
43
|
-
viewportHeight,
|
|
44
|
-
viewportWidth,
|
|
20
|
+
measurementKey,
|
|
45
21
|
}: UseHostMeasurementParams) => {
|
|
46
22
|
const hostRef = useAnimatedRef<View>();
|
|
47
|
-
const
|
|
48
|
-
const
|
|
23
|
+
const hostBounds = useSharedValue<MeasuredDimensions | null>(null);
|
|
24
|
+
const measuredKey = useSharedValue<string | null>(null);
|
|
49
25
|
const retryToken = useSharedValue(0);
|
|
50
26
|
|
|
51
27
|
useAnimatedReaction(
|
|
52
28
|
() => {
|
|
53
29
|
"worklet";
|
|
54
|
-
if (!
|
|
30
|
+
if (!measurementKey) {
|
|
55
31
|
return null;
|
|
56
32
|
}
|
|
57
33
|
|
|
58
|
-
return [
|
|
34
|
+
return [measurementKey, measuredKey.get(), retryToken.get()] as const;
|
|
59
35
|
},
|
|
60
36
|
(state) => {
|
|
61
37
|
"worklet";
|
|
@@ -64,9 +40,8 @@ export const useHostMeasurement = ({
|
|
|
64
40
|
return;
|
|
65
41
|
}
|
|
66
42
|
|
|
67
|
-
const [
|
|
68
|
-
|
|
69
|
-
if (!enabled || hasAlreadyMeasured) {
|
|
43
|
+
const [requestedKey, completedKey] = state;
|
|
44
|
+
if (requestedKey === completedKey) {
|
|
70
45
|
return;
|
|
71
46
|
}
|
|
72
47
|
|
|
@@ -85,23 +60,7 @@ export const useHostMeasurement = ({
|
|
|
85
60
|
|
|
86
61
|
cancelAnimation(retryToken);
|
|
87
62
|
|
|
88
|
-
|
|
89
|
-
// overscroll displacement into the host frame. Store the at-rest
|
|
90
|
-
// position instead; clamped scroll deltas share that basis.
|
|
91
|
-
const currentScroll = scrollMetadata.get();
|
|
92
|
-
const overscrollNormalized = capturesScroll
|
|
93
|
-
? adjustedMeasuredBoundsForOverscrollDeltas(measured, currentScroll)
|
|
94
|
-
: measured;
|
|
95
|
-
|
|
96
|
-
const correctedMeasured = correctMeasuredBoundsForVisibilityGate({
|
|
97
|
-
measured: overscrollNormalized,
|
|
98
|
-
visibilityBlocked: visibilityBlocked.get(),
|
|
99
|
-
visibilityBlockOffset: getVisibilityBlockOffset(viewportHeight),
|
|
100
|
-
viewportWidth,
|
|
101
|
-
viewportHeight,
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
if (correctedMeasured.width <= 0 || correctedMeasured.height <= 0) {
|
|
63
|
+
if (measured.width <= 0 || measured.height <= 0) {
|
|
105
64
|
cancelAnimation(retryToken);
|
|
106
65
|
retryToken.set(
|
|
107
66
|
withDelay(
|
|
@@ -112,27 +71,21 @@ export const useHostMeasurement = ({
|
|
|
112
71
|
return;
|
|
113
72
|
}
|
|
114
73
|
|
|
115
|
-
|
|
116
|
-
x:
|
|
117
|
-
y:
|
|
118
|
-
width:
|
|
119
|
-
height:
|
|
120
|
-
pageX:
|
|
121
|
-
pageY:
|
|
122
|
-
scroll: capturesScroll ? currentScroll : null,
|
|
74
|
+
hostBounds.set({
|
|
75
|
+
x: measured.x,
|
|
76
|
+
y: measured.y,
|
|
77
|
+
width: measured.width,
|
|
78
|
+
height: measured.height,
|
|
79
|
+
pageX: measured.pageX,
|
|
80
|
+
pageY: measured.pageY,
|
|
123
81
|
});
|
|
124
|
-
|
|
125
|
-
hasMeasuredHost.set(true);
|
|
82
|
+
measuredKey.set(requestedKey);
|
|
126
83
|
},
|
|
127
84
|
);
|
|
128
85
|
|
|
129
|
-
useLayoutEffect(() => {
|
|
130
|
-
return () => {
|
|
131
|
-
runOnUI(clearPortalHostBounds)(hostKey);
|
|
132
|
-
};
|
|
133
|
-
}, [hostKey]);
|
|
134
|
-
|
|
135
86
|
return {
|
|
87
|
+
hostBounds,
|
|
136
88
|
hostRef,
|
|
89
|
+
measuredKey,
|
|
137
90
|
};
|
|
138
91
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { useSyncExternalStore } from "react";
|
|
2
2
|
import type { SharedValue } from "react-native-reanimated";
|
|
3
3
|
import type { NormalizedTransitionInterpolatedStyle } from "../../../../../../types/animation.types";
|
|
4
|
+
import type { BoundaryLocalMeasurementValue } from "../../../../types";
|
|
4
5
|
|
|
5
6
|
export type ActivePortalBoundaryHost = {
|
|
6
7
|
boundaryId: string;
|
|
7
8
|
hostKey: string;
|
|
9
|
+
localMeasurement: BoundaryLocalMeasurementValue;
|
|
8
10
|
pairKey: string;
|
|
9
11
|
portalHostName: string;
|
|
10
12
|
portalHostReady: SharedValue<boolean>;
|
|
11
|
-
screenKey: string;
|
|
12
13
|
slotsMap: SharedValue<NormalizedTransitionInterpolatedStyle>;
|
|
13
14
|
};
|
|
14
15
|
|
|
@@ -54,10 +55,10 @@ const isSameHost = (
|
|
|
54
55
|
return (
|
|
55
56
|
a.boundaryId === b.boundaryId &&
|
|
56
57
|
a.hostKey === b.hostKey &&
|
|
58
|
+
a.localMeasurement === b.localMeasurement &&
|
|
57
59
|
a.pairKey === b.pairKey &&
|
|
58
60
|
a.portalHostName === b.portalHostName &&
|
|
59
61
|
a.portalHostReady === b.portalHostReady &&
|
|
60
|
-
a.screenKey === b.screenKey &&
|
|
61
62
|
a.slotsMap === b.slotsMap
|
|
62
63
|
);
|
|
63
64
|
};
|