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
|
@@ -2,7 +2,7 @@ import type { MeasuredDimensions } from "react-native-reanimated";
|
|
|
2
2
|
import { interpolate } from "react-native-reanimated";
|
|
3
3
|
import type {
|
|
4
4
|
ScreenTransitionState,
|
|
5
|
-
|
|
5
|
+
TransitionClip,
|
|
6
6
|
} from "../../../../types/animation.types";
|
|
7
7
|
import type {
|
|
8
8
|
BoundsLink,
|
|
@@ -11,18 +11,18 @@ import type {
|
|
|
11
11
|
import type { Layout } from "../../../../types/screen.types";
|
|
12
12
|
import type { BoundsAnchor } from "../../types/options";
|
|
13
13
|
import { toNumber } from "../helpers";
|
|
14
|
-
import {
|
|
14
|
+
import { DRAG_CLIP_HEIGHT_COLLAPSE_END } from "../reveal/config";
|
|
15
15
|
import {
|
|
16
16
|
interpolateClamped,
|
|
17
|
-
|
|
17
|
+
resolveAspectRatioClipHeight,
|
|
18
18
|
} from "../reveal/math";
|
|
19
19
|
import { ZOOM_SHARED_OPTIONS } from "./config";
|
|
20
20
|
import type { ZoomDragState } from "./drag";
|
|
21
21
|
|
|
22
|
-
export const
|
|
23
|
-
const
|
|
22
|
+
export const ZOOM_NAVIGATION_CLIP_BORDER_RADIUS = 64;
|
|
23
|
+
const ZOOM_VERTICAL_DRAG_CLIP_COLLAPSE_SCALE = 0.8;
|
|
24
24
|
|
|
25
|
-
interface
|
|
25
|
+
interface ZoomClipProps {
|
|
26
26
|
scopedBounds: BoundsScopedAccessor;
|
|
27
27
|
link: BoundsLink;
|
|
28
28
|
sourceBounds: MeasuredDimensions;
|
|
@@ -40,7 +40,7 @@ interface ZoomNavigationMaskStyleProps {
|
|
|
40
40
|
anchor: BoundsAnchor;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
export function
|
|
43
|
+
export function resolveZoomClip({
|
|
44
44
|
scopedBounds,
|
|
45
45
|
link,
|
|
46
46
|
sourceBounds,
|
|
@@ -52,10 +52,10 @@ export function resolveZoomNavigationMaskStyle({
|
|
|
52
52
|
expandedBorderRadius,
|
|
53
53
|
active,
|
|
54
54
|
anchor,
|
|
55
|
-
}:
|
|
55
|
+
}: ZoomClipProps): TransitionClip {
|
|
56
56
|
"worklet";
|
|
57
57
|
|
|
58
|
-
const
|
|
58
|
+
const clipRaw = scopedBounds.values({
|
|
59
59
|
scaleMode: ZOOM_SHARED_OPTIONS.scaleMode,
|
|
60
60
|
anchor,
|
|
61
61
|
method: "size",
|
|
@@ -63,46 +63,44 @@ export function resolveZoomNavigationMaskStyle({
|
|
|
63
63
|
target: "fullscreen",
|
|
64
64
|
progress: transitionProgress,
|
|
65
65
|
});
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
targetWidth:
|
|
73
|
-
targetHeight:
|
|
66
|
+
const clipWidth = clipRaw.width;
|
|
67
|
+
const clipHeight = clipRaw.height;
|
|
68
|
+
const clipAspectBounds = link.initialSource?.bounds ?? sourceBounds;
|
|
69
|
+
const minClipHeight = resolveAspectRatioClipHeight({
|
|
70
|
+
clipWidth,
|
|
71
|
+
clipHeight,
|
|
72
|
+
targetWidth: clipAspectBounds.width,
|
|
73
|
+
targetHeight: clipAspectBounds.height,
|
|
74
74
|
});
|
|
75
|
-
const
|
|
75
|
+
const clipHeightCollapseDrag = drag.collapsesClip
|
|
76
76
|
? Math.max(
|
|
77
77
|
0,
|
|
78
|
-
drag.dismissNorm *
|
|
78
|
+
drag.dismissNorm * ZOOM_VERTICAL_DRAG_CLIP_COLLAPSE_SCALE,
|
|
79
79
|
drag.dismissProgress,
|
|
80
80
|
)
|
|
81
81
|
: 0;
|
|
82
|
-
const
|
|
83
|
-
|
|
82
|
+
const renderedClipHeight = interpolateClamped(
|
|
83
|
+
clipHeightCollapseDrag,
|
|
84
84
|
0,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
DRAG_CLIP_HEIGHT_COLLAPSE_END,
|
|
86
|
+
clipHeight,
|
|
87
|
+
minClipHeight,
|
|
88
88
|
);
|
|
89
|
-
const maskCenterX = maskWidth / 2;
|
|
90
|
-
const maskCenterY = renderedMaskHeight / 2;
|
|
91
89
|
const contentCenterX = screenLayout.width / 2;
|
|
92
90
|
const contentCenterY = screenLayout.height / 2;
|
|
93
|
-
const
|
|
94
|
-
?
|
|
91
|
+
const clipOriginOffsetY = drag.isVerticalInverted
|
|
92
|
+
? clipHeight - renderedClipHeight
|
|
95
93
|
: 0;
|
|
96
|
-
const
|
|
97
|
-
(
|
|
98
|
-
contentTransform.translateX
|
|
99
|
-
(1 - contentTransform.scale) *
|
|
94
|
+
const compensatedClipTranslateX =
|
|
95
|
+
(clipRaw.translateX -
|
|
96
|
+
contentTransform.translateX -
|
|
97
|
+
(1 - contentTransform.scale) * contentCenterX) /
|
|
100
98
|
contentTransform.scale;
|
|
101
|
-
const
|
|
102
|
-
(
|
|
99
|
+
const compensatedClipTranslateY =
|
|
100
|
+
(clipRaw.translateY -
|
|
103
101
|
contentTransform.translateY +
|
|
104
|
-
|
|
105
|
-
(1 - contentTransform.scale) *
|
|
102
|
+
clipOriginOffsetY -
|
|
103
|
+
(1 - contentTransform.scale) * contentCenterY) /
|
|
106
104
|
contentTransform.scale;
|
|
107
105
|
const initialSourceBorderRadius = toNumber(
|
|
108
106
|
link.initialSource?.styles.borderRadius,
|
|
@@ -110,10 +108,12 @@ export function resolveZoomNavigationMaskStyle({
|
|
|
110
108
|
);
|
|
111
109
|
|
|
112
110
|
return {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
111
|
+
x: compensatedClipTranslateX,
|
|
112
|
+
y: compensatedClipTranslateY,
|
|
113
|
+
width: clipWidth / contentTransform.scale,
|
|
114
|
+
height: renderedClipHeight / contentTransform.scale,
|
|
115
|
+
borderRadius:
|
|
116
|
+
interpolate(
|
|
117
117
|
transitionProgress,
|
|
118
118
|
[0, 1],
|
|
119
119
|
[
|
|
@@ -121,13 +121,7 @@ export function resolveZoomNavigationMaskStyle({
|
|
|
121
121
|
active.animating ? expandedBorderRadius : 0,
|
|
122
122
|
],
|
|
123
123
|
"clamp",
|
|
124
|
-
),
|
|
125
|
-
|
|
126
|
-
transform: [
|
|
127
|
-
{ translateX: compensatedMaskTranslateX },
|
|
128
|
-
{ translateY: compensatedMaskTranslateY },
|
|
129
|
-
{ scale: 1 / contentTransform.scale },
|
|
130
|
-
],
|
|
131
|
-
},
|
|
124
|
+
) / contentTransform.scale,
|
|
125
|
+
borderCurve: "continuous",
|
|
132
126
|
};
|
|
133
127
|
}
|
|
@@ -20,7 +20,7 @@ const ZOOM_PINCH_VELOCITY_DEPTH_MULTIPLIER = 2;
|
|
|
20
20
|
type ZoomGesture = BoundsInterpolationProps["active"]["gesture"];
|
|
21
21
|
|
|
22
22
|
export type ZoomDragState = {
|
|
23
|
-
|
|
23
|
+
collapsesClip: boolean;
|
|
24
24
|
dismissContentScale: number;
|
|
25
25
|
dismissNorm: number;
|
|
26
26
|
dismissProgress: number;
|
|
@@ -274,7 +274,7 @@ export function resolveZoomDragState({
|
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
return {
|
|
277
|
-
|
|
277
|
+
collapsesClip: isVertical,
|
|
278
278
|
dismissContentScale,
|
|
279
279
|
dismissNorm,
|
|
280
280
|
dismissProgress: isDismissing ? 1 - activeTransitionProgress : 0,
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
NAVIGATION_MASK_CONTAINER_STYLE_ID,
|
|
3
|
-
NAVIGATION_MASK_ELEMENT_STYLE_ID,
|
|
4
|
-
} from "../../../../constants";
|
|
5
1
|
import type {
|
|
6
2
|
BoundsInterpolationProps,
|
|
7
3
|
BoundsNavigationZoomOptions,
|
|
8
4
|
BoundsNavigationZoomStyle,
|
|
9
5
|
} from "../../../../types/bounds.types";
|
|
10
6
|
|
|
11
|
-
export type ZoomInterpolatedStyle = BoundsNavigationZoomStyle
|
|
12
|
-
[NAVIGATION_MASK_CONTAINER_STYLE_ID]?: BoundsNavigationZoomStyle[typeof NAVIGATION_MASK_CONTAINER_STYLE_ID];
|
|
13
|
-
[NAVIGATION_MASK_ELEMENT_STYLE_ID]?: BoundsNavigationZoomStyle[typeof NAVIGATION_MASK_ELEMENT_STYLE_ID];
|
|
14
|
-
};
|
|
7
|
+
export type ZoomInterpolatedStyle = BoundsNavigationZoomStyle;
|
|
15
8
|
|
|
16
9
|
export type BuildZoomStylesParams = {
|
|
17
10
|
tag?: string;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useBoundaryMeasurement = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _styles = require("../../../utils/bounds/helpers/styles/styles");
|
|
9
|
-
var _useBoundaryPresence = require("./lifecycles/use-boundary-presence");
|
|
10
|
-
var _useInitialDestinationMeasurement = require("./lifecycles/use-initial-destination-measurement");
|
|
11
|
-
var _useInitialSourceMeasurement = require("./lifecycles/use-initial-source-measurement");
|
|
12
|
-
var _useRefreshBoundary = require("./lifecycles/use-refresh-boundary");
|
|
13
|
-
var _useMeasurer = require("./use-measurer");
|
|
14
|
-
/**
|
|
15
|
-
* Owns the full measurement lifecycle for a boundary: builds the measurer,
|
|
16
|
-
* registers presence, runs the initial source/destination + refresh reactions,
|
|
17
|
-
* and keeps the component itself away from the measurer.
|
|
18
|
-
*/
|
|
19
|
-
const useBoundaryMeasurement = ({
|
|
20
|
-
boundTag,
|
|
21
|
-
enabled,
|
|
22
|
-
runtimeEnabled,
|
|
23
|
-
currentScreenKey,
|
|
24
|
-
measuredRef,
|
|
25
|
-
style,
|
|
26
|
-
handoff,
|
|
27
|
-
escapeClipping,
|
|
28
|
-
localMeasurement,
|
|
29
|
-
config
|
|
30
|
-
}) => {
|
|
31
|
-
const {
|
|
32
|
-
anchor,
|
|
33
|
-
scaleMode,
|
|
34
|
-
target,
|
|
35
|
-
method
|
|
36
|
-
} = config;
|
|
37
|
-
const boundaryConfig = (0, _react.useMemo)(() => ({
|
|
38
|
-
anchor,
|
|
39
|
-
scaleMode,
|
|
40
|
-
target,
|
|
41
|
-
method
|
|
42
|
-
}), [anchor, scaleMode, target, method]);
|
|
43
|
-
const preparedStyles = (0, _react.useMemo)(() => (0, _styles.prepareStyleForBounds)(style), [style]);
|
|
44
|
-
const measureBoundary = (0, _useMeasurer.useMeasurer)({
|
|
45
|
-
enabled,
|
|
46
|
-
boundTag,
|
|
47
|
-
currentScreenKey,
|
|
48
|
-
preparedStyles,
|
|
49
|
-
measuredAnimatedRef: measuredRef,
|
|
50
|
-
handoff,
|
|
51
|
-
escapeClipping,
|
|
52
|
-
localMeasurement
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
// Presence and source capture must not depend on this screen owning an
|
|
56
|
-
// interpolator: a nested source can participate in a transition owned by a
|
|
57
|
-
// different navigator.
|
|
58
|
-
(0, _useBoundaryPresence.useBoundaryPresence)({
|
|
59
|
-
enabled,
|
|
60
|
-
boundTag,
|
|
61
|
-
currentScreenKey,
|
|
62
|
-
boundaryConfig,
|
|
63
|
-
handoff,
|
|
64
|
-
escapeClipping
|
|
65
|
-
});
|
|
66
|
-
(0, _useInitialSourceMeasurement.useInitialSourceMeasurement)({
|
|
67
|
-
enabled,
|
|
68
|
-
measureBoundary,
|
|
69
|
-
boundTag
|
|
70
|
-
});
|
|
71
|
-
(0, _useInitialDestinationMeasurement.useInitialDestinationMeasurement)({
|
|
72
|
-
boundTag,
|
|
73
|
-
enabled: runtimeEnabled,
|
|
74
|
-
measureBoundary
|
|
75
|
-
});
|
|
76
|
-
(0, _useRefreshBoundary.useRefreshBoundary)({
|
|
77
|
-
enabled: runtimeEnabled,
|
|
78
|
-
boundTag,
|
|
79
|
-
measureBoundary
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
exports.useBoundaryMeasurement = useBoundaryMeasurement;
|
|
83
|
-
//# sourceMappingURL=use-boundary-measurement.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_styles","_useBoundaryPresence","_useInitialDestinationMeasurement","_useInitialSourceMeasurement","_useRefreshBoundary","_useMeasurer","useBoundaryMeasurement","boundTag","enabled","runtimeEnabled","currentScreenKey","measuredRef","style","handoff","escapeClipping","localMeasurement","config","anchor","scaleMode","target","method","boundaryConfig","useMemo","preparedStyles","prepareStyleForBounds","measureBoundary","useMeasurer","measuredAnimatedRef","useBoundaryPresence","useInitialSourceMeasurement","useInitialDestinationMeasurement","useRefreshBoundary","exports"],"sourceRoot":"../../../../../src","sources":["components/boundary/hooks/use-boundary-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,OAAA,GAAAD,OAAA;AAKA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,iCAAA,GAAAH,OAAA;AACA,IAAAI,4BAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAmBA;AACA;AACA;AACA;AACA;AACO,MAAMO,sBAAsB,GAAGA,CAAC;EACtCC,QAAQ;EACRC,OAAO;EACPC,cAAc;EACdC,gBAAgB;EAChBC,WAAW;EACXC,KAAK;EACLC,OAAO;EACPC,cAAc;EACdC,gBAAgB;EAChBC;AAC6B,CAAC,KAAK;EACnC,MAAM;IAAEC,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGJ,MAAM;EACpD,MAAMK,cAAc,GAAG,IAAAC,cAAO,EAC7B,OAAO;IAAEL,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,CAAC,EAC7C,CAACH,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAEC,MAAM,CACnC,CAAC;EAED,MAAMG,cAAc,GAAG,IAAAD,cAAO,EAAC,MAAM,IAAAE,6BAAqB,EAACZ,KAAK,CAAC,EAAE,CAACA,KAAK,CAAC,CAAC;EAE3E,MAAMa,eAAe,GAAG,IAAAC,wBAAW,EAAC;IACnClB,OAAO;IACPD,QAAQ;IACRG,gBAAgB;IAChBa,cAAc;IACdI,mBAAmB,EAAEhB,WAAW;IAChCE,OAAO;IACPC,cAAc;IACdC;EACD,CAAC,CAAC;;EAEF;EACA;EACA;EACA,IAAAa,wCAAmB,EAAC;IACnBpB,OAAO;IACPD,QAAQ;IACRG,gBAAgB;IAChBW,cAAc;IACdR,OAAO;IACPC;EACD,CAAC,CAAC;EAEF,IAAAe,wDAA2B,EAAC;IAC3BrB,OAAO;IACPiB,eAAe;IACflB;EACD,CAAC,CAAC;EAEF,IAAAuB,kEAAgC,EAAC;IAChCvB,QAAQ;IACRC,OAAO,EAAEC,cAAc;IACvBgB;EACD,CAAC,CAAC;EAEF,IAAAM,sCAAkB,EAAC;IAClBvB,OAAO,EAAEC,cAAc;IACvBF,QAAQ;IACRkB;EACD,CAAC,CAAC;AACH,CAAC;AAACO,OAAA,CAAA1B,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.BoundaryContentPortalHost = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
|
|
10
|
-
var _teleport = require("../../../teleport");
|
|
11
|
-
var _hostName = require("../helpers/host-name");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
const AnimatedPortalHost = _teleport.NativePortalHost ? _reactNativeReanimated.default.createAnimatedComponent(_teleport.NativePortalHost) : null;
|
|
15
|
-
const BoundaryContentPortalHost = exports.BoundaryContentPortalHost = /*#__PURE__*/(0, _react.memo)(function BoundaryContentPortalHost({
|
|
16
|
-
boundaryId,
|
|
17
|
-
children,
|
|
18
|
-
enabled,
|
|
19
|
-
screenKey
|
|
20
|
-
}) {
|
|
21
|
-
if (!enabled || !AnimatedPortalHost) {
|
|
22
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
23
|
-
children: children
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
const portalHostName = (0, _hostName.createBoundaryContentPortalHostName)(screenKey, boundaryId);
|
|
27
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
28
|
-
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedPortalHost, {
|
|
29
|
-
name: portalHostName,
|
|
30
|
-
pointerEvents: _teleport.PORTAL_POINTER_EVENTS,
|
|
31
|
-
style: styles.host
|
|
32
|
-
})]
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
const styles = _reactNative.StyleSheet.create({
|
|
36
|
-
host: {
|
|
37
|
-
position: "absolute",
|
|
38
|
-
top: 0,
|
|
39
|
-
right: 0,
|
|
40
|
-
bottom: 0,
|
|
41
|
-
left: 0,
|
|
42
|
-
overflow: "visible"
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
//# sourceMappingURL=host.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_teleport","_hostName","_jsxRuntime","e","__esModule","default","AnimatedPortalHost","NativePortalHost","Animated","createAnimatedComponent","BoundaryContentPortalHost","exports","memo","boundaryId","children","enabled","screenKey","jsx","Fragment","portalHostName","createBoundaryContentPortalHostName","jsxs","name","pointerEvents","PORTAL_POINTER_EVENTS","style","styles","host","StyleSheet","create","position","top","right","bottom","left","overflow"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/components/host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAA2E,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAG,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE3E,MAAMG,kBAAkB,GAAGC,0BAAgB,GACxCC,8BAAQ,CAACC,uBAAuB,CAACF,0BAAgB,CAAC,GAClD,IAAI;AASA,MAAMG,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,gBAAG,IAAAE,WAAI,EAC5C,SAASF,yBAAyBA,CAAC;EAClCG,UAAU;EACVC,QAAQ;EACRC,OAAO;EACPC;AAC+B,CAAC,EAAE;EAClC,IAAI,CAACD,OAAO,IAAI,CAACT,kBAAkB,EAAE;IACpC,oBAAO,IAAAJ,WAAA,CAAAe,GAAA,EAAAf,WAAA,CAAAgB,QAAA;MAAAJ,QAAA,EAAGA;IAAQ,CAAG,CAAC;EACvB;EAEA,MAAMK,cAAc,GAAG,IAAAC,6CAAmC,EACzDJ,SAAS,EACTH,UACD,CAAC;EAED,oBACC,IAAAX,WAAA,CAAAmB,IAAA,EAAAnB,WAAA,CAAAgB,QAAA;IAAAJ,QAAA,GACEA,QAAQ,eACT,IAAAZ,WAAA,CAAAe,GAAA,EAACX,kBAAkB;MAClBgB,IAAI,EAAEH,cAAe;MACrBI,aAAa,EAAEC,+BAAsB;MACrCC,KAAK,EAAEC,MAAM,CAACC;IAAK,CACnB,CAAC;EAAA,CACD,CAAC;AAEL,CACD,CAAC;AAED,MAAMD,MAAM,GAAGE,uBAAU,CAACC,MAAM,CAAC;EAChCF,IAAI,EAAE;IACLG,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE;EACX;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.resolveRequestedHandoffReceiver = exports.resolveRequestedHandoffPairKey = exports.resolvePreviousHandoffReceiver = exports.resolveHandoffAttachmentCandidate = exports.resolveActiveHandoffReceiver = void 0;
|
|
7
|
-
const resolveActiveHandoffReceiver = ({
|
|
8
|
-
focusedIndex,
|
|
9
|
-
routes,
|
|
10
|
-
scenes
|
|
11
|
-
}) => {
|
|
12
|
-
for (let index = scenes.length - 1; index >= 0; index--) {
|
|
13
|
-
const scene = scenes[index];
|
|
14
|
-
if (scene?.activity === "closing") {
|
|
15
|
-
return scene.route.key;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return routes[focusedIndex]?.key ?? null;
|
|
19
|
-
};
|
|
20
|
-
exports.resolveActiveHandoffReceiver = resolveActiveHandoffReceiver;
|
|
21
|
-
const resolvePreviousHandoffReceiver = ({
|
|
22
|
-
focusedIndex,
|
|
23
|
-
routes,
|
|
24
|
-
scenes
|
|
25
|
-
}) => {
|
|
26
|
-
for (let index = scenes.length - 1; index >= 0; index--) {
|
|
27
|
-
if (scenes[index]?.activity !== "closing") {
|
|
28
|
-
continue;
|
|
29
|
-
}
|
|
30
|
-
for (let previousIndex = index - 1; previousIndex >= 0; previousIndex--) {
|
|
31
|
-
const previousScene = scenes[previousIndex];
|
|
32
|
-
if (previousScene?.activity !== "closing") {
|
|
33
|
-
return previousScene?.route.key ?? null;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return routes[focusedIndex]?.key ?? null;
|
|
38
|
-
};
|
|
39
|
-
exports.resolvePreviousHandoffReceiver = resolvePreviousHandoffReceiver;
|
|
40
|
-
const resolveHandoffAttachmentCandidate = ({
|
|
41
|
-
activeReceiverClosing,
|
|
42
|
-
activeReceiverScreenKey,
|
|
43
|
-
attachedReceiverScreenKey,
|
|
44
|
-
hasActiveCloseFinished,
|
|
45
|
-
isScreenReady,
|
|
46
|
-
pairChangedDuringClose = false,
|
|
47
|
-
pairDestinationScreenKey,
|
|
48
|
-
pairHasBoundaryLink,
|
|
49
|
-
previousReceiverScreenKey
|
|
50
|
-
}) => {
|
|
51
|
-
"worklet";
|
|
52
|
-
|
|
53
|
-
const currentPairHasBoundaryLink = pairHasBoundaryLink ?? pairDestinationScreenKey !== null;
|
|
54
|
-
if (activeReceiverClosing && attachedReceiverScreenKey !== activeReceiverScreenKey && !currentPairHasBoundaryLink) {
|
|
55
|
-
return attachedReceiverScreenKey;
|
|
56
|
-
}
|
|
57
|
-
if (activeReceiverClosing && isScreenReady && pairDestinationScreenKey && pairChangedDuringClose) {
|
|
58
|
-
return pairDestinationScreenKey;
|
|
59
|
-
}
|
|
60
|
-
if (activeReceiverClosing && pairChangedDuringClose && !currentPairHasBoundaryLink) {
|
|
61
|
-
return hasActiveCloseFinished ? previousReceiverScreenKey : attachedReceiverScreenKey;
|
|
62
|
-
}
|
|
63
|
-
if (hasActiveCloseFinished && attachedReceiverScreenKey === activeReceiverScreenKey) {
|
|
64
|
-
return previousReceiverScreenKey;
|
|
65
|
-
}
|
|
66
|
-
if (hasActiveCloseFinished) {
|
|
67
|
-
return attachedReceiverScreenKey;
|
|
68
|
-
}
|
|
69
|
-
if (activeReceiverClosing && attachedReceiverScreenKey !== activeReceiverScreenKey && isScreenReady && pairDestinationScreenKey) {
|
|
70
|
-
return pairDestinationScreenKey;
|
|
71
|
-
}
|
|
72
|
-
return activeReceiverScreenKey;
|
|
73
|
-
};
|
|
74
|
-
exports.resolveHandoffAttachmentCandidate = resolveHandoffAttachmentCandidate;
|
|
75
|
-
const resolveRequestedHandoffReceiver = ({
|
|
76
|
-
automaticScreenKey,
|
|
77
|
-
destinationReady = true,
|
|
78
|
-
destinationScreenKey,
|
|
79
|
-
handoffTarget,
|
|
80
|
-
sourceScreenKey
|
|
81
|
-
}) => {
|
|
82
|
-
"worklet";
|
|
83
|
-
|
|
84
|
-
if (handoffTarget === "source") {
|
|
85
|
-
return sourceScreenKey;
|
|
86
|
-
}
|
|
87
|
-
if (handoffTarget === "destination") {
|
|
88
|
-
return destinationReady ? destinationScreenKey : automaticScreenKey;
|
|
89
|
-
}
|
|
90
|
-
return automaticScreenKey;
|
|
91
|
-
};
|
|
92
|
-
exports.resolveRequestedHandoffReceiver = resolveRequestedHandoffReceiver;
|
|
93
|
-
const resolveRequestedHandoffPairKey = ({
|
|
94
|
-
destinationPairHasCompleteLink,
|
|
95
|
-
destinationPairKey,
|
|
96
|
-
handoffTarget,
|
|
97
|
-
retainedSourcePairHasCompleteLink,
|
|
98
|
-
retainedSourcePairKey,
|
|
99
|
-
sourcePairHasCompleteLink,
|
|
100
|
-
sourcePairKey
|
|
101
|
-
}) => {
|
|
102
|
-
"worklet";
|
|
103
|
-
|
|
104
|
-
if (handoffTarget === "source" || handoffTarget === "destination") {
|
|
105
|
-
if (sourcePairHasCompleteLink) {
|
|
106
|
-
return sourcePairKey;
|
|
107
|
-
}
|
|
108
|
-
if (destinationPairHasCompleteLink) {
|
|
109
|
-
return destinationPairKey;
|
|
110
|
-
}
|
|
111
|
-
if (retainedSourcePairHasCompleteLink) {
|
|
112
|
-
return retainedSourcePairKey;
|
|
113
|
-
}
|
|
114
|
-
return sourcePairKey ?? destinationPairKey ?? retainedSourcePairKey;
|
|
115
|
-
}
|
|
116
|
-
return sourcePairKey;
|
|
117
|
-
};
|
|
118
|
-
exports.resolveRequestedHandoffPairKey = resolveRequestedHandoffPairKey;
|
|
119
|
-
//# sourceMappingURL=active-handoff-receiver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["resolveActiveHandoffReceiver","focusedIndex","routes","scenes","index","length","scene","activity","route","key","exports","resolvePreviousHandoffReceiver","previousIndex","previousScene","resolveHandoffAttachmentCandidate","activeReceiverClosing","activeReceiverScreenKey","attachedReceiverScreenKey","hasActiveCloseFinished","isScreenReady","pairChangedDuringClose","pairDestinationScreenKey","pairHasBoundaryLink","previousReceiverScreenKey","currentPairHasBoundaryLink","resolveRequestedHandoffReceiver","automaticScreenKey","destinationReady","destinationScreenKey","handoffTarget","sourceScreenKey","resolveRequestedHandoffPairKey","destinationPairHasCompleteLink","destinationPairKey","retainedSourcePairHasCompleteLink","retainedSourcePairKey","sourcePairHasCompleteLink","sourcePairKey"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.ts"],"mappings":";;;;;;AAkBO,MAAMA,4BAA4B,GAAGA,CAAC;EAC5CC,YAAY;EACZC,MAAM;EACNC;AACmC,CAAC,KAAoB;EACxD,KAAK,IAAIC,KAAK,GAAGD,MAAM,CAACE,MAAM,GAAG,CAAC,EAAED,KAAK,IAAI,CAAC,EAAEA,KAAK,EAAE,EAAE;IACxD,MAAME,KAAK,GAAGH,MAAM,CAACC,KAAK,CAAC;IAC3B,IAAIE,KAAK,EAAEC,QAAQ,KAAK,SAAS,EAAE;MAClC,OAAOD,KAAK,CAACE,KAAK,CAACC,GAAG;IACvB;EACD;EAEA,OAAOP,MAAM,CAACD,YAAY,CAAC,EAAEQ,GAAG,IAAI,IAAI;AACzC,CAAC;AAACC,OAAA,CAAAV,4BAAA,GAAAA,4BAAA;AAEK,MAAMW,8BAA8B,GAAGA,CAAC;EAC9CV,YAAY;EACZC,MAAM;EACNC;AACmC,CAAC,KAAoB;EACxD,KAAK,IAAIC,KAAK,GAAGD,MAAM,CAACE,MAAM,GAAG,CAAC,EAAED,KAAK,IAAI,CAAC,EAAEA,KAAK,EAAE,EAAE;IACxD,IAAID,MAAM,CAACC,KAAK,CAAC,EAAEG,QAAQ,KAAK,SAAS,EAAE;MAC1C;IACD;IAEA,KAAK,IAAIK,aAAa,GAAGR,KAAK,GAAG,CAAC,EAAEQ,aAAa,IAAI,CAAC,EAAEA,aAAa,EAAE,EAAE;MACxE,MAAMC,aAAa,GAAGV,MAAM,CAACS,aAAa,CAAC;MAC3C,IAAIC,aAAa,EAAEN,QAAQ,KAAK,SAAS,EAAE;QAC1C,OAAOM,aAAa,EAAEL,KAAK,CAACC,GAAG,IAAI,IAAI;MACxC;IACD;EACD;EAEA,OAAOP,MAAM,CAACD,YAAY,CAAC,EAAEQ,GAAG,IAAI,IAAI;AACzC,CAAC;AAACC,OAAA,CAAAC,8BAAA,GAAAA,8BAAA;AAEK,MAAMG,iCAAiC,GAAGA,CAAC;EACjDC,qBAAqB;EACrBC,uBAAuB;EACvBC,yBAAyB;EACzBC,sBAAsB;EACtBC,aAAa;EACbC,sBAAsB,GAAG,KAAK;EAC9BC,wBAAwB;EACxBC,mBAAmB;EACnBC;AAWD,CAAC,KAAK;EACL,SAAS;;EACT,MAAMC,0BAA0B,GAC/BF,mBAAmB,IAAID,wBAAwB,KAAK,IAAI;EAEzD,IACCN,qBAAqB,IACrBE,yBAAyB,KAAKD,uBAAuB,IACrD,CAACQ,0BAA0B,EAC1B;IACD,OAAOP,yBAAyB;EACjC;EAEA,IACCF,qBAAqB,IACrBI,aAAa,IACbE,wBAAwB,IACxBD,sBAAsB,EACrB;IACD,OAAOC,wBAAwB;EAChC;EAEA,IACCN,qBAAqB,IACrBK,sBAAsB,IACtB,CAACI,0BAA0B,EAC1B;IACD,OAAON,sBAAsB,GAC1BK,yBAAyB,GACzBN,yBAAyB;EAC7B;EAEA,IACCC,sBAAsB,IACtBD,yBAAyB,KAAKD,uBAAuB,EACpD;IACD,OAAOO,yBAAyB;EACjC;EAEA,IAAIL,sBAAsB,EAAE;IAC3B,OAAOD,yBAAyB;EACjC;EAEA,IACCF,qBAAqB,IACrBE,yBAAyB,KAAKD,uBAAuB,IACrDG,aAAa,IACbE,wBAAwB,EACvB;IACD,OAAOA,wBAAwB;EAChC;EAEA,OAAOL,uBAAuB;AAC/B,CAAC;AAACN,OAAA,CAAAI,iCAAA,GAAAA,iCAAA;AAEK,MAAMW,+BAA+B,GAAGA,CAAC;EAC/CC,kBAAkB;EAClBC,gBAAgB,GAAG,IAAI;EACvBC,oBAAoB;EACpBC,aAAa;EACbC;AAOD,CAAC,KAAK;EACL,SAAS;;EAET,IAAID,aAAa,KAAK,QAAQ,EAAE;IAC/B,OAAOC,eAAe;EACvB;EAEA,IAAID,aAAa,KAAK,aAAa,EAAE;IACpC,OAAOF,gBAAgB,GAAGC,oBAAoB,GAAGF,kBAAkB;EACpE;EAEA,OAAOA,kBAAkB;AAC1B,CAAC;AAAChB,OAAA,CAAAe,+BAAA,GAAAA,+BAAA;AAEK,MAAMM,8BAA8B,GAAGA,CAAC;EAC9CC,8BAA8B;EAC9BC,kBAAkB;EAClBJ,aAAa;EACbK,iCAAiC;EACjCC,qBAAqB;EACrBC,yBAAyB;EACzBC;AASD,CAAC,KAAK;EACL,SAAS;;EAET,IAAIR,aAAa,KAAK,QAAQ,IAAIA,aAAa,KAAK,aAAa,EAAE;IAClE,IAAIO,yBAAyB,EAAE;MAC9B,OAAOC,aAAa;IACrB;IAEA,IAAIL,8BAA8B,EAAE;MACnC,OAAOC,kBAAkB;IAC1B;IAEA,IAAIC,iCAAiC,EAAE;MACtC,OAAOC,qBAAqB;IAC7B;IAEA,OAAOE,aAAa,IAAIJ,kBAAkB,IAAIE,qBAAqB;EACpE;EAEA,OAAOE,aAAa;AACrB,CAAC;AAAC3B,OAAA,CAAAqB,8BAAA,GAAAA,8BAAA","ignoreList":[]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.canActivateHandoffReceiver = canActivateHandoffReceiver;
|
|
7
|
-
function canActivateHandoffReceiver({
|
|
8
|
-
returningFromActiveClose,
|
|
9
|
-
activatingPairDestination,
|
|
10
|
-
animationProgress,
|
|
11
|
-
receiverIsActiveDestination,
|
|
12
|
-
destinationIsScreenReady
|
|
13
|
-
}) {
|
|
14
|
-
"worklet";
|
|
15
|
-
|
|
16
|
-
// Keep the loaded source in place until its receiving screen is visible.
|
|
17
|
-
if (receiverIsActiveDestination && destinationIsScreenReady !== true) return false;
|
|
18
|
-
return returningFromActiveClose || activatingPairDestination || animationProgress > 0;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=handoff-visibility.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["canActivateHandoffReceiver","returningFromActiveClose","activatingPairDestination","animationProgress","receiverIsActiveDestination","destinationIsScreenReady"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/helpers/handoff-visibility.ts"],"mappings":";;;;;;AAAO,SAASA,0BAA0BA,CAAC;EAC1CC,wBAAwB;EACxBC,yBAAyB;EACzBC,iBAAiB;EACjBC,2BAA2B;EAC3BC;AAOD,CAAC,EAAE;EACF,SAAS;;EACT;EACA,IAAID,2BAA2B,IAAIC,wBAAwB,KAAK,IAAI,EACnE,OAAO,KAAK;EACb,OACCJ,wBAAwB,IACxBC,yBAAyB,IACzBC,iBAAiB,GAAG,CAAC;AAEvB","ignoreList":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createBoundaryContentPortalHostName = void 0;
|
|
7
|
-
const BOUNDARY_CONTENT_PORTAL_HOST_NAME_SUFFIX = "-content-portal-host";
|
|
8
|
-
const createBoundaryContentPortalHostName = (screenKey, boundaryId) => {
|
|
9
|
-
"worklet";
|
|
10
|
-
|
|
11
|
-
return `${screenKey}-${boundaryId}${BOUNDARY_CONTENT_PORTAL_HOST_NAME_SUFFIX}`;
|
|
12
|
-
};
|
|
13
|
-
exports.createBoundaryContentPortalHostName = createBoundaryContentPortalHostName;
|
|
14
|
-
//# sourceMappingURL=host-name.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["BOUNDARY_CONTENT_PORTAL_HOST_NAME_SUFFIX","createBoundaryContentPortalHostName","screenKey","boundaryId","exports"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/helpers/host-name.ts"],"mappings":";;;;;;AAAA,MAAMA,wCAAwC,GAAG,sBAAsB;AAEhE,MAAMC,mCAAmC,GAAGA,CAClDC,SAAiB,EACjBC,UAAkB,KACd;EACJ,SAAS;;EACT,OAAO,GAAGD,SAAS,IAAIC,UAAU,GAAGH,wCAAwC,EAAE;AAC/E,CAAC;AAACI,OAAA,CAAAH,mCAAA,GAAAA,mCAAA","ignoreList":[]}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useBoundaryContentPortalAttachment = void 0;
|
|
7
|
-
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
-
var _builder = require("../../../../../../providers/screen/builder");
|
|
9
|
-
var _motion = require("../../../../../../providers/screen/motion");
|
|
10
|
-
var _transitionVisualState = require("../../../../../../providers/screen/motion/helpers/transition-visual-state");
|
|
11
|
-
var _orchestrator = require("../../../../../../providers/screen/orchestrator");
|
|
12
|
-
var _blankStack = require("../../../../../../providers/stack/blank-stack.provider");
|
|
13
|
-
var _linkPairs = require("../../../../../../stores/bounds/helpers/link-pairs.helpers");
|
|
14
|
-
var _entries = require("../../../../../../stores/bounds/internals/entries");
|
|
15
|
-
var _links = require("../../../../../../stores/bounds/internals/links");
|
|
16
|
-
var _state = require("../../../../../../stores/bounds/internals/state");
|
|
17
|
-
var _naming = require("../../../utils/naming");
|
|
18
|
-
var _activeHandoffReceiver = require("../helpers/active-handoff-receiver");
|
|
19
|
-
var _handoffVisibility = require("../helpers/handoff-visibility");
|
|
20
|
-
var _hostName = require("../helpers/host-name");
|
|
21
|
-
const isCompleteActiveLink = (pair, link, boundaryLinkKey) => {
|
|
22
|
-
"worklet";
|
|
23
|
-
|
|
24
|
-
return link?.status === "complete" && (!link.group || pair?.groups[link.group]?.activeId === boundaryLinkKey);
|
|
25
|
-
};
|
|
26
|
-
const useBoundaryContentPortalAttachment = ({
|
|
27
|
-
boundaryId
|
|
28
|
-
}) => {
|
|
29
|
-
const slotsMap = (0, _orchestrator.useOrchestratorStore)(store => store.slotsMap);
|
|
30
|
-
const currentScreenKey = (0, _builder.useBuilderStore)(s => s.derivations.currentScreenKey);
|
|
31
|
-
const nextScreenKey = (0, _builder.useBuilderStore)(s => s.derivations.nextScreenKey);
|
|
32
|
-
const sourcePairKey = (0, _builder.useBuilderStore)(s => s.derivations.sourcePairKey);
|
|
33
|
-
const destinationPairKey = (0, _builder.useBuilderStore)(s => s.derivations.destinationPairKey);
|
|
34
|
-
const destinationIsScreenReady = (0, _motion.useOptionalMotionStore)(nextScreenKey ?? currentScreenKey, store => store.isScreenReady);
|
|
35
|
-
const unavailableIsScreenReady = (0, _reactNativeReanimated.useSharedValue)(false);
|
|
36
|
-
const screenReadiness = destinationIsScreenReady ?? unavailableIsScreenReady;
|
|
37
|
-
const activeReceiverScreenKey = (0, _blankStack.useBlankStackStore)(_activeHandoffReceiver.resolveActiveHandoffReceiver);
|
|
38
|
-
const previousReceiverScreenKey = (0, _blankStack.useBlankStackStore)(_activeHandoffReceiver.resolvePreviousHandoffReceiver);
|
|
39
|
-
const localAnimationProgress = (0, _motion.useMotionStore)(store => store.state.animationProgress);
|
|
40
|
-
const receiverAnimationProgress = (0, _motion.useOptionalMotionStore)(activeReceiverScreenKey ?? currentScreenKey, store => store.state.animationProgress);
|
|
41
|
-
const activeReceiverAnimationProgress = receiverAnimationProgress ?? localAnimationProgress;
|
|
42
|
-
const activeReceiverClosing = (0, _motion.useOptionalMotionStore)(activeReceiverScreenKey ?? currentScreenKey, store => store.state.closing);
|
|
43
|
-
const activeReceiverIsScreenReady = (0, _motion.useOptionalMotionStore)(activeReceiverScreenKey ?? currentScreenKey, store => store.isScreenReady);
|
|
44
|
-
const attachedReceiverScreenKey = (0, _reactNativeReanimated.useSharedValue)(currentScreenKey);
|
|
45
|
-
const sourcePairBeforeClose = (0, _reactNativeReanimated.useSharedValue)(null);
|
|
46
|
-
const teleportProps = (0, _reactNativeReanimated.useAnimatedProps)(() => {
|
|
47
|
-
"worklet";
|
|
48
|
-
|
|
49
|
-
const slot = slotsMap.get()[boundaryId];
|
|
50
|
-
const {
|
|
51
|
-
pointerEvents: _pointerEvents,
|
|
52
|
-
handoffTarget,
|
|
53
|
-
...slotProps
|
|
54
|
-
} = slot?.props ?? {};
|
|
55
|
-
const closing = activeReceiverClosing?.get() ?? 0;
|
|
56
|
-
const animationProgress = activeReceiverAnimationProgress.get();
|
|
57
|
-
if (!closing) {
|
|
58
|
-
sourcePairBeforeClose.set(sourcePairKey ?? null);
|
|
59
|
-
}
|
|
60
|
-
const pairChangedDuringClose = !!closing && !!sourcePairKey && sourcePairKey !== sourcePairBeforeClose.get();
|
|
61
|
-
const hasActiveCloseFinished = (0, _transitionVisualState.hasCloseTransitionFinished)({
|
|
62
|
-
closing,
|
|
63
|
-
animationProgress
|
|
64
|
-
});
|
|
65
|
-
const automaticPair = sourcePairKey ? _state.pairs.get()[sourcePairKey] : null;
|
|
66
|
-
const boundaryLinkKey = (0, _linkPairs.getLinkKeyFromTag)(boundaryId);
|
|
67
|
-
const automaticLink = automaticPair?.links[boundaryLinkKey];
|
|
68
|
-
const requestedSourcePairKey = (0, _links.getPairKeyForSource)(boundaryId, currentScreenKey) ?? sourcePairKey;
|
|
69
|
-
const requestedSourcePair = requestedSourcePairKey ? _state.pairs.get()[requestedSourcePairKey] : null;
|
|
70
|
-
const requestedSourceLink = requestedSourcePair?.links[boundaryLinkKey];
|
|
71
|
-
const pairDestination = automaticLink?.status === "complete" && (!automaticLink.group || automaticPair?.groups[automaticLink.group]?.activeId === boundaryLinkKey) ? automaticLink.destination.screenKey : null;
|
|
72
|
-
const requestedDestinationPairKey = (0, _links.getPairKeyForDestination)(boundaryId, currentScreenKey) ?? destinationPairKey;
|
|
73
|
-
const destinationPair = requestedDestinationPairKey ? _state.pairs.get()[requestedDestinationPairKey] : null;
|
|
74
|
-
const destinationLink = destinationPair?.links[boundaryLinkKey];
|
|
75
|
-
const retainedSourcePairKey = sourcePairBeforeClose.get() ?? undefined;
|
|
76
|
-
const retainedSourcePair = retainedSourcePairKey ? _state.pairs.get()[retainedSourcePairKey] : null;
|
|
77
|
-
const retainedSourceLink = retainedSourcePair?.links[boundaryLinkKey];
|
|
78
|
-
const requestedPairKey = (0, _activeHandoffReceiver.resolveRequestedHandoffPairKey)({
|
|
79
|
-
destinationPairHasCompleteLink: isCompleteActiveLink(destinationPair, destinationLink, boundaryLinkKey),
|
|
80
|
-
destinationPairKey: requestedDestinationPairKey,
|
|
81
|
-
handoffTarget,
|
|
82
|
-
retainedSourcePairHasCompleteLink: isCompleteActiveLink(retainedSourcePair, retainedSourceLink, boundaryLinkKey),
|
|
83
|
-
retainedSourcePairKey,
|
|
84
|
-
sourcePairHasCompleteLink: isCompleteActiveLink(requestedSourcePair, requestedSourceLink, boundaryLinkKey),
|
|
85
|
-
sourcePairKey: requestedSourcePairKey
|
|
86
|
-
});
|
|
87
|
-
const requestedPair = requestedPairKey ? _state.pairs.get()[requestedPairKey] : null;
|
|
88
|
-
const requestedLink = requestedPair?.links[boundaryLinkKey];
|
|
89
|
-
const isScreenReady = screenReadiness.get();
|
|
90
|
-
const attachedScreenKey = attachedReceiverScreenKey.get();
|
|
91
|
-
const automaticReceiverScreenKey = (0, _activeHandoffReceiver.resolveHandoffAttachmentCandidate)({
|
|
92
|
-
activeReceiverClosing: !!closing,
|
|
93
|
-
activeReceiverScreenKey,
|
|
94
|
-
attachedReceiverScreenKey: attachedScreenKey,
|
|
95
|
-
hasActiveCloseFinished,
|
|
96
|
-
isScreenReady,
|
|
97
|
-
pairChangedDuringClose,
|
|
98
|
-
pairDestinationScreenKey: pairDestination,
|
|
99
|
-
pairHasBoundaryLink: automaticLink !== undefined,
|
|
100
|
-
previousReceiverScreenKey
|
|
101
|
-
});
|
|
102
|
-
const requestedDestinationScreenKey = requestedLink?.status === "complete" ? requestedLink.destination.screenKey : null;
|
|
103
|
-
const nextReceiverScreenKey = (0, _activeHandoffReceiver.resolveRequestedHandoffReceiver)({
|
|
104
|
-
automaticScreenKey: automaticReceiverScreenKey,
|
|
105
|
-
destinationReady: requestedDestinationScreenKey === activeReceiverScreenKey || isScreenReady,
|
|
106
|
-
destinationScreenKey: requestedDestinationScreenKey,
|
|
107
|
-
handoffTarget,
|
|
108
|
-
sourceScreenKey: requestedLink?.status === "complete" ? requestedLink.source.screenKey : null
|
|
109
|
-
});
|
|
110
|
-
const receiverEntry = nextReceiverScreenKey ? (0, _entries.getEntry)(boundaryId, nextReceiverScreenKey) : null;
|
|
111
|
-
const receiverReady = receiverEntry?.handoff === true;
|
|
112
|
-
const returningFromActiveClose = hasActiveCloseFinished && attachedScreenKey === activeReceiverScreenKey;
|
|
113
|
-
const activatingPairDestination = !!pairDestination && isScreenReady && nextReceiverScreenKey === pairDestination;
|
|
114
|
-
const canActivateReceiver = (0, _handoffVisibility.canActivateHandoffReceiver)({
|
|
115
|
-
returningFromActiveClose,
|
|
116
|
-
activatingPairDestination,
|
|
117
|
-
animationProgress,
|
|
118
|
-
receiverIsActiveDestination: !returningFromActiveClose && nextReceiverScreenKey === activeReceiverScreenKey,
|
|
119
|
-
destinationIsScreenReady: activeReceiverIsScreenReady?.get()
|
|
120
|
-
});
|
|
121
|
-
if (nextReceiverScreenKey && receiverReady && canActivateReceiver) {
|
|
122
|
-
attachedReceiverScreenKey.set(nextReceiverScreenKey);
|
|
123
|
-
}
|
|
124
|
-
const targetScreenKey = attachedReceiverScreenKey.get();
|
|
125
|
-
const targetHostName = targetScreenKey ? (0, _hostName.createBoundaryContentPortalHostName)(targetScreenKey, boundaryId) : _naming.PORTAL_HOST_NAME_RESET_VALUE;
|
|
126
|
-
return {
|
|
127
|
-
...slotProps,
|
|
128
|
-
hostName: targetHostName
|
|
129
|
-
};
|
|
130
|
-
});
|
|
131
|
-
return {
|
|
132
|
-
teleportProps
|
|
133
|
-
};
|
|
134
|
-
};
|
|
135
|
-
exports.useBoundaryContentPortalAttachment = useBoundaryContentPortalAttachment;
|
|
136
|
-
//# sourceMappingURL=use-boundary-content-portal-attachment.js.map
|