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
|
@@ -42,3 +42,29 @@ export const hasCloseTransitionFinished = ({
|
|
|
42
42
|
"worklet";
|
|
43
43
|
return !!closing && animationProgress === 0;
|
|
44
44
|
};
|
|
45
|
+
|
|
46
|
+
export const isScreenInterpolatorReady = ({
|
|
47
|
+
hasInterpolator,
|
|
48
|
+
opening,
|
|
49
|
+
closing,
|
|
50
|
+
pendingLifecycleStartBlockCount,
|
|
51
|
+
animationProgress,
|
|
52
|
+
}: {
|
|
53
|
+
hasInterpolator: boolean;
|
|
54
|
+
opening: boolean;
|
|
55
|
+
closing: number;
|
|
56
|
+
pendingLifecycleStartBlockCount: number;
|
|
57
|
+
animationProgress: number;
|
|
58
|
+
}) => {
|
|
59
|
+
"worklet";
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
hasInterpolator &&
|
|
63
|
+
!isOpenTransitionBlocked({
|
|
64
|
+
opening,
|
|
65
|
+
pendingLifecycleStartBlockCount,
|
|
66
|
+
animationProgress,
|
|
67
|
+
}) &&
|
|
68
|
+
!hasCloseTransitionFinished({ closing, animationProgress })
|
|
69
|
+
);
|
|
70
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useRoute } from "@react-navigation/native";
|
|
1
2
|
import { useMemo } from "react";
|
|
2
3
|
import { useAnimatedProps, useAnimatedStyle } from "react-native-reanimated";
|
|
3
4
|
import { NO_PROPS, NO_STYLES } from "../../../../constants";
|
|
@@ -7,8 +8,19 @@ import {
|
|
|
7
8
|
} from "../helpers/compose-slot-style";
|
|
8
9
|
import { useScreenSlots } from "../slot.provider";
|
|
9
10
|
|
|
11
|
+
const useCurrentScreenSlotsMap = () => {
|
|
12
|
+
const route = useRoute();
|
|
13
|
+
const slotsMap = useScreenSlots(route.key, (store) => store.slotsMap);
|
|
14
|
+
|
|
15
|
+
if (!slotsMap) {
|
|
16
|
+
throw new Error(`ScreenSlot store for route "${route.key}" was not found`);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return slotsMap;
|
|
20
|
+
};
|
|
21
|
+
|
|
10
22
|
export const useSlotStyles = (slotId: string | undefined) => {
|
|
11
|
-
const
|
|
23
|
+
const slotsMap = useCurrentScreenSlotsMap();
|
|
12
24
|
|
|
13
25
|
return useAnimatedStyle(() => {
|
|
14
26
|
const slot = slotId ? slotsMap.get()[slotId] : undefined;
|
|
@@ -26,7 +38,7 @@ export const useComposedSlotStyles = (
|
|
|
26
38
|
slotId: string | undefined,
|
|
27
39
|
style: unknown,
|
|
28
40
|
) => {
|
|
29
|
-
const
|
|
41
|
+
const slotsMap = useCurrentScreenSlotsMap();
|
|
30
42
|
const localTransform = useMemo(
|
|
31
43
|
() => getLocalTransformForSlotComposition(style),
|
|
32
44
|
[style],
|
|
@@ -50,7 +62,7 @@ export const useComposedSlotStyles = (
|
|
|
50
62
|
* target takes the full associated style. Yields `NO_STYLES` when neither is set.
|
|
51
63
|
*/
|
|
52
64
|
export const useSlotStackingStyles = (slotId: string | undefined) => {
|
|
53
|
-
const
|
|
65
|
+
const slotsMap = useCurrentScreenSlotsMap();
|
|
54
66
|
|
|
55
67
|
return useAnimatedStyle(() => {
|
|
56
68
|
const baseStyle = slotId ? slotsMap.get()[slotId]?.style : undefined;
|
|
@@ -66,7 +78,7 @@ export const useSlotStackingStyles = (slotId: string | undefined) => {
|
|
|
66
78
|
};
|
|
67
79
|
|
|
68
80
|
export const useSlotLayoutStyles = (slotId: string | undefined) => {
|
|
69
|
-
const
|
|
81
|
+
const slotsMap = useCurrentScreenSlotsMap();
|
|
70
82
|
|
|
71
83
|
return useAnimatedStyle(() => {
|
|
72
84
|
const baseStyle = slotId ? slotsMap.get()[slotId]?.style : undefined;
|
|
@@ -103,7 +115,7 @@ export const useSlotLayoutStyles = (slotId: string | undefined) => {
|
|
|
103
115
|
};
|
|
104
116
|
|
|
105
117
|
export const useSlotProps = (slotId: string | undefined) => {
|
|
106
|
-
const
|
|
118
|
+
const slotsMap = useCurrentScreenSlotsMap();
|
|
107
119
|
|
|
108
120
|
return useAnimatedProps(() => {
|
|
109
121
|
return (slotId ? slotsMap.get()[slotId]?.props : undefined) ?? NO_PROPS;
|
|
@@ -40,6 +40,7 @@ import { stripInterpolatorOptions } from "../helpers/strip-interpolator-options"
|
|
|
40
40
|
import {
|
|
41
41
|
hasCloseTransitionFinished,
|
|
42
42
|
isOpenTransitionBlocked,
|
|
43
|
+
isScreenInterpolatorReady,
|
|
43
44
|
} from "../helpers/transition-visual-state";
|
|
44
45
|
import { resolveInitialDestinationStyleGate } from "../helpers/visibility-gate";
|
|
45
46
|
|
|
@@ -144,17 +145,59 @@ export const useInterpolatedStylesMap = ({
|
|
|
144
145
|
(s) => s.derivations.destinationPairKey,
|
|
145
146
|
);
|
|
146
147
|
const screenOptions = useScreenOptionsStore();
|
|
147
|
-
const
|
|
148
|
+
const screenInterpolatorProps = useScreenAnimationStore(
|
|
149
|
+
(store) => store.screenInterpolatorProps,
|
|
150
|
+
);
|
|
151
|
+
const screenInterpolatorPropsRevision = useScreenAnimationStore(
|
|
152
|
+
(store) => store.screenInterpolatorPropsRevision,
|
|
153
|
+
);
|
|
154
|
+
const selectedInterpolatorOptions = useScreenAnimationStore(
|
|
155
|
+
(store) => store.selectedInterpolatorOptions,
|
|
156
|
+
);
|
|
157
|
+
const nextInterpolator = useScreenAnimationStore(
|
|
158
|
+
(store) => store.nextInterpolator,
|
|
159
|
+
);
|
|
160
|
+
const currentInterpolator = useScreenAnimationStore(
|
|
161
|
+
(store) => store.currentInterpolator,
|
|
162
|
+
);
|
|
163
|
+
const ancestorScreenAnimationSources = useScreenAnimationStore(
|
|
164
|
+
(store) => store.ancestorScreenAnimationSources,
|
|
165
|
+
);
|
|
166
|
+
const descendantScreenAnimationSources = useScreenAnimationStore(
|
|
167
|
+
(store) => store.descendantScreenAnimationSources,
|
|
168
|
+
);
|
|
169
|
+
const transition = useBuildTransitionAccessor({
|
|
148
170
|
screenInterpolatorProps,
|
|
149
171
|
screenInterpolatorPropsRevision,
|
|
150
|
-
selectedInterpolatorOptions,
|
|
151
|
-
nextInterpolator,
|
|
152
|
-
currentInterpolator,
|
|
153
172
|
ancestorScreenAnimationSources,
|
|
154
173
|
descendantScreenAnimationSources,
|
|
155
|
-
}
|
|
156
|
-
const
|
|
157
|
-
const
|
|
174
|
+
});
|
|
175
|
+
const hasCurrentInterpolator = !!currentInterpolator;
|
|
176
|
+
const { closing: currentClosing, entering: currentEntering } =
|
|
177
|
+
AnimationStore.getBag(currentScreenKey);
|
|
178
|
+
const {
|
|
179
|
+
animationProgress: currentAnimationProgress,
|
|
180
|
+
pendingLifecycleRequestKind: currentPendingLifecycleRequestKind,
|
|
181
|
+
pendingLifecycleStartBlockCount: currentPendingLifecycleStartBlockCount,
|
|
182
|
+
} = SystemStore.getBag(currentScreenKey);
|
|
183
|
+
const interpolatorReady = useDerivedValue<number>(() => {
|
|
184
|
+
"worklet";
|
|
185
|
+
const isPendingOpen =
|
|
186
|
+
currentPendingLifecycleRequestKind.get() ===
|
|
187
|
+
LifecycleTransitionRequestKind.Open;
|
|
188
|
+
const opening = isPendingOpen || !!currentEntering.get();
|
|
189
|
+
|
|
190
|
+
return isScreenInterpolatorReady({
|
|
191
|
+
hasInterpolator: hasCurrentInterpolator,
|
|
192
|
+
opening,
|
|
193
|
+
closing: currentClosing.get(),
|
|
194
|
+
pendingLifecycleStartBlockCount:
|
|
195
|
+
currentPendingLifecycleStartBlockCount.get(),
|
|
196
|
+
animationProgress: currentAnimationProgress.get(),
|
|
197
|
+
})
|
|
198
|
+
? 1
|
|
199
|
+
: 0;
|
|
200
|
+
});
|
|
158
201
|
|
|
159
202
|
// In some cases, a user may want to use external shared values to drive animations in the interpoaltor.
|
|
160
203
|
// We can now support this by collecting those shared values and reading them here to trigger an update.
|
|
@@ -249,10 +292,6 @@ export const useInterpolatedStylesMap = ({
|
|
|
249
292
|
!nextInterpolator ||
|
|
250
293
|
isOpeningBlocked ||
|
|
251
294
|
hasCloseFinished;
|
|
252
|
-
const nextReady = currentOwnsInterpolator ? 0 : 1;
|
|
253
|
-
|
|
254
|
-
nextInterpolatorReady.set(nextReady);
|
|
255
|
-
|
|
256
295
|
const interpolatorOptionsOwner = currentOwnsInterpolator
|
|
257
296
|
? "current"
|
|
258
297
|
: "next";
|
|
@@ -328,7 +367,7 @@ export const useInterpolatedStylesMap = ({
|
|
|
328
367
|
});
|
|
329
368
|
|
|
330
369
|
return {
|
|
370
|
+
interpolatorReady,
|
|
331
371
|
localStylesMaps,
|
|
332
|
-
nextInterpolatorReady,
|
|
333
372
|
};
|
|
334
373
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode,
|
|
1
|
+
import { type ReactNode, useMemo } from "react";
|
|
2
2
|
import { StyleSheet } from "react-native";
|
|
3
3
|
import Animated, { type SharedValue } from "react-native-reanimated";
|
|
4
4
|
import type {
|
|
@@ -8,22 +8,16 @@ import type {
|
|
|
8
8
|
import type { NormalizedTransitionInterpolatedStyle } from "../../../types/animation.types";
|
|
9
9
|
import createProvider from "../../../utils/create-provider";
|
|
10
10
|
import { useDescriptorsStore } from "../descriptors";
|
|
11
|
-
import { FloatingOverlayLayer } from "./components/floating-overlay-layer";
|
|
12
|
-
import type { LocalStyleLayers } from "./helpers/resolve-slot-styles";
|
|
13
11
|
import { useInterpolatedStylesMap } from "./hooks/use-interpolated-style-maps";
|
|
14
12
|
import { useMaybeBlockVisibility } from "./hooks/use-maybe-block-visibility";
|
|
15
13
|
import { useResolvedStylesMap } from "./hooks/use-resolved-slot-style-map";
|
|
16
|
-
import {
|
|
17
|
-
registerScreenSlots,
|
|
18
|
-
unregisterScreenSlots,
|
|
19
|
-
} from "./stores/slot-references.store";
|
|
20
14
|
|
|
21
15
|
type Props = {
|
|
22
16
|
children: ReactNode;
|
|
23
|
-
isFloatingOverlay?: boolean;
|
|
24
17
|
};
|
|
25
18
|
|
|
26
19
|
export type ScreenSlotName =
|
|
20
|
+
| "overlay"
|
|
27
21
|
| "content"
|
|
28
22
|
| "backdrop"
|
|
29
23
|
| "surface"
|
|
@@ -31,8 +25,7 @@ export type ScreenSlotName =
|
|
|
31
25
|
| typeof NAVIGATION_MASK_ELEMENT_STYLE_ID;
|
|
32
26
|
|
|
33
27
|
export type ScreenSlotContextValue = {
|
|
34
|
-
|
|
35
|
-
nextInterpolatorReady: SharedValue<number>;
|
|
28
|
+
interpolatorReady: SharedValue<number>;
|
|
36
29
|
slotsMap: SharedValue<NormalizedTransitionInterpolatedStyle>;
|
|
37
30
|
visibilityBlocked: SharedValue<boolean>;
|
|
38
31
|
};
|
|
@@ -40,69 +33,52 @@ export type ScreenSlotContextValue = {
|
|
|
40
33
|
export const { ScreenSlotProvider, useScreenSlotStore: useScreenSlots } =
|
|
41
34
|
createProvider("ScreenSlot", {
|
|
42
35
|
guarded: true,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
global: true,
|
|
37
|
+
})<Props, ScreenSlotContextValue>(({ children }, { useParentStore }) => {
|
|
38
|
+
const ancestorStylesMap = useParentStore(
|
|
39
|
+
(parentContext) => parentContext?.slotsMap,
|
|
40
|
+
);
|
|
41
|
+
const currentScreenKey = useDescriptorsStore(
|
|
42
|
+
(store) => store.derivations.currentScreenKey,
|
|
43
|
+
);
|
|
44
|
+
const { animatedStyle, animatedProps, shouldBlockVisibility } =
|
|
45
|
+
useMaybeBlockVisibility();
|
|
49
46
|
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
const { interpolatorReady, localStylesMaps } = useInterpolatedStylesMap({
|
|
48
|
+
enabled: true,
|
|
49
|
+
visibilityBlocked: shouldBlockVisibility,
|
|
50
|
+
});
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
const slotsMap = useResolvedStylesMap({
|
|
53
|
+
localStylesMaps,
|
|
54
|
+
ancestorStylesMap,
|
|
55
|
+
});
|
|
56
|
+
const value = useMemo(
|
|
57
|
+
() => ({
|
|
58
|
+
interpolatorReady,
|
|
59
|
+
slotsMap,
|
|
60
|
+
visibilityBlocked: shouldBlockVisibility,
|
|
61
|
+
}),
|
|
62
|
+
[interpolatorReady, shouldBlockVisibility, slotsMap],
|
|
63
|
+
);
|
|
64
|
+
const content = useMemo(
|
|
65
|
+
() => (
|
|
66
|
+
<Animated.View
|
|
67
|
+
style={[styles.container, animatedStyle]}
|
|
68
|
+
animatedProps={animatedProps}
|
|
69
|
+
>
|
|
70
|
+
{children}
|
|
71
|
+
</Animated.View>
|
|
72
|
+
),
|
|
73
|
+
[children, animatedStyle, animatedProps],
|
|
74
|
+
);
|
|
58
75
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
localStylesMaps,
|
|
66
|
-
nextInterpolatorReady,
|
|
67
|
-
slotsMap,
|
|
68
|
-
visibilityBlocked: shouldBlockVisibility,
|
|
69
|
-
}),
|
|
70
|
-
[
|
|
71
|
-
localStylesMaps,
|
|
72
|
-
nextInterpolatorReady,
|
|
73
|
-
shouldBlockVisibility,
|
|
74
|
-
slotsMap,
|
|
75
|
-
],
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
useLayoutEffect(() => {
|
|
79
|
-
registerScreenSlots(currentScreenKey, value);
|
|
80
|
-
|
|
81
|
-
return () => {
|
|
82
|
-
unregisterScreenSlots(currentScreenKey, value);
|
|
83
|
-
};
|
|
84
|
-
}, [currentScreenKey, value]);
|
|
85
|
-
|
|
86
|
-
const content = useMemo(
|
|
87
|
-
() => (
|
|
88
|
-
<FloatingOverlayLayer enabled={isFloatingOverlay}>
|
|
89
|
-
<Animated.View
|
|
90
|
-
style={[styles.container, animatedStyle]}
|
|
91
|
-
animatedProps={animatedProps}
|
|
92
|
-
>
|
|
93
|
-
{children}
|
|
94
|
-
</Animated.View>
|
|
95
|
-
</FloatingOverlayLayer>
|
|
96
|
-
),
|
|
97
|
-
[children, animatedStyle, isFloatingOverlay, animatedProps],
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
return {
|
|
101
|
-
value,
|
|
102
|
-
children: content,
|
|
103
|
-
};
|
|
104
|
-
},
|
|
105
|
-
);
|
|
76
|
+
return {
|
|
77
|
+
key: currentScreenKey,
|
|
78
|
+
value,
|
|
79
|
+
children: content,
|
|
80
|
+
};
|
|
81
|
+
});
|
|
106
82
|
|
|
107
83
|
const styles = StyleSheet.create({
|
|
108
84
|
container: { flex: 1 },
|
|
@@ -5,6 +5,7 @@ import type {
|
|
|
5
5
|
BaseStackNavigation,
|
|
6
6
|
BaseStackRoute,
|
|
7
7
|
} from "../../../types/stack.types";
|
|
8
|
+
import { dispatchCloseAction } from "../../../utils/navigation/close-action-replay";
|
|
8
9
|
import { buildBlankStackState } from "./helpers/build-blank-stack-state";
|
|
9
10
|
import { deriveBlankStackState } from "./helpers/derive-blank-stack-state";
|
|
10
11
|
import type {
|
|
@@ -86,10 +87,13 @@ export const createBlankStackController = <
|
|
|
86
87
|
const { state, navigation } = props;
|
|
87
88
|
|
|
88
89
|
if (state.routes.some((candidate) => candidate.key === route.key)) {
|
|
89
|
-
|
|
90
|
+
const action = {
|
|
90
91
|
...StackActions.pop(),
|
|
91
92
|
source: route.key,
|
|
92
93
|
target: state.key,
|
|
94
|
+
};
|
|
95
|
+
dispatchCloseAction(action, (closeAction) => {
|
|
96
|
+
navigation.dispatch(closeAction);
|
|
93
97
|
});
|
|
94
98
|
return;
|
|
95
99
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BaseStackRoute } from "../../../../types/stack.types";
|
|
2
|
+
|
|
3
|
+
export function resolvePresentedIndex(
|
|
4
|
+
routes: BaseStackRoute[],
|
|
5
|
+
focusedRouteKey: string | undefined,
|
|
6
|
+
closingRouteKeys: ReadonlySet<string>,
|
|
7
|
+
): number {
|
|
8
|
+
const focusedIndex = focusedRouteKey
|
|
9
|
+
? routes.findIndex((route) => route.key === focusedRouteKey)
|
|
10
|
+
: routes.length - 1;
|
|
11
|
+
const resolvedFocusedIndex =
|
|
12
|
+
focusedIndex >= 0 ? focusedIndex : routes.length - 1;
|
|
13
|
+
|
|
14
|
+
for (let index = resolvedFocusedIndex; index >= 0; index -= 1) {
|
|
15
|
+
const route = routes[index];
|
|
16
|
+
if (route && !closingRouteKeys.has(route.key)) {
|
|
17
|
+
return index;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return resolvedFocusedIndex;
|
|
22
|
+
}
|
|
@@ -15,6 +15,7 @@ import type {
|
|
|
15
15
|
} from "../../types/stack.types";
|
|
16
16
|
import createProvider from "../../utils/create-provider";
|
|
17
17
|
import { useBlankStackState } from "./blank-stack-state";
|
|
18
|
+
import { resolvePresentedIndex } from "./blank-stack-state/helpers/resolve-presented-index";
|
|
18
19
|
import { useStackCoreStore } from "./core.provider";
|
|
19
20
|
|
|
20
21
|
type InternalBlankStackProviderProps = BlankStackProviderProps<
|
|
@@ -58,7 +59,11 @@ function BlankStackProvider({
|
|
|
58
59
|
state: stackState,
|
|
59
60
|
});
|
|
60
61
|
const navigatorKey = stackState.key;
|
|
61
|
-
const focusedIndex =
|
|
62
|
+
const focusedIndex = resolvePresentedIndex(
|
|
63
|
+
state.routes,
|
|
64
|
+
state.focusedRouteKey,
|
|
65
|
+
state.closingRouteKeys,
|
|
66
|
+
);
|
|
62
67
|
const scenesByKey = useMemo(
|
|
63
68
|
() => createScenesByKey(state.scenes),
|
|
64
69
|
[state.scenes],
|
|
@@ -384,6 +384,14 @@ export type TransitionInterpolatedStyle = {
|
|
|
384
384
|
* This reserved key is stripped before style slot normalization.
|
|
385
385
|
*/
|
|
386
386
|
options?: TransitionInterpolatorOptions;
|
|
387
|
+
/**
|
|
388
|
+
* Animated style and props for the route-owned floating overlay.
|
|
389
|
+
*
|
|
390
|
+
* Visible overlays form their own adjacency chain. A route that returns this
|
|
391
|
+
* slot controls the previous visible overlay and, when it owns an overlay,
|
|
392
|
+
* its entering overlay.
|
|
393
|
+
*/
|
|
394
|
+
overlay?: TransitionSlotStyle;
|
|
387
395
|
/** Animated style and props for the main screen content view. */
|
|
388
396
|
content?: TransitionSlotStyle;
|
|
389
397
|
/** Animated style and props for the backdrop layer between screens. */
|
|
@@ -51,7 +51,7 @@ export type {
|
|
|
51
51
|
ScrollMetadataState,
|
|
52
52
|
SideActivation,
|
|
53
53
|
} from "./gesture.types";
|
|
54
|
-
export type { OverlayProps } from "./overlay.types";
|
|
54
|
+
export type { OverlayComponent, OverlayProps } from "./overlay.types";
|
|
55
55
|
export type {
|
|
56
56
|
GestureTracking,
|
|
57
57
|
InactiveBehavior,
|
|
@@ -1,28 +1,44 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
ParamListBase,
|
|
3
|
+
ParamListRoute,
|
|
4
|
+
RouteProp,
|
|
5
|
+
} from "@react-navigation/native";
|
|
6
|
+
import type { ReactNode } from "react";
|
|
2
7
|
import type { DerivedValue } from "react-native-reanimated";
|
|
3
8
|
import type { ScreenTransitionConfig } from "./screen.types";
|
|
4
9
|
|
|
5
10
|
/**
|
|
6
|
-
*
|
|
7
|
-
* Generic over the navigation type since different stacks have different navigation props.
|
|
11
|
+
* Overlay state without the animated progress value.
|
|
8
12
|
*/
|
|
13
|
+
export type OverlayScreenState<
|
|
14
|
+
TNavigation = unknown,
|
|
15
|
+
TParamList extends ParamListBase = ParamListBase,
|
|
16
|
+
TOwnerRouteName extends keyof TParamList = keyof TParamList,
|
|
17
|
+
> = Omit<OverlayProps<TNavigation, TParamList, TOwnerRouteName>, "progress"> & {
|
|
18
|
+
snapTo: (index: number) => void;
|
|
19
|
+
};
|
|
20
|
+
|
|
9
21
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
22
|
+
* Props passed to a floating overlay component.
|
|
23
|
+
*
|
|
24
|
+
* `route` and `index` identify the screen that owns the overlay. Focused
|
|
25
|
+
* values may describe a later screen while that overlay remains visible.
|
|
12
26
|
*/
|
|
13
|
-
export type
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
27
|
+
export type OverlayProps<
|
|
28
|
+
TNavigation = unknown,
|
|
29
|
+
TParamList extends ParamListBase = ParamListBase,
|
|
30
|
+
TOwnerRouteName extends keyof TParamList = keyof TParamList,
|
|
31
|
+
> = {
|
|
32
|
+
/** Route that declared this overlay. */
|
|
33
|
+
route: RouteProp<TParamList, TOwnerRouteName>;
|
|
34
|
+
|
|
35
|
+
/** Index of the route that declared this overlay. */
|
|
17
36
|
index: number;
|
|
18
|
-
snapTo: (index: number) => void;
|
|
19
|
-
};
|
|
20
37
|
|
|
21
|
-
export type OverlayProps<TNavigation = unknown> = {
|
|
22
38
|
/**
|
|
23
39
|
* Route of the currently focused screen in the stack.
|
|
24
40
|
*/
|
|
25
|
-
focusedRoute:
|
|
41
|
+
focusedRoute: ParamListRoute<TParamList>;
|
|
26
42
|
|
|
27
43
|
/**
|
|
28
44
|
* Index of the focused route in the stack.
|
|
@@ -32,7 +48,7 @@ export type OverlayProps<TNavigation = unknown> = {
|
|
|
32
48
|
/**
|
|
33
49
|
* All routes currently in the stack.
|
|
34
50
|
*/
|
|
35
|
-
routes:
|
|
51
|
+
routes: ParamListRoute<TParamList>[];
|
|
36
52
|
|
|
37
53
|
/**
|
|
38
54
|
* Custom metadata from the focused screen's options.
|
|
@@ -55,3 +71,14 @@ export type OverlayProps<TNavigation = unknown> = {
|
|
|
55
71
|
*/
|
|
56
72
|
progress: DerivedValue<number>;
|
|
57
73
|
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Component rendered for a floating screen overlay.
|
|
77
|
+
*
|
|
78
|
+
* The callback is bivariant because React Navigation stores overlay components
|
|
79
|
+
* in navigator-wide screen options while applications annotate them for one
|
|
80
|
+
* specific route.
|
|
81
|
+
*/
|
|
82
|
+
export type OverlayComponent = {
|
|
83
|
+
bivarianceHack(props: OverlayProps): ReactNode;
|
|
84
|
+
}["bivarianceHack"];
|
|
@@ -11,7 +11,7 @@ import type {
|
|
|
11
11
|
GestureProgressMode,
|
|
12
12
|
ScrollMetadataState,
|
|
13
13
|
} from "./gesture.types";
|
|
14
|
-
import type {
|
|
14
|
+
import type { OverlayComponent } from "./overlay.types";
|
|
15
15
|
|
|
16
16
|
export type Layout = {
|
|
17
17
|
width: number;
|
|
@@ -336,7 +336,7 @@ export type ScreenTransitionConfig = {
|
|
|
336
336
|
/**
|
|
337
337
|
* Function that returns a React Element to display as an overlay.
|
|
338
338
|
*/
|
|
339
|
-
overlay?:
|
|
339
|
+
overlay?: OverlayComponent;
|
|
340
340
|
|
|
341
341
|
/**
|
|
342
342
|
* Whether to show the overlay. The overlay is shown by default when `overlay` is provided.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SharedValue } from "react-native-reanimated";
|
|
2
2
|
import { FALSE, TRUE } from "../../constants";
|
|
3
3
|
import {
|
|
4
4
|
type AnimationStoreMap,
|
|
@@ -16,7 +16,6 @@ interface AnimateToProgressProps {
|
|
|
16
16
|
*/
|
|
17
17
|
target: "open" | "close" | number;
|
|
18
18
|
spec?: TransitionSpec;
|
|
19
|
-
onAnimationFinish?: (finished: boolean) => void;
|
|
20
19
|
animations: AnimationStoreMap;
|
|
21
20
|
targetProgress: SharedValue<number>;
|
|
22
21
|
animationProgress: SharedValue<number>;
|
|
@@ -61,7 +60,6 @@ export const resolveAnimationProgressRange = (
|
|
|
61
60
|
export const animateToProgress = ({
|
|
62
61
|
target,
|
|
63
62
|
spec,
|
|
64
|
-
onAnimationFinish,
|
|
65
63
|
animations,
|
|
66
64
|
targetProgress,
|
|
67
65
|
animationProgress,
|
|
@@ -112,9 +110,6 @@ export const animateToProgress = ({
|
|
|
112
110
|
entering.set(FALSE);
|
|
113
111
|
}
|
|
114
112
|
|
|
115
|
-
if (onAnimationFinish) {
|
|
116
|
-
runOnJS(onAnimationFinish)(true);
|
|
117
|
-
}
|
|
118
113
|
return;
|
|
119
114
|
}
|
|
120
115
|
|
|
@@ -141,23 +136,7 @@ export const animateToProgress = ({
|
|
|
141
136
|
|
|
142
137
|
if (isClosing) {
|
|
143
138
|
progressAnimating.set(FALSE);
|
|
144
|
-
|
|
145
|
-
if (onAnimationFinish) {
|
|
146
|
-
// Paint the terminal UI-thread host/style state before React
|
|
147
|
-
// removes the closing route and its native portal host.
|
|
148
|
-
requestAnimationFrame(() => {
|
|
149
|
-
"worklet";
|
|
150
|
-
requestAnimationFrame(() => {
|
|
151
|
-
"worklet";
|
|
152
|
-
runOnJS(onAnimationFinish)(state.finished);
|
|
153
|
-
});
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
139
|
} else {
|
|
157
|
-
if (onAnimationFinish) {
|
|
158
|
-
runOnJS(onAnimationFinish)(state.finished);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
140
|
// Delay clearing progress animation by one frame to ensure final frame is painted
|
|
162
141
|
requestAnimationFrame(() => {
|
|
163
142
|
progressAnimating.set(FALSE);
|