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
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { memo, useLayoutEffect, useRef } from "react";
|
|
2
|
-
import {
|
|
3
|
-
type StyleProp,
|
|
4
|
-
StyleSheet,
|
|
5
|
-
useWindowDimensions,
|
|
6
|
-
View,
|
|
7
|
-
type ViewStyle,
|
|
8
|
-
} from "react-native";
|
|
9
|
-
import Animated from "react-native-reanimated";
|
|
10
|
-
import { useBuilderStore } from "../../../../../../providers/screen/builder";
|
|
11
|
-
import { PORTAL_POINTER_EVENTS } from "../../../teleport";
|
|
12
|
-
import { useHostMeasurement } from "../hooks/use-host-measurement";
|
|
13
|
-
import { registerHost, unregisterHost } from "../stores/host-registry.store";
|
|
14
|
-
import { useActivePortalBoundaryHosts } from "../stores/portal-boundary-host.store";
|
|
15
|
-
import { PortalBoundaryHost } from "./portal-boundary-host";
|
|
16
|
-
|
|
17
|
-
let nextHostId = 0;
|
|
18
|
-
|
|
19
|
-
export type PublicHostProps = {
|
|
20
|
-
style?: StyleProp<ViewStyle>;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
type HostImplProps = PublicHostProps & {
|
|
24
|
-
fallback?: boolean;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
function HostImpl({ fallback = false, style }: HostImplProps) {
|
|
28
|
-
const screenKey = useBuilderStore((s) => s.derivations.currentScreenKey);
|
|
29
|
-
const generatedHostKeyRef = useRef<string | null>(null);
|
|
30
|
-
|
|
31
|
-
if (generatedHostKeyRef.current === null) {
|
|
32
|
-
generatedHostKeyRef.current = `${screenKey}-host-${nextHostId++}`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const hostKey = fallback ? screenKey : generatedHostKeyRef.current;
|
|
36
|
-
const activeBoundaryHosts = useActivePortalBoundaryHosts(hostKey);
|
|
37
|
-
|
|
38
|
-
const { height: viewportHeight, width: viewportWidth } =
|
|
39
|
-
useWindowDimensions();
|
|
40
|
-
|
|
41
|
-
const measurementKey = activeBoundaryHosts.length
|
|
42
|
-
? activeBoundaryHosts.map((host) => host.portalHostName).join("|")
|
|
43
|
-
: null;
|
|
44
|
-
|
|
45
|
-
const measurement = useHostMeasurement({
|
|
46
|
-
measurementKey,
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
useLayoutEffect(() => {
|
|
50
|
-
registerHost({
|
|
51
|
-
fallback,
|
|
52
|
-
hostKey,
|
|
53
|
-
screenKey,
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
return () => {
|
|
57
|
-
unregisterHost(screenKey, hostKey);
|
|
58
|
-
};
|
|
59
|
-
}, [fallback, hostKey, screenKey]);
|
|
60
|
-
|
|
61
|
-
const boundaryHosts = activeBoundaryHosts.map((host) => (
|
|
62
|
-
<View
|
|
63
|
-
key={host.portalHostName}
|
|
64
|
-
pointerEvents={PORTAL_POINTER_EVENTS}
|
|
65
|
-
style={[
|
|
66
|
-
styles.boundaryHostViewport,
|
|
67
|
-
{ width: viewportWidth, height: viewportHeight },
|
|
68
|
-
]}
|
|
69
|
-
>
|
|
70
|
-
<PortalBoundaryHost
|
|
71
|
-
host={host}
|
|
72
|
-
hostBounds={measurement.hostBounds}
|
|
73
|
-
hostMeasurementKey={measurementKey}
|
|
74
|
-
measuredHostKey={measurement.measuredKey}
|
|
75
|
-
style={StyleSheet.absoluteFill}
|
|
76
|
-
/>
|
|
77
|
-
</View>
|
|
78
|
-
));
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<Animated.View
|
|
82
|
-
ref={measurement.hostRef}
|
|
83
|
-
pointerEvents={PORTAL_POINTER_EVENTS}
|
|
84
|
-
style={[
|
|
85
|
-
styles.host,
|
|
86
|
-
{ width: viewportWidth, height: viewportHeight },
|
|
87
|
-
style,
|
|
88
|
-
]}
|
|
89
|
-
collapsable={false}
|
|
90
|
-
>
|
|
91
|
-
{boundaryHosts}
|
|
92
|
-
</Animated.View>
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export const Host = memo(function Host(props: PublicHostProps) {
|
|
97
|
-
return <HostImpl {...props} />;
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
export const ScreenFallbackHost = memo(function ScreenFallbackHost() {
|
|
101
|
-
return <HostImpl fallback />;
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
const styles = StyleSheet.create({
|
|
105
|
-
host: {
|
|
106
|
-
elevation: 999999,
|
|
107
|
-
left: 0,
|
|
108
|
-
overflow: "visible",
|
|
109
|
-
position: "absolute",
|
|
110
|
-
top: 0,
|
|
111
|
-
zIndex: 999999,
|
|
112
|
-
},
|
|
113
|
-
boundaryHostViewport: {
|
|
114
|
-
left: 0,
|
|
115
|
-
overflow: "visible",
|
|
116
|
-
position: "absolute",
|
|
117
|
-
top: 0,
|
|
118
|
-
},
|
|
119
|
-
});
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { memo } from "react";
|
|
2
|
-
import {
|
|
3
|
-
I18nManager,
|
|
4
|
-
type StyleProp,
|
|
5
|
-
StyleSheet,
|
|
6
|
-
type ViewStyle,
|
|
7
|
-
} from "react-native";
|
|
8
|
-
import Animated, {
|
|
9
|
-
type MeasuredDimensions,
|
|
10
|
-
type SharedValue,
|
|
11
|
-
useAnimatedReaction,
|
|
12
|
-
useAnimatedStyle,
|
|
13
|
-
} from "react-native-reanimated";
|
|
14
|
-
import { NO_STYLES } from "../../../../../../constants";
|
|
15
|
-
import { composeSlotStyleWithLocalTransform } from "../../../../../../providers/screen/orchestrator/styles/helpers/compose-slot-style";
|
|
16
|
-
import { NativePortalHost, PORTAL_POINTER_EVENTS } from "../../../teleport";
|
|
17
|
-
import { resolveBoundaryLocalMeasurement } from "../helpers/local-measurement";
|
|
18
|
-
import { resolvePortalOffsetStyle } from "../helpers/offset-style";
|
|
19
|
-
import type { ActivePortalBoundaryHost } from "../stores/portal-boundary-host.store";
|
|
20
|
-
|
|
21
|
-
const AnimatedPortalBoundaryHost = NativePortalHost
|
|
22
|
-
? Animated.createAnimatedComponent(NativePortalHost)
|
|
23
|
-
: null;
|
|
24
|
-
|
|
25
|
-
const getCurrentBoundaryBounds = (host: ActivePortalBoundaryHost) => {
|
|
26
|
-
"worklet";
|
|
27
|
-
return resolveBoundaryLocalMeasurement(
|
|
28
|
-
host.localMeasurement.get(),
|
|
29
|
-
host.pairKey,
|
|
30
|
-
);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
type PortalBoundaryHostProps = {
|
|
34
|
-
host: ActivePortalBoundaryHost;
|
|
35
|
-
hostBounds: SharedValue<MeasuredDimensions | null>;
|
|
36
|
-
hostMeasurementKey: string | null;
|
|
37
|
-
measuredHostKey: SharedValue<string | null>;
|
|
38
|
-
style?: StyleProp<ViewStyle>;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export const PortalBoundaryHost = memo(function PortalBoundaryHost({
|
|
42
|
-
host,
|
|
43
|
-
hostBounds,
|
|
44
|
-
hostMeasurementKey,
|
|
45
|
-
measuredHostKey,
|
|
46
|
-
style,
|
|
47
|
-
}: PortalBoundaryHostProps) {
|
|
48
|
-
useAnimatedReaction(
|
|
49
|
-
() => {
|
|
50
|
-
"worklet";
|
|
51
|
-
return (
|
|
52
|
-
getCurrentBoundaryBounds(host) !== null &&
|
|
53
|
-
hostBounds.get() !== null &&
|
|
54
|
-
!!hostMeasurementKey &&
|
|
55
|
-
measuredHostKey.get() === hostMeasurementKey
|
|
56
|
-
);
|
|
57
|
-
},
|
|
58
|
-
(ready) => {
|
|
59
|
-
"worklet";
|
|
60
|
-
if (ready) {
|
|
61
|
-
host.portalHostReady.set(true);
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
const hostStyle = useAnimatedStyle(() => {
|
|
67
|
-
"worklet";
|
|
68
|
-
const boundaryBounds = getCurrentBoundaryBounds(host);
|
|
69
|
-
if (!boundaryBounds) {
|
|
70
|
-
return NO_STYLES;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return resolvePortalOffsetStyle({
|
|
74
|
-
bounds: boundaryBounds,
|
|
75
|
-
hostBounds: hostBounds.get(),
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
const contentFrameStyle = useAnimatedStyle(() => {
|
|
80
|
-
"worklet";
|
|
81
|
-
const boundaryBounds = getCurrentBoundaryBounds(host);
|
|
82
|
-
if (!boundaryBounds) {
|
|
83
|
-
return NO_STYLES;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return {
|
|
87
|
-
height: boundaryBounds.height,
|
|
88
|
-
width: boundaryBounds.width,
|
|
89
|
-
};
|
|
90
|
-
});
|
|
91
|
-
const slotStyle = useAnimatedStyle(() => {
|
|
92
|
-
"worklet";
|
|
93
|
-
const slot = host.slotsMap.get()[host.boundaryId];
|
|
94
|
-
|
|
95
|
-
return composeSlotStyleWithLocalTransform(
|
|
96
|
-
slot?.style ?? NO_STYLES,
|
|
97
|
-
undefined,
|
|
98
|
-
slot?.boundsLocalTransform,
|
|
99
|
-
);
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
// Without `react-native-teleport` no portal ever mounts a boundary host, so
|
|
103
|
-
// this never renders - the guard just narrows the nullable animated host.
|
|
104
|
-
if (!AnimatedPortalBoundaryHost) {
|
|
105
|
-
return null;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
return (
|
|
109
|
-
<Animated.View
|
|
110
|
-
pointerEvents={PORTAL_POINTER_EVENTS}
|
|
111
|
-
style={[style, hostStyle]}
|
|
112
|
-
collapsable={false}
|
|
113
|
-
>
|
|
114
|
-
<AnimatedPortalBoundaryHost
|
|
115
|
-
name={host.portalHostName}
|
|
116
|
-
pointerEvents={PORTAL_POINTER_EVENTS}
|
|
117
|
-
style={[styles.content, contentFrameStyle, slotStyle]}
|
|
118
|
-
/>
|
|
119
|
-
</Animated.View>
|
|
120
|
-
);
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
// The teleport offset is a physical page delta measured from the screen's
|
|
124
|
-
// left edge, so the content box must anchor there too. Under native RTL,
|
|
125
|
-
// `left: 0` swaps to a right-edge anchor; `end: 0` is the physical left edge
|
|
126
|
-
// in RTL regardless of the swap setting.
|
|
127
|
-
const styles = StyleSheet.create({
|
|
128
|
-
content: I18nManager.isRTL
|
|
129
|
-
? {
|
|
130
|
-
end: 0,
|
|
131
|
-
position: "absolute",
|
|
132
|
-
top: 0,
|
|
133
|
-
}
|
|
134
|
-
: {
|
|
135
|
-
left: 0,
|
|
136
|
-
position: "absolute",
|
|
137
|
-
top: 0,
|
|
138
|
-
},
|
|
139
|
-
});
|
package/src/components/boundary/portal/components/boundary-portal/helpers/local-measurement.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ScreenPairKey } from "../../../../../../stores/bounds/types";
|
|
2
|
-
import type { BoundaryLocalMeasurement } from "../../../../types";
|
|
3
|
-
|
|
4
|
-
export const resolveBoundaryLocalMeasurement = (
|
|
5
|
-
measurement: BoundaryLocalMeasurement | null,
|
|
6
|
-
pairKey: ScreenPairKey,
|
|
7
|
-
) => {
|
|
8
|
-
"worklet";
|
|
9
|
-
return measurement?.pairKey === pairKey ? measurement.bounds : null;
|
|
10
|
-
};
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { useCallback, useLayoutEffect, useState } from "react";
|
|
2
|
-
import { type SharedValue, useAnimatedReaction } from "react-native-reanimated";
|
|
3
|
-
import { scheduleOnRN } from "react-native-worklets";
|
|
4
|
-
import { getPairKeyForSource } from "../../../../../../stores/bounds/internals/links";
|
|
5
|
-
import type { ScreenPairKey } from "../../../../../../stores/bounds/types";
|
|
6
|
-
import type { NormalizedTransitionInterpolatedStyle } from "../../../../../../types/animation.types";
|
|
7
|
-
import type { BoundaryLocalMeasurementValue } from "../../../../types";
|
|
8
|
-
import { createBoundaryPortalHostName } from "../../../utils/naming";
|
|
9
|
-
import {
|
|
10
|
-
mountPortalBoundaryHost,
|
|
11
|
-
unmountPortalBoundaryHostByName,
|
|
12
|
-
} from "../stores/portal-boundary-host.store";
|
|
13
|
-
|
|
14
|
-
type UseActivePortalBoundaryHostParams = {
|
|
15
|
-
boundaryId: string;
|
|
16
|
-
currentScreenKey: string;
|
|
17
|
-
escapeHostKey?: string;
|
|
18
|
-
localMeasurement: BoundaryLocalMeasurementValue;
|
|
19
|
-
portalHostName: SharedValue<string | null>;
|
|
20
|
-
portalHostReady: SharedValue<boolean>;
|
|
21
|
-
slotsMap: SharedValue<NormalizedTransitionInterpolatedStyle>;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const resolveActivePortalPairKey = ({
|
|
25
|
-
pairKey,
|
|
26
|
-
measurementPairKey,
|
|
27
|
-
hasAnimatedSlot,
|
|
28
|
-
}: {
|
|
29
|
-
pairKey: ScreenPairKey | null;
|
|
30
|
-
measurementPairKey: ScreenPairKey | null | undefined;
|
|
31
|
-
hasAnimatedSlot: boolean;
|
|
32
|
-
}): ScreenPairKey | null => {
|
|
33
|
-
"worklet";
|
|
34
|
-
if (!pairKey || measurementPairKey !== pairKey || !hasAnimatedSlot) {
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return pairKey;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export const useActivePortalBoundaryHost = ({
|
|
42
|
-
boundaryId,
|
|
43
|
-
currentScreenKey,
|
|
44
|
-
escapeHostKey,
|
|
45
|
-
localMeasurement,
|
|
46
|
-
portalHostName,
|
|
47
|
-
portalHostReady,
|
|
48
|
-
slotsMap,
|
|
49
|
-
}: UseActivePortalBoundaryHostParams) => {
|
|
50
|
-
const [activePairKey, setActivePairKey] = useState<ScreenPairKey | null>(
|
|
51
|
-
null,
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
const updateActivePairKey = useCallback((pairKey: ScreenPairKey | null) => {
|
|
55
|
-
setActivePairKey(pairKey);
|
|
56
|
-
}, []);
|
|
57
|
-
|
|
58
|
-
useAnimatedReaction(
|
|
59
|
-
() => {
|
|
60
|
-
"worklet";
|
|
61
|
-
const pairKey = getPairKeyForSource(boundaryId, currentScreenKey);
|
|
62
|
-
const measurement = localMeasurement.get();
|
|
63
|
-
|
|
64
|
-
return resolveActivePortalPairKey({
|
|
65
|
-
pairKey,
|
|
66
|
-
measurementPairKey: measurement?.pairKey,
|
|
67
|
-
hasAnimatedSlot: slotsMap.get()[boundaryId] !== undefined,
|
|
68
|
-
});
|
|
69
|
-
},
|
|
70
|
-
(pairKey, previousPairKey) => {
|
|
71
|
-
"worklet";
|
|
72
|
-
if (pairKey === previousPairKey) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
scheduleOnRN(updateActivePairKey, pairKey);
|
|
77
|
-
},
|
|
78
|
-
);
|
|
79
|
-
|
|
80
|
-
useLayoutEffect(() => {
|
|
81
|
-
if (!activePairKey || !escapeHostKey) {
|
|
82
|
-
portalHostName.set(null);
|
|
83
|
-
portalHostReady.set(false);
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const nextPortalHostName = createBoundaryPortalHostName(
|
|
88
|
-
escapeHostKey,
|
|
89
|
-
boundaryId,
|
|
90
|
-
activePairKey,
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
mountPortalBoundaryHost({
|
|
94
|
-
boundaryId,
|
|
95
|
-
hostKey: escapeHostKey,
|
|
96
|
-
localMeasurement,
|
|
97
|
-
pairKey: activePairKey,
|
|
98
|
-
portalHostName: nextPortalHostName,
|
|
99
|
-
portalHostReady,
|
|
100
|
-
slotsMap,
|
|
101
|
-
});
|
|
102
|
-
portalHostName.set(nextPortalHostName);
|
|
103
|
-
|
|
104
|
-
return () => {
|
|
105
|
-
portalHostName.set(null);
|
|
106
|
-
portalHostReady.set(false);
|
|
107
|
-
unmountPortalBoundaryHostByName(nextPortalHostName);
|
|
108
|
-
};
|
|
109
|
-
}, [
|
|
110
|
-
activePairKey,
|
|
111
|
-
boundaryId,
|
|
112
|
-
escapeHostKey,
|
|
113
|
-
localMeasurement,
|
|
114
|
-
portalHostName,
|
|
115
|
-
portalHostReady,
|
|
116
|
-
slotsMap,
|
|
117
|
-
]);
|
|
118
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { useAnimatedProps, useSharedValue } from "react-native-reanimated";
|
|
2
|
-
import { useBuilderStore } from "../../../../../../providers/screen/builder";
|
|
3
|
-
import { useOrchestratorStore } from "../../../../../../providers/screen/orchestrator";
|
|
4
|
-
import { useBoundaryRootStore } from "../../../../providers/boundary-root.provider";
|
|
5
|
-
import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../utils/naming";
|
|
6
|
-
import { useActiveHostKey } from "../stores/host-registry.store";
|
|
7
|
-
import { useActivePortalBoundaryHost } from "./use-active-portal-boundary-host";
|
|
8
|
-
|
|
9
|
-
interface UseBoundaryPortalAttachmentParams {
|
|
10
|
-
boundaryId: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const useBoundaryPortalAttachment = ({
|
|
14
|
-
boundaryId,
|
|
15
|
-
}: UseBoundaryPortalAttachmentParams) => {
|
|
16
|
-
const localMeasurement = useBoundaryRootStore((root) => {
|
|
17
|
-
if (!root) {
|
|
18
|
-
throw new Error("Boundary portal attachment requires a boundary root.");
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return root.localMeasurement;
|
|
22
|
-
});
|
|
23
|
-
const currentScreenKey = useBuilderStore(
|
|
24
|
-
(s) => s.derivations.currentScreenKey,
|
|
25
|
-
);
|
|
26
|
-
const slotsMap = useOrchestratorStore((store) => store.slotsMap);
|
|
27
|
-
const portalHostName = useSharedValue<string | null>(null);
|
|
28
|
-
const portalHostReady = useSharedValue(false);
|
|
29
|
-
const escapeHostKey = useActiveHostKey(currentScreenKey);
|
|
30
|
-
|
|
31
|
-
useActivePortalBoundaryHost({
|
|
32
|
-
boundaryId,
|
|
33
|
-
currentScreenKey,
|
|
34
|
-
escapeHostKey,
|
|
35
|
-
localMeasurement,
|
|
36
|
-
portalHostName,
|
|
37
|
-
portalHostReady,
|
|
38
|
-
slotsMap,
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
const teleportProps = useAnimatedProps(() => {
|
|
42
|
-
"worklet";
|
|
43
|
-
|
|
44
|
-
const slot = slotsMap.get()[boundaryId];
|
|
45
|
-
const {
|
|
46
|
-
pointerEvents: _pointerEvents,
|
|
47
|
-
handoffTarget: _handoffTarget,
|
|
48
|
-
...slotProps
|
|
49
|
-
} = slot?.props ?? {};
|
|
50
|
-
|
|
51
|
-
const shouldAttach = slot !== undefined && portalHostReady.get();
|
|
52
|
-
|
|
53
|
-
const hostName = shouldAttach
|
|
54
|
-
? portalHostName.get()
|
|
55
|
-
: PORTAL_HOST_NAME_RESET_VALUE;
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
...slotProps,
|
|
59
|
-
hostName,
|
|
60
|
-
};
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
return { teleportProps };
|
|
64
|
-
};
|
package/src/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import type { View } from "react-native";
|
|
2
|
-
import {
|
|
3
|
-
cancelAnimation,
|
|
4
|
-
type MeasuredDimensions,
|
|
5
|
-
measure,
|
|
6
|
-
useAnimatedReaction,
|
|
7
|
-
useAnimatedRef,
|
|
8
|
-
useSharedValue,
|
|
9
|
-
withDelay,
|
|
10
|
-
withTiming,
|
|
11
|
-
} from "react-native-reanimated";
|
|
12
|
-
|
|
13
|
-
const HOST_MEASUREMENT_RETRY_DELAY_MS = 16;
|
|
14
|
-
|
|
15
|
-
type UseHostMeasurementParams = {
|
|
16
|
-
measurementKey: string | null;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const useHostMeasurement = ({
|
|
20
|
-
measurementKey,
|
|
21
|
-
}: UseHostMeasurementParams) => {
|
|
22
|
-
const hostRef = useAnimatedRef<View>();
|
|
23
|
-
const hostBounds = useSharedValue<MeasuredDimensions | null>(null);
|
|
24
|
-
const measuredKey = useSharedValue<string | null>(null);
|
|
25
|
-
const retryToken = useSharedValue(0);
|
|
26
|
-
|
|
27
|
-
useAnimatedReaction(
|
|
28
|
-
() => {
|
|
29
|
-
"worklet";
|
|
30
|
-
if (!measurementKey) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return [measurementKey, measuredKey.get(), retryToken.get()] as const;
|
|
35
|
-
},
|
|
36
|
-
(state) => {
|
|
37
|
-
"worklet";
|
|
38
|
-
if (!state) {
|
|
39
|
-
cancelAnimation(retryToken);
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const [requestedKey, completedKey] = state;
|
|
44
|
-
if (requestedKey === completedKey) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const measured = measure(hostRef);
|
|
49
|
-
|
|
50
|
-
if (!measured) {
|
|
51
|
-
cancelAnimation(retryToken);
|
|
52
|
-
retryToken.set(
|
|
53
|
-
withDelay(
|
|
54
|
-
HOST_MEASUREMENT_RETRY_DELAY_MS,
|
|
55
|
-
withTiming(retryToken.get() + 1, { duration: 0 }),
|
|
56
|
-
),
|
|
57
|
-
);
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
cancelAnimation(retryToken);
|
|
62
|
-
|
|
63
|
-
if (measured.width <= 0 || measured.height <= 0) {
|
|
64
|
-
cancelAnimation(retryToken);
|
|
65
|
-
retryToken.set(
|
|
66
|
-
withDelay(
|
|
67
|
-
HOST_MEASUREMENT_RETRY_DELAY_MS,
|
|
68
|
-
withTiming(retryToken.get() + 1, { duration: 0 }),
|
|
69
|
-
),
|
|
70
|
-
);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
hostBounds.set({
|
|
75
|
-
x: measured.x,
|
|
76
|
-
y: measured.y,
|
|
77
|
-
width: measured.width,
|
|
78
|
-
height: measured.height,
|
|
79
|
-
pageX: measured.pageX,
|
|
80
|
-
pageY: measured.pageY,
|
|
81
|
-
});
|
|
82
|
-
measuredKey.set(requestedKey);
|
|
83
|
-
},
|
|
84
|
-
);
|
|
85
|
-
return {
|
|
86
|
-
hostBounds,
|
|
87
|
-
hostRef,
|
|
88
|
-
measuredKey,
|
|
89
|
-
};
|
|
90
|
-
};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type ComponentProps,
|
|
3
|
-
type ComponentType,
|
|
4
|
-
memo,
|
|
5
|
-
type ReactNode,
|
|
6
|
-
} from "react";
|
|
7
|
-
import type { View } from "react-native";
|
|
8
|
-
import Animated, { type AnimatedRef } from "react-native-reanimated";
|
|
9
|
-
import { scheduleOnUI } from "react-native-worklets";
|
|
10
|
-
import { logger } from "../../../../../utils/logger";
|
|
11
|
-
import {
|
|
12
|
-
isTeleportAvailable,
|
|
13
|
-
PORTAL_POINTER_EVENTS,
|
|
14
|
-
NativePortal as TeleportPortal,
|
|
15
|
-
} from "../../teleport";
|
|
16
|
-
import { useBoundaryPortalAttachment } from "./hooks/use-boundary-portal-attachment";
|
|
17
|
-
import { usePlaceholderStyles } from "./hooks/use-placeholder-styles";
|
|
18
|
-
|
|
19
|
-
type NullableHostNamePortalProps = Omit<
|
|
20
|
-
ComponentProps<NonNullable<typeof TeleportPortal>>,
|
|
21
|
-
"hostName"
|
|
22
|
-
> & {
|
|
23
|
-
hostName?: string | null;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const AnimatedNativePortal = TeleportPortal
|
|
27
|
-
? Animated.createAnimatedComponent(
|
|
28
|
-
TeleportPortal as ComponentType<NullableHostNamePortalProps>,
|
|
29
|
-
)
|
|
30
|
-
: null;
|
|
31
|
-
const EnabledNativePortal = AnimatedNativePortal as NonNullable<
|
|
32
|
-
typeof AnimatedNativePortal
|
|
33
|
-
>;
|
|
34
|
-
|
|
35
|
-
type BoundaryPortalProps = {
|
|
36
|
-
boundaryId: string;
|
|
37
|
-
children: ReactNode;
|
|
38
|
-
enabled: boolean;
|
|
39
|
-
placeholderRef?: AnimatedRef<View>;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const BoundaryPortal = memo(function BoundaryPortal({
|
|
43
|
-
boundaryId,
|
|
44
|
-
children,
|
|
45
|
-
enabled,
|
|
46
|
-
placeholderRef,
|
|
47
|
-
}: BoundaryPortalProps) {
|
|
48
|
-
if (!enabled || !isTeleportAvailable || !AnimatedNativePortal) {
|
|
49
|
-
return children;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return (
|
|
53
|
-
<EnabledBoundaryPortal
|
|
54
|
-
boundaryId={boundaryId}
|
|
55
|
-
placeholderRef={placeholderRef}
|
|
56
|
-
>
|
|
57
|
-
{children}
|
|
58
|
-
</EnabledBoundaryPortal>
|
|
59
|
-
);
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
const EnabledBoundaryPortal = memo(function EnabledBoundaryPortal({
|
|
63
|
-
boundaryId,
|
|
64
|
-
children,
|
|
65
|
-
placeholderRef,
|
|
66
|
-
}: Omit<BoundaryPortalProps, "enabled">) {
|
|
67
|
-
if (__DEV__ && !boundaryId) {
|
|
68
|
-
logger.warnOnce(
|
|
69
|
-
"portal:missing-id",
|
|
70
|
-
"A boundary portal was rendered without an id; rendering inline.",
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const { teleportProps } = useBoundaryPortalAttachment({ boundaryId });
|
|
75
|
-
|
|
76
|
-
const { handleOnLayout, placeholderStyle } = usePlaceholderStyles();
|
|
77
|
-
|
|
78
|
-
return (
|
|
79
|
-
<Animated.View
|
|
80
|
-
ref={placeholderRef}
|
|
81
|
-
onLayout={({ nativeEvent: { layout } }) =>
|
|
82
|
-
scheduleOnUI(handleOnLayout, layout)
|
|
83
|
-
}
|
|
84
|
-
style={placeholderStyle}
|
|
85
|
-
pointerEvents={PORTAL_POINTER_EVENTS}
|
|
86
|
-
collapsable={false}
|
|
87
|
-
>
|
|
88
|
-
<EnabledNativePortal
|
|
89
|
-
animatedProps={teleportProps}
|
|
90
|
-
name={boundaryId}
|
|
91
|
-
pointerEvents={PORTAL_POINTER_EVENTS}
|
|
92
|
-
>
|
|
93
|
-
{children}
|
|
94
|
-
</EnabledNativePortal>
|
|
95
|
-
</Animated.View>
|
|
96
|
-
);
|
|
97
|
-
});
|