react-native-screen-transitions 4.1.0-beta.0 → 4.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/boundary/components/boundary-lifecycle.js +40 -8
- package/lib/commonjs/components/boundary/components/boundary-lifecycle.js.map +1 -1
- package/lib/commonjs/components/boundary/components/boundary-target.js +10 -17
- package/lib/commonjs/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/commonjs/components/boundary/create-boundary-component.js +13 -16
- package/lib/commonjs/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/commonjs/components/boundary/helpers/presentation.js +56 -0
- package/lib/commonjs/components/boundary/helpers/presentation.js.map +1 -0
- package/lib/commonjs/components/boundary/hooks/use-boundary-presentation.js +65 -0
- package/lib/commonjs/components/boundary/hooks/use-boundary-presentation.js.map +1 -0
- package/lib/commonjs/components/boundary/hooks/use-composed-boundary-style.js +43 -0
- package/lib/commonjs/components/boundary/hooks/use-composed-boundary-style.js.map +1 -0
- package/lib/commonjs/components/boundary/index.js +2 -3
- package/lib/commonjs/components/boundary/index.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/portal-host.js +39 -0
- package/lib/commonjs/components/boundary/portal/components/portal-host.js.map +1 -0
- package/lib/commonjs/components/boundary/portal/components/portal-overlay.js +170 -0
- package/lib/commonjs/components/boundary/portal/components/portal-overlay.js.map +1 -0
- package/lib/commonjs/components/boundary/portal/components/portal.js +88 -0
- package/lib/commonjs/components/boundary/portal/components/portal.js.map +1 -0
- package/lib/commonjs/components/boundary/portal/helpers/offset-style.js.map +1 -0
- package/lib/commonjs/components/boundary/portal/hooks/use-active-portal-boundary-host.js +35 -0
- package/lib/commonjs/components/boundary/portal/hooks/use-active-portal-boundary-host.js.map +1 -0
- package/lib/commonjs/components/boundary/portal/hooks/use-host-measurement.js +83 -0
- package/lib/commonjs/components/boundary/portal/hooks/use-host-measurement.js.map +1 -0
- package/lib/commonjs/components/boundary/portal/hooks/use-placeholder-styles.js.map +1 -0
- package/lib/commonjs/components/boundary/portal/hooks/use-portal-destination.js +58 -0
- package/lib/commonjs/components/boundary/portal/hooks/use-portal-destination.js.map +1 -0
- package/lib/commonjs/components/boundary/portal/index.js +0 -7
- package/lib/commonjs/components/boundary/portal/index.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/{components/boundary-portal/stores → stores}/host-registry.store.js +1 -12
- package/lib/commonjs/components/boundary/portal/stores/host-registry.store.js.map +1 -0
- package/lib/commonjs/components/boundary/portal/{components/boundary-portal/stores → stores}/portal-boundary-host.store.js +17 -17
- package/lib/commonjs/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -0
- package/lib/commonjs/components/boundary/portal/utils/naming.js +8 -1
- package/lib/commonjs/components/boundary/portal/utils/naming.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/utils/resolve-portal.js +7 -27
- package/lib/commonjs/components/boundary/portal/utils/resolve-portal.js.map +1 -1
- package/lib/commonjs/components/boundary/providers/boundary-root.provider.js +13 -7
- package/lib/commonjs/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/commonjs/components/screen/container/helpers/layer-component.js +39 -0
- package/lib/commonjs/components/screen/container/helpers/layer-component.js.map +1 -0
- package/lib/commonjs/components/screen/container/{layers/render-component.js → helpers/uses-layer-render-props.js} +1 -1
- package/lib/commonjs/components/screen/container/helpers/uses-layer-render-props.js.map +1 -0
- package/lib/commonjs/components/screen/container/layers/backdrop.js +4 -13
- package/lib/commonjs/components/screen/container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/components/screen/container/layers/clip.js +117 -0
- package/lib/commonjs/components/screen/container/layers/clip.js.map +1 -0
- package/lib/commonjs/components/screen/container/layers/content.js +17 -33
- package/lib/commonjs/components/screen/container/layers/content.js.map +1 -1
- package/lib/commonjs/components/screen/container/layers/surface.js +3 -15
- package/lib/commonjs/components/screen/container/layers/surface.js.map +1 -1
- package/lib/commonjs/components/screen/lifecycle/hooks/use-open-transition-intent.js +15 -0
- package/lib/commonjs/components/screen/lifecycle/hooks/use-open-transition-intent.js.map +1 -1
- package/lib/commonjs/constants.js +3 -1
- package/lib/commonjs/constants.js.map +1 -1
- package/lib/commonjs/hooks/navigation/use-navigation-helpers.js +16 -4
- package/lib/commonjs/hooks/navigation/use-navigation-helpers.js.map +1 -1
- package/lib/commonjs/providers/screen/motion/animation/helpers/build-screen-transition-options.js +0 -1
- package/lib/commonjs/providers/screen/motion/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/commonjs/providers/screen/motion/animation/helpers/hydrate-transition-state/index.js +3 -2
- package/lib/commonjs/providers/screen/motion/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/commonjs/providers/screen/motion/options/helpers.js +1 -3
- package/lib/commonjs/providers/screen/motion/options/helpers.js.map +1 -1
- package/lib/commonjs/providers/screen/orchestrator/helpers/use-interpolator-state.js +4 -2
- package/lib/commonjs/providers/screen/orchestrator/helpers/use-interpolator-state.js.map +1 -1
- package/lib/commonjs/providers/screen/orchestrator/helpers/use-pair-presentation.js +79 -0
- package/lib/commonjs/providers/screen/orchestrator/helpers/use-pair-presentation.js.map +1 -0
- package/lib/commonjs/providers/screen/orchestrator/orchestrator.provider.js +3 -0
- package/lib/commonjs/providers/screen/orchestrator/orchestrator.provider.js.map +1 -1
- package/lib/commonjs/providers/screen/orchestrator/styles/constants.js +1 -0
- package/lib/commonjs/providers/screen/orchestrator/styles/constants.js.map +1 -1
- package/lib/commonjs/providers/screen/orchestrator/styles/hooks/slot-resolvers.js +5 -8
- package/lib/commonjs/providers/screen/orchestrator/styles/hooks/slot-resolvers.js.map +1 -1
- package/lib/commonjs/utils/bounds/navigation/reveal/build.js +28 -61
- package/lib/commonjs/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/commonjs/utils/bounds/navigation/reveal/config.js +3 -4
- package/lib/commonjs/utils/bounds/navigation/reveal/config.js.map +1 -1
- package/lib/commonjs/utils/bounds/navigation/reveal/math.js +8 -8
- package/lib/commonjs/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/commonjs/utils/bounds/navigation/reveal/types.js +3 -1
- package/lib/commonjs/utils/bounds/navigation/reveal/types.js.map +1 -1
- package/lib/commonjs/utils/bounds/navigation/zoom/build.js +4 -6
- package/lib/commonjs/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/commonjs/utils/bounds/navigation/zoom/clip.js +64 -0
- package/lib/commonjs/utils/bounds/navigation/zoom/clip.js.map +1 -0
- package/lib/commonjs/utils/bounds/navigation/zoom/drag.js +1 -1
- package/lib/commonjs/utils/bounds/navigation/zoom/drag.js.map +1 -1
- package/lib/commonjs/utils/bounds/navigation/zoom/types.js +3 -1
- package/lib/commonjs/utils/bounds/navigation/zoom/types.js.map +1 -1
- package/lib/module/components/boundary/components/boundary-lifecycle.js +41 -9
- package/lib/module/components/boundary/components/boundary-lifecycle.js.map +1 -1
- package/lib/module/components/boundary/components/boundary-target.js +10 -17
- package/lib/module/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/module/components/boundary/create-boundary-component.js +13 -16
- package/lib/module/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/module/components/boundary/helpers/presentation.js +50 -0
- package/lib/module/components/boundary/helpers/presentation.js.map +1 -0
- package/lib/module/components/boundary/hooks/use-boundary-presentation.js +62 -0
- package/lib/module/components/boundary/hooks/use-boundary-presentation.js.map +1 -0
- package/lib/module/components/boundary/hooks/use-composed-boundary-style.js +39 -0
- package/lib/module/components/boundary/hooks/use-composed-boundary-style.js.map +1 -0
- package/lib/module/components/boundary/index.js +2 -3
- package/lib/module/components/boundary/index.js.map +1 -1
- package/lib/module/components/boundary/portal/components/portal-host.js +34 -0
- package/lib/module/components/boundary/portal/components/portal-host.js.map +1 -0
- package/lib/module/components/boundary/portal/components/portal-overlay.js +165 -0
- package/lib/module/components/boundary/portal/components/portal-overlay.js.map +1 -0
- package/lib/module/components/boundary/portal/components/portal.js +83 -0
- package/lib/module/components/boundary/portal/components/portal.js.map +1 -0
- package/lib/module/components/boundary/portal/helpers/offset-style.js.map +1 -0
- package/lib/module/components/boundary/portal/hooks/use-active-portal-boundary-host.js +31 -0
- package/lib/module/components/boundary/portal/hooks/use-active-portal-boundary-host.js.map +1 -0
- package/lib/module/components/boundary/portal/hooks/use-host-measurement.js +78 -0
- package/lib/module/components/boundary/portal/hooks/use-host-measurement.js.map +1 -0
- package/lib/module/components/boundary/portal/hooks/use-placeholder-styles.js.map +1 -0
- package/lib/module/components/boundary/portal/hooks/use-portal-destination.js +54 -0
- package/lib/module/components/boundary/portal/hooks/use-portal-destination.js.map +1 -0
- package/lib/module/components/boundary/portal/index.js +0 -1
- package/lib/module/components/boundary/portal/index.js.map +1 -1
- package/lib/module/components/boundary/portal/{components/boundary-portal/stores → stores}/host-registry.store.js +1 -12
- package/lib/module/components/boundary/portal/stores/host-registry.store.js.map +1 -0
- package/lib/module/components/boundary/portal/{components/boundary-portal/stores → stores}/portal-boundary-host.store.js +17 -17
- package/lib/module/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -0
- package/lib/module/components/boundary/portal/utils/naming.js +6 -0
- package/lib/module/components/boundary/portal/utils/naming.js.map +1 -1
- package/lib/module/components/boundary/portal/utils/resolve-portal.js +7 -27
- package/lib/module/components/boundary/portal/utils/resolve-portal.js.map +1 -1
- package/lib/module/components/boundary/providers/boundary-root.provider.js +13 -7
- package/lib/module/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/module/components/screen/container/helpers/layer-component.js +35 -0
- package/lib/module/components/screen/container/helpers/layer-component.js.map +1 -0
- package/lib/module/components/screen/container/{layers/render-component.js → helpers/uses-layer-render-props.js} +1 -1
- package/lib/module/components/screen/container/helpers/uses-layer-render-props.js.map +1 -0
- package/lib/module/components/screen/container/layers/backdrop.js +5 -13
- package/lib/module/components/screen/container/layers/backdrop.js.map +1 -1
- package/lib/module/components/screen/container/layers/clip.js +112 -0
- package/lib/module/components/screen/container/layers/clip.js.map +1 -0
- package/lib/module/components/screen/container/layers/content.js +18 -33
- package/lib/module/components/screen/container/layers/content.js.map +1 -1
- package/lib/module/components/screen/container/layers/surface.js +4 -15
- package/lib/module/components/screen/container/layers/surface.js.map +1 -1
- package/lib/module/components/screen/lifecycle/hooks/use-open-transition-intent.js +17 -2
- package/lib/module/components/screen/lifecycle/hooks/use-open-transition-intent.js.map +1 -1
- package/lib/module/constants.js +3 -1
- package/lib/module/constants.js.map +1 -1
- package/lib/module/hooks/navigation/use-navigation-helpers.js +16 -4
- package/lib/module/hooks/navigation/use-navigation-helpers.js.map +1 -1
- package/lib/module/providers/screen/motion/animation/helpers/build-screen-transition-options.js +0 -1
- package/lib/module/providers/screen/motion/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/module/providers/screen/motion/animation/helpers/hydrate-transition-state/index.js +3 -2
- package/lib/module/providers/screen/motion/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/module/providers/screen/motion/options/helpers.js +1 -3
- package/lib/module/providers/screen/motion/options/helpers.js.map +1 -1
- package/lib/module/providers/screen/orchestrator/helpers/use-interpolator-state.js +6 -4
- package/lib/module/providers/screen/orchestrator/helpers/use-interpolator-state.js.map +1 -1
- package/lib/module/providers/screen/orchestrator/helpers/use-pair-presentation.js +73 -0
- package/lib/module/providers/screen/orchestrator/helpers/use-pair-presentation.js.map +1 -0
- package/lib/module/providers/screen/orchestrator/orchestrator.provider.js +3 -0
- package/lib/module/providers/screen/orchestrator/orchestrator.provider.js.map +1 -1
- package/lib/module/providers/screen/orchestrator/styles/constants.js +1 -0
- package/lib/module/providers/screen/orchestrator/styles/constants.js.map +1 -1
- package/lib/module/providers/screen/orchestrator/styles/hooks/slot-resolvers.js +5 -8
- package/lib/module/providers/screen/orchestrator/styles/hooks/slot-resolvers.js.map +1 -1
- package/lib/module/types/animation.types.js +3 -1
- package/lib/module/types/animation.types.js.map +1 -1
- package/lib/module/utils/bounds/navigation/reveal/build.js +30 -63
- package/lib/module/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/module/utils/bounds/navigation/reveal/config.js +2 -3
- package/lib/module/utils/bounds/navigation/reveal/config.js.map +1 -1
- package/lib/module/utils/bounds/navigation/reveal/math.js +7 -7
- package/lib/module/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/module/utils/bounds/navigation/reveal/types.js +1 -1
- package/lib/module/utils/bounds/navigation/reveal/types.js.map +1 -1
- package/lib/module/utils/bounds/navigation/zoom/build.js +5 -7
- package/lib/module/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/module/utils/bounds/navigation/zoom/clip.js +59 -0
- package/lib/module/utils/bounds/navigation/zoom/clip.js.map +1 -0
- package/lib/module/utils/bounds/navigation/zoom/drag.js +1 -1
- package/lib/module/utils/bounds/navigation/zoom/drag.js.map +1 -1
- package/lib/module/utils/bounds/navigation/zoom/types.js +1 -1
- package/lib/module/utils/bounds/navigation/zoom/types.js.map +1 -1
- package/lib/typescript/components/boundary/components/boundary-lifecycle.d.ts.map +1 -1
- package/lib/typescript/components/boundary/components/boundary-target.d.ts.map +1 -1
- package/lib/typescript/components/boundary/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/components/boundary/helpers/presentation.d.ts +14 -0
- package/lib/typescript/components/boundary/helpers/presentation.d.ts.map +1 -0
- package/lib/typescript/components/boundary/hooks/use-boundary-presentation.d.ts +9 -0
- package/lib/typescript/components/boundary/hooks/use-boundary-presentation.d.ts.map +1 -0
- package/lib/typescript/components/boundary/hooks/use-composed-boundary-style.d.ts +4 -0
- package/lib/typescript/components/boundary/hooks/use-composed-boundary-style.d.ts.map +1 -0
- package/lib/typescript/components/boundary/index.d.ts +3 -2
- package/lib/typescript/components/boundary/index.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/portal-host.d.ts +15 -0
- package/lib/typescript/components/boundary/portal/components/portal-host.d.ts.map +1 -0
- package/lib/typescript/components/boundary/portal/components/portal-overlay.d.ts +20 -0
- package/lib/typescript/components/boundary/portal/components/portal-overlay.d.ts.map +1 -0
- package/lib/typescript/components/boundary/portal/components/portal.d.ts +23 -0
- package/lib/typescript/components/boundary/portal/components/portal.d.ts.map +1 -0
- package/lib/typescript/components/boundary/portal/helpers/offset-style.d.ts.map +1 -0
- package/lib/typescript/components/boundary/portal/hooks/use-active-portal-boundary-host.d.ts +11 -0
- package/lib/typescript/components/boundary/portal/hooks/use-active-portal-boundary-host.d.ts.map +1 -0
- package/lib/typescript/components/boundary/portal/hooks/use-host-measurement.d.ts +13 -0
- package/lib/typescript/components/boundary/portal/hooks/use-host-measurement.d.ts.map +1 -0
- package/lib/typescript/components/boundary/portal/hooks/use-placeholder-styles.d.ts.map +1 -0
- package/lib/typescript/components/boundary/portal/hooks/use-portal-destination.d.ts +8 -0
- package/lib/typescript/components/boundary/portal/hooks/use-portal-destination.d.ts.map +1 -0
- package/lib/typescript/components/boundary/portal/index.d.ts +0 -1
- package/lib/typescript/components/boundary/portal/index.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/stores/host-registry.store.d.ts.map +1 -0
- package/lib/typescript/components/boundary/portal/{components/boundary-portal/stores → stores}/portal-boundary-host.store.d.ts +2 -3
- package/lib/typescript/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +1 -0
- package/lib/typescript/components/boundary/portal/utils/naming.d.ts +1 -0
- package/lib/typescript/components/boundary/portal/utils/naming.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/utils/resolve-portal.d.ts +2 -7
- package/lib/typescript/components/boundary/portal/utils/resolve-portal.d.ts.map +1 -1
- package/lib/typescript/components/boundary/providers/boundary-root.provider.d.ts +5 -2
- package/lib/typescript/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
- package/lib/typescript/components/screen/container/helpers/layer-component.d.ts +10 -0
- package/lib/typescript/components/screen/container/helpers/layer-component.d.ts.map +1 -0
- package/lib/typescript/components/screen/container/{layers/render-component.d.ts → helpers/uses-layer-render-props.d.ts} +1 -1
- package/lib/typescript/components/screen/container/helpers/uses-layer-render-props.d.ts.map +1 -0
- package/lib/typescript/components/screen/container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/components/screen/container/layers/clip.d.ts +7 -0
- package/lib/typescript/components/screen/container/layers/clip.d.ts.map +1 -0
- package/lib/typescript/components/screen/container/layers/content.d.ts.map +1 -1
- package/lib/typescript/components/screen/container/layers/surface.d.ts.map +1 -1
- package/lib/typescript/components/screen/lifecycle/hooks/use-open-transition-intent.d.ts.map +1 -1
- package/lib/typescript/constants.d.ts +3 -1
- package/lib/typescript/constants.d.ts.map +1 -1
- package/lib/typescript/hooks/navigation/use-navigation-helpers.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/providers/screen/motion/animation/helpers/build-screen-transition-options.d.ts.map +1 -1
- package/lib/typescript/providers/screen/motion/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
- package/lib/typescript/providers/screen/motion/options/helpers.d.ts.map +1 -1
- package/lib/typescript/providers/screen/motion/options/types.d.ts +0 -1
- package/lib/typescript/providers/screen/motion/options/types.d.ts.map +1 -1
- package/lib/typescript/providers/screen/orchestrator/helpers/use-interpolator-state.d.ts.map +1 -1
- package/lib/typescript/providers/screen/orchestrator/helpers/use-pair-presentation.d.ts +21 -0
- package/lib/typescript/providers/screen/orchestrator/helpers/use-pair-presentation.d.ts.map +1 -0
- package/lib/typescript/providers/screen/orchestrator/orchestrator.provider.d.ts +2 -0
- package/lib/typescript/providers/screen/orchestrator/orchestrator.provider.d.ts.map +1 -1
- package/lib/typescript/providers/screen/orchestrator/styles/constants.d.ts.map +1 -1
- package/lib/typescript/providers/screen/orchestrator/styles/hooks/slot-resolvers.d.ts +1 -1
- package/lib/typescript/providers/screen/orchestrator/styles/hooks/slot-resolvers.d.ts.map +1 -1
- package/lib/typescript/providers/screen/orchestrator/styles/types.d.ts +1 -1
- package/lib/typescript/providers/screen/orchestrator/styles/types.d.ts.map +1 -1
- package/lib/typescript/types/animation.types.d.ts +16 -4
- package/lib/typescript/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/types/bounds.types.d.ts +7 -15
- package/lib/typescript/types/bounds.types.d.ts.map +1 -1
- package/lib/typescript/types/index.d.ts +1 -1
- package/lib/typescript/types/index.d.ts.map +1 -1
- package/lib/typescript/types/screen.types.d.ts +1 -8
- package/lib/typescript/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/navigation/reveal/config.d.ts +2 -3
- package/lib/typescript/utils/bounds/navigation/reveal/config.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/navigation/reveal/math.d.ts +3 -3
- package/lib/typescript/utils/bounds/navigation/reveal/types.d.ts +1 -5
- package/lib/typescript/utils/bounds/navigation/reveal/types.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/navigation/zoom/{mask.d.ts → clip.d.ts} +5 -5
- package/lib/typescript/utils/bounds/navigation/zoom/clip.d.ts.map +1 -0
- package/lib/typescript/utils/bounds/navigation/zoom/drag.d.ts +1 -1
- package/lib/typescript/utils/bounds/navigation/zoom/types.d.ts +1 -5
- package/lib/typescript/utils/bounds/navigation/zoom/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/boundary/components/boundary-lifecycle.tsx +44 -8
- package/src/components/boundary/components/boundary-target.tsx +14 -36
- package/src/components/boundary/create-boundary-component.tsx +16 -17
- package/src/components/boundary/helpers/presentation.ts +88 -0
- package/src/components/boundary/hooks/use-boundary-presentation.ts +82 -0
- package/src/components/boundary/hooks/use-composed-boundary-style.ts +58 -0
- package/src/components/boundary/index.tsx +10 -5
- package/src/components/boundary/portal/components/portal-host.tsx +36 -0
- package/src/components/boundary/portal/components/portal-overlay.tsx +223 -0
- package/src/components/boundary/portal/components/portal.tsx +124 -0
- package/src/components/boundary/portal/hooks/use-active-portal-boundary-host.ts +52 -0
- package/src/components/boundary/portal/hooks/use-host-measurement.ts +101 -0
- package/src/components/boundary/portal/hooks/use-portal-destination.ts +53 -0
- package/src/components/boundary/portal/index.ts +0 -1
- package/src/components/boundary/portal/{components/boundary-portal/stores → stores}/host-registry.store.ts +1 -20
- package/src/components/boundary/portal/{components/boundary-portal/stores → stores}/portal-boundary-host.store.ts +19 -26
- package/src/components/boundary/portal/utils/naming.ts +10 -0
- package/src/components/boundary/portal/utils/resolve-portal.ts +9 -48
- package/src/components/boundary/providers/boundary-root.provider.tsx +34 -22
- package/src/components/screen/container/helpers/layer-component.tsx +38 -0
- package/src/components/screen/container/layers/backdrop.tsx +8 -31
- package/src/components/screen/container/layers/clip.tsx +124 -0
- package/src/components/screen/container/layers/content.tsx +21 -62
- package/src/components/screen/container/layers/surface.tsx +5 -23
- package/src/components/screen/lifecycle/hooks/use-open-transition-intent.ts +26 -2
- package/src/constants.ts +3 -1
- package/src/hooks/navigation/use-navigation-helpers.ts +13 -7
- package/src/index.ts +1 -0
- package/src/providers/screen/motion/animation/helpers/build-screen-transition-options.ts +0 -1
- package/src/providers/screen/motion/animation/helpers/hydrate-transition-state/index.ts +3 -2
- package/src/providers/screen/motion/options/helpers.ts +0 -6
- package/src/providers/screen/motion/options/types.ts +0 -1
- package/src/providers/screen/orchestrator/helpers/use-interpolator-state.ts +13 -8
- package/src/providers/screen/orchestrator/helpers/use-pair-presentation.ts +103 -0
- package/src/providers/screen/orchestrator/orchestrator.provider.tsx +4 -0
- package/src/providers/screen/orchestrator/styles/constants.ts +1 -0
- package/src/providers/screen/orchestrator/styles/hooks/slot-resolvers.tsx +8 -11
- package/src/providers/screen/orchestrator/styles/types.ts +1 -0
- package/src/types/animation.types.ts +35 -4
- package/src/types/bounds.types.ts +7 -15
- package/src/types/index.ts +1 -0
- package/src/types/screen.types.ts +1 -8
- package/src/utils/bounds/navigation/reveal/build.ts +46 -80
- package/src/utils/bounds/navigation/reveal/config.ts +2 -4
- package/src/utils/bounds/navigation/reveal/math.ts +9 -9
- package/src/utils/bounds/navigation/reveal/types.ts +1 -8
- package/src/utils/bounds/navigation/zoom/build.ts +16 -26
- package/src/utils/bounds/navigation/zoom/{mask.ts → clip.ts} +42 -48
- package/src/utils/bounds/navigation/zoom/drag.ts +2 -2
- package/src/utils/bounds/navigation/zoom/types.ts +1 -8
- package/lib/commonjs/components/boundary/hooks/use-boundary-measurement.js +0 -83
- package/lib/commonjs/components/boundary/hooks/use-boundary-measurement.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/components/host.js +0 -45
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/components/host.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +0 -119
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/helpers/handoff-visibility.js +0 -20
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/helpers/handoff-visibility.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js +0 -14
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +0 -136
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/index.js +0 -53
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/index.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/host.js +0 -99
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/host.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +0 -104
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +0 -13
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +0 -82
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +0 -58
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +0 -67
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/index.js +0 -68
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/index.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +0 -1
- package/lib/commonjs/components/screen/container/layers/maybe-masked-navigation-container.js +0 -83
- package/lib/commonjs/components/screen/container/layers/maybe-masked-navigation-container.js.map +0 -1
- package/lib/commonjs/components/screen/container/layers/render-component.js.map +0 -1
- package/lib/commonjs/utils/bounds/navigation/zoom/mask.js +0 -73
- package/lib/commonjs/utils/bounds/navigation/zoom/mask.js.map +0 -1
- package/lib/module/components/boundary/hooks/use-boundary-measurement.js +0 -78
- package/lib/module/components/boundary/hooks/use-boundary-measurement.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-content-portal/components/host.js +0 -40
- package/lib/module/components/boundary/portal/components/boundary-content-portal/components/host.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +0 -110
- package/lib/module/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-content-portal/helpers/handoff-visibility.js +0 -16
- package/lib/module/components/boundary/portal/components/boundary-content-portal/helpers/handoff-visibility.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js +0 -9
- package/lib/module/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +0 -131
- package/lib/module/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-content-portal/index.js +0 -42
- package/lib/module/components/boundary/portal/components/boundary-content-portal/index.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/components/host.js +0 -94
- package/lib/module/components/boundary/portal/components/boundary-portal/components/host.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +0 -99
- package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +0 -8
- package/lib/module/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +0 -76
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +0 -53
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +0 -62
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/index.js +0 -63
- package/lib/module/components/boundary/portal/components/boundary-portal/index.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +0 -1
- package/lib/module/components/screen/container/layers/maybe-masked-navigation-container.js +0 -78
- package/lib/module/components/screen/container/layers/maybe-masked-navigation-container.js.map +0 -1
- package/lib/module/components/screen/container/layers/render-component.js.map +0 -1
- package/lib/module/utils/bounds/navigation/zoom/mask.js +0 -68
- package/lib/module/utils/bounds/navigation/zoom/mask.js.map +0 -1
- package/lib/typescript/components/boundary/hooks/use-boundary-measurement.d.ts +0 -28
- package/lib/typescript/components/boundary/hooks/use-boundary-measurement.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/components/host.d.ts +0 -10
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/components/host.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts +0 -45
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/helpers/handoff-visibility.d.ts +0 -8
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/helpers/handoff-visibility.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/helpers/host-name.d.ts +0 -2
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/helpers/host-name.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts +0 -10
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/index.d.ts +0 -9
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/index.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/components/host.d.ts +0 -7
- package/lib/typescript/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts +0 -13
- package/lib/typescript/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts +0 -4
- package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts +0 -21
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts +0 -10
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts +0 -12
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/index.d.ts +0 -12
- package/lib/typescript/components/boundary/portal/components/boundary-portal/index.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +0 -1
- package/lib/typescript/components/screen/container/layers/maybe-masked-navigation-container.d.ts +0 -9
- package/lib/typescript/components/screen/container/layers/maybe-masked-navigation-container.d.ts.map +0 -1
- package/lib/typescript/components/screen/container/layers/render-component.d.ts.map +0 -1
- package/lib/typescript/utils/bounds/navigation/zoom/mask.d.ts.map +0 -1
- package/src/components/boundary/hooks/use-boundary-measurement.ts +0 -98
- package/src/components/boundary/portal/components/boundary-content-portal/components/host.tsx +0 -56
- package/src/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.ts +0 -192
- package/src/components/boundary/portal/components/boundary-content-portal/helpers/handoff-visibility.ts +0 -23
- package/src/components/boundary/portal/components/boundary-content-portal/helpers/host-name.ts +0 -9
- package/src/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +0 -252
- package/src/components/boundary/portal/components/boundary-content-portal/index.tsx +0 -81
- package/src/components/boundary/portal/components/boundary-portal/components/host.tsx +0 -119
- package/src/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +0 -139
- package/src/components/boundary/portal/components/boundary-portal/helpers/local-measurement.ts +0 -10
- package/src/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts +0 -118
- package/src/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +0 -64
- package/src/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts +0 -90
- package/src/components/boundary/portal/components/boundary-portal/index.tsx +0 -97
- package/src/components/screen/container/layers/maybe-masked-navigation-container.tsx +0 -113
- /package/lib/commonjs/components/boundary/portal/{components/boundary-portal/helpers → helpers}/offset-style.js +0 -0
- /package/lib/commonjs/components/boundary/portal/{components/boundary-portal/hooks → hooks}/use-placeholder-styles.js +0 -0
- /package/lib/module/components/boundary/portal/{components/boundary-portal/helpers → helpers}/offset-style.js +0 -0
- /package/lib/module/components/boundary/portal/{components/boundary-portal/hooks → hooks}/use-placeholder-styles.js +0 -0
- /package/lib/typescript/components/boundary/portal/{components/boundary-portal/helpers → helpers}/offset-style.d.ts +0 -0
- /package/lib/typescript/components/boundary/portal/{components/boundary-portal/hooks → hooks}/use-placeholder-styles.d.ts +0 -0
- /package/lib/typescript/components/boundary/portal/{components/boundary-portal/stores → stores}/host-registry.store.d.ts +0 -0
- /package/src/components/boundary/portal/{components/boundary-portal/helpers → helpers}/offset-style.ts +0 -0
- /package/src/components/boundary/portal/{components/boundary-portal/hooks → hooks}/use-placeholder-styles.ts +0 -0
- /package/src/components/screen/container/{layers/render-component.ts → helpers/uses-layer-render-props.ts} +0 -0
package/src/components/boundary/portal/components/boundary-content-portal/components/host.tsx
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { memo, type ReactNode } from "react";
|
|
2
|
-
import { StyleSheet } from "react-native";
|
|
3
|
-
import Animated from "react-native-reanimated";
|
|
4
|
-
import { NativePortalHost, PORTAL_POINTER_EVENTS } from "../../../teleport";
|
|
5
|
-
import { createBoundaryContentPortalHostName } from "../helpers/host-name";
|
|
6
|
-
|
|
7
|
-
const AnimatedPortalHost = NativePortalHost
|
|
8
|
-
? Animated.createAnimatedComponent(NativePortalHost)
|
|
9
|
-
: null;
|
|
10
|
-
|
|
11
|
-
type BoundaryContentPortalHostProps = {
|
|
12
|
-
boundaryId: string;
|
|
13
|
-
children: ReactNode;
|
|
14
|
-
enabled: boolean;
|
|
15
|
-
screenKey: string;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const BoundaryContentPortalHost = memo(
|
|
19
|
-
function BoundaryContentPortalHost({
|
|
20
|
-
boundaryId,
|
|
21
|
-
children,
|
|
22
|
-
enabled,
|
|
23
|
-
screenKey,
|
|
24
|
-
}: BoundaryContentPortalHostProps) {
|
|
25
|
-
if (!enabled || !AnimatedPortalHost) {
|
|
26
|
-
return <>{children}</>;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const portalHostName = createBoundaryContentPortalHostName(
|
|
30
|
-
screenKey,
|
|
31
|
-
boundaryId,
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<>
|
|
36
|
-
{children}
|
|
37
|
-
<AnimatedPortalHost
|
|
38
|
-
name={portalHostName}
|
|
39
|
-
pointerEvents={PORTAL_POINTER_EVENTS}
|
|
40
|
-
style={styles.host}
|
|
41
|
-
/>
|
|
42
|
-
</>
|
|
43
|
-
);
|
|
44
|
-
},
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
const styles = StyleSheet.create({
|
|
48
|
-
host: {
|
|
49
|
-
position: "absolute",
|
|
50
|
-
top: 0,
|
|
51
|
-
right: 0,
|
|
52
|
-
bottom: 0,
|
|
53
|
-
left: 0,
|
|
54
|
-
overflow: "visible",
|
|
55
|
-
},
|
|
56
|
-
});
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import type { ScreenPairKey } from "../../../../../../stores/bounds/types";
|
|
2
|
-
import type { BoundaryHandoffTarget } from "../../../../../../types/animation.types";
|
|
3
|
-
|
|
4
|
-
type ReceiverRoute = {
|
|
5
|
-
key: string;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
type ReceiverScene = {
|
|
9
|
-
activity: string;
|
|
10
|
-
route: ReceiverRoute;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
type ResolveActiveHandoffReceiverParams = {
|
|
14
|
-
focusedIndex: number;
|
|
15
|
-
routes: ReceiverRoute[];
|
|
16
|
-
scenes: ReceiverScene[];
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const resolveActiveHandoffReceiver = ({
|
|
20
|
-
focusedIndex,
|
|
21
|
-
routes,
|
|
22
|
-
scenes,
|
|
23
|
-
}: ResolveActiveHandoffReceiverParams): string | null => {
|
|
24
|
-
for (let index = scenes.length - 1; index >= 0; index--) {
|
|
25
|
-
const scene = scenes[index];
|
|
26
|
-
if (scene?.activity === "closing") {
|
|
27
|
-
return scene.route.key;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return routes[focusedIndex]?.key ?? null;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export const resolvePreviousHandoffReceiver = ({
|
|
35
|
-
focusedIndex,
|
|
36
|
-
routes,
|
|
37
|
-
scenes,
|
|
38
|
-
}: ResolveActiveHandoffReceiverParams): string | null => {
|
|
39
|
-
for (let index = scenes.length - 1; index >= 0; index--) {
|
|
40
|
-
if (scenes[index]?.activity !== "closing") {
|
|
41
|
-
continue;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
for (let previousIndex = index - 1; previousIndex >= 0; previousIndex--) {
|
|
45
|
-
const previousScene = scenes[previousIndex];
|
|
46
|
-
if (previousScene?.activity !== "closing") {
|
|
47
|
-
return previousScene?.route.key ?? null;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return routes[focusedIndex]?.key ?? null;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const resolveHandoffAttachmentCandidate = ({
|
|
56
|
-
activeReceiverClosing,
|
|
57
|
-
activeReceiverScreenKey,
|
|
58
|
-
attachedReceiverScreenKey,
|
|
59
|
-
hasActiveCloseFinished,
|
|
60
|
-
isScreenReady,
|
|
61
|
-
pairChangedDuringClose = false,
|
|
62
|
-
pairDestinationScreenKey,
|
|
63
|
-
pairHasBoundaryLink,
|
|
64
|
-
previousReceiverScreenKey,
|
|
65
|
-
}: {
|
|
66
|
-
activeReceiverClosing: boolean;
|
|
67
|
-
activeReceiverScreenKey: string | null;
|
|
68
|
-
attachedReceiverScreenKey: string;
|
|
69
|
-
hasActiveCloseFinished: boolean;
|
|
70
|
-
isScreenReady: boolean;
|
|
71
|
-
pairChangedDuringClose?: boolean;
|
|
72
|
-
pairDestinationScreenKey: string | null;
|
|
73
|
-
pairHasBoundaryLink?: boolean;
|
|
74
|
-
previousReceiverScreenKey: string | null;
|
|
75
|
-
}) => {
|
|
76
|
-
"worklet";
|
|
77
|
-
const currentPairHasBoundaryLink =
|
|
78
|
-
pairHasBoundaryLink ?? pairDestinationScreenKey !== null;
|
|
79
|
-
|
|
80
|
-
if (
|
|
81
|
-
activeReceiverClosing &&
|
|
82
|
-
attachedReceiverScreenKey !== activeReceiverScreenKey &&
|
|
83
|
-
!currentPairHasBoundaryLink
|
|
84
|
-
) {
|
|
85
|
-
return attachedReceiverScreenKey;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (
|
|
89
|
-
activeReceiverClosing &&
|
|
90
|
-
isScreenReady &&
|
|
91
|
-
pairDestinationScreenKey &&
|
|
92
|
-
pairChangedDuringClose
|
|
93
|
-
) {
|
|
94
|
-
return pairDestinationScreenKey;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (
|
|
98
|
-
activeReceiverClosing &&
|
|
99
|
-
pairChangedDuringClose &&
|
|
100
|
-
!currentPairHasBoundaryLink
|
|
101
|
-
) {
|
|
102
|
-
return hasActiveCloseFinished
|
|
103
|
-
? previousReceiverScreenKey
|
|
104
|
-
: attachedReceiverScreenKey;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (
|
|
108
|
-
hasActiveCloseFinished &&
|
|
109
|
-
attachedReceiverScreenKey === activeReceiverScreenKey
|
|
110
|
-
) {
|
|
111
|
-
return previousReceiverScreenKey;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if (hasActiveCloseFinished) {
|
|
115
|
-
return attachedReceiverScreenKey;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
if (
|
|
119
|
-
activeReceiverClosing &&
|
|
120
|
-
attachedReceiverScreenKey !== activeReceiverScreenKey &&
|
|
121
|
-
isScreenReady &&
|
|
122
|
-
pairDestinationScreenKey
|
|
123
|
-
) {
|
|
124
|
-
return pairDestinationScreenKey;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return activeReceiverScreenKey;
|
|
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
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export function canActivateHandoffReceiver({
|
|
2
|
-
returningFromActiveClose,
|
|
3
|
-
activatingPairDestination,
|
|
4
|
-
animationProgress,
|
|
5
|
-
receiverIsActiveDestination,
|
|
6
|
-
destinationIsScreenReady,
|
|
7
|
-
}: {
|
|
8
|
-
returningFromActiveClose: boolean;
|
|
9
|
-
activatingPairDestination: boolean;
|
|
10
|
-
animationProgress: number;
|
|
11
|
-
receiverIsActiveDestination: boolean;
|
|
12
|
-
destinationIsScreenReady: boolean | undefined;
|
|
13
|
-
}) {
|
|
14
|
-
"worklet";
|
|
15
|
-
// Keep the loaded source in place until its receiving screen is visible.
|
|
16
|
-
if (receiverIsActiveDestination && destinationIsScreenReady !== true)
|
|
17
|
-
return false;
|
|
18
|
-
return (
|
|
19
|
-
returningFromActiveClose ||
|
|
20
|
-
activatingPairDestination ||
|
|
21
|
-
animationProgress > 0
|
|
22
|
-
);
|
|
23
|
-
}
|
package/src/components/boundary/portal/components/boundary-content-portal/helpers/host-name.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const BOUNDARY_CONTENT_PORTAL_HOST_NAME_SUFFIX = "-content-portal-host";
|
|
2
|
-
|
|
3
|
-
export const createBoundaryContentPortalHostName = (
|
|
4
|
-
screenKey: string,
|
|
5
|
-
boundaryId: string,
|
|
6
|
-
) => {
|
|
7
|
-
"worklet";
|
|
8
|
-
return `${screenKey}-${boundaryId}${BOUNDARY_CONTENT_PORTAL_HOST_NAME_SUFFIX}`;
|
|
9
|
-
};
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import { useAnimatedProps, useSharedValue } from "react-native-reanimated";
|
|
2
|
-
import { useBuilderStore } from "../../../../../../providers/screen/builder";
|
|
3
|
-
import {
|
|
4
|
-
useMotionStore,
|
|
5
|
-
useOptionalMotionStore,
|
|
6
|
-
} from "../../../../../../providers/screen/motion";
|
|
7
|
-
import { hasCloseTransitionFinished } from "../../../../../../providers/screen/motion/helpers/transition-visual-state";
|
|
8
|
-
import { useOrchestratorStore } from "../../../../../../providers/screen/orchestrator";
|
|
9
|
-
import { useBlankStackStore } from "../../../../../../providers/stack/blank-stack.provider";
|
|
10
|
-
import { getLinkKeyFromTag } from "../../../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
11
|
-
import { getEntry } from "../../../../../../stores/bounds/internals/entries";
|
|
12
|
-
import {
|
|
13
|
-
getPairKeyForDestination,
|
|
14
|
-
getPairKeyForSource,
|
|
15
|
-
} from "../../../../../../stores/bounds/internals/links";
|
|
16
|
-
import { pairs } from "../../../../../../stores/bounds/internals/state";
|
|
17
|
-
import type {
|
|
18
|
-
LinkPairState,
|
|
19
|
-
TagLink,
|
|
20
|
-
} from "../../../../../../stores/bounds/types";
|
|
21
|
-
import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../utils/naming";
|
|
22
|
-
import {
|
|
23
|
-
resolveActiveHandoffReceiver,
|
|
24
|
-
resolveHandoffAttachmentCandidate,
|
|
25
|
-
resolvePreviousHandoffReceiver,
|
|
26
|
-
resolveRequestedHandoffPairKey,
|
|
27
|
-
resolveRequestedHandoffReceiver,
|
|
28
|
-
} from "../helpers/active-handoff-receiver";
|
|
29
|
-
import { canActivateHandoffReceiver } from "../helpers/handoff-visibility";
|
|
30
|
-
import { createBoundaryContentPortalHostName } from "../helpers/host-name";
|
|
31
|
-
|
|
32
|
-
interface UseBoundaryContentPortalAttachmentParams {
|
|
33
|
-
boundaryId: string;
|
|
34
|
-
}
|
|
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
|
-
|
|
49
|
-
export const useBoundaryContentPortalAttachment = ({
|
|
50
|
-
boundaryId,
|
|
51
|
-
}: UseBoundaryContentPortalAttachmentParams) => {
|
|
52
|
-
const slotsMap = useOrchestratorStore((store) => store.slotsMap);
|
|
53
|
-
|
|
54
|
-
const currentScreenKey = useBuilderStore(
|
|
55
|
-
(s) => s.derivations.currentScreenKey,
|
|
56
|
-
);
|
|
57
|
-
const nextScreenKey = useBuilderStore((s) => s.derivations.nextScreenKey);
|
|
58
|
-
const sourcePairKey = useBuilderStore((s) => s.derivations.sourcePairKey);
|
|
59
|
-
const destinationPairKey = useBuilderStore(
|
|
60
|
-
(s) => s.derivations.destinationPairKey,
|
|
61
|
-
);
|
|
62
|
-
const destinationIsScreenReady = useOptionalMotionStore(
|
|
63
|
-
nextScreenKey ?? currentScreenKey,
|
|
64
|
-
(store) => store.isScreenReady,
|
|
65
|
-
);
|
|
66
|
-
const unavailableIsScreenReady = useSharedValue(false);
|
|
67
|
-
const screenReadiness = destinationIsScreenReady ?? unavailableIsScreenReady;
|
|
68
|
-
|
|
69
|
-
const activeReceiverScreenKey = useBlankStackStore(
|
|
70
|
-
resolveActiveHandoffReceiver,
|
|
71
|
-
);
|
|
72
|
-
const previousReceiverScreenKey = useBlankStackStore(
|
|
73
|
-
resolvePreviousHandoffReceiver,
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
const localAnimationProgress = useMotionStore(
|
|
77
|
-
(store) => store.state.animationProgress,
|
|
78
|
-
);
|
|
79
|
-
const receiverAnimationProgress = useOptionalMotionStore(
|
|
80
|
-
activeReceiverScreenKey ?? currentScreenKey,
|
|
81
|
-
(store) => store.state.animationProgress,
|
|
82
|
-
);
|
|
83
|
-
const activeReceiverAnimationProgress =
|
|
84
|
-
receiverAnimationProgress ?? localAnimationProgress;
|
|
85
|
-
|
|
86
|
-
const activeReceiverClosing = useOptionalMotionStore(
|
|
87
|
-
activeReceiverScreenKey ?? currentScreenKey,
|
|
88
|
-
(store) => store.state.closing,
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
const activeReceiverIsScreenReady = useOptionalMotionStore(
|
|
92
|
-
activeReceiverScreenKey ?? currentScreenKey,
|
|
93
|
-
(store) => store.isScreenReady,
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
const attachedReceiverScreenKey = useSharedValue(currentScreenKey);
|
|
97
|
-
const sourcePairBeforeClose = useSharedValue<string | null>(null);
|
|
98
|
-
|
|
99
|
-
const teleportProps = useAnimatedProps(() => {
|
|
100
|
-
"worklet";
|
|
101
|
-
|
|
102
|
-
const slot = slotsMap.get()[boundaryId];
|
|
103
|
-
const {
|
|
104
|
-
pointerEvents: _pointerEvents,
|
|
105
|
-
handoffTarget,
|
|
106
|
-
...slotProps
|
|
107
|
-
} = slot?.props ?? {};
|
|
108
|
-
const closing = activeReceiverClosing?.get() ?? 0;
|
|
109
|
-
const animationProgress = activeReceiverAnimationProgress.get();
|
|
110
|
-
|
|
111
|
-
if (!closing) {
|
|
112
|
-
sourcePairBeforeClose.set(sourcePairKey ?? null);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
const pairChangedDuringClose =
|
|
116
|
-
!!closing &&
|
|
117
|
-
!!sourcePairKey &&
|
|
118
|
-
sourcePairKey !== sourcePairBeforeClose.get();
|
|
119
|
-
|
|
120
|
-
const hasActiveCloseFinished = hasCloseTransitionFinished({
|
|
121
|
-
closing,
|
|
122
|
-
animationProgress,
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
const automaticPair = sourcePairKey ? pairs.get()[sourcePairKey] : null;
|
|
126
|
-
const boundaryLinkKey = getLinkKeyFromTag(boundaryId);
|
|
127
|
-
const automaticLink = automaticPair?.links[boundaryLinkKey];
|
|
128
|
-
const requestedSourcePairKey =
|
|
129
|
-
getPairKeyForSource(boundaryId, currentScreenKey) ?? sourcePairKey;
|
|
130
|
-
const requestedSourcePair = requestedSourcePairKey
|
|
131
|
-
? pairs.get()[requestedSourcePairKey]
|
|
132
|
-
: null;
|
|
133
|
-
const requestedSourceLink = requestedSourcePair?.links[boundaryLinkKey];
|
|
134
|
-
|
|
135
|
-
const pairDestination =
|
|
136
|
-
automaticLink?.status === "complete" &&
|
|
137
|
-
(!automaticLink.group ||
|
|
138
|
-
automaticPair?.groups[automaticLink.group]?.activeId ===
|
|
139
|
-
boundaryLinkKey)
|
|
140
|
-
? automaticLink.destination.screenKey
|
|
141
|
-
: null;
|
|
142
|
-
const requestedDestinationPairKey =
|
|
143
|
-
getPairKeyForDestination(boundaryId, currentScreenKey) ??
|
|
144
|
-
destinationPairKey;
|
|
145
|
-
const destinationPair = requestedDestinationPairKey
|
|
146
|
-
? pairs.get()[requestedDestinationPairKey]
|
|
147
|
-
: null;
|
|
148
|
-
const destinationLink = destinationPair?.links[boundaryLinkKey];
|
|
149
|
-
const retainedSourcePairKey = sourcePairBeforeClose.get() ?? undefined;
|
|
150
|
-
const retainedSourcePair = retainedSourcePairKey
|
|
151
|
-
? pairs.get()[retainedSourcePairKey]
|
|
152
|
-
: null;
|
|
153
|
-
const retainedSourceLink = retainedSourcePair?.links[boundaryLinkKey];
|
|
154
|
-
const requestedPairKey = resolveRequestedHandoffPairKey({
|
|
155
|
-
destinationPairHasCompleteLink: isCompleteActiveLink(
|
|
156
|
-
destinationPair,
|
|
157
|
-
destinationLink,
|
|
158
|
-
boundaryLinkKey,
|
|
159
|
-
),
|
|
160
|
-
destinationPairKey: requestedDestinationPairKey,
|
|
161
|
-
handoffTarget,
|
|
162
|
-
retainedSourcePairHasCompleteLink: isCompleteActiveLink(
|
|
163
|
-
retainedSourcePair,
|
|
164
|
-
retainedSourceLink,
|
|
165
|
-
boundaryLinkKey,
|
|
166
|
-
),
|
|
167
|
-
retainedSourcePairKey,
|
|
168
|
-
sourcePairHasCompleteLink: isCompleteActiveLink(
|
|
169
|
-
requestedSourcePair,
|
|
170
|
-
requestedSourceLink,
|
|
171
|
-
boundaryLinkKey,
|
|
172
|
-
),
|
|
173
|
-
sourcePairKey: requestedSourcePairKey,
|
|
174
|
-
});
|
|
175
|
-
const requestedPair = requestedPairKey
|
|
176
|
-
? pairs.get()[requestedPairKey]
|
|
177
|
-
: null;
|
|
178
|
-
const requestedLink = requestedPair?.links[boundaryLinkKey];
|
|
179
|
-
|
|
180
|
-
const isScreenReady = screenReadiness.get();
|
|
181
|
-
const attachedScreenKey = attachedReceiverScreenKey.get();
|
|
182
|
-
|
|
183
|
-
const automaticReceiverScreenKey = resolveHandoffAttachmentCandidate({
|
|
184
|
-
activeReceiverClosing: !!closing,
|
|
185
|
-
activeReceiverScreenKey,
|
|
186
|
-
attachedReceiverScreenKey: attachedScreenKey,
|
|
187
|
-
hasActiveCloseFinished,
|
|
188
|
-
isScreenReady,
|
|
189
|
-
pairChangedDuringClose,
|
|
190
|
-
pairDestinationScreenKey: pairDestination,
|
|
191
|
-
pairHasBoundaryLink: automaticLink !== undefined,
|
|
192
|
-
previousReceiverScreenKey,
|
|
193
|
-
});
|
|
194
|
-
const requestedDestinationScreenKey =
|
|
195
|
-
requestedLink?.status === "complete"
|
|
196
|
-
? requestedLink.destination.screenKey
|
|
197
|
-
: null;
|
|
198
|
-
const nextReceiverScreenKey = resolveRequestedHandoffReceiver({
|
|
199
|
-
automaticScreenKey: automaticReceiverScreenKey,
|
|
200
|
-
destinationReady:
|
|
201
|
-
requestedDestinationScreenKey === activeReceiverScreenKey ||
|
|
202
|
-
isScreenReady,
|
|
203
|
-
destinationScreenKey: requestedDestinationScreenKey,
|
|
204
|
-
handoffTarget,
|
|
205
|
-
sourceScreenKey:
|
|
206
|
-
requestedLink?.status === "complete"
|
|
207
|
-
? requestedLink.source.screenKey
|
|
208
|
-
: null,
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
const receiverEntry = nextReceiverScreenKey
|
|
212
|
-
? getEntry(boundaryId, nextReceiverScreenKey)
|
|
213
|
-
: null;
|
|
214
|
-
|
|
215
|
-
const receiverReady = receiverEntry?.handoff === true;
|
|
216
|
-
|
|
217
|
-
const returningFromActiveClose =
|
|
218
|
-
hasActiveCloseFinished && attachedScreenKey === activeReceiverScreenKey;
|
|
219
|
-
|
|
220
|
-
const activatingPairDestination =
|
|
221
|
-
!!pairDestination &&
|
|
222
|
-
isScreenReady &&
|
|
223
|
-
nextReceiverScreenKey === pairDestination;
|
|
224
|
-
|
|
225
|
-
const canActivateReceiver = canActivateHandoffReceiver({
|
|
226
|
-
returningFromActiveClose,
|
|
227
|
-
activatingPairDestination,
|
|
228
|
-
animationProgress,
|
|
229
|
-
receiverIsActiveDestination:
|
|
230
|
-
!returningFromActiveClose &&
|
|
231
|
-
nextReceiverScreenKey === activeReceiverScreenKey,
|
|
232
|
-
destinationIsScreenReady: activeReceiverIsScreenReady?.get(),
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
if (nextReceiverScreenKey && receiverReady && canActivateReceiver) {
|
|
236
|
-
attachedReceiverScreenKey.set(nextReceiverScreenKey);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
const targetScreenKey = attachedReceiverScreenKey.get();
|
|
240
|
-
|
|
241
|
-
const targetHostName = targetScreenKey
|
|
242
|
-
? createBoundaryContentPortalHostName(targetScreenKey, boundaryId)
|
|
243
|
-
: PORTAL_HOST_NAME_RESET_VALUE;
|
|
244
|
-
|
|
245
|
-
return {
|
|
246
|
-
...slotProps,
|
|
247
|
-
hostName: targetHostName,
|
|
248
|
-
};
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
return { teleportProps };
|
|
252
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type ComponentProps,
|
|
3
|
-
type ComponentType,
|
|
4
|
-
memo,
|
|
5
|
-
type ReactNode,
|
|
6
|
-
} from "react";
|
|
7
|
-
import { StyleSheet } from "react-native";
|
|
8
|
-
import Animated from "react-native-reanimated";
|
|
9
|
-
import {
|
|
10
|
-
isTeleportAvailable,
|
|
11
|
-
NativePortal,
|
|
12
|
-
PORTAL_POINTER_EVENTS,
|
|
13
|
-
} from "../../teleport";
|
|
14
|
-
import { useBoundaryContentPortalAttachment } from "./hooks/use-boundary-content-portal-attachment";
|
|
15
|
-
|
|
16
|
-
export { BoundaryContentPortalHost } from "./components/host";
|
|
17
|
-
|
|
18
|
-
type BoundaryContentPortalProps = {
|
|
19
|
-
boundaryId?: string;
|
|
20
|
-
children: ReactNode;
|
|
21
|
-
enabled: boolean;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
type NullableHostNamePortalProps = Omit<
|
|
25
|
-
ComponentProps<NonNullable<typeof NativePortal>>,
|
|
26
|
-
"hostName"
|
|
27
|
-
> & {
|
|
28
|
-
hostName?: string | null;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const AnimatedNativePortal = NativePortal
|
|
32
|
-
? Animated.createAnimatedComponent(
|
|
33
|
-
NativePortal as ComponentType<NullableHostNamePortalProps>,
|
|
34
|
-
)
|
|
35
|
-
: null;
|
|
36
|
-
const EnabledNativePortal = AnimatedNativePortal as NonNullable<
|
|
37
|
-
typeof AnimatedNativePortal
|
|
38
|
-
>;
|
|
39
|
-
|
|
40
|
-
export const BoundaryContentPortal = memo(function BoundaryContentPortal({
|
|
41
|
-
boundaryId,
|
|
42
|
-
children,
|
|
43
|
-
enabled,
|
|
44
|
-
}: BoundaryContentPortalProps) {
|
|
45
|
-
if (
|
|
46
|
-
!enabled ||
|
|
47
|
-
boundaryId === undefined ||
|
|
48
|
-
!isTeleportAvailable ||
|
|
49
|
-
!AnimatedNativePortal
|
|
50
|
-
) {
|
|
51
|
-
return children;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<EnabledBoundaryContentPortal boundaryId={boundaryId}>
|
|
56
|
-
{children}
|
|
57
|
-
</EnabledBoundaryContentPortal>
|
|
58
|
-
);
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
const EnabledBoundaryContentPortal = memo(
|
|
62
|
-
function EnabledBoundaryContentPortal({
|
|
63
|
-
boundaryId,
|
|
64
|
-
children,
|
|
65
|
-
}: Omit<BoundaryContentPortalProps, "enabled"> & { boundaryId: string }) {
|
|
66
|
-
const { teleportProps } = useBoundaryContentPortalAttachment({
|
|
67
|
-
boundaryId,
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
return (
|
|
71
|
-
<EnabledNativePortal
|
|
72
|
-
animatedProps={teleportProps}
|
|
73
|
-
name={boundaryId}
|
|
74
|
-
pointerEvents={PORTAL_POINTER_EVENTS}
|
|
75
|
-
style={StyleSheet.absoluteFill}
|
|
76
|
-
>
|
|
77
|
-
{children}
|
|
78
|
-
</EnabledNativePortal>
|
|
79
|
-
);
|
|
80
|
-
},
|
|
81
|
-
);
|