react-native-screen-transitions 4.0.0-alpha.8 → 4.0.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/README.md +6 -11
- package/lib/commonjs/components/boundary/create-boundary-component.js +5 -1
- package/lib/commonjs/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +53 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +43 -8
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +2 -3
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/teleport.js +1 -13
- package/lib/commonjs/components/boundary/portal/teleport.js.map +1 -1
- package/lib/commonjs/components/boundary/utils/source-signals.js +6 -4
- package/lib/commonjs/components/boundary/utils/source-signals.js.map +1 -1
- package/lib/commonjs/components/overlay/helpers/get-active-overlay.js +3 -24
- package/lib/commonjs/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/commonjs/components/overlay/helpers/retain-ready-overlay-resources.js +4 -3
- package/lib/commonjs/components/overlay/helpers/retain-ready-overlay-resources.js.map +1 -1
- package/lib/commonjs/components/overlay/hooks/use-overlay-slot.js +1 -2
- package/lib/commonjs/components/overlay/hooks/use-overlay-slot.js.map +1 -1
- package/lib/commonjs/components/overlay/variations/float-overlay.js +0 -2
- package/lib/commonjs/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/commonjs/components/overlay/variations/overlay-host.js +18 -15
- package/lib/commonjs/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/commonjs/components/screen-container/layers/content.js +10 -5
- package/lib/commonjs/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/components/screen-container/layers/surface.js +50 -0
- package/lib/commonjs/components/screen-container/layers/surface.js.map +1 -0
- package/lib/commonjs/components/stack-view.js +7 -29
- package/lib/commonjs/components/stack-view.js.map +1 -1
- package/lib/commonjs/configs/index.js +1 -4
- package/lib/commonjs/configs/index.js.map +1 -1
- package/lib/commonjs/configs/presets.js +1 -384
- package/lib/commonjs/configs/presets.js.map +1 -1
- package/lib/commonjs/constants.js +2 -1
- package/lib/commonjs/constants.js.map +1 -1
- package/lib/commonjs/navigators/create-blank-stack-navigator.js +7 -67
- package/lib/commonjs/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/commonjs/navigators/expo-router/index.js +1 -18
- package/lib/commonjs/navigators/expo-router/index.js.map +1 -1
- package/lib/commonjs/navigators/react-navigation/index.js +1 -3
- package/lib/commonjs/navigators/react-navigation/index.js.map +1 -1
- package/lib/commonjs/providers/screen/animation/animation.provider.js +6 -1
- package/lib/commonjs/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/commonjs/providers/screen/animation/helpers/build-screen-transition-options.js +1 -0
- package/lib/commonjs/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js +20 -5
- package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -1
- package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/index.js +16 -1
- package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/commonjs/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
- package/lib/commonjs/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
- package/lib/commonjs/providers/screen/animation/use-screen-animation.js +1 -8
- package/lib/commonjs/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-release.js +28 -6
- package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -1
- package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-release.js +26 -6
- package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
- package/lib/commonjs/providers/screen/gestures/shared/policy.js +1 -0
- package/lib/commonjs/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/commonjs/providers/screen/gestures/shared/snap-points.js +71 -1
- package/lib/commonjs/providers/screen/gestures/shared/snap-points.js.map +1 -1
- package/lib/commonjs/providers/screen/options/helpers.js +8 -1
- package/lib/commonjs/providers/screen/options/helpers.js.map +1 -1
- package/lib/commonjs/providers/screen/styles/constants.js +4 -1
- package/lib/commonjs/providers/screen/styles/constants.js.map +1 -1
- package/lib/commonjs/providers/screen/styles/hooks/slot-resolvers.js +1 -9
- package/lib/commonjs/providers/screen/styles/hooks/slot-resolvers.js.map +1 -1
- package/lib/commonjs/providers/screen/styles/slot.provider.js +3 -1
- package/lib/commonjs/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/commonjs/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js +10 -4
- package/lib/commonjs/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js.map +1 -1
- package/lib/commonjs/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js +4 -3
- package/lib/commonjs/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js.map +1 -1
- package/lib/commonjs/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.js.map +1 -1
- package/lib/commonjs/providers/stack/blank-stack-state/helpers/state-equality.js +9 -2
- package/lib/commonjs/providers/stack/blank-stack-state/helpers/state-equality.js.map +1 -1
- package/lib/commonjs/utils/create-provider.js +14 -3
- package/lib/commonjs/utils/create-provider.js.map +1 -1
- package/lib/module/components/boundary/create-boundary-component.js +6 -2
- package/lib/module/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +50 -0
- package/lib/module/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +44 -9
- package/lib/module/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +2 -3
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/module/components/boundary/portal/teleport.js +1 -14
- package/lib/module/components/boundary/portal/teleport.js.map +1 -1
- package/lib/module/components/boundary/utils/source-signals.js +6 -4
- package/lib/module/components/boundary/utils/source-signals.js.map +1 -1
- package/lib/module/components/overlay/helpers/get-active-overlay.js +3 -24
- package/lib/module/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/module/components/overlay/helpers/retain-ready-overlay-resources.js +4 -3
- package/lib/module/components/overlay/helpers/retain-ready-overlay-resources.js.map +1 -1
- package/lib/module/components/overlay/hooks/use-overlay-slot.js +1 -2
- package/lib/module/components/overlay/hooks/use-overlay-slot.js.map +1 -1
- package/lib/module/components/overlay/variations/float-overlay.js +0 -2
- package/lib/module/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/module/components/overlay/variations/overlay-host.js +19 -16
- package/lib/module/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/module/components/screen-container/layers/content.js +10 -5
- package/lib/module/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/components/screen-container/layers/surface.js +45 -0
- package/lib/module/components/screen-container/layers/surface.js.map +1 -0
- package/lib/module/components/stack-view.js +7 -29
- package/lib/module/components/stack-view.js.map +1 -1
- package/lib/module/configs/index.js +2 -5
- package/lib/module/configs/index.js.map +1 -1
- package/lib/module/configs/presets.js +0 -380
- package/lib/module/configs/presets.js.map +1 -1
- package/lib/module/constants.js +1 -0
- package/lib/module/constants.js.map +1 -1
- package/lib/module/navigators/create-blank-stack-navigator.js +7 -66
- package/lib/module/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/module/navigators/expo-router/index.js +1 -18
- package/lib/module/navigators/expo-router/index.js.map +1 -1
- package/lib/module/navigators/react-navigation/index.js +1 -3
- package/lib/module/navigators/react-navigation/index.js.map +1 -1
- package/lib/module/providers/screen/animation/animation.provider.js +4 -0
- package/lib/module/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/module/providers/screen/animation/helpers/build-screen-transition-options.js +1 -0
- package/lib/module/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js +20 -5
- package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -1
- package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/index.js +16 -1
- package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/module/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
- package/lib/module/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
- package/lib/module/providers/screen/animation/use-screen-animation.js +2 -9
- package/lib/module/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/module/providers/screen/gestures/pan/behavior/pan-release.js +29 -7
- package/lib/module/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -1
- package/lib/module/providers/screen/gestures/pinch/behavior/pinch-release.js +27 -7
- package/lib/module/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
- package/lib/module/providers/screen/gestures/shared/policy.js +2 -1
- package/lib/module/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/module/providers/screen/gestures/shared/snap-points.js +66 -0
- package/lib/module/providers/screen/gestures/shared/snap-points.js.map +1 -1
- package/lib/module/providers/screen/options/helpers.js +9 -2
- package/lib/module/providers/screen/options/helpers.js.map +1 -1
- package/lib/module/providers/screen/styles/constants.js +4 -1
- package/lib/module/providers/screen/styles/constants.js.map +1 -1
- package/lib/module/providers/screen/styles/hooks/slot-resolvers.js +2 -10
- package/lib/module/providers/screen/styles/hooks/slot-resolvers.js.map +1 -1
- package/lib/module/providers/screen/styles/slot.provider.js +1 -0
- package/lib/module/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/module/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js +11 -5
- package/lib/module/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js.map +1 -1
- package/lib/module/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js +5 -4
- package/lib/module/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js.map +1 -1
- package/lib/module/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.js.map +1 -1
- package/lib/module/providers/stack/blank-stack-state/helpers/state-equality.js +7 -1
- package/lib/module/providers/stack/blank-stack-state/helpers/state-equality.js.map +1 -1
- package/lib/module/types/animation.types.js +10 -0
- package/lib/module/types/animation.types.js.map +1 -1
- package/lib/module/utils/create-provider.js +14 -3
- package/lib/module/utils/create-provider.js.map +1 -1
- package/lib/typescript/components/boundary/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts +20 -1
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/teleport.d.ts +1 -1
- package/lib/typescript/components/boundary/portal/teleport.d.ts.map +1 -1
- package/lib/typescript/components/boundary/utils/source-signals.d.ts.map +1 -1
- package/lib/typescript/components/overlay/helpers/get-active-overlay.d.ts +2 -8
- package/lib/typescript/components/overlay/helpers/get-active-overlay.d.ts.map +1 -1
- package/lib/typescript/components/overlay/helpers/retain-ready-overlay-resources.d.ts +2 -1
- package/lib/typescript/components/overlay/helpers/retain-ready-overlay-resources.d.ts.map +1 -1
- package/lib/typescript/components/overlay/hooks/use-overlay-slot.d.ts.map +1 -1
- package/lib/typescript/components/overlay/variations/float-overlay.d.ts.map +1 -1
- package/lib/typescript/components/overlay/variations/overlay-host.d.ts +2 -3
- package/lib/typescript/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/components/screen-container/layers/surface.d.ts +7 -0
- package/lib/typescript/components/screen-container/layers/surface.d.ts.map +1 -0
- package/lib/typescript/components/stack-view.d.ts +1 -1
- package/lib/typescript/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/configs/index.d.ts +0 -9
- package/lib/typescript/configs/index.d.ts.map +1 -1
- package/lib/typescript/configs/presets.d.ts +0 -9
- package/lib/typescript/configs/presets.d.ts.map +1 -1
- package/lib/typescript/constants.d.ts +2 -1
- package/lib/typescript/constants.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -10
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/navigators/create-blank-stack-navigator.d.ts +2 -4
- package/lib/typescript/navigators/create-blank-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/navigators/expo-router/index.d.ts +3 -3
- package/lib/typescript/navigators/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/navigators/react-navigation/index.d.ts +1 -1
- package/lib/typescript/navigators/react-navigation/index.d.ts.map +1 -1
- package/lib/typescript/providers/screen/animation/animation.provider.d.ts +10 -1
- package/lib/typescript/providers/screen/animation/animation.provider.d.ts.map +1 -1
- package/lib/typescript/providers/screen/animation/helpers/build-screen-transition-options.d.ts.map +1 -1
- package/lib/typescript/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.d.ts +2 -1
- package/lib/typescript/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.d.ts.map +1 -1
- package/lib/typescript/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
- package/lib/typescript/providers/screen/animation/helpers/selected-interpolator-options.d.ts.map +1 -1
- package/lib/typescript/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/pan/behavior/pan-release.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/pinch/behavior/pinch-release.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/shared/policy.d.ts +2 -1
- package/lib/typescript/providers/screen/gestures/shared/policy.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/shared/snap-points.d.ts +11 -0
- package/lib/typescript/providers/screen/gestures/shared/snap-points.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/types.d.ts +2 -0
- package/lib/typescript/providers/screen/gestures/types.d.ts.map +1 -1
- package/lib/typescript/providers/screen/options/helpers.d.ts.map +1 -1
- package/lib/typescript/providers/screen/options/types.d.ts +1 -0
- package/lib/typescript/providers/screen/options/types.d.ts.map +1 -1
- package/lib/typescript/providers/screen/styles/constants.d.ts.map +1 -1
- package/lib/typescript/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -1
- package/lib/typescript/providers/screen/styles/slot.provider.d.ts +11 -2
- package/lib/typescript/providers/screen/styles/slot.provider.d.ts.map +1 -1
- package/lib/typescript/providers/stack/blank-stack-state/helpers/build-blank-stack-state.d.ts +3 -3
- package/lib/typescript/providers/stack/blank-stack-state/helpers/build-blank-stack-state.d.ts.map +1 -1
- package/lib/typescript/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.d.ts.map +1 -1
- package/lib/typescript/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.d.ts +3 -2
- package/lib/typescript/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.d.ts.map +1 -1
- package/lib/typescript/providers/stack/blank-stack-state/helpers/state-equality.d.ts +4 -4
- package/lib/typescript/providers/stack/blank-stack-state/helpers/state-equality.d.ts.map +1 -1
- package/lib/typescript/providers/stack/blank-stack-state/helpers/types.d.ts +6 -5
- package/lib/typescript/providers/stack/blank-stack-state/helpers/types.d.ts.map +1 -1
- package/lib/typescript/providers/stack/blank-stack.provider.d.ts +3 -1
- package/lib/typescript/providers/stack/blank-stack.provider.d.ts.map +1 -1
- package/lib/typescript/types/animation.types.d.ts +16 -12
- package/lib/typescript/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/types/blank-stack.types.d.ts +2 -23
- package/lib/typescript/types/blank-stack.types.d.ts.map +1 -1
- package/lib/typescript/types/index.d.ts +2 -2
- package/lib/typescript/types/index.d.ts.map +1 -1
- package/lib/typescript/types/providers/blank-stack-provider.types.d.ts +8 -6
- package/lib/typescript/types/providers/blank-stack-provider.types.d.ts.map +1 -1
- package/lib/typescript/types/screen.types.d.ts +50 -0
- package/lib/typescript/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/utils/create-provider.d.ts +4 -1
- package/lib/typescript/utils/create-provider.d.ts.map +1 -1
- package/package.json +3 -8
- package/src/components/boundary/create-boundary-component.tsx +10 -2
- package/src/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.ts +89 -0
- package/src/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +97 -14
- package/src/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +2 -6
- package/src/components/boundary/portal/teleport.ts +2 -23
- package/src/components/boundary/utils/source-signals.ts +6 -4
- package/src/components/overlay/helpers/get-active-overlay.ts +4 -36
- package/src/components/overlay/helpers/retain-ready-overlay-resources.ts +10 -1
- package/src/components/overlay/hooks/use-overlay-slot.ts +1 -5
- package/src/components/overlay/variations/float-overlay.tsx +9 -12
- package/src/components/overlay/variations/overlay-host.tsx +24 -22
- package/src/components/screen-container/layers/content.tsx +12 -7
- package/src/components/screen-container/layers/surface.tsx +65 -0
- package/src/components/stack-view.tsx +8 -39
- package/src/configs/index.ts +0 -6
- package/src/configs/presets.ts +0 -447
- package/src/constants.ts +2 -0
- package/src/index.ts +4 -1
- package/src/navigators/create-blank-stack-navigator.tsx +16 -124
- package/src/navigators/expo-router/index.tsx +0 -23
- package/src/navigators/react-navigation/index.tsx +0 -3
- package/src/providers/screen/animation/animation.provider.tsx +60 -54
- package/src/providers/screen/animation/helpers/build-screen-transition-options.ts +1 -0
- package/src/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.ts +26 -0
- package/src/providers/screen/animation/helpers/hydrate-transition-state/index.ts +20 -0
- package/src/providers/screen/animation/helpers/selected-interpolator-options.ts +1 -0
- package/src/providers/screen/animation/use-screen-animation.tsx +2 -14
- package/src/providers/screen/gestures/pan/behavior/pan-release.ts +46 -7
- package/src/providers/screen/gestures/pinch/behavior/pinch-release.ts +45 -4
- package/src/providers/screen/gestures/shared/policy.ts +4 -0
- package/src/providers/screen/gestures/shared/snap-points.ts +87 -0
- package/src/providers/screen/gestures/types.ts +2 -0
- package/src/providers/screen/options/helpers.ts +18 -0
- package/src/providers/screen/options/types.ts +1 -0
- package/src/providers/screen/styles/constants.ts +2 -1
- package/src/providers/screen/styles/hooks/slot-resolvers.tsx +2 -17
- package/src/providers/screen/styles/slot.provider.tsx +2 -1
- package/src/providers/stack/blank-stack-state/helpers/build-blank-stack-state.ts +30 -12
- package/src/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.ts +11 -3
- package/src/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.ts +2 -2
- package/src/providers/stack/blank-stack-state/helpers/state-equality.ts +27 -16
- package/src/providers/stack/blank-stack-state/helpers/types.ts +9 -4
- package/src/types/animation.types.ts +16 -13
- package/src/types/blank-stack.types.ts +1 -29
- package/src/types/index.ts +4 -1
- package/src/types/providers/blank-stack-provider.types.ts +14 -11
- package/src/types/screen.types.ts +57 -0
- package/src/utils/create-provider.tsx +22 -4
- package/lib/commonjs/components/boundary/portal/utils/teleport-control.js +0 -16
- package/lib/commonjs/components/boundary/portal/utils/teleport-control.js.map +0 -1
- package/lib/commonjs/providers/navigation/navigation-host.provider.js +0 -56
- package/lib/commonjs/providers/navigation/navigation-host.provider.js.map +0 -1
- package/lib/commonjs/providers/navigation/react-navigation-host.js +0 -23
- package/lib/commonjs/providers/navigation/react-navigation-host.js.map +0 -1
- package/lib/module/components/boundary/portal/utils/teleport-control.js +0 -11
- package/lib/module/components/boundary/portal/utils/teleport-control.js.map +0 -1
- package/lib/module/providers/navigation/navigation-host.provider.js +0 -50
- package/lib/module/providers/navigation/navigation-host.provider.js.map +0 -1
- package/lib/module/providers/navigation/react-navigation-host.js +0 -19
- package/lib/module/providers/navigation/react-navigation-host.js.map +0 -1
- package/lib/typescript/components/boundary/portal/utils/teleport-control.d.ts +0 -3
- package/lib/typescript/components/boundary/portal/utils/teleport-control.d.ts.map +0 -1
- package/lib/typescript/providers/navigation/navigation-host.provider.d.ts +0 -21
- package/lib/typescript/providers/navigation/navigation-host.provider.d.ts.map +0 -1
- package/lib/typescript/providers/navigation/react-navigation-host.d.ts +0 -3
- package/lib/typescript/providers/navigation/react-navigation-host.d.ts.map +0 -1
- package/src/components/boundary/portal/utils/teleport-control.ts +0 -13
- package/src/providers/navigation/navigation-host.provider.tsx +0 -75
- package/src/providers/navigation/react-navigation-host.tsx +0 -24
|
@@ -30,6 +30,15 @@ export type ScreenLayouts = {
|
|
|
30
30
|
};
|
|
31
31
|
export type ScreenKey = string;
|
|
32
32
|
export type SheetScrollGestureBehavior = "expand-and-collapse" | "collapse-only";
|
|
33
|
+
/**
|
|
34
|
+
* Controls how a drag moves between configured {@linkcode ScreenTransitionConfig.snapPoints}.
|
|
35
|
+
*
|
|
36
|
+
* - `"continuous"` maps physical movement directly to global screen progress.
|
|
37
|
+
* - `"step"` maps each drag across one adjacent snap interval.
|
|
38
|
+
*
|
|
39
|
+
* @see {@linkcode ScreenTransitionConfig.sheetSnapBehavior}
|
|
40
|
+
*/
|
|
41
|
+
export type SheetSnapBehavior = "continuous" | "step";
|
|
33
42
|
export type GestureTracking = "auto" | "never" | "always";
|
|
34
43
|
/**
|
|
35
44
|
* A single snap point value. Either a fraction of screen height (0–1) or
|
|
@@ -71,6 +80,16 @@ export type ScreenContentComponentProps = ScreenLayerComponentProps & {
|
|
|
71
80
|
*/
|
|
72
81
|
children: ReactNode;
|
|
73
82
|
};
|
|
83
|
+
/**
|
|
84
|
+
* Props passed to {@linkcode ScreenTransitionConfig.surfaceComponent} when it
|
|
85
|
+
* is provided as a render-style component.
|
|
86
|
+
*/
|
|
87
|
+
export type ScreenSurfaceComponentProps = ScreenLayerComponentProps & {
|
|
88
|
+
/**
|
|
89
|
+
* The screen subtree rendered inside the visual surface layer.
|
|
90
|
+
*/
|
|
91
|
+
children: ReactNode;
|
|
92
|
+
};
|
|
74
93
|
/**
|
|
75
94
|
* Custom renderer for the backdrop layer.
|
|
76
95
|
*
|
|
@@ -91,6 +110,17 @@ export type ScreenBackdropComponent = ComponentType<any> | ComponentType<ScreenB
|
|
|
91
110
|
* @see {@linkcode ScreenTransitionConfig.contentComponent}
|
|
92
111
|
*/
|
|
93
112
|
export type ScreenContentComponent = ComponentType<any> | ComponentType<ScreenContentComponentProps>;
|
|
113
|
+
/**
|
|
114
|
+
* Custom renderer for the screen's visual surface layer.
|
|
115
|
+
*
|
|
116
|
+
* The surface is nested inside the content layer and does not contain the
|
|
117
|
+
* shared-element fallback host. Use it for visual effects such as filters,
|
|
118
|
+
* clipping, backgrounds, and corner treatments without changing navigation
|
|
119
|
+
* geometry.
|
|
120
|
+
*
|
|
121
|
+
* @see {@linkcode ScreenTransitionConfig.surfaceComponent}
|
|
122
|
+
*/
|
|
123
|
+
export type ScreenSurfaceComponent = ComponentType<any> | ComponentType<ScreenSurfaceComponentProps>;
|
|
94
124
|
/**
|
|
95
125
|
* Controls how an inactive screen is retained after it is no longer active.
|
|
96
126
|
*
|
|
@@ -298,6 +328,16 @@ export type ScreenTransitionConfig = {
|
|
|
298
328
|
* @default "expand-and-collapse"
|
|
299
329
|
*/
|
|
300
330
|
sheetScrollGestureBehavior?: SheetScrollGestureBehavior;
|
|
331
|
+
/**
|
|
332
|
+
* Controls how gesture movement maps between adjacent snap points.
|
|
333
|
+
*
|
|
334
|
+
* `"continuous"` preserves direct global progress and permits one gesture to
|
|
335
|
+
* cross multiple snap points. `"step"` gives every adjacent interval a full
|
|
336
|
+
* normalized drag range and limits the gesture to one snap-point step.
|
|
337
|
+
*
|
|
338
|
+
* @default "continuous"
|
|
339
|
+
*/
|
|
340
|
+
sheetSnapBehavior?: SheetSnapBehavior;
|
|
301
341
|
/**
|
|
302
342
|
* Locks gesture-based snap movement to the current snap point.
|
|
303
343
|
*
|
|
@@ -372,5 +412,15 @@ export type ScreenTransitionConfig = {
|
|
|
372
412
|
* @default undefined
|
|
373
413
|
*/
|
|
374
414
|
contentComponent?: ScreenContentComponent;
|
|
415
|
+
/**
|
|
416
|
+
* Custom component to render as the screen's visual surface layer.
|
|
417
|
+
*
|
|
418
|
+
* The component receives the `surface` slot's animated styles and props. It
|
|
419
|
+
* is nested inside the content layer while shared-element fallback content
|
|
420
|
+
* remains outside it.
|
|
421
|
+
*
|
|
422
|
+
* @default undefined
|
|
423
|
+
*/
|
|
424
|
+
surfaceComponent?: ScreenSurfaceComponent;
|
|
375
425
|
};
|
|
376
426
|
//# sourceMappingURL=screen.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen.types.d.ts","sourceRoot":"","sources":["../../../src/types/screen.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EACX,uBAAuB,EACvB,cAAc,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACX,sBAAsB,EACtB,mBAAmB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,C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;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IAEzB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;;;;;;;;OAWG;IACH,0BAA0B,CAAC,EAAE,0BAA0B,CAAC;IAExD;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAEtC;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;IAE5C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAE1C;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;CAC1C,CAAC"}
|
|
@@ -43,6 +43,7 @@ type ResolvedOptionalProviderStoreHook<ContextValue, Global extends boolean> = O
|
|
|
43
43
|
type ProviderFactoryResult<ContextValue, Global extends boolean> = {
|
|
44
44
|
value: ContextValue;
|
|
45
45
|
children?: ReactNode;
|
|
46
|
+
unregisterOnCleanup?: boolean;
|
|
46
47
|
} & (Global extends true ? {
|
|
47
48
|
key: string;
|
|
48
49
|
} : {
|
|
@@ -52,9 +53,11 @@ export default function createProvider<ProviderName extends string, Global exten
|
|
|
52
53
|
global?: Global;
|
|
53
54
|
}): <ProviderProps extends object, ContextValue>(factory: (props: ProviderProps) => ProviderFactoryResult<ContextValue, Global>) => {
|
|
54
55
|
StoreProvider: {
|
|
55
|
-
({ children, storeKey, value, }: {
|
|
56
|
+
({ children, registerGlobally, storeKey, unregisterOnCleanup, value, }: {
|
|
56
57
|
children?: ReactNode;
|
|
58
|
+
registerGlobally?: boolean;
|
|
57
59
|
storeKey?: string;
|
|
60
|
+
unregisterOnCleanup?: boolean;
|
|
58
61
|
value: ContextValue;
|
|
59
62
|
}): import("react").JSX.Element;
|
|
60
63
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-provider.d.ts","sourceRoot":"","sources":["../../../src/utils/create-provider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAEN,KAAK,SAAS,EAMd,MAAM,OAAO,CAAC;AAEf,KAAK,iBAAiB,CAAC,YAAY,IAAI;IACtC,IAAI,YAAY,CAAC;IACjB,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,QAAQ,GAAG,QAAQ,CAAC;CAClE,CAAC;AAEF,KAAK,uBAAuB,CAAC,YAAY,IAAI;IAC5C,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC;IAC5B,CAAC,QAAQ,EACR,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,QAAQ,GACzC,QAAQ,CAAC;CACZ,CAAC;AAEF,KAAK,yBAAyB,CAAC,YAAY,IAAI;IAC9C,IAAI,YAAY,GAAG,IAAI,CAAC;IACxB,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,KAAK,QAAQ,GAAG,QAAQ,CAAC;CACzE,CAAC;AAEF,KAAK,+BAA+B,CAAC,YAAY,IAAI;IACpD,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,YAAY,GAAG,IAAI,CAAC;IAC1C,CAAC,QAAQ,EACR,GAAG,EAAE,MAAM,GAAG,IAAI,EAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,QAAQ,GACzC,QAAQ,GAAG,IAAI,CAAC;CACnB,CAAC;AAEF,KAAK,yBAAyB,CAC7B,YAAY,EACZ,MAAM,SAAS,OAAO,IACnB,iBAAiB,CAAC,YAAY,CAAC,GAClC,CAAC,MAAM,SAAS,IAA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O,CAAC;YAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;YAC9B,KAAK,EAAE,YAAY,CAAC;SACpB;;MA2EyC;CAAE,GAAG,GAC7C,CAAC,IAAI,YAAY,IAAI,GAAG,CAAC,UAAU,GAAG,KAAK,CAAC,EAAE,CAAC,aAAa,CAAC,GAC9D,GAAG,GACF,CAAC,IAAI,YAAY,IAAI,cAAc,CAAC,OAAO,GAAG,iCAAiC,CAC/E,YAAY,EACZ,MAAM,CACN,GACD,GAAG,GACF,CAAC,IAAI,YAAY,IAAI,MAAM,CAAC,OAAO,GAAG,yBAAyB,CAC/D,YAAY,EACZ,MAAM,CACN,GACD,CAEF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-screen-transitions",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Easy screen transitions for React Native and Expo",
|
|
5
5
|
"author": "Ed",
|
|
6
6
|
"license": "MIT",
|
|
@@ -70,20 +70,15 @@
|
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"@react-navigation/native": ">=7.3.0",
|
|
72
72
|
"@types/react": "*",
|
|
73
|
-
"@types/react-native": "*",
|
|
74
|
-
"expo-router": ">=56.2.10",
|
|
75
73
|
"react": ">=19.2.0",
|
|
76
74
|
"react-native": "*",
|
|
77
75
|
"react-native-gesture-handler": ">=2.16.1",
|
|
78
76
|
"react-native-reanimated": ">=4.0.0",
|
|
79
77
|
"react-native-safe-area-context": "*",
|
|
80
|
-
"react-native-teleport": ">=1.
|
|
81
|
-
"react-native-worklets": "0.8.
|
|
78
|
+
"react-native-teleport": ">=1.2.0",
|
|
79
|
+
"react-native-worklets": ">=0.8.0"
|
|
82
80
|
},
|
|
83
81
|
"peerDependenciesMeta": {
|
|
84
|
-
"expo-router": {
|
|
85
|
-
"optional": true
|
|
86
|
-
},
|
|
87
82
|
"react-native-teleport": {
|
|
88
83
|
"optional": true
|
|
89
84
|
}
|
|
@@ -10,7 +10,10 @@ import {
|
|
|
10
10
|
BOUNDARY_TARGET_ACTIVE_PROP,
|
|
11
11
|
BoundaryTarget,
|
|
12
12
|
} from "./components/boundary-target";
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
BoundaryContentPortal,
|
|
15
|
+
BoundaryContentPortalHost,
|
|
16
|
+
} from "./portal/components/boundary-content-portal";
|
|
14
17
|
import { BoundaryPortal } from "./portal/components/boundary-portal";
|
|
15
18
|
import { BoundaryRootProvider } from "./providers/boundary-root.provider";
|
|
16
19
|
import type { BoundaryComponentProps } from "./types";
|
|
@@ -91,7 +94,12 @@ export function createBoundaryComponent<P extends object>(
|
|
|
91
94
|
enabled={root.shouldRenderHandoffHost}
|
|
92
95
|
screenKey={root.currentScreenKey}
|
|
93
96
|
>
|
|
94
|
-
|
|
97
|
+
<BoundaryContentPortal
|
|
98
|
+
boundaryId={root.boundTag.tag}
|
|
99
|
+
enabled={root.shouldRenderHandoffHost}
|
|
100
|
+
>
|
|
101
|
+
{targetResolution.children}
|
|
102
|
+
</BoundaryContentPortal>
|
|
95
103
|
</BoundaryContentPortalHost>
|
|
96
104
|
</AnimatedComponent>
|
|
97
105
|
</BoundaryPortal>
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { ScreenPairKey } from "../../../../../../stores/bounds/types";
|
|
2
|
+
import type { BoundaryHandoffTarget } from "../../../../../../types/animation.types";
|
|
3
|
+
|
|
1
4
|
type ReceiverRoute = {
|
|
2
5
|
key: string;
|
|
3
6
|
};
|
|
@@ -57,6 +60,7 @@ export const resolveHandoffAttachmentCandidate = ({
|
|
|
57
60
|
interpolatorReady,
|
|
58
61
|
pairChangedDuringClose = false,
|
|
59
62
|
pairDestinationScreenKey,
|
|
63
|
+
pairHasBoundaryLink,
|
|
60
64
|
previousReceiverScreenKey,
|
|
61
65
|
}: {
|
|
62
66
|
activeReceiverClosing: boolean;
|
|
@@ -66,9 +70,20 @@ export const resolveHandoffAttachmentCandidate = ({
|
|
|
66
70
|
interpolatorReady: boolean;
|
|
67
71
|
pairChangedDuringClose?: boolean;
|
|
68
72
|
pairDestinationScreenKey: string | null;
|
|
73
|
+
pairHasBoundaryLink?: boolean;
|
|
69
74
|
previousReceiverScreenKey: string | null;
|
|
70
75
|
}) => {
|
|
71
76
|
"worklet";
|
|
77
|
+
const currentPairHasBoundaryLink =
|
|
78
|
+
pairHasBoundaryLink ?? pairDestinationScreenKey !== null;
|
|
79
|
+
|
|
80
|
+
if (
|
|
81
|
+
activeReceiverClosing &&
|
|
82
|
+
attachedReceiverScreenKey !== activeReceiverScreenKey &&
|
|
83
|
+
!currentPairHasBoundaryLink
|
|
84
|
+
) {
|
|
85
|
+
return attachedReceiverScreenKey;
|
|
86
|
+
}
|
|
72
87
|
|
|
73
88
|
if (
|
|
74
89
|
activeReceiverClosing &&
|
|
@@ -79,6 +94,16 @@ export const resolveHandoffAttachmentCandidate = ({
|
|
|
79
94
|
return pairDestinationScreenKey;
|
|
80
95
|
}
|
|
81
96
|
|
|
97
|
+
if (
|
|
98
|
+
activeReceiverClosing &&
|
|
99
|
+
pairChangedDuringClose &&
|
|
100
|
+
!currentPairHasBoundaryLink
|
|
101
|
+
) {
|
|
102
|
+
return hasActiveCloseFinished
|
|
103
|
+
? previousReceiverScreenKey
|
|
104
|
+
: attachedReceiverScreenKey;
|
|
105
|
+
}
|
|
106
|
+
|
|
82
107
|
if (
|
|
83
108
|
hasActiveCloseFinished &&
|
|
84
109
|
attachedReceiverScreenKey === activeReceiverScreenKey
|
|
@@ -101,3 +126,67 @@ export const resolveHandoffAttachmentCandidate = ({
|
|
|
101
126
|
|
|
102
127
|
return activeReceiverScreenKey;
|
|
103
128
|
};
|
|
129
|
+
|
|
130
|
+
export const resolveRequestedHandoffReceiver = ({
|
|
131
|
+
automaticScreenKey,
|
|
132
|
+
destinationReady = true,
|
|
133
|
+
destinationScreenKey,
|
|
134
|
+
handoffTarget,
|
|
135
|
+
sourceScreenKey,
|
|
136
|
+
}: {
|
|
137
|
+
automaticScreenKey: string | null;
|
|
138
|
+
destinationReady?: boolean;
|
|
139
|
+
destinationScreenKey: string | null;
|
|
140
|
+
handoffTarget: BoundaryHandoffTarget | undefined;
|
|
141
|
+
sourceScreenKey: string | null;
|
|
142
|
+
}) => {
|
|
143
|
+
"worklet";
|
|
144
|
+
|
|
145
|
+
if (handoffTarget === "source") {
|
|
146
|
+
return sourceScreenKey;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (handoffTarget === "destination") {
|
|
150
|
+
return destinationReady ? destinationScreenKey : automaticScreenKey;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return automaticScreenKey;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export const resolveRequestedHandoffPairKey = ({
|
|
157
|
+
destinationPairHasCompleteLink,
|
|
158
|
+
destinationPairKey,
|
|
159
|
+
handoffTarget,
|
|
160
|
+
retainedSourcePairHasCompleteLink,
|
|
161
|
+
retainedSourcePairKey,
|
|
162
|
+
sourcePairHasCompleteLink,
|
|
163
|
+
sourcePairKey,
|
|
164
|
+
}: {
|
|
165
|
+
destinationPairHasCompleteLink: boolean;
|
|
166
|
+
destinationPairKey: ScreenPairKey | undefined;
|
|
167
|
+
handoffTarget: BoundaryHandoffTarget | undefined;
|
|
168
|
+
retainedSourcePairHasCompleteLink: boolean;
|
|
169
|
+
retainedSourcePairKey: ScreenPairKey | undefined;
|
|
170
|
+
sourcePairHasCompleteLink: boolean;
|
|
171
|
+
sourcePairKey: ScreenPairKey | undefined;
|
|
172
|
+
}) => {
|
|
173
|
+
"worklet";
|
|
174
|
+
|
|
175
|
+
if (handoffTarget === "source" || handoffTarget === "destination") {
|
|
176
|
+
if (sourcePairHasCompleteLink) {
|
|
177
|
+
return sourcePairKey;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
if (destinationPairHasCompleteLink) {
|
|
181
|
+
return destinationPairKey;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (retainedSourcePairHasCompleteLink) {
|
|
185
|
+
return retainedSourcePairKey;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return sourcePairKey ?? destinationPairKey ?? retainedSourcePairKey;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return sourcePairKey;
|
|
192
|
+
};
|
|
@@ -9,14 +9,23 @@ import { useBlankStackStore } from "../../../../../../providers/stack/blank-stac
|
|
|
9
9
|
import { AnimationStore } from "../../../../../../stores/animation.store";
|
|
10
10
|
import { getLinkKeyFromTag } from "../../../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
11
11
|
import { getEntry } from "../../../../../../stores/bounds/internals/entries";
|
|
12
|
+
import {
|
|
13
|
+
getPairKeyForDestination,
|
|
14
|
+
getPairKeyForSource,
|
|
15
|
+
} from "../../../../../../stores/bounds/internals/links";
|
|
12
16
|
import { pairs } from "../../../../../../stores/bounds/internals/state";
|
|
17
|
+
import type {
|
|
18
|
+
LinkPairState,
|
|
19
|
+
TagLink,
|
|
20
|
+
} from "../../../../../../stores/bounds/types";
|
|
13
21
|
import { SystemStore } from "../../../../../../stores/system.store";
|
|
14
22
|
import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../utils/naming";
|
|
15
|
-
import { isTeleportEnabled } from "../../../utils/teleport-control";
|
|
16
23
|
import {
|
|
17
24
|
resolveActiveHandoffReceiver,
|
|
18
25
|
resolveHandoffAttachmentCandidate,
|
|
19
26
|
resolvePreviousHandoffReceiver,
|
|
27
|
+
resolveRequestedHandoffPairKey,
|
|
28
|
+
resolveRequestedHandoffReceiver,
|
|
20
29
|
} from "../helpers/active-handoff-receiver";
|
|
21
30
|
import { createBoundaryContentPortalHostName } from "../helpers/host-name";
|
|
22
31
|
|
|
@@ -24,6 +33,19 @@ interface UseBoundaryContentPortalAttachmentParams {
|
|
|
24
33
|
boundaryId: string;
|
|
25
34
|
}
|
|
26
35
|
|
|
36
|
+
const isCompleteActiveLink = (
|
|
37
|
+
pair: LinkPairState | null | undefined,
|
|
38
|
+
link: TagLink | undefined,
|
|
39
|
+
boundaryLinkKey: string,
|
|
40
|
+
) => {
|
|
41
|
+
"worklet";
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
link?.status === "complete" &&
|
|
45
|
+
(!link.group || pair?.groups[link.group]?.activeId === boundaryLinkKey)
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
|
|
27
49
|
export const useBoundaryContentPortalAttachment = ({
|
|
28
50
|
boundaryId,
|
|
29
51
|
}: UseBoundaryContentPortalAttachmentParams) => {
|
|
@@ -34,6 +56,9 @@ export const useBoundaryContentPortalAttachment = ({
|
|
|
34
56
|
);
|
|
35
57
|
const nextScreenKey = useDescriptorsStore((s) => s.derivations.nextScreenKey);
|
|
36
58
|
const sourcePairKey = useDescriptorsStore((s) => s.derivations.sourcePairKey);
|
|
59
|
+
const destinationPairKey = useDescriptorsStore(
|
|
60
|
+
(s) => s.derivations.destinationPairKey,
|
|
61
|
+
);
|
|
37
62
|
const destinationSlots = useOptionalScreenSlotStore(
|
|
38
63
|
nextScreenKey ?? currentScreenKey,
|
|
39
64
|
);
|
|
@@ -67,11 +92,9 @@ export const useBoundaryContentPortalAttachment = ({
|
|
|
67
92
|
const slot = slotsMap.get()[boundaryId];
|
|
68
93
|
const {
|
|
69
94
|
pointerEvents: _pointerEvents,
|
|
70
|
-
|
|
95
|
+
handoffTarget,
|
|
71
96
|
...slotProps
|
|
72
97
|
} = slot?.props ?? {};
|
|
73
|
-
|
|
74
|
-
const shouldTeleport = isTeleportEnabled(teleport);
|
|
75
98
|
const closing = activeReceiverClosing.get();
|
|
76
99
|
const animationProgress = activeReceiverAnimationProgress.get();
|
|
77
100
|
|
|
@@ -89,20 +112,65 @@ export const useBoundaryContentPortalAttachment = ({
|
|
|
89
112
|
animationProgress,
|
|
90
113
|
});
|
|
91
114
|
|
|
92
|
-
const
|
|
93
|
-
const
|
|
115
|
+
const automaticPair = sourcePairKey ? pairs.get()[sourcePairKey] : null;
|
|
116
|
+
const boundaryLinkKey = getLinkKeyFromTag(boundaryId);
|
|
117
|
+
const automaticLink = automaticPair?.links[boundaryLinkKey];
|
|
118
|
+
const requestedSourcePairKey =
|
|
119
|
+
getPairKeyForSource(boundaryId, currentScreenKey) ?? sourcePairKey;
|
|
120
|
+
const requestedSourcePair = requestedSourcePairKey
|
|
121
|
+
? pairs.get()[requestedSourcePairKey]
|
|
122
|
+
: null;
|
|
123
|
+
const requestedSourceLink = requestedSourcePair?.links[boundaryLinkKey];
|
|
94
124
|
|
|
95
125
|
const pairDestination =
|
|
96
|
-
|
|
97
|
-
(!
|
|
98
|
-
|
|
99
|
-
|
|
126
|
+
automaticLink?.status === "complete" &&
|
|
127
|
+
(!automaticLink.group ||
|
|
128
|
+
automaticPair?.groups[automaticLink.group]?.activeId ===
|
|
129
|
+
boundaryLinkKey)
|
|
130
|
+
? automaticLink.destination.screenKey
|
|
100
131
|
: null;
|
|
132
|
+
const requestedDestinationPairKey =
|
|
133
|
+
getPairKeyForDestination(boundaryId, currentScreenKey) ??
|
|
134
|
+
destinationPairKey;
|
|
135
|
+
const destinationPair = requestedDestinationPairKey
|
|
136
|
+
? pairs.get()[requestedDestinationPairKey]
|
|
137
|
+
: null;
|
|
138
|
+
const destinationLink = destinationPair?.links[boundaryLinkKey];
|
|
139
|
+
const retainedSourcePairKey = sourcePairBeforeClose.get() ?? undefined;
|
|
140
|
+
const retainedSourcePair = retainedSourcePairKey
|
|
141
|
+
? pairs.get()[retainedSourcePairKey]
|
|
142
|
+
: null;
|
|
143
|
+
const retainedSourceLink = retainedSourcePair?.links[boundaryLinkKey];
|
|
144
|
+
const requestedPairKey = resolveRequestedHandoffPairKey({
|
|
145
|
+
destinationPairHasCompleteLink: isCompleteActiveLink(
|
|
146
|
+
destinationPair,
|
|
147
|
+
destinationLink,
|
|
148
|
+
boundaryLinkKey,
|
|
149
|
+
),
|
|
150
|
+
destinationPairKey: requestedDestinationPairKey,
|
|
151
|
+
handoffTarget,
|
|
152
|
+
retainedSourcePairHasCompleteLink: isCompleteActiveLink(
|
|
153
|
+
retainedSourcePair,
|
|
154
|
+
retainedSourceLink,
|
|
155
|
+
boundaryLinkKey,
|
|
156
|
+
),
|
|
157
|
+
retainedSourcePairKey,
|
|
158
|
+
sourcePairHasCompleteLink: isCompleteActiveLink(
|
|
159
|
+
requestedSourcePair,
|
|
160
|
+
requestedSourceLink,
|
|
161
|
+
boundaryLinkKey,
|
|
162
|
+
),
|
|
163
|
+
sourcePairKey: requestedSourcePairKey,
|
|
164
|
+
});
|
|
165
|
+
const requestedPair = requestedPairKey
|
|
166
|
+
? pairs.get()[requestedPairKey]
|
|
167
|
+
: null;
|
|
168
|
+
const requestedLink = requestedPair?.links[boundaryLinkKey];
|
|
101
169
|
|
|
102
170
|
const isInterpolatorReady = interpolatorReady.get();
|
|
103
171
|
const attachedScreenKey = attachedReceiverScreenKey.get();
|
|
104
172
|
|
|
105
|
-
const
|
|
173
|
+
const automaticReceiverScreenKey = resolveHandoffAttachmentCandidate({
|
|
106
174
|
activeReceiverClosing: !!closing,
|
|
107
175
|
activeReceiverScreenKey,
|
|
108
176
|
attachedReceiverScreenKey: attachedScreenKey,
|
|
@@ -110,8 +178,25 @@ export const useBoundaryContentPortalAttachment = ({
|
|
|
110
178
|
interpolatorReady: !!isInterpolatorReady,
|
|
111
179
|
pairChangedDuringClose,
|
|
112
180
|
pairDestinationScreenKey: pairDestination,
|
|
181
|
+
pairHasBoundaryLink: automaticLink !== undefined,
|
|
113
182
|
previousReceiverScreenKey,
|
|
114
183
|
});
|
|
184
|
+
const requestedDestinationScreenKey =
|
|
185
|
+
requestedLink?.status === "complete"
|
|
186
|
+
? requestedLink.destination.screenKey
|
|
187
|
+
: null;
|
|
188
|
+
const nextReceiverScreenKey = resolveRequestedHandoffReceiver({
|
|
189
|
+
automaticScreenKey: automaticReceiverScreenKey,
|
|
190
|
+
destinationReady:
|
|
191
|
+
requestedDestinationScreenKey === activeReceiverScreenKey ||
|
|
192
|
+
!!isInterpolatorReady,
|
|
193
|
+
destinationScreenKey: requestedDestinationScreenKey,
|
|
194
|
+
handoffTarget,
|
|
195
|
+
sourceScreenKey:
|
|
196
|
+
requestedLink?.status === "complete"
|
|
197
|
+
? requestedLink.source.screenKey
|
|
198
|
+
: null,
|
|
199
|
+
});
|
|
115
200
|
|
|
116
201
|
const receiverEntry = nextReceiverScreenKey
|
|
117
202
|
? getEntry(boundaryId, nextReceiverScreenKey)
|
|
@@ -136,9 +221,7 @@ export const useBoundaryContentPortalAttachment = ({
|
|
|
136
221
|
attachedReceiverScreenKey.set(nextReceiverScreenKey);
|
|
137
222
|
}
|
|
138
223
|
|
|
139
|
-
const targetScreenKey =
|
|
140
|
-
? attachedReceiverScreenKey.get()
|
|
141
|
-
: null;
|
|
224
|
+
const targetScreenKey = attachedReceiverScreenKey.get();
|
|
142
225
|
|
|
143
226
|
const targetHostName = targetScreenKey
|
|
144
227
|
? createBoundaryContentPortalHostName(targetScreenKey, boundaryId)
|
|
@@ -3,7 +3,6 @@ import { useDescriptorsStore } from "../../../../../../providers/screen/descript
|
|
|
3
3
|
import { useScreenSlotStore } from "../../../../../../providers/screen/styles";
|
|
4
4
|
import { useBoundaryRootStore } from "../../../../providers/boundary-root.provider";
|
|
5
5
|
import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../utils/naming";
|
|
6
|
-
import { isTeleportEnabled } from "../../../utils/teleport-control";
|
|
7
6
|
import { useActiveHostKey } from "../stores/host-registry.store";
|
|
8
7
|
import { useActivePortalBoundaryHost } from "./use-active-portal-boundary-host";
|
|
9
8
|
|
|
@@ -45,14 +44,11 @@ export const useBoundaryPortalAttachment = ({
|
|
|
45
44
|
const slot = slotsMap.get()[boundaryId];
|
|
46
45
|
const {
|
|
47
46
|
pointerEvents: _pointerEvents,
|
|
48
|
-
|
|
47
|
+
handoffTarget: _handoffTarget,
|
|
49
48
|
...slotProps
|
|
50
49
|
} = slot?.props ?? {};
|
|
51
50
|
|
|
52
|
-
const shouldAttach =
|
|
53
|
-
slot !== undefined &&
|
|
54
|
-
isTeleportEnabled(teleport) &&
|
|
55
|
-
portalHostReady.get();
|
|
51
|
+
const shouldAttach = slot !== undefined && portalHostReady.get();
|
|
56
52
|
|
|
57
53
|
const hostName = shouldAttach
|
|
58
54
|
? portalHostName.get()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentType, ReactNode } from "react";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* `react-native-teleport` is an optional peer dependency. The require sits in a
|
|
@@ -9,33 +9,12 @@ import { type ComponentType, createElement, type ReactNode } from "react";
|
|
|
9
9
|
* inline rendering; everything else keeps working.
|
|
10
10
|
*/
|
|
11
11
|
let mod: any = null;
|
|
12
|
-
let managerMod: any = null;
|
|
13
|
-
let providerViewMod: any = null;
|
|
14
12
|
try {
|
|
15
13
|
mod = require("react-native-teleport");
|
|
16
|
-
managerMod = require("react-native-teleport/lib/module/contexts/PortalManager");
|
|
17
|
-
providerViewMod = require("react-native-teleport/lib/module/views/PortalProvider");
|
|
18
14
|
} catch {}
|
|
19
15
|
|
|
20
|
-
const NativePortalProviderView: ComponentType<{ children: ReactNode }> | null =
|
|
21
|
-
providerViewMod?.default ?? null;
|
|
22
|
-
const PortalManagerProvider: ComponentType<{ children: ReactNode }> | null =
|
|
23
|
-
managerMod?.PortalManagerProvider ?? null;
|
|
24
|
-
|
|
25
16
|
const SafeNativePortalProvider: ComponentType<{ children: ReactNode }> | null =
|
|
26
|
-
|
|
27
|
-
? ({ children }: { children: ReactNode }) => {
|
|
28
|
-
const managedChildren = createElement(
|
|
29
|
-
PortalManagerProvider,
|
|
30
|
-
null,
|
|
31
|
-
children,
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
return NativePortalProviderView
|
|
35
|
-
? createElement(NativePortalProviderView, null, managedChildren)
|
|
36
|
-
: managedChildren;
|
|
37
|
-
}
|
|
38
|
-
: null;
|
|
17
|
+
mod?.PortalProvider ?? null;
|
|
39
18
|
|
|
40
19
|
export const isTeleportAvailable =
|
|
41
20
|
mod !== null && SafeNativePortalProvider !== null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getLinkKeyFromTag } from "../../../stores/bounds/helpers/link-pairs.helpers";
|
|
1
2
|
import type {
|
|
2
3
|
LinkPairsState,
|
|
3
4
|
ScreenPairKey,
|
|
@@ -25,8 +26,9 @@ export const getInitialSourceCaptureSignal = (params: {
|
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
const pair = linkState?.[sourcePairKey];
|
|
28
|
-
const
|
|
29
|
-
const
|
|
29
|
+
const linkKey = getLinkKeyFromTag(linkId);
|
|
30
|
+
const link = pair?.links?.[linkKey];
|
|
31
|
+
const hasSourceRequest = pair?.sourceRequests?.[linkKey];
|
|
30
32
|
|
|
31
33
|
if ((!link?.destination && !hasSourceRequest) || link?.source) {
|
|
32
34
|
return null;
|
|
@@ -37,12 +39,12 @@ export const getInitialSourceCaptureSignal = (params: {
|
|
|
37
39
|
|
|
38
40
|
// Passive grouped sources should not measure every mounted item. Once a
|
|
39
41
|
// group has an active id, only that concrete member can auto-capture.
|
|
40
|
-
if (activeId && activeId !==
|
|
42
|
+
if (activeId && activeId !== linkKey) {
|
|
41
43
|
return null;
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
|
|
45
|
-
const signalParts = group ? [group,
|
|
47
|
+
const signalParts = group ? [group, linkKey] : [linkKey];
|
|
46
48
|
|
|
47
49
|
return {
|
|
48
50
|
pairKey: sourcePairKey,
|
|
@@ -4,52 +4,24 @@ type StackScene = BaseStackScene;
|
|
|
4
4
|
|
|
5
5
|
import { isOverlayVisible } from "../../../utils/overlay/visibility";
|
|
6
6
|
|
|
7
|
-
export type FloatOverlayActivity = "active" | "inert" | "inactive" | "closing";
|
|
8
|
-
|
|
9
7
|
export type FloatOverlayEntry = {
|
|
10
8
|
scene: StackScene;
|
|
11
9
|
overlayIndex: number;
|
|
12
|
-
activity: FloatOverlayActivity;
|
|
13
10
|
};
|
|
14
11
|
|
|
15
12
|
export type FloatOverlayTransitionEntry = FloatOverlayEntry & {
|
|
16
13
|
driverScene: StackScene;
|
|
17
14
|
};
|
|
18
15
|
|
|
19
|
-
type OverlayCandidate = Omit<FloatOverlayEntry, "activity">;
|
|
20
|
-
|
|
21
|
-
const resolveOverlayActivity = (
|
|
22
|
-
scene: StackScene,
|
|
23
|
-
distanceFromTop: number,
|
|
24
|
-
): FloatOverlayActivity => {
|
|
25
|
-
if (distanceFromTop === 0 && scene.activity === "closing") {
|
|
26
|
-
return "closing";
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (distanceFromTop === 0) {
|
|
30
|
-
return "active";
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (distanceFromTop === 1) {
|
|
34
|
-
return "inert";
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return "inactive";
|
|
38
|
-
};
|
|
39
|
-
|
|
40
16
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* The newest checkpoint owns the active overlay. Its immediate predecessor
|
|
44
|
-
* remains visible and inert; all older checkpoints are retained but inactive.
|
|
45
|
-
* This mirrors the screen activity window without making plain screens create
|
|
46
|
-
* a new overlay checkpoint.
|
|
17
|
+
* Overlay ordering and transition coordination are library-owned. Visibility,
|
|
18
|
+
* interaction, and presentation are user-owned.
|
|
47
19
|
*/
|
|
48
20
|
export function getFloatOverlayStack(
|
|
49
21
|
scenes: StackScene[],
|
|
50
22
|
transitionsAlwaysOn: boolean,
|
|
51
23
|
): FloatOverlayEntry[] {
|
|
52
|
-
const candidates:
|
|
24
|
+
const candidates: FloatOverlayEntry[] = [];
|
|
53
25
|
|
|
54
26
|
for (let index = 0; index < scenes.length; index += 1) {
|
|
55
27
|
const scene = scenes[index];
|
|
@@ -64,11 +36,7 @@ export function getFloatOverlayStack(
|
|
|
64
36
|
}
|
|
65
37
|
}
|
|
66
38
|
|
|
67
|
-
|
|
68
|
-
return candidates.map((candidate, index) => ({
|
|
69
|
-
...candidate,
|
|
70
|
-
activity: resolveOverlayActivity(candidate.scene, topIndex - index),
|
|
71
|
-
}));
|
|
39
|
+
return candidates;
|
|
72
40
|
}
|
|
73
41
|
|
|
74
42
|
export function getFloatOverlayTransitions(
|