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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.setsAreEqual = exports.routesHaveSameKeys = exports.routeKeyListsAreEqual = exports.getRouteChildStateMap = exports.getRouteChildState = exports.areRouteChildStateMapsEqual = exports.areRecordsShallowEqual = exports.areDescriptorsEqual = exports.areDescriptorSourcesEquivalent = exports.areDescriptorSourceMapsEquivalent = void 0;
|
|
6
|
+
exports.setsAreEqual = exports.routesHaveSameKeys = exports.routesAreShallowlyEqual = exports.routeKeyListsAreEqual = exports.getRouteChildStateMap = exports.getRouteChildState = exports.areRouteChildStateMapsEqual = exports.areRecordsShallowEqual = exports.areDescriptorsEqual = exports.areDescriptorSourcesEquivalent = exports.areDescriptorSourceMapsEquivalent = void 0;
|
|
7
7
|
const areDescriptorsEqual = (a, b) => {
|
|
8
8
|
if (a === b) return true;
|
|
9
9
|
const aKeys = Object.keys(a);
|
|
@@ -35,6 +35,13 @@ const routesHaveSameKeys = (a, b) => {
|
|
|
35
35
|
return a.every((route, index) => route.key === b[index]?.key);
|
|
36
36
|
};
|
|
37
37
|
exports.routesHaveSameKeys = routesHaveSameKeys;
|
|
38
|
+
const routesAreShallowlyEqual = (previous, next) => {
|
|
39
|
+
if (!routesHaveSameKeys(previous, next)) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
return previous.every((route, index) => areRecordsShallowEqual(route, next[index]));
|
|
43
|
+
};
|
|
44
|
+
exports.routesAreShallowlyEqual = routesAreShallowlyEqual;
|
|
38
45
|
const getRouteChildState = route => {
|
|
39
46
|
if (!route || typeof route !== "object") {
|
|
40
47
|
return undefined;
|
|
@@ -71,7 +78,7 @@ const areRecordsShallowEqual = (a, b) => {
|
|
|
71
78
|
};
|
|
72
79
|
exports.areRecordsShallowEqual = areRecordsShallowEqual;
|
|
73
80
|
const areDescriptorSourcesEquivalent = (previous, next) => {
|
|
74
|
-
return
|
|
81
|
+
return areRecordsShallowEqual(previous.options, next.options);
|
|
75
82
|
};
|
|
76
83
|
exports.areDescriptorSourcesEquivalent = areDescriptorSourcesEquivalent;
|
|
77
84
|
const areDescriptorSourceMapsEquivalent = (previous, next) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["areDescriptorsEqual","a","b","aKeys","Object","keys","bKeys","length","every","key","exports","setsAreEqual","left","right","size","value","has","routeKeyListsAreEqual","index","routesHaveSameKeys","route","getRouteChildState","undefined","childStateSymbol","getOwnPropertySymbols","find","symbol","description","state","getRouteChildStateMap","routes","childStates","areRouteChildStateMapsEqual","
|
|
1
|
+
{"version":3,"names":["areDescriptorsEqual","a","b","aKeys","Object","keys","bKeys","length","every","key","exports","setsAreEqual","left","right","size","value","has","routeKeyListsAreEqual","index","routesHaveSameKeys","route","routesAreShallowlyEqual","previous","next","areRecordsShallowEqual","getRouteChildState","undefined","childStateSymbol","getOwnPropertySymbols","find","symbol","description","state","getRouteChildStateMap","routes","childStates","areRouteChildStateMapsEqual","previousKeys","nextKeys","is","areDescriptorSourcesEquivalent","options","areDescriptorSourceMapsEquivalent","previousDescriptor","nextDescriptor"],"sourceRoot":"../../../../../../src","sources":["providers/stack/blank-stack-state/helpers/state-equality.ts"],"mappings":";;;;;;AAMO,MAAMA,mBAAmB,GAAGA,CAGlCC,CAAgB,EAChBC,CAAgB,KACH;EACb,IAAID,CAAC,KAAKC,CAAC,EAAE,OAAO,IAAI;EAExB,MAAMC,KAAK,GAAGC,MAAM,CAACC,IAAI,CAACJ,CAAC,CAAC;EAC5B,MAAMK,KAAK,GAAGF,MAAM,CAACC,IAAI,CAACH,CAAC,CAAC;EAE5B,IAAIC,KAAK,CAACI,MAAM,KAAKD,KAAK,CAACC,MAAM,EAAE,OAAO,KAAK;EAE/C,OAAOJ,KAAK,CAACK,KAAK,CAAEC,GAAG,IAAKR,CAAC,CAACQ,GAAG,CAAC,KAAKP,CAAC,CAACO,GAAG,CAAC,CAAC;AAC/C,CAAC;AAACC,OAAA,CAAAV,mBAAA,GAAAA,mBAAA;AAEK,MAAMW,YAAY,GAAGA,CAC3BC,IAAoB,EACpBC,KAAqB,KACjB;EACJ,IAAID,IAAI,CAACE,IAAI,KAAKD,KAAK,CAACC,IAAI,EAAE;IAC7B,OAAO,KAAK;EACb;EAEA,KAAK,MAAMC,KAAK,IAAIH,IAAI,EAAE;IACzB,IAAI,CAACC,KAAK,CAACG,GAAG,CAACD,KAAK,CAAC,EAAE;MACtB,OAAO,KAAK;IACb;EACD;EAEA,OAAO,IAAI;AACZ,CAAC;AAACL,OAAA,CAAAC,YAAA,GAAAA,YAAA;AAEK,MAAMM,qBAAqB,GAAGA,CACpChB,CAAoB,EACpBC,CAAoB,KACP;EACb,IAAID,CAAC,KAAKC,CAAC,EAAE,OAAO,IAAI;EACxB,IAA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K,CAACC,MAAM,EAAE,OAAO,KAAK;EAE/C,OAAOJ,KAAK,CAACK,KAAK,CAAEC,GAAG,IAAKL,MAAM,CAACmC,EAAE,CAACtC,CAAC,CAACQ,GAAG,CAAC,EAAEP,CAAC,CAACO,GAAG,CAAC,CAAC,CAAC;AACvD,CAAC;AAACC,OAAA,CAAAc,sBAAA,GAAAA,sBAAA;AAEK,MAAMgB,8BAA8B,GAAGA,CAC7ClB,QAAoC,EACpCC,IAAgC,KACnB;EACb,OAAOC,sBAAsB,CAC5BF,QAAQ,CAACmB,OAAO,EAChBlB,IAAI,CAACkB,OACN,CAAC;AACF,CAAC;AAAC/B,OAAA,CAAA8B,8BAAA,GAAAA,8BAAA;AAEK,MAAME,iCAAiC,GAAGA,CAChDpB,QAAqC,EACrCC,IAAiC,KACpB;EACb,IAAID,QAAQ,KAAKC,IAAI,EAAE,OAAO,IAAI;EAElC,MAAMc,YAAY,GAAGjC,MAAM,CAACC,IAAI,CAACiB,QAAQ,CAAC;EAC1C,MAAMgB,QAAQ,GAAGlC,MAAM,CAACC,IAAI,CAACkB,IAAI,CAAC;EAElC,IAAIc,YAAY,CAAC9B,MAAM,KAAK+B,QAAQ,CAAC/B,MAAM,EAAE,OAAO,KAAK;EAEzD,OAAO8B,YAAY,CAAC7B,KAAK,CAAEC,GAAG,IAAK;IAClC,MAAMkC,kBAAkB,GAAGrB,QAAQ,CAACb,GAAG,CAAC;IACxC,MAAMmC,cAAc,GAAGrB,IAAI,CAACd,GAAG,CAAC;IAEhC,IAAI,CAACkC,kBAAkB,IAAI,CAACC,cAAc,EAAE;MAC3C,OAAO,KAAK;IACb;IAEA,OAAOJ,8BAA8B,CAACG,kBAAkB,EAAEC,cAAc,CAAC;EAC1E,CAAC,CAAC;AACH,CAAC;AAAClC,OAAA,CAAAgC,iCAAA,GAAAA,iCAAA","ignoreList":[]}
|
|
@@ -159,24 +159,33 @@ function createProvider(name, options) {
|
|
|
159
159
|
const useStoreSelector = (selectorOrKey, globalSelector) => useStoreSelection(true, selectorOrKey, globalSelector);
|
|
160
160
|
const StoreProvider = ({
|
|
161
161
|
children,
|
|
162
|
+
registerGlobally = true,
|
|
162
163
|
storeKey,
|
|
164
|
+
unregisterOnCleanup = true,
|
|
163
165
|
value
|
|
164
166
|
}) => {
|
|
165
167
|
const storeRef = (0, _react.useRef)(null);
|
|
166
168
|
const pendingNotifyRef = (0, _react.useRef)(false);
|
|
169
|
+
const unregisterOnCleanupRef = (0, _react.useRef)(unregisterOnCleanup);
|
|
170
|
+
unregisterOnCleanupRef.current = unregisterOnCleanup;
|
|
167
171
|
if (storeRef.current === null) {
|
|
168
172
|
storeRef.current = createProviderStore(value);
|
|
169
173
|
}
|
|
170
174
|
const store = storeRef.current;
|
|
171
175
|
(0, _react.useLayoutEffect)(() => {
|
|
172
|
-
if (!globalRegistry) {
|
|
176
|
+
if (!globalRegistry || !registerGlobally) {
|
|
173
177
|
return;
|
|
174
178
|
}
|
|
175
179
|
if (typeof storeKey !== "string") {
|
|
176
180
|
throw new Error(`${name}StoreProvider requires a storeKey when global mode is enabled`);
|
|
177
181
|
}
|
|
178
|
-
|
|
179
|
-
|
|
182
|
+
const unregister = globalRegistry.register(storeKey, store);
|
|
183
|
+
return () => {
|
|
184
|
+
if (unregisterOnCleanupRef.current) {
|
|
185
|
+
unregister();
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
}, [registerGlobally, storeKey, store]);
|
|
180
189
|
pendingNotifyRef.current = store.setSnapshot(value) || pendingNotifyRef.current;
|
|
181
190
|
(0, _react.useLayoutEffect)(() => {
|
|
182
191
|
if (!pendingNotifyRef.current) {
|
|
@@ -195,10 +204,12 @@ function createProvider(name, options) {
|
|
|
195
204
|
const {
|
|
196
205
|
children = props.children,
|
|
197
206
|
key,
|
|
207
|
+
unregisterOnCleanup,
|
|
198
208
|
value
|
|
199
209
|
} = factory(props);
|
|
200
210
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StoreProvider, {
|
|
201
211
|
storeKey: key,
|
|
212
|
+
unregisterOnCleanup: unregisterOnCleanup,
|
|
202
213
|
value: value,
|
|
203
214
|
children: children
|
|
204
215
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_jsxRuntime","NullProviderStore","getSnapshot","subscribe","shallowEqual","a","b","Object","is","aKeys","keys","bKeys","length","key","createProviderStore","initialSnapshot","snapshot","listeners","Set","notify","listener","setSnapshot","nextSnapshot","add","delete","createProviderStoreRegistry","listenersByKey","Map","storesByKey","get","getStore","register","store","set","size","createProvider","name","options","factory","global","providerDisplayName","globalRegistry","StoreContext","createContext","displayName","useStoreSelection","required","selectorOrKey","globalSelector","isGlobalLookup","selector","contextStore","useContext","selectorRef","useRef","current","useCallback","unsubscribeStore","unsubscribeRegistry","getSelectedSnapshot","Error","useSyncExternalStore","useOptionalStoreSelector","useStoreSelector","StoreProvider","children","storeKey","value","storeRef","pendingNotifyRef","useLayoutEffect","jsx","Provider","props"],"sourceRoot":"../../../src","sources":["utils/create-provider.tsx"],"mappings":";;;;;;AAuBA,IAAAA,MAAA,GAAAC,OAAA;AAQe,IAAAC,WAAA,GAAAD,OAAA;AA/Bf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["_react","require","_jsxRuntime","NullProviderStore","getSnapshot","subscribe","shallowEqual","a","b","Object","is","aKeys","keys","bKeys","length","key","createProviderStore","initialSnapshot","snapshot","listeners","Set","notify","listener","setSnapshot","nextSnapshot","add","delete","createProviderStoreRegistry","listenersByKey","Map","storesByKey","get","getStore","register","store","set","size","createProvider","name","options","factory","global","providerDisplayName","globalRegistry","StoreContext","createContext","displayName","useStoreSelection","required","selectorOrKey","globalSelector","isGlobalLookup","selector","contextStore","useContext","selectorRef","useRef","current","useCallback","unsubscribeStore","unsubscribeRegistry","getSelectedSnapshot","Error","useSyncExternalStore","useOptionalStoreSelector","useStoreSelector","StoreProvider","children","registerGlobally","storeKey","unregisterOnCleanup","value","storeRef","pendingNotifyRef","unregisterOnCleanupRef","useLayoutEffect","unregister","jsx","Provider","props"],"sourceRoot":"../../../src","sources":["utils/create-provider.tsx"],"mappings":";;;;;;AAuBA,IAAAA,MAAA,GAAAC,OAAA;AAQe,IAAAC,WAAA,GAAAD,OAAA;AA/Bf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA0EA,MAAME,iBAA0C,GAAG;EAClDC,WAAW,EAAEA,CAAA,KAAM,IAAI;EACvBC,SAAS,EAAEA,CAAA,KAAM,MAAM,CAAC;AACzB,CAAC;AAED,MAAMC,YAAY,GAAGA,CAACC,CAAU,EAAEC,CAAU,KAAc;EACzD,IAAIC,MAAM,CAACC,EAAE,CAACH,CAAC,EAAEC,CAAC,CAAC,EAAE;IACpB,OAAO,IAAI;EACZ;EAEA,IACC,OAAOD,CAAC,KAAK,QAAQ,IACrBA,CAAC,KAAK,IAAI,IACV,OAAOC,CAAC,KAAK,QAAQ,IACrBA,CAAC,KAAK,IAAI,EACT;IACD,OAAO,KAAK;EACb;EAEA,MAAMG,KAAK,GAAGF,MAAM,CAACG,IAAI,CAACL,CAAC,CAAC;EAC5B,MAAMM,KAAK,GAAGJ,MAAM,CAACG,IAAI,CAACJ,CAAC,CAAC;EAE5B,IAAIG,KAAK,CAACG,MAAM,KAAKD,KAAK,CAACC,MAAM,EAAE;IAClC,OAAO,KAAK;EACb;EAEA,KAAK,MAAMC,GAAG,IAAIJ,KAAK,EAAE;IACxB,IACC,EAAEI,GAAG,IAAIP,CAAC,CAAC,IACX,CAACC,MAAM,CAACC,EAAE,CACRH,CAAC,CAA6BQ,GAAG,CAAC,EAClCP,CAAC,CAA6BO,GAAG,CACnC,CAAC,EACA;MACD,OAAO,KAAK;IACb;EACD;EAEA,OAAO,I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,GAAG/B,OAAO,CAACuC,KAAK,CAAC;MAClB,oBACC,IAAA7E,WAAA,CAAA2E,GAAA,EAACX,aAAa;QACbG,QAAQ,EAAEtD,GAAI;QACduD,mBAAmB,EAAEA,mBAAoB;QACzCC,KAAK,EAAEA,KAAM;QAAAJ,QAAA,EAEZA;MAAQ,CACK,CAAC;IAElB,CAAC;IACDW,QAAQ,CAAChC,WAAW,GAAGJ,mBAAmB;IAE1C,OAAO;MACNwB,aAAa;MACb,CAAC,GAAG5B,IAAI,UAAU,GAAGwC,QAAQ;MAC7B,CAAC,cAAcxC,IAAI,OAAO,GAAG0B,wBAAwB;MACrD,CAAC,MAAM1B,IAAI,OAAO,GAAG2B;IACtB,CAAC;EAaF,CAAC;AACF","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { cloneElement, forwardRef, memo, useMemo } from "react";
|
|
4
4
|
import Animated from "react-native-reanimated";
|
|
5
5
|
import { BOUNDARY_TARGET_ACTIVE_PROP, BoundaryTarget } from "./components/boundary-target";
|
|
6
|
-
import { BoundaryContentPortalHost } from "./portal/components/boundary-content-portal";
|
|
6
|
+
import { BoundaryContentPortal, BoundaryContentPortalHost } from "./portal/components/boundary-content-portal";
|
|
7
7
|
import { BoundaryPortal } from "./portal/components/boundary-portal";
|
|
8
8
|
import { BoundaryRootProvider } from "./providers/boundary-root.provider";
|
|
9
9
|
import { resolveBoundaryTarget } from "./utils/resolve-boundary-target";
|
|
@@ -67,7 +67,11 @@ export function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
67
67
|
boundaryId: root.boundTag.tag,
|
|
68
68
|
enabled: root.shouldRenderHandoffHost,
|
|
69
69
|
screenKey: root.currentScreenKey,
|
|
70
|
-
children:
|
|
70
|
+
children: /*#__PURE__*/_jsx(BoundaryContentPortal, {
|
|
71
|
+
boundaryId: root.boundTag.tag,
|
|
72
|
+
enabled: root.shouldRenderHandoffHost,
|
|
73
|
+
children: targetResolution.children
|
|
74
|
+
})
|
|
71
75
|
})
|
|
72
76
|
})
|
|
73
77
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cloneElement","forwardRef","memo","useMemo","Animated","BOUNDARY_TARGET_ACTIVE_PROP","BoundaryTarget","BoundaryContentPortalHost","BoundaryPortal","BoundaryRootProvider","resolveBoundaryTarget","jsx","_jsx","createBoundaryComponent","Wrapped","options","alreadyAnimated","AnimatedComponent","createAnimatedComponent","Inner","props","forwardedRef","enabled","group","id","anchor","scaleMode","target","method","style","handoff","escapeClipping","children","rest","targetResolution","isTarget","element","type","mapTarget","selected","targetStyle","config","hasTarget","targetCount","root","boundaryId","boundTag","tag","shouldRenderBoundaryRootThroughPortal","placeholderRef","measurementRef","ref","attachedStyle","collapsable","shouldRenderHandoffHost","screenKey","currentScreenKey"],"sourceRoot":"../../../../src","sources":["components/boundary/create-boundary-component.tsx"],"mappings":";;AAAA,SAECA,YAAY,EACZC,UAAU,EACVC,IAAI,EACJC,OAAO,QACD,OAAO;AACd,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SACCC,2BAA2B,EAC3BC,cAAc,QACR,8BAA8B;AACrC,
|
|
1
|
+
{"version":3,"names":["cloneElement","forwardRef","memo","useMemo","Animated","BOUNDARY_TARGET_ACTIVE_PROP","BoundaryTarget","BoundaryContentPortal","BoundaryContentPortalHost","BoundaryPortal","BoundaryRootProvider","resolveBoundaryTarget","jsx","_jsx","createBoundaryComponent","Wrapped","options","alreadyAnimated","AnimatedComponent","createAnimatedComponent","Inner","props","forwardedRef","enabled","group","id","anchor","scaleMode","target","method","style","handoff","escapeClipping","children","rest","targetResolution","isTarget","element","type","mapTarget","selected","targetStyle","config","hasTarget","targetCount","root","boundaryId","boundTag","tag","shouldRenderBoundaryRootThroughPortal","placeholderRef","measurementRef","ref","attachedStyle","collapsable","shouldRenderHandoffHost","screenKey","currentScreenKey"],"sourceRoot":"../../../../src","sources":["components/boundary/create-boundary-component.tsx"],"mappings":";;AAAA,SAECA,YAAY,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AAC;EAEzB,CAAC,CAAC;;EAEF;EACA;EACA,oBAAO/B,IAAI,CAACkB,KAAK,CAAC;AAMnB","ignoreList":[]}
|
|
@@ -39,13 +39,21 @@ export const resolveHandoffAttachmentCandidate = ({
|
|
|
39
39
|
interpolatorReady,
|
|
40
40
|
pairChangedDuringClose = false,
|
|
41
41
|
pairDestinationScreenKey,
|
|
42
|
+
pairHasBoundaryLink,
|
|
42
43
|
previousReceiverScreenKey
|
|
43
44
|
}) => {
|
|
44
45
|
"worklet";
|
|
45
46
|
|
|
47
|
+
const currentPairHasBoundaryLink = pairHasBoundaryLink ?? pairDestinationScreenKey !== null;
|
|
48
|
+
if (activeReceiverClosing && attachedReceiverScreenKey !== activeReceiverScreenKey && !currentPairHasBoundaryLink) {
|
|
49
|
+
return attachedReceiverScreenKey;
|
|
50
|
+
}
|
|
46
51
|
if (activeReceiverClosing && interpolatorReady && pairDestinationScreenKey && pairChangedDuringClose) {
|
|
47
52
|
return pairDestinationScreenKey;
|
|
48
53
|
}
|
|
54
|
+
if (activeReceiverClosing && pairChangedDuringClose && !currentPairHasBoundaryLink) {
|
|
55
|
+
return hasActiveCloseFinished ? previousReceiverScreenKey : attachedReceiverScreenKey;
|
|
56
|
+
}
|
|
49
57
|
if (hasActiveCloseFinished && attachedReceiverScreenKey === activeReceiverScreenKey) {
|
|
50
58
|
return previousReceiverScreenKey;
|
|
51
59
|
}
|
|
@@ -57,4 +65,46 @@ export const resolveHandoffAttachmentCandidate = ({
|
|
|
57
65
|
}
|
|
58
66
|
return activeReceiverScreenKey;
|
|
59
67
|
};
|
|
68
|
+
export const resolveRequestedHandoffReceiver = ({
|
|
69
|
+
automaticScreenKey,
|
|
70
|
+
destinationReady = true,
|
|
71
|
+
destinationScreenKey,
|
|
72
|
+
handoffTarget,
|
|
73
|
+
sourceScreenKey
|
|
74
|
+
}) => {
|
|
75
|
+
"worklet";
|
|
76
|
+
|
|
77
|
+
if (handoffTarget === "source") {
|
|
78
|
+
return sourceScreenKey;
|
|
79
|
+
}
|
|
80
|
+
if (handoffTarget === "destination") {
|
|
81
|
+
return destinationReady ? destinationScreenKey : automaticScreenKey;
|
|
82
|
+
}
|
|
83
|
+
return automaticScreenKey;
|
|
84
|
+
};
|
|
85
|
+
export const resolveRequestedHandoffPairKey = ({
|
|
86
|
+
destinationPairHasCompleteLink,
|
|
87
|
+
destinationPairKey,
|
|
88
|
+
handoffTarget,
|
|
89
|
+
retainedSourcePairHasCompleteLink,
|
|
90
|
+
retainedSourcePairKey,
|
|
91
|
+
sourcePairHasCompleteLink,
|
|
92
|
+
sourcePairKey
|
|
93
|
+
}) => {
|
|
94
|
+
"worklet";
|
|
95
|
+
|
|
96
|
+
if (handoffTarget === "source" || handoffTarget === "destination") {
|
|
97
|
+
if (sourcePairHasCompleteLink) {
|
|
98
|
+
return sourcePairKey;
|
|
99
|
+
}
|
|
100
|
+
if (destinationPairHasCompleteLink) {
|
|
101
|
+
return destinationPairKey;
|
|
102
|
+
}
|
|
103
|
+
if (retainedSourcePairHasCompleteLink) {
|
|
104
|
+
return retainedSourcePairKey;
|
|
105
|
+
}
|
|
106
|
+
return sourcePairKey ?? destinationPairKey ?? retainedSourcePairKey;
|
|
107
|
+
}
|
|
108
|
+
return sourcePairKey;
|
|
109
|
+
};
|
|
60
110
|
//# sourceMappingURL=active-handoff-receiver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["resolveActiveHandoffReceiver","focusedIndex","routes","scenes","index","length","scene","activity","route","key","resolvePreviousHandoffReceiver","previousIndex","previousScene","resolveHandoffAttachmentCandidate","activeReceiverClosing","activeReceiverScreenKey","attachedReceiverScreenKey","hasActiveCloseFinished","interpolatorReady","pairChangedDuringClose","pairDestinationScreenKey","previousReceiverScreenKey"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["resolveActiveHandoffReceiver","focusedIndex","routes","scenes","index","length","scene","activity","route","key","resolvePreviousHandoffReceiver","previousIndex","previousScene","resolveHandoffAttachmentCandidate","activeReceiverClosing","activeReceiverScreenKey","attachedReceiverScreenKey","hasActiveCloseFinished","interpolatorReady","pairChangedDuringClose","pairDestinationScreenKey","pairHasBoundaryLink","previousReceiverScreenKey","currentPairHasBoundaryLink","resolveRequestedHandoffReceiver","automaticScreenKey","destinationReady","destinationScreenKey","handoffTarget","sourceScreenKey","resolveRequestedHandoffPairKey","destinationPairHasCompleteLink","destinationPairKey","retainedSourcePairHasCompleteLink","retainedSourcePairKey","sourcePairHasCompleteLink","sourcePairKey"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.ts"],"mappings":";;AAkBA,OAAO,MAAMA,4BAA4B,GAAGA,CAAC;EAC5CC,YAAY;EACZC,MAAM;EACNC;AACmC,CAAC,KAAoB;EACxD,KAAK,IAAIC,KAAK,GAAGD,MAAM,CAACE,MAAM,GAAG,CAAC,EAAED,KAAK,IAAI,CAAC,EAAEA,KAAK,EAAE,EAAE;IACxD,MAAME,KAAK,GAAGH,MAAM,CAACC,KAAK,CAAC;IAC3B,IAAIE,KAAK,EAAEC,QAAQ,KAAK,SAAS,EAAE;MAClC,OAAOD,KAAK,CAACE,KAAK,CAACC,GAAG;IACvB;EACD;EAEA,OAAOP,MAAM,CAACD,YAAY,CAAC,EAAEQ,GAAG,IAAI,IAAI;AACzC,CAAC;AAED,OAAO,MAAMC,8BAA8B,GAAGA,CAAC;EAC9CT,YAAY;EACZC,MAAM;EACNC;AACmC,CAAC,KAAoB;EACxD,KAAK,IAAIC,KAAK,GAAGD,MAAM,CAACE,MAAM,GAAG,CAAC,EAAED,KAAK,IAAI,CAAC,EAAEA,KAAK,EAAE,EAAE;IACxD,IAAID,MAAM,CAACC,KAAK,CAAC,EAAEG,QAAQ,KAAK,SAAS,EAAE;MAC1C;IACD;IAEA,KAAK,IAAII,aAAa,GAAGP,KAAK,GAA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,+BAA+B,GAAGA,CAAC;EAC/CC,kBAAkB;EAClBC,gBAAgB,GAAG,IAAI;EACvBC,oBAAoB;EACpBC,aAAa;EACbC;AAOD,CAAC,KAAK;EACL,SAAS;;EAET,IAAID,aAAa,KAAK,QAAQ,EAAE;IAC/B,OAAOC,eAAe;EACvB;EAEA,IAAID,aAAa,KAAK,aAAa,EAAE;IACpC,OAAOF,gBAAgB,GAAGC,oBAAoB,GAAGF,kBAAkB;EACpE;EAEA,OAAOA,kBAAkB;AAC1B,CAAC;AAED,OAAO,MAAMK,8BAA8B,GAAGA,CAAC;EAC9CC,8BAA8B;EAC9BC,kBAAkB;EAClBJ,aAAa;EACbK,iCAAiC;EACjCC,qBAAqB;EACrBC,yBAAyB;EACzBC;AASD,CAAC,KAAK;EACL,SAAS;;EAET,IAAIR,aAAa,KAAK,QAAQ,IAAIA,aAAa,KAAK,aAAa,EAAE;IAClE,IAAIO,yBAAyB,EAAE;MAC9B,OAAOC,aAAa;IACrB;IAEA,IAAIL,8BAA8B,EAAE;MACnC,OAAOC,kBAAkB;IAC1B;IAEA,IAAIC,iCAAiC,EAAE;MACtC,OAAOC,qBAAqB;IAC7B;IAEA,OAAOE,aAAa,IAAIJ,kBAAkB,IAAIE,qBAAqB;EACpE;EAEA,OAAOE,aAAa;AACrB,CAAC","ignoreList":[]}
|
|
@@ -8,12 +8,17 @@ import { useBlankStackStore } from "../../../../../../providers/stack/blank-stac
|
|
|
8
8
|
import { AnimationStore } from "../../../../../../stores/animation.store";
|
|
9
9
|
import { getLinkKeyFromTag } from "../../../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
10
10
|
import { getEntry } from "../../../../../../stores/bounds/internals/entries";
|
|
11
|
+
import { getPairKeyForDestination, getPairKeyForSource } from "../../../../../../stores/bounds/internals/links";
|
|
11
12
|
import { pairs } from "../../../../../../stores/bounds/internals/state";
|
|
12
13
|
import { SystemStore } from "../../../../../../stores/system.store";
|
|
13
14
|
import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../utils/naming";
|
|
14
|
-
import {
|
|
15
|
-
import { resolveActiveHandoffReceiver, resolveHandoffAttachmentCandidate, resolvePreviousHandoffReceiver } from "../helpers/active-handoff-receiver";
|
|
15
|
+
import { resolveActiveHandoffReceiver, resolveHandoffAttachmentCandidate, resolvePreviousHandoffReceiver, resolveRequestedHandoffPairKey, resolveRequestedHandoffReceiver } from "../helpers/active-handoff-receiver";
|
|
16
16
|
import { createBoundaryContentPortalHostName } from "../helpers/host-name";
|
|
17
|
+
const isCompleteActiveLink = (pair, link, boundaryLinkKey) => {
|
|
18
|
+
"worklet";
|
|
19
|
+
|
|
20
|
+
return link?.status === "complete" && (!link.group || pair?.groups[link.group]?.activeId === boundaryLinkKey);
|
|
21
|
+
};
|
|
17
22
|
export const useBoundaryContentPortalAttachment = ({
|
|
18
23
|
boundaryId
|
|
19
24
|
}) => {
|
|
@@ -21,6 +26,7 @@ export const useBoundaryContentPortalAttachment = ({
|
|
|
21
26
|
const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
22
27
|
const nextScreenKey = useDescriptorsStore(s => s.derivations.nextScreenKey);
|
|
23
28
|
const sourcePairKey = useDescriptorsStore(s => s.derivations.sourcePairKey);
|
|
29
|
+
const destinationPairKey = useDescriptorsStore(s => s.derivations.destinationPairKey);
|
|
24
30
|
const destinationSlots = useOptionalScreenSlotStore(nextScreenKey ?? currentScreenKey);
|
|
25
31
|
const unavailableInterpolatorReady = useSharedValue(0);
|
|
26
32
|
const interpolatorReady = destinationSlots?.interpolatorReady ?? unavailableInterpolatorReady;
|
|
@@ -36,10 +42,9 @@ export const useBoundaryContentPortalAttachment = ({
|
|
|
36
42
|
const slot = slotsMap.get()[boundaryId];
|
|
37
43
|
const {
|
|
38
44
|
pointerEvents: _pointerEvents,
|
|
39
|
-
|
|
45
|
+
handoffTarget,
|
|
40
46
|
...slotProps
|
|
41
47
|
} = slot?.props ?? {};
|
|
42
|
-
const shouldTeleport = isTeleportEnabled(teleport);
|
|
43
48
|
const closing = activeReceiverClosing.get();
|
|
44
49
|
const animationProgress = activeReceiverAnimationProgress.get();
|
|
45
50
|
if (!closing) {
|
|
@@ -50,12 +55,33 @@ export const useBoundaryContentPortalAttachment = ({
|
|
|
50
55
|
closing,
|
|
51
56
|
animationProgress
|
|
52
57
|
});
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
58
|
+
const automaticPair = sourcePairKey ? pairs.get()[sourcePairKey] : null;
|
|
59
|
+
const boundaryLinkKey = getLinkKeyFromTag(boundaryId);
|
|
60
|
+
const automaticLink = automaticPair?.links[boundaryLinkKey];
|
|
61
|
+
const requestedSourcePairKey = getPairKeyForSource(boundaryId, currentScreenKey) ?? sourcePairKey;
|
|
62
|
+
const requestedSourcePair = requestedSourcePairKey ? pairs.get()[requestedSourcePairKey] : null;
|
|
63
|
+
const requestedSourceLink = requestedSourcePair?.links[boundaryLinkKey];
|
|
64
|
+
const pairDestination = automaticLink?.status === "complete" && (!automaticLink.group || automaticPair?.groups[automaticLink.group]?.activeId === boundaryLinkKey) ? automaticLink.destination.screenKey : null;
|
|
65
|
+
const requestedDestinationPairKey = getPairKeyForDestination(boundaryId, currentScreenKey) ?? destinationPairKey;
|
|
66
|
+
const destinationPair = requestedDestinationPairKey ? pairs.get()[requestedDestinationPairKey] : null;
|
|
67
|
+
const destinationLink = destinationPair?.links[boundaryLinkKey];
|
|
68
|
+
const retainedSourcePairKey = sourcePairBeforeClose.get() ?? undefined;
|
|
69
|
+
const retainedSourcePair = retainedSourcePairKey ? pairs.get()[retainedSourcePairKey] : null;
|
|
70
|
+
const retainedSourceLink = retainedSourcePair?.links[boundaryLinkKey];
|
|
71
|
+
const requestedPairKey = resolveRequestedHandoffPairKey({
|
|
72
|
+
destinationPairHasCompleteLink: isCompleteActiveLink(destinationPair, destinationLink, boundaryLinkKey),
|
|
73
|
+
destinationPairKey: requestedDestinationPairKey,
|
|
74
|
+
handoffTarget,
|
|
75
|
+
retainedSourcePairHasCompleteLink: isCompleteActiveLink(retainedSourcePair, retainedSourceLink, boundaryLinkKey),
|
|
76
|
+
retainedSourcePairKey,
|
|
77
|
+
sourcePairHasCompleteLink: isCompleteActiveLink(requestedSourcePair, requestedSourceLink, boundaryLinkKey),
|
|
78
|
+
sourcePairKey: requestedSourcePairKey
|
|
79
|
+
});
|
|
80
|
+
const requestedPair = requestedPairKey ? pairs.get()[requestedPairKey] : null;
|
|
81
|
+
const requestedLink = requestedPair?.links[boundaryLinkKey];
|
|
56
82
|
const isInterpolatorReady = interpolatorReady.get();
|
|
57
83
|
const attachedScreenKey = attachedReceiverScreenKey.get();
|
|
58
|
-
const
|
|
84
|
+
const automaticReceiverScreenKey = resolveHandoffAttachmentCandidate({
|
|
59
85
|
activeReceiverClosing: !!closing,
|
|
60
86
|
activeReceiverScreenKey,
|
|
61
87
|
attachedReceiverScreenKey: attachedScreenKey,
|
|
@@ -63,8 +89,17 @@ export const useBoundaryContentPortalAttachment = ({
|
|
|
63
89
|
interpolatorReady: !!isInterpolatorReady,
|
|
64
90
|
pairChangedDuringClose,
|
|
65
91
|
pairDestinationScreenKey: pairDestination,
|
|
92
|
+
pairHasBoundaryLink: automaticLink !== undefined,
|
|
66
93
|
previousReceiverScreenKey
|
|
67
94
|
});
|
|
95
|
+
const requestedDestinationScreenKey = requestedLink?.status === "complete" ? requestedLink.destination.screenKey : null;
|
|
96
|
+
const nextReceiverScreenKey = resolveRequestedHandoffReceiver({
|
|
97
|
+
automaticScreenKey: automaticReceiverScreenKey,
|
|
98
|
+
destinationReady: requestedDestinationScreenKey === activeReceiverScreenKey || !!isInterpolatorReady,
|
|
99
|
+
destinationScreenKey: requestedDestinationScreenKey,
|
|
100
|
+
handoffTarget,
|
|
101
|
+
sourceScreenKey: requestedLink?.status === "complete" ? requestedLink.source.screenKey : null
|
|
102
|
+
});
|
|
68
103
|
const receiverEntry = nextReceiverScreenKey ? getEntry(boundaryId, nextReceiverScreenKey) : null;
|
|
69
104
|
const receiverReady = receiverEntry?.handoff === true;
|
|
70
105
|
const returningFromActiveClose = hasActiveCloseFinished && attachedScreenKey === activeReceiverScreenKey;
|
|
@@ -73,7 +108,7 @@ export const useBoundaryContentPortalAttachment = ({
|
|
|
73
108
|
if (nextReceiverScreenKey && receiverReady && canActivateReceiver) {
|
|
74
109
|
attachedReceiverScreenKey.set(nextReceiverScreenKey);
|
|
75
110
|
}
|
|
76
|
-
const targetScreenKey =
|
|
111
|
+
const targetScreenKey = attachedReceiverScreenKey.get();
|
|
77
112
|
const targetHostName = targetScreenKey ? createBoundaryContentPortalHostName(targetScreenKey, boundaryId) : PORTAL_HOST_NAME_RESET_VALUE;
|
|
78
113
|
return {
|
|
79
114
|
...slotProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedProps","useSharedValue","useDescriptorsStore","useOptionalScreenSlotStore","useScreenSlotStore","hasCloseTransitionFinished","useBlankStackStore","AnimationStore","getLinkKeyFromTag","getEntry","pairs","SystemStore","PORTAL_HOST_NAME_RESET_VALUE","
|
|
1
|
+
{"version":3,"names":["useAnimatedProps","useSharedValue","useDescriptorsStore","useOptionalScreenSlotStore","useScreenSlotStore","hasCloseTransitionFinished","useBlankStackStore","AnimationStore","getLinkKeyFromTag","getEntry","getPairKeyForDestination","getPairKeyForSource","pairs","SystemStore","PORTAL_HOST_NAME_RESET_VALUE","resolveActiveHandoffReceiver","resolveHandoffAttachmentCandidate","resolvePreviousHandoffReceiver","resolveRequestedHandoffPairKey","resolveRequestedHandoffReceiver","createBoundaryContentPortalHostName","isCompleteActiveLink","pair","link","boundaryLinkKey","status","group","groups","activeId","useBoundaryContentPortalAttachment","boundaryId","slotsMap","store","currentScreenKey","s","derivations","nextScreenKey","sourcePairKey","destinationPairKey","destinationSlots","unavailableInterpolatorReady","interpolatorReady","activeReceiverScreenKey","previousReceiverScreenKey","activeReceiverAnimationProgress","getValue","activeReceiverClosing","attachedReceiverScreenKey","sourcePairBeforeClose","teleportProps","slot","get","pointerEvents","_pointerEvents","handoffTarget","slotProps","props","closing","animationProgress","set","pairChangedDuringClose","hasActiveCloseFinished","automaticPair","automaticLink","links","requestedSourcePairKey","requestedSourcePair","requestedSourceLink","pairDestination","destination","screenKey","requestedDestinationPairKey","destinationPair","destinationLink","retainedSourcePairKey","undefined","retainedSourcePair","retainedSourceLink","requestedPairKey","destinationPairHasCompleteLink","retainedSourcePairHasCompleteLink","sourcePairHasCompleteLink","requestedPair","requestedLink","isInterpolatorReady","attachedScreenKey","automaticReceiverScreenKey","pairDestinationScreenKey","pairHasBoundaryLink","requestedDestinationScreenKey","nextReceiverScreenKey","automaticScreenKey","destinationReady","destinationScreenKey","sourceScreenKey","source","receiverEntry","receiverReady","handoff","returningFromActiveClose","activatingPairDestination","canActivateReceiver","targetScreenKey","targetHostName","hostName"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts"],"mappings":";;AAAA,SAASA,gBAAgB,EAAEC,cAAc,QAAQ,yBAAyB;AAC1E,SAASC,mBAAmB,QAAQ,gDAAgD;AACpF,SACCC,0BAA0B,EAC1BC,kBAAkB,QACZ,2CAA2C;AAClD,SAASC,0BAA0B,QAAQ,2EAA2E;AACtH,SAASC,kBAAkB,QAAQ,wDAAwD;AAC3F,SAASC,cAAc,QAAQ,0CAA0C;AACzE,SAASC,iBAAiB,QAAQ,4DAA4D;AAC9F,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SACCC,wBAAwB,EACxBC,mBAAmB,QACb,iDAAiD;AACxD,SAASC,KAAK,QAAQ,iDAAiD;AAKvE,SAASC,WAAW,QAAQ,uCAAuC;AACnE,SAASC,4BAA4B,QAAQ,uBAAuB;AACpE,SACCC,4BAA4B,EAC5BC,iCAAiC,EACjCC,8BAA8B,EAC9BC,8BAA8B,EAC9BC,+BAA+B,QACzB,oCAAoC;AAC3C,SAASC,mCAAmC,QAAQ,sBAAsB;AAM1E,MAAMC,oBAAoB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Aa,EAAEE,OAAO,KAAK,IAAI;IAErD,MAAMC,wBAAwB,GAC7BtC,sBAAsB,IAAIwB,iBAAiB,KAAK3C,uBAAuB;IAExE,MAAM0D,yBAAyB,GAC9B,CAAC,CAAChC,eAAe,IACjB,CAAC,CAACgB,mBAAmB,IACrBM,qBAAqB,KAAKtB,eAAe;IAE1C,MAAMiC,mBAAmB,GACxBF,wBAAwB,IACxBC,yBAAyB,IACzB1C,iBAAiB,GAAG,CAAC;IAEtB,IAAIgC,qBAAqB,IAAIO,aAAa,IAAII,mBAAmB,EAAE;MAClEtD,yBAAyB,CAACY,GAAG,CAAC+B,qBAAqB,CAAC;IACrD;IAEA,MAAMY,eAAe,GAAGvD,yBAAyB,CAACI,GAAG,CAAC,CAAC;IAEvD,MAAMoD,cAAc,GAAGD,eAAe,GACnClF,mCAAmC,CAACkF,eAAe,EAAExE,UAAU,CAAC,GAChEhB,4BAA4B;IAE/B,OAAO;MACN,GAAGyC,SAAS;MACZiD,QAAQ,EAAED;IACX,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IAAEtD;EAAc,CAAC;AACzB,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,6 @@ import { useDescriptorsStore } from "../../../../../../providers/screen/descript
|
|
|
5
5
|
import { useScreenSlotStore } from "../../../../../../providers/screen/styles";
|
|
6
6
|
import { useBoundaryRootStore } from "../../../../providers/boundary-root.provider";
|
|
7
7
|
import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../utils/naming";
|
|
8
|
-
import { isTeleportEnabled } from "../../../utils/teleport-control";
|
|
9
8
|
import { useActiveHostKey } from "../stores/host-registry.store";
|
|
10
9
|
import { useActivePortalBoundaryHost } from "./use-active-portal-boundary-host";
|
|
11
10
|
export const useBoundaryPortalAttachment = ({
|
|
@@ -37,10 +36,10 @@ export const useBoundaryPortalAttachment = ({
|
|
|
37
36
|
const slot = slotsMap.get()[boundaryId];
|
|
38
37
|
const {
|
|
39
38
|
pointerEvents: _pointerEvents,
|
|
40
|
-
|
|
39
|
+
handoffTarget: _handoffTarget,
|
|
41
40
|
...slotProps
|
|
42
41
|
} = slot?.props ?? {};
|
|
43
|
-
const shouldAttach = slot !== undefined &&
|
|
42
|
+
const shouldAttach = slot !== undefined && portalHostReady.get();
|
|
44
43
|
const hostName = shouldAttach ? portalHostName.get() : PORTAL_HOST_NAME_RESET_VALUE;
|
|
45
44
|
return {
|
|
46
45
|
...slotProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedProps","useSharedValue","useDescriptorsStore","useScreenSlotStore","useBoundaryRootStore","PORTAL_HOST_NAME_RESET_VALUE","
|
|
1
|
+
{"version":3,"names":["useAnimatedProps","useSharedValue","useDescriptorsStore","useScreenSlotStore","useBoundaryRootStore","PORTAL_HOST_NAME_RESET_VALUE","useActiveHostKey","useActivePortalBoundaryHost","useBoundaryPortalAttachment","boundaryId","localMeasurement","root","Error","currentScreenKey","s","derivations","slotsMap","store","portalHostName","portalHostReady","escapeHostKey","teleportProps","slot","get","pointerEvents","_pointerEvents","handoffTarget","_handoffTarget","slotProps","props","shouldAttach","undefined","hostName"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts"],"mappings":";;AAAA,SAASA,gBAAgB,EAAEC,cAAc,QAAQ,yBAAyB;AAC1E,SAASC,mBAAmB,QAAQ,gDAAgD;AACpF,SAASC,kBAAkB,QAAQ,2CAA2C;AAC9E,SAASC,oBAAoB,QAAQ,8CAA8C;AACnF,SAASC,4BAA4B,QAAQ,uBAAuB;AACpE,SAASC,gBAAgB,QAAQ,+BAA+B;AAChE,SAASC,2BAA2B,QAAQ,mCAAmC;AAM/E,OAAO,MAAMC,2BAA2B,GAAGA,CAAC;EAC3CC;AACkC,CAAC,KAAK;EACxC,MAAMC,gBAAgB,GAAGN,oBAAoB,CAAEO,IAAI,IAAK;IACvD,IAAI,CAACA,IAAI,EAAE;MACV,MAAM,IAAIC,KAAK,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|
6
4
|
* `react-native-teleport` is an optional peer dependency. The require sits in a
|
|
7
5
|
* try/catch so Metro treats it as an optional dependency — an absent module no
|
|
@@ -11,21 +9,10 @@ import { createElement } from "react";
|
|
|
11
9
|
* inline rendering; everything else keeps working.
|
|
12
10
|
*/
|
|
13
11
|
let mod = null;
|
|
14
|
-
let managerMod = null;
|
|
15
|
-
let providerViewMod = null;
|
|
16
12
|
try {
|
|
17
13
|
mod = require("react-native-teleport");
|
|
18
|
-
managerMod = require("react-native-teleport/lib/module/contexts/PortalManager");
|
|
19
|
-
providerViewMod = require("react-native-teleport/lib/module/views/PortalProvider");
|
|
20
14
|
} catch {}
|
|
21
|
-
const
|
|
22
|
-
const PortalManagerProvider = managerMod?.PortalManagerProvider ?? null;
|
|
23
|
-
const SafeNativePortalProvider = PortalManagerProvider ? ({
|
|
24
|
-
children
|
|
25
|
-
}) => {
|
|
26
|
-
const managedChildren = /*#__PURE__*/createElement(PortalManagerProvider, null, children);
|
|
27
|
-
return NativePortalProviderView ? /*#__PURE__*/createElement(NativePortalProviderView, null, managedChildren) : managedChildren;
|
|
28
|
-
} : null;
|
|
15
|
+
const SafeNativePortalProvider = mod?.PortalProvider ?? null;
|
|
29
16
|
export const isTeleportAvailable = mod !== null && SafeNativePortalProvider !== null;
|
|
30
17
|
export const PORTAL_POINTER_EVENTS = "box-none";
|
|
31
18
|
export const NativePortal = mod?.Portal ?? null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["mod","require","SafeNativePortalProvider","PortalProvider","isTeleportAvailable","PORTAL_POINTER_EVENTS","NativePortal","Portal","NativePortalProvider","NativePortalHost","PortalHost"],"sourceRoot":"../../../../../src","sources":["components/boundary/portal/teleport.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIA,GAAQ,GAAG,IAAI;AACnB,IAAI;EACHA,GAAG,GAAGC,OAAO,CAAC,uBAAuB,CAAC;AACvC,CAAC,CAAC,MAAM,CAAC;AAET,MAAMC,wBAAuE,GAC5EF,GAAG,EAAEG,cAAc,IAAI,IAAI;AAE5B,OAAO,MAAMC,mBAAmB,GAC/BJ,GAAG,KAAK,IAAI,IAAIE,wBAAwB,KAAK,IAAI;AAClD,OAAO,MAAMG,qBAAqB,GAAG,UAAmB;AACxD,OAAO,MAAMC,YAAuC,GAAGN,GAAG,EAAEO,MAAM,IAAI,IAAI;AAC1E,OAAO,MAAMC,oBAA+C,GAC3DN,wBAAwB;AACzB,OAAO,MAAMO,gBAA2C,GACvDT,GAAG,EAAEU,UAAU,IAAI,IAAI","ignoreList":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { getLinkKeyFromTag } from "../../../stores/bounds/helpers/link-pairs.helpers";
|
|
3
4
|
const SOURCE_SIGNAL_PREFIX = "source|";
|
|
4
5
|
export const getInitialSourceCaptureSignal = params => {
|
|
5
6
|
"worklet";
|
|
@@ -15,8 +16,9 @@ export const getInitialSourceCaptureSignal = params => {
|
|
|
15
16
|
return null;
|
|
16
17
|
}
|
|
17
18
|
const pair = linkState?.[sourcePairKey];
|
|
18
|
-
const
|
|
19
|
-
const
|
|
19
|
+
const linkKey = getLinkKeyFromTag(linkId);
|
|
20
|
+
const link = pair?.links?.[linkKey];
|
|
21
|
+
const hasSourceRequest = pair?.sourceRequests?.[linkKey];
|
|
20
22
|
if (!link?.destination && !hasSourceRequest || link?.source) {
|
|
21
23
|
return null;
|
|
22
24
|
}
|
|
@@ -25,11 +27,11 @@ export const getInitialSourceCaptureSignal = params => {
|
|
|
25
27
|
|
|
26
28
|
// Passive grouped sources should not measure every mounted item. Once a
|
|
27
29
|
// group has an active id, only that concrete member can auto-capture.
|
|
28
|
-
if (activeId && activeId !==
|
|
30
|
+
if (activeId && activeId !== linkKey) {
|
|
29
31
|
return null;
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
|
-
const signalParts = group ? [group,
|
|
34
|
+
const signalParts = group ? [group, linkKey] : [linkKey];
|
|
33
35
|
return {
|
|
34
36
|
pairKey: sourcePairKey,
|
|
35
37
|
signal: `${SOURCE_SIGNAL_PREFIX}${sourcePairKey}|${signalParts.join("|")}`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SOURCE_SIGNAL_PREFIX","getInitialSourceCaptureSignal","params","enabled","sourcePairKey","linkId","group","linkState","pair","link","links","hasSourceRequest","sourceRequests","destination","source","activeId","groups","signalParts","pairKey","signal","join"],"sourceRoot":"../../../../../src","sources":["components/boundary/utils/source-signals.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["getLinkKeyFromTag","SOURCE_SIGNAL_PREFIX","getInitialSourceCaptureSignal","params","enabled","sourcePairKey","linkId","group","linkState","pair","linkKey","link","links","hasSourceRequest","sourceRequests","destination","source","activeId","groups","signalParts","pairKey","signal","join"],"sourceRoot":"../../../../../src","sources":["components/boundary/utils/source-signals.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAAQ,mDAAmD;AAMrF,MAAMC,oBAAoB,GAAG,SAAS;AAOtC,OAAO,MAAMC,6BAA6B,GAAIC,MAM7C,IAAiC;EACjC,SAAS;;EACT,MAAM;IAAEC,OAAO;IAAEC,aAAa;IAAEC,MAAM;IAAEC,KAAK;IAAEC;EAAU,CAAC,GAAGL,MAAM;EAEnE,IAAI,CAACC,OAAO,IAAI,CAACC,aAAa,EAAE;IAC/B,OAAO,IAAI;EACZ;EAEA,MAAMI,IAAI,GAAGD,SAAS,GAAGH,aAAa,CAAC;EACvC,MAAMK,OAAO,GAAGV,iBAAiB,CAACM,MAAM,CAAC;EACzC,MAAMK,IAAI,GAAGF,IAAI,EAAEG,KAAK,GAAGF,OAAO,CAAC;EACnC,MAAMG,gBAAgB,GAAGJ,IAAI,EAAEK,cAAc,GAAGJ,OAAO,CAAC;EAExD,IAAK,CAACC,IAAI,EAAEI,WAAW,IAAI,CAACF,gBAAgB,IAAKF,IAAI,EAAEK,MAAM,EAAE;IAC9D,OAAO,IAAI;EACZ;EAEA,IAAIT,KAAK,EAAE;IACV,MAAMU,QAAQ,GAAGT,SAAS,GAAGH,aAAa,CAAC,EAAEa,MAAM,GAAGX,KAAK,CAAC,EAAEU,QAAQ;;IAEtE;IACA;IACA,IAAIA,QAAQ,IAAIA,QAAQ,KAAKP,OAAO,EAAE;MACrC,OAAO,IAAI;IACZ;EACD;EAEA,MAAMS,WAAW,GAAGZ,KAAK,GAAG,CAACA,KAAK,EAAEG,OAAO,CAAC,GAAG,CAACA,OAAO,CAAC;EAExD,OAAO;IACNU,OAAO,EAAEf,aAAa;IACtBgB,MAAM,EAAE,GAAGpB,oBAAoB,GAAGI,aAAa,IAAIc,WAAW,CAACG,IAAI,CAAC,GAAG,CAAC;EACzE,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,26 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { isOverlayVisible } from "../../../utils/overlay/visibility";
|
|
4
|
-
const resolveOverlayActivity = (scene, distanceFromTop) => {
|
|
5
|
-
if (distanceFromTop === 0 && scene.activity === "closing") {
|
|
6
|
-
return "closing";
|
|
7
|
-
}
|
|
8
|
-
if (distanceFromTop === 0) {
|
|
9
|
-
return "active";
|
|
10
|
-
}
|
|
11
|
-
if (distanceFromTop === 1) {
|
|
12
|
-
return "inert";
|
|
13
|
-
}
|
|
14
|
-
return "inactive";
|
|
15
|
-
};
|
|
16
|
-
|
|
17
4
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* The newest checkpoint owns the active overlay. Its immediate predecessor
|
|
21
|
-
* remains visible and inert; all older checkpoints are retained but inactive.
|
|
22
|
-
* This mirrors the screen activity window without making plain screens create
|
|
23
|
-
* a new overlay checkpoint.
|
|
5
|
+
* Overlay ordering and transition coordination are library-owned. Visibility,
|
|
6
|
+
* interaction, and presentation are user-owned.
|
|
24
7
|
*/
|
|
25
8
|
export function getFloatOverlayStack(scenes, transitionsAlwaysOn) {
|
|
26
9
|
const candidates = [];
|
|
@@ -37,11 +20,7 @@ export function getFloatOverlayStack(scenes, transitionsAlwaysOn) {
|
|
|
37
20
|
});
|
|
38
21
|
}
|
|
39
22
|
}
|
|
40
|
-
|
|
41
|
-
return candidates.map((candidate, index) => ({
|
|
42
|
-
...candidate,
|
|
43
|
-
activity: resolveOverlayActivity(candidate.scene, topIndex - index)
|
|
44
|
-
}));
|
|
23
|
+
return candidates;
|
|
45
24
|
}
|
|
46
25
|
export function getFloatOverlayTransitions(overlayStack, scenes) {
|
|
47
26
|
const topScene = scenes[scenes.length - 1];
|