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,36 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
import { logger } from "../../../../utils/logger";
|
|
4
4
|
import { isTeleportAvailable } from "../teleport";
|
|
5
|
-
const DISABLED_RUNTIME = {
|
|
6
|
-
handoff: false,
|
|
7
|
-
escapeClipping: false
|
|
8
|
-
};
|
|
9
|
-
const HANDOFF_RUNTIME = {
|
|
10
|
-
handoff: true,
|
|
11
|
-
escapeClipping: false
|
|
12
|
-
};
|
|
13
|
-
const ESCAPE_CLIPPING_RUNTIME = {
|
|
14
|
-
handoff: false,
|
|
15
|
-
escapeClipping: true
|
|
16
|
-
};
|
|
17
|
-
const HANDOFF_ESCAPE_CLIPPING_RUNTIME = {
|
|
18
|
-
handoff: true,
|
|
19
|
-
escapeClipping: true
|
|
20
|
-
};
|
|
21
5
|
export const resolveBoundaryPortal = ({
|
|
22
|
-
handoff,
|
|
23
|
-
escapeClipping
|
|
6
|
+
handoff = false,
|
|
7
|
+
escapeClipping = false
|
|
24
8
|
}) => {
|
|
25
|
-
|
|
26
|
-
const resolvedEscapeClipping = escapeClipping ?? false;
|
|
27
|
-
const enabled = resolvedHandoff || resolvedEscapeClipping;
|
|
28
|
-
if (!enabled) {
|
|
29
|
-
return DISABLED_RUNTIME;
|
|
30
|
-
}
|
|
31
|
-
if (!isTeleportAvailable) {
|
|
9
|
+
if (!isTeleportAvailable && (handoff || escapeClipping)) {
|
|
32
10
|
logger.warnOnce("boundary:teleport-missing", "react-native-teleport is not installed; handoff and escapeClipping boundaries will render inline.");
|
|
33
|
-
return DISABLED_RUNTIME;
|
|
34
11
|
}
|
|
35
|
-
return
|
|
12
|
+
return {
|
|
13
|
+
handoff: isTeleportAvailable && handoff,
|
|
14
|
+
escapeClipping: isTeleportAvailable && escapeClipping
|
|
15
|
+
};
|
|
36
16
|
};
|
|
37
17
|
//# sourceMappingURL=resolve-portal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["logger","isTeleportAvailable","
|
|
1
|
+
{"version":3,"names":["logger","isTeleportAvailable","resolveBoundaryPortal","handoff","escapeClipping","warnOnce"],"sourceRoot":"../../../../../../src","sources":["components/boundary/portal/utils/resolve-portal.ts"],"mappings":";;AACA,SAASA,MAAM,QAAQ,0BAA0B;AACjD,SAASC,mBAAmB,QAAQ,aAAa;AAEjD,OAAO,MAAMC,qBAAqB,GAAGA,CAAC;EACrCC,OAAO,GAAG,KAAK;EACfC,cAAc,GAAG;AACI,CAAC,KAAK;EAC3B,IAAI,CAACH,mBAAmB,KAAKE,OAAO,IAAIC,cAAc,CAAC,EAAE;IACxDJ,MAAM,CAACK,QAAQ,CACd,2BAA2B,EAC3B,mGACD,CAAC;EACF;EACA,OAAO;IACNF,OAAO,EAAEF,mBAAmB,IAAIE,OAAO;IACvCC,cAAc,EAAEH,mBAAmB,IAAIG;EACxC,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
import { useImperativeHandle, useLayoutEffect, useMemo, useRef } from "react";
|
|
4
4
|
import { useAnimatedRef, useSharedValue } from "react-native-reanimated";
|
|
5
5
|
import { useBuilderStore } from "../../../providers/screen/builder";
|
|
6
|
-
import { useComposedSlotStyles, useSlotStackingStyles } from "../../../providers/screen/orchestrator/styles";
|
|
7
6
|
import { useBlankStackStore } from "../../../providers/stack/blank-stack.provider";
|
|
8
7
|
import { createBoundTag } from "../../../stores/bounds/helpers/link-pairs.helpers";
|
|
9
8
|
import createProvider from "../../../utils/create-provider";
|
|
10
9
|
import { logger } from "../../../utils/logger";
|
|
11
10
|
import { BoundaryLifecycle } from "../components/boundary-lifecycle";
|
|
11
|
+
import { useBoundaryPresentation } from "../hooks/use-boundary-presentation";
|
|
12
|
+
import { useComposedBoundaryStyle } from "../hooks/use-composed-boundary-style";
|
|
12
13
|
import { resolveBoundaryPortal } from "../portal/utils/resolve-portal";
|
|
13
14
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
15
|
// logger.warn prepends the library prefix.
|
|
@@ -33,10 +34,10 @@ export const {
|
|
|
33
34
|
targetStyle
|
|
34
35
|
}) => {
|
|
35
36
|
const requestedBoundTag = useMemo(() => createBoundTag(String(id), group), [id, group]);
|
|
36
|
-
const portalRuntime = resolveBoundaryPortal({
|
|
37
|
+
const portalRuntime = useMemo(() => resolveBoundaryPortal({
|
|
37
38
|
handoff,
|
|
38
39
|
escapeClipping
|
|
39
|
-
});
|
|
40
|
+
}), [handoff, escapeClipping]);
|
|
40
41
|
const currentScreenKey = useBuilderStore(s => s.derivations.currentScreenKey);
|
|
41
42
|
const isCurrentScreenClosing = useBlankStackStore(store => portalRuntime.handoff && store.scenesByKey[currentScreenKey]?.activity === "closing");
|
|
42
43
|
const retainedBoundTagRef = useRef(requestedBoundTag);
|
|
@@ -53,8 +54,11 @@ export const {
|
|
|
53
54
|
// independent of whether an interpolator is configured for this transition.
|
|
54
55
|
const shouldAttachAssociatedStyles = enabled;
|
|
55
56
|
const shouldEscapeBoundaryRootToScreenHost = portalRuntime.escapeClipping;
|
|
56
|
-
const
|
|
57
|
-
|
|
57
|
+
const {
|
|
58
|
+
presentation: boundaryPresentation,
|
|
59
|
+
slotsMap
|
|
60
|
+
} = useBoundaryPresentation(boundTag.tag, enabled && (portalRuntime.handoff || portalRuntime.escapeClipping));
|
|
61
|
+
const associatedStyles = useComposedBoundaryStyle(slotsMap, boundTag.tag, style, hasTarget ? "stacking" : "full");
|
|
58
62
|
const rootRef = useAnimatedRef();
|
|
59
63
|
const measurementRef = useAnimatedRef();
|
|
60
64
|
const localMeasurement = useSharedValue(null);
|
|
@@ -74,8 +78,10 @@ export const {
|
|
|
74
78
|
// Host-only handoff receivers still need the associated style: their
|
|
75
79
|
// handoff host is absolute-filled inside this root, so the root is the
|
|
76
80
|
// visual frame that animates the received payload.
|
|
77
|
-
const attachedStyle = shouldAttachAssociatedStyles
|
|
81
|
+
const attachedStyle = shouldAttachAssociatedStyles && (hasTarget || !shouldRenderBoundaryRootThroughPortal) ? associatedStyles : undefined;
|
|
78
82
|
const value = useMemo(() => ({
|
|
83
|
+
boundaryPresentation,
|
|
84
|
+
slotsMap,
|
|
79
85
|
attachedStyle,
|
|
80
86
|
boundTag,
|
|
81
87
|
currentScreenKey,
|
|
@@ -86,7 +92,7 @@ export const {
|
|
|
86
92
|
ref: rootRef,
|
|
87
93
|
shouldRenderBoundaryRootThroughPortal,
|
|
88
94
|
shouldRenderHandoffHost: handoffEnabled && !hasTarget
|
|
89
|
-
}), [attachedStyle, boundTag, currentScreenKey, handoffEnabled, hasTarget, localMeasurement, measurementRef, portalRuntime, rootRef, shouldRenderBoundaryRootThroughPortal]);
|
|
95
|
+
}), [boundaryPresentation, slotsMap, attachedStyle, boundTag, currentScreenKey, handoffEnabled, hasTarget, localMeasurement, measurementRef, portalRuntime, rootRef, shouldRenderBoundaryRootThroughPortal]);
|
|
90
96
|
return {
|
|
91
97
|
value,
|
|
92
98
|
children: /*#__PURE__*/_jsxs(_Fragment, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useImperativeHandle","useLayoutEffect","useMemo","useRef","useAnimatedRef","useSharedValue","useBuilderStore","
|
|
1
|
+
{"version":3,"names":["useImperativeHandle","useLayoutEffect","useMemo","useRef","useAnimatedRef","useSharedValue","useBuilderStore","useBlankStackStore","createBoundTag","createProvider","logger","BoundaryLifecycle","useBoundaryPresentation","useComposedBoundaryStyle","resolveBoundaryPortal","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","MULTIPLE_TARGETS_WARNING","TARGET_OUTSIDE_ROOT_WARNING","BoundaryRootProvider","useBoundaryRootStore","useOptionalBoundaryRootStore","children","config","enabled","escapeClipping","forwardedRef","group","handoff","hasTarget","id","style","targetCount","targetStyle","requestedBoundTag","String","portalRuntime","currentScreenKey","s","derivations","isCurrentScreenClosing","store","scenesByKey","activity","retainedBoundTagRef","shouldRetainClosingBoundTag","current","boundTag","shouldAttachAssociatedStyles","shouldEscapeBoundaryRootToScreenHost","presentation","boundaryPresentation","slotsMap","tag","associatedStyles","rootRef","measurementRef","localMeasurement","__DEV__","warnOnce","measuredRef","shouldRenderBoundaryRootThroughPortal","handoffEnabled","attachedStyle","undefined","value","ref","shouldRenderHandoffHost"],"sourceRoot":"../../../../../src","sources":["components/boundary/providers/boundary-root.provider.tsx"],"mappings":";;AAAA,SAGCA,mBAAmB,EACnBC,eAAe,EACfC,OAAO,EACPC,MAAM,QACA,OAAO;AAGd,SAASC,cAAc,EAAEC,cAAc,QAAQ,yBAAyB;AACxE,SAASC,eAAe,QAAQ,mCAAmC;AACnE,SAASC,kBAAkB,QAAQ,+CAA+C;AAClF,SAASC,cAAc,QAAQ,mDAAmD;AAElF,OAAOC,cAAc,MAAM,gCAAgC;AAC3D,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,iBAAiB,QAAQ,kCAAkC;AACpE,SAASC,uBAAuB,QAAQ,oCAAoC;AAC5E,SAASC,wBAAwB,QAAQ,sCAAsC;AAC/E,SAASC,qBAAqB,QAAQ,gCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAWvE;AACA,MAAMC,wBAAwB,GAC7B,kIAAkI;AAEnI,OAAO,MAAMC,2BAA2B,GACvC,gHAAgH;AAiCjH,OAAO,MAAM;EACZC,oBAAoB;EACpBC,oBAAoB;EACpBC;AACD,CAAC,GAAGhB,cAAc,CAAC,cAAc,CAAC,CAI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sB,oBAAoB,EACpBC,QAAQ,EACRW,aAAa,EACbhB,QAAQ,EACRV,gBAAgB,EAChByB,cAAc,EACdjC,SAAS,EACT4B,gBAAgB,EAChBD,cAAc,EACdpB,aAAa,EACbmB,OAAO,EACPM,qCAAqC,CAEvC,CAAC;EAED,OAAO;IACNI,KAAK;IACL3C,QAAQ,eACPN,KAAA,CAAAF,SAAA;MAAAQ,QAAA,GACEA,QAAQ,CAAC2C,KAAK,CAAC,eAChBrD,IAAA,CAACL,iBAAiB;QACjBwC,QAAQ,EAAEA,QAAS;QACnBxB,MAAM,EAAEA,MAAO;QACfc,gBAAgB,EAAEA,gBAAiB;QACnCb,OAAO,EAAEA,OAAQ;QACjBC,cAAc,EAAEW,aAAa,CAACX,cAAe;QAC7CG,OAAO,EAAEQ,aAAa,CAACR,OAAQ;QAC/B6B,gBAAgB,EAAEA,gBAAiB;QACnCG,WAAW,EAAEA,WAAY;QACzB7B,KAAK,EAAEF,SAAS,GAAGI,WAAW,GAAGF;MAAM,CACvC,CAAC;IAAA,CACD;EAEJ,CAAC;AACF,CACD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import Animated from "react-native-reanimated";
|
|
5
|
+
import { usesLayerRenderProps } from "./uses-layer-render-props";
|
|
6
|
+
|
|
7
|
+
/** Adapts the two supported custom layer APIs without changing component identity. */
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
export function LayerComponent({
|
|
10
|
+
component,
|
|
11
|
+
styles,
|
|
12
|
+
props,
|
|
13
|
+
pointerEvents,
|
|
14
|
+
children,
|
|
15
|
+
collapsable
|
|
16
|
+
}) {
|
|
17
|
+
const renderProps = component && usesLayerRenderProps(component);
|
|
18
|
+
const Component = useMemo(() => {
|
|
19
|
+
if (!component) return Animated.View;
|
|
20
|
+
return usesLayerRenderProps(component) ? component : Animated.createAnimatedComponent(component);
|
|
21
|
+
}, [component]);
|
|
22
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
23
|
+
...(renderProps ? {
|
|
24
|
+
styles,
|
|
25
|
+
props
|
|
26
|
+
} : {
|
|
27
|
+
style: styles,
|
|
28
|
+
animatedProps: props
|
|
29
|
+
}),
|
|
30
|
+
pointerEvents: pointerEvents,
|
|
31
|
+
collapsable: collapsable,
|
|
32
|
+
children: children
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=layer-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useMemo","Animated","usesLayerRenderProps","jsx","_jsx","LayerComponent","component","styles","props","pointerEvents","children","collapsable","renderProps","Component","View","createAnimatedComponent","style","animatedProps"],"sourceRoot":"../../../../../../src","sources":["components/screen/container/helpers/layer-component.tsx"],"mappings":";;AAAA,SAA6CA,OAAO,QAAQ,OAAO;AAEnE,OAAOC,QAAQ,MAAM,yBAAyB;AAE9C,SAASC,oBAAoB,QAAQ,2BAA2B;;AAEhE;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,OAAO,SAASC,cAAcA,CAAC;EAC9BC,SAAS;EACTC,MAAM;EACNC,KAAK;EACLC,aAAa;EACbC,QAAQ;EACRC;AAKD,CAAC,EAAE;EACF,MAAMC,WAAW,GAAGN,SAAS,IAAIJ,oBAAoB,CAACI,SAAS,CAAC;EAChE,MAAMO,SAAS,GAAGb,OAAO,CAAqB,MAAM;IACnD,IAAI,CAACM,SAAS,EAAE,OAAOL,QAAQ,CAACa,IAAI;IACpC,OAAOZ,oBAAoB,CAACI,SAAS,CAAC,GACnCA,SAAS,GACTL,QAAQ,CAACc,uBAAuB,CAACT,SAAS,CAAC;EAC/C,CAAC,EAAE,CAACA,SAAS,CAAC,CAAC;EACf,oBACCF,IAAA,CAACS,SAAS;IAAA,IACJD,WAAW,GACb;MAAEL,MAAM;MAAEC;IAAM,CAAC,GACjB;MAAEQ,KAAK,EAAET,MAAM;MAAEU,aAAa,EAAET;IAAM,CAAC;IAC1CC,aAAa,EAAEA,aAAc;IAC7BE,WAAW,EAAEA,WAAY;IAAAD,QAAA,EAExBA;EAAQ,CACC,CAAC;AAEd","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["usesLayerRenderProps","component","prototype","isReactComponent"],"sourceRoot":"../../../../../../src","sources":["components/screen/container/helpers/uses-layer-render-props.ts"],"mappings":";;AAEA,OAAO,SAASA,oBAAoBA,CACnCC,SAA6B,EACyB;EACtD,OACC,OAAOA,SAAS,KAAK,UAAU,IAAI,CAACA,SAAS,CAACC,SAAS,EAAEC,gBAAgB;AAE3E","ignoreList":[]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { memo, useCallback
|
|
3
|
+
import { memo, useCallback } from "react";
|
|
4
4
|
import { Pressable, StyleSheet } from "react-native";
|
|
5
|
-
import Animated from "react-native-reanimated";
|
|
6
5
|
import { scheduleOnRN, scheduleOnUI } from "react-native-worklets";
|
|
7
6
|
import { DefaultSnapSpec } from "../../../../configs/specs";
|
|
8
7
|
import { useBuilderStore } from "../../../../providers/screen/builder";
|
|
@@ -10,7 +9,7 @@ import { useMotionStore } from "../../../../providers/screen/motion";
|
|
|
10
9
|
import { useSlotProps, useSlotStyles } from "../../../../providers/screen/orchestrator/styles";
|
|
11
10
|
import { animateToProgress } from "../../../../utils/animation/animate-to-progress";
|
|
12
11
|
import { findCollapseTarget } from "../helpers/find-collapse-target";
|
|
13
|
-
import {
|
|
12
|
+
import { LayerComponent } from "../helpers/layer-component";
|
|
14
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
14
|
export const BackdropLayer = /*#__PURE__*/memo(function BackdropLayer({
|
|
16
15
|
backdropBehavior,
|
|
@@ -28,7 +27,6 @@ export const BackdropLayer = /*#__PURE__*/memo(function BackdropLayer({
|
|
|
28
27
|
animationProgress,
|
|
29
28
|
resolvedAutoSnapPoint
|
|
30
29
|
} = animations;
|
|
31
|
-
const AnimatedBackdropComponent = useMemo(() => BackdropComponent && !usesLayerRenderProps(BackdropComponent) ? Animated.createAnimatedComponent(BackdropComponent) : null, [BackdropComponent]);
|
|
32
30
|
const handleBackdropPress = useCallback(() => {
|
|
33
31
|
if (backdropBehavior === "dismiss") {
|
|
34
32
|
onDismissRequest?.();
|
|
@@ -87,16 +85,10 @@ export const BackdropLayer = /*#__PURE__*/memo(function BackdropLayer({
|
|
|
87
85
|
style: StyleSheet.absoluteFill,
|
|
88
86
|
pointerEvents: backdropBehavior === "passthrough" ? "none" : "auto",
|
|
89
87
|
onPress: isBackdropActive ? handleBackdropPress : undefined,
|
|
90
|
-
children:
|
|
91
|
-
|
|
92
|
-
animatedProps: animatedBackdropProps,
|
|
93
|
-
pointerEvents: backdropPointerEvents
|
|
94
|
-
}) : BackdropComponent ? /*#__PURE__*/_jsx(BackdropComponent, {
|
|
88
|
+
children: /*#__PURE__*/_jsx(LayerComponent, {
|
|
89
|
+
component: BackdropComponent,
|
|
95
90
|
styles: backdropStyles,
|
|
96
|
-
props: backdropProps,
|
|
97
|
-
pointerEvents: backdropPointerEvents
|
|
98
|
-
}) : /*#__PURE__*/_jsx(Animated.View, {
|
|
99
|
-
style: backdropStyles,
|
|
91
|
+
props: BackdropComponent ? backdropProps : undefined,
|
|
100
92
|
pointerEvents: backdropPointerEvents
|
|
101
93
|
})
|
|
102
94
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","useCallback","
|
|
1
|
+
{"version":3,"names":["memo","useCallback","Pressable","StyleSheet","scheduleOnRN","scheduleOnUI","DefaultSnapSpec","useBuilderStore","useMotionStore","useSlotProps","useSlotStyles","animateToProgress","findCollapseTarget","LayerComponent","jsx","_jsx","BackdropLayer","backdropBehavior","isBackdropActive","onDismissRequest","BackdropComponent","store","options","backdropComponent","rawSnapPoints","snapPoints","isGestureDismissEnabled","gestureEnabled","canDismiss","transitionSpec","animations","state","targetProgress","animationProgress","resolvedAutoSnapPoint","handleBackdropPress","length","gestures","resolvedSnaps","i","point","resolvedPoint","get","push","target","shouldDismiss","transitionProgress","dismissing","set","spec","open","expand","close","collapse","markEntering","animatedBackdropStyle","animatedBackdropProps","backdropPointerEvents","backdropStyles","absoluteFill","backdropProps","style","pointerEvents","onPress","undefined","children","component","styles","props"],"sourceRoot":"../../../../../../src","sources":["components/screen/container/layers/backdrop.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,WAAW,QAAQ,OAAO;AACzC,SAASC,SAAS,EAAEC,UAAU,QAAQ,cAAc;AACpD,SAASC,YAAY,EAAEC,YAAY,QAAQ,uBAAuB;AAClE,SAASC,eAAe,QAAQ,2BAA2B;AAC3D,SAASC,eAAe,QAAQ,sCAAsC;AACtE,SAASC,cAAc,QAAQ,qCAAqC;AACpE,SACCC,YAAY,EACZC,aAAa,QACP,kDAAkD;AAKzD,SAASC,iBAAiB,QAAQ,iDAAiD;AACnF,SAASC,kBAAkB,QAAQ,iCAAiC;AACpE,SAASC,cAAc,QAAQ,4BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5D,OAAO,MAAMC,aAAa,gBAAGhB,IAAI,CAAC,SAASgB,aAAaA,CAAC;EACxDC,gBAAgB;EAChBC,gBAAgB;EAChBC;AAKD,CAAC,EAAE;EACF,MAAMC,iBAAiB,GAAGb,eAAe,CACvCc,KAAK,IAAKA,KAAK,CAACC,OAAO,CAACC,iBAC1B,CAAC;EACD,MAAMC,aAAa,GAAGjB,eAAe,CAAEc,KAAK,IAAKA,KAAK,CAACC,OAAO,CAACG,UAAU,CAAC;EAC1E,MAAMC,uBAAuB,GAAGnB,eAAe,CAC7Cc,KAAK,IAAKA,KAAK,CAACC,OAAO,CAACK,cAAc,KAAK,KAC7C,CAAC;EACD,MAAMC,UAAU,GAAGF,uBAAuB;EAC1C,MAAMG,cAAc,GAAGtB,eAAe,CACpCc,KAAK,IAAKA,KAAK,CAACC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C;EAAC,CACQ,CAAC;AAEd,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { memo, useCallback } from "react";
|
|
4
|
+
import { I18nManager, StyleSheet, View } from "react-native";
|
|
5
|
+
import Animated, { useAnimatedStyle, useDerivedValue, useSharedValue } from "react-native-reanimated";
|
|
6
|
+
import { useOrchestratorStore } from "../../../../providers/screen/orchestrator/orchestrator.provider";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
/** Stable layout host: changing the viewport must never resize the screen. */
|
|
9
|
+
export const Clip = /*#__PURE__*/memo(({
|
|
10
|
+
children,
|
|
11
|
+
pointerEvents
|
|
12
|
+
}) => {
|
|
13
|
+
const slotsMap = useOrchestratorStore(store => store.slotsMap);
|
|
14
|
+
const screenInterpolatorProps = useOrchestratorStore(store => store.screenInterpolatorProps);
|
|
15
|
+
const layout = useSharedValue(null);
|
|
16
|
+
const onLayout = useCallback(event => {
|
|
17
|
+
const {
|
|
18
|
+
width,
|
|
19
|
+
height
|
|
20
|
+
} = event.nativeEvent.layout;
|
|
21
|
+
layout.set({
|
|
22
|
+
width,
|
|
23
|
+
height
|
|
24
|
+
});
|
|
25
|
+
}, [layout]);
|
|
26
|
+
const clippingStyles = useDerivedValue(() => {
|
|
27
|
+
const clipStyle = slotsMap.get().clip?.style;
|
|
28
|
+
// Reset-only slots have no rectangle dimensions.
|
|
29
|
+
const clip = clipStyle?.width !== undefined && clipStyle.height !== undefined ? clipStyle : undefined;
|
|
30
|
+
// Keep content independent of the viewport, even before onLayout.
|
|
31
|
+
const contentLayout = layout.get() ?? screenInterpolatorProps.get().layouts.screen;
|
|
32
|
+
const x = clip?.x ?? 0;
|
|
33
|
+
const y = clip?.y ?? 0;
|
|
34
|
+
return {
|
|
35
|
+
viewport: {
|
|
36
|
+
width: clip ? clip.width : "100%",
|
|
37
|
+
height: clip ? clip.height : "100%",
|
|
38
|
+
overflow: clip ? "hidden" : "visible",
|
|
39
|
+
borderRadius: clip?.borderRadius,
|
|
40
|
+
borderTopLeftRadius: clip?.borderTopLeftRadius,
|
|
41
|
+
borderTopRightRadius: clip?.borderTopRightRadius,
|
|
42
|
+
borderBottomLeftRadius: clip?.borderBottomLeftRadius,
|
|
43
|
+
borderBottomRightRadius: clip?.borderBottomRightRadius,
|
|
44
|
+
borderTopStartRadius: clip?.borderTopStartRadius,
|
|
45
|
+
borderTopEndRadius: clip?.borderTopEndRadius,
|
|
46
|
+
borderBottomStartRadius: clip?.borderBottomStartRadius,
|
|
47
|
+
borderBottomEndRadius: clip?.borderBottomEndRadius,
|
|
48
|
+
borderStartStartRadius: clip?.borderStartStartRadius,
|
|
49
|
+
borderStartEndRadius: clip?.borderStartEndRadius,
|
|
50
|
+
borderEndStartRadius: clip?.borderEndStartRadius,
|
|
51
|
+
borderEndEndRadius: clip?.borderEndEndRadius,
|
|
52
|
+
borderCurve: clip?.borderCurve,
|
|
53
|
+
transform: [{
|
|
54
|
+
translateX: x
|
|
55
|
+
}, {
|
|
56
|
+
translateY: y
|
|
57
|
+
}]
|
|
58
|
+
},
|
|
59
|
+
content: {
|
|
60
|
+
width: contentLayout.width,
|
|
61
|
+
height: contentLayout.height,
|
|
62
|
+
transform: [{
|
|
63
|
+
translateX: -x
|
|
64
|
+
}, {
|
|
65
|
+
translateY: -y
|
|
66
|
+
}]
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
const viewportStyle = useAnimatedStyle(() => clippingStyles.get().viewport);
|
|
71
|
+
const innerStyle = useAnimatedStyle(() => clippingStyles.get().content);
|
|
72
|
+
return /*#__PURE__*/_jsx(View, {
|
|
73
|
+
style: styles.host,
|
|
74
|
+
onLayout: onLayout,
|
|
75
|
+
pointerEvents: pointerEvents,
|
|
76
|
+
collapsable: false,
|
|
77
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
78
|
+
style: [styles.viewport, viewportStyle],
|
|
79
|
+
pointerEvents: pointerEvents,
|
|
80
|
+
collapsable: false,
|
|
81
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
82
|
+
style: [styles.inner, innerStyle],
|
|
83
|
+
pointerEvents: pointerEvents,
|
|
84
|
+
collapsable: false,
|
|
85
|
+
children: children
|
|
86
|
+
})
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
const styles = StyleSheet.create({
|
|
91
|
+
host: {
|
|
92
|
+
flex: 1
|
|
93
|
+
},
|
|
94
|
+
// Pin to the physical left under both native layout directions.
|
|
95
|
+
viewport: {
|
|
96
|
+
position: "absolute",
|
|
97
|
+
top: 0,
|
|
98
|
+
...(I18nManager.isRTL ? {
|
|
99
|
+
end: 0
|
|
100
|
+
} : {
|
|
101
|
+
left: 0
|
|
102
|
+
})
|
|
103
|
+
},
|
|
104
|
+
inner: {
|
|
105
|
+
...(I18nManager.isRTL ? {
|
|
106
|
+
alignSelf: "flex-end"
|
|
107
|
+
} : {
|
|
108
|
+
alignSelf: "flex-start"
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
//# sourceMappingURL=clip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","useCallback","I18nManager","StyleSheet","View","Animated","useAnimatedStyle","useDerivedValue","useSharedValue","useOrchestratorStore","jsx","_jsx","Clip","children","pointerEvents","slotsMap","store","screenInterpolatorProps","layout","onLayout","event","width","height","nativeEvent","set","clippingStyles","clipStyle","get","clip","style","undefined","contentLayout","layouts","screen","x","y","viewport","overflow","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderTopStartRadius","borderTopEndRadius","borderBottomStartRadius","borderBottomEndRadius","borderStartStartRadius","borderStartEndRadius","borderEndStartRadius","borderEndEndRadius","borderCurve","transform","translateX","translateY","content","viewportStyle","innerStyle","styles","host","collapsable","inner","create","flex","position","top","isRTL","end","left","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D,WAAW,CAACgE,KAAK,GAClB;MAAEG,SAAS,EAAE;IAAoB,CAAC,GAClC;MAAEA,SAAS,EAAE;IAAsB,CAAC;EACxC;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { memo
|
|
3
|
+
import { memo } from "react";
|
|
4
4
|
import { StyleSheet, View } from "react-native";
|
|
5
5
|
import { GestureDetector } from "react-native-gesture-handler";
|
|
6
|
-
import Animated from "react-native-reanimated";
|
|
7
6
|
import { useBuilderStore } from "../../../../providers/screen/builder";
|
|
8
7
|
import { useMotionStore } from "../../../../providers/screen/motion";
|
|
9
8
|
import { useSlotProps, useSlotStyles } from "../../../../providers/screen/orchestrator/styles";
|
|
10
|
-
import {
|
|
9
|
+
import { PortalOverlay } from "../../../boundary/portal/components/portal-overlay";
|
|
10
|
+
import { LayerComponent } from "../helpers/layer-component";
|
|
11
11
|
import { useContentLayout } from "../hooks/use-content-layout";
|
|
12
|
-
import {
|
|
13
|
-
import { usesLayerRenderProps } from "./render-component";
|
|
12
|
+
import { Clip } from "./clip";
|
|
14
13
|
import { SurfaceLayer } from "./surface";
|
|
15
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
15
|
export const ContentLayer = /*#__PURE__*/memo(({
|
|
@@ -20,47 +19,33 @@ export const ContentLayer = /*#__PURE__*/memo(({
|
|
|
20
19
|
}) => {
|
|
21
20
|
const gestureContext = useMotionStore(store => store.gestures);
|
|
22
21
|
const ContentComponent = useBuilderStore(store => store.options.contentComponent);
|
|
23
|
-
const isNavigationMaskEnabled = useBuilderStore(store => !!store.options.navigationMaskEnabled);
|
|
24
22
|
const hasAutoSnapPoint = useBuilderStore(store => store.options.snapPoints?.includes("auto") ?? false);
|
|
25
23
|
const contentPointerEvents = isBackdropActive ? "box-none" : pointerEvents;
|
|
26
|
-
const AnimatedContentComponent = useMemo(() => {
|
|
27
|
-
return ContentComponent && !usesLayerRenderProps(ContentComponent) ? Animated.createAnimatedComponent(ContentComponent) : null;
|
|
28
|
-
}, [ContentComponent]);
|
|
29
24
|
const handleContentLayout = useContentLayout("content");
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const contentStyles = [styles.content,
|
|
33
|
-
const contentProps = animatedContentProps;
|
|
25
|
+
const contentStyle = useSlotStyles("content");
|
|
26
|
+
const contentProps = useSlotProps("content");
|
|
27
|
+
const contentStyles = [styles.content, contentStyle];
|
|
34
28
|
const screenChildren = hasAutoSnapPoint ? /*#__PURE__*/_jsx(View, {
|
|
35
29
|
collapsable: false,
|
|
36
30
|
onLayout: handleContentLayout,
|
|
37
31
|
children: children
|
|
38
32
|
}) : children;
|
|
39
|
-
const contentChildren = /*#__PURE__*/_jsxs(MaybeMaskedNavigationContainer, {
|
|
40
|
-
pointerEvents: contentPointerEvents,
|
|
41
|
-
enabled: isNavigationMaskEnabled,
|
|
42
|
-
children: [/*#__PURE__*/_jsx(SurfaceLayer, {
|
|
43
|
-
pointerEvents: contentPointerEvents,
|
|
44
|
-
children: screenChildren
|
|
45
|
-
}), /*#__PURE__*/_jsx(ScreenFallbackHost, {})]
|
|
46
|
-
});
|
|
47
33
|
return /*#__PURE__*/_jsx(GestureDetector, {
|
|
48
34
|
gesture: gestureContext.detectorGesture,
|
|
49
|
-
children:
|
|
50
|
-
|
|
51
|
-
animatedProps: animatedContentProps,
|
|
52
|
-
pointerEvents: contentPointerEvents,
|
|
53
|
-
children: contentChildren
|
|
54
|
-
}) : ContentComponent ? /*#__PURE__*/_jsx(ContentComponent, {
|
|
35
|
+
children: /*#__PURE__*/_jsx(LayerComponent, {
|
|
36
|
+
component: ContentComponent,
|
|
55
37
|
styles: contentStyles,
|
|
56
38
|
props: contentProps,
|
|
57
39
|
pointerEvents: contentPointerEvents,
|
|
58
|
-
children:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
40
|
+
children: /*#__PURE__*/_jsxs(Clip, {
|
|
41
|
+
pointerEvents: contentPointerEvents,
|
|
42
|
+
children: [/*#__PURE__*/_jsx(SurfaceLayer, {
|
|
43
|
+
pointerEvents: contentPointerEvents,
|
|
44
|
+
children: screenChildren
|
|
45
|
+
}), /*#__PURE__*/_jsx(PortalOverlay, {
|
|
46
|
+
fallback: true
|
|
47
|
+
})]
|
|
48
|
+
})
|
|
64
49
|
})
|
|
65
50
|
});
|
|
66
51
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","
|
|
1
|
+
{"version":3,"names":["memo","StyleSheet","View","GestureDetector","useBuilderStore","useMotionStore","useSlotProps","useSlotStyles","PortalOverlay","LayerComponent","useContentLayout","Clip","SurfaceLayer","jsx","_jsx","jsxs","_jsxs","ContentLayer","children","pointerEvents","isBackdropActive","gestureContext","store","gestures","ContentComponent","options","contentComponent","hasAutoSnapPoint","snapPoints","includes","contentPointerEvents","handleContentLayout","contentStyle","contentProps","contentStyles","styles","content","screenChildren","collapsable","onLayout","gesture","detectorGesture","component","props","fallback","create","flex"],"sourceRoot":"../../../../../../src","sources":["components/screen/container/layers/content.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,SAASC,eAAe,QAAQ,sCAAsC;AACtE,SAASC,cAAc,QAAQ,qCAAqC;AACpE,SACCC,YAAY,EACZC,aAAa,QACP,kDAAkD;AACzD,SAASC,aAAa,QAAQ,oDAAoD;AAClF,SAASC,cAAc,QAAQ,4BAA4B;AAC3D,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,YAAY,QAAQ,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQzC,OAAO,MAAMC,YAAY,gBAAGjB,IAAI,CAC/B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;QAAc,CACF,CAAC,eACfvB,IAAA,CAACN,aAAa;UAACoC,QAAQ;QAAA,CAAE,CAAC;MAAA,CACrB;IAAC,CACQ;EAAC,CACD,CAAC;AAEpB,CACD,CAAC;AAED,MAAMT,MAAM,GAAGlC,UAAU,CAAC4C,MAAM,CAAC;EAChCT,OAAO,EAAE;IACRU,IAAI,EAAE;EACP;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { memo
|
|
3
|
+
import { memo } from "react";
|
|
4
4
|
import { StyleSheet } from "react-native";
|
|
5
|
-
import Animated from "react-native-reanimated";
|
|
6
5
|
import { useBuilderStore } from "../../../../providers/screen/builder";
|
|
7
6
|
import { useSlotProps, useSlotStyles } from "../../../../providers/screen/orchestrator/styles";
|
|
8
|
-
import {
|
|
7
|
+
import { LayerComponent } from "../helpers/layer-component";
|
|
9
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
9
|
export const SurfaceLayer = /*#__PURE__*/memo(({
|
|
11
10
|
children,
|
|
12
11
|
pointerEvents
|
|
13
12
|
}) => {
|
|
14
13
|
const SurfaceComponent = useBuilderStore(store => store.options.surfaceComponent);
|
|
15
|
-
const AnimatedSurfaceComponent = useMemo(() => {
|
|
16
|
-
return SurfaceComponent && !usesLayerRenderProps(SurfaceComponent) ? Animated.createAnimatedComponent(SurfaceComponent) : null;
|
|
17
|
-
}, [SurfaceComponent]);
|
|
18
14
|
const animatedSurfaceStyle = useSlotStyles("surface");
|
|
19
15
|
const animatedSurfaceProps = useSlotProps("surface");
|
|
20
16
|
const surfaceStyles = [styles.surface, animatedSurfaceStyle];
|
|
@@ -22,15 +18,8 @@ export const SurfaceLayer = /*#__PURE__*/memo(({
|
|
|
22
18
|
if (!SurfaceComponent) {
|
|
23
19
|
return children;
|
|
24
20
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
style: surfaceStyles,
|
|
28
|
-
animatedProps: animatedSurfaceProps,
|
|
29
|
-
pointerEvents: pointerEvents,
|
|
30
|
-
children: children
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
return /*#__PURE__*/_jsx(SurfaceComponent, {
|
|
21
|
+
return /*#__PURE__*/_jsx(LayerComponent, {
|
|
22
|
+
component: SurfaceComponent,
|
|
34
23
|
styles: surfaceStyles,
|
|
35
24
|
props: surfaceProps,
|
|
36
25
|
pointerEvents: pointerEvents,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","
|
|
1
|
+
{"version":3,"names":["memo","StyleSheet","useBuilderStore","useSlotProps","useSlotStyles","LayerComponent","jsx","_jsx","SurfaceLayer","children","pointerEvents","SurfaceComponent","store","options","surfaceComponent","animatedSurfaceStyle","animatedSurfaceProps","surfaceStyles","styles","surface","surfaceProps","component","props","create","flex"],"sourceRoot":"../../../../../../src","sources":["components/screen/container/layers/surface.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,eAAe,QAAQ,sCAAsC;AACtE,SACCC,YAAY,EACZC,aAAa,QACP,kDAAkD;AAEzD,SAASC,cAAc,QAAQ,4BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAO5D,OAAO,MAAMC,YAAY,gBAAGR,IAAI,CAAC,CAAC;EAAES,QAAQ;EAAEC;AAAqB,CAAC,KAAK;EACxE,MAAMC,gBAAgB,GAAGT,eAAe,CACtCU,KAAK,IAAKA,KAAK,CAACC,OAAO,CAACC,gBAC1B,CAAC;EAED,MAAMC,oBAAoB,GAAGX,aAAa,CAAC,SAAS,CAAC;EACrD,MAAMY,oBAAoB,GAAGb,YAAY,CAAC,SAAS,CAAC;EACpD,MAAMc,aAAa,GAAG,CACrBC,MAAM,CAACC,OAAO,EACdJ,oBAAoB,CACqB;EAC1C,MAAMK,YAAY,GACjBJ,oBAA4D;EAE7D,IAAI,CAACL,gBAAgB,EAAE;IACtB,OAAOF,QAAQ;EAChB;EAEA,oBACCF,IAAA,CAACF,cAAc;IACdgB,SAAS,EAAEV,gBAAiB;IAC5BO,MAAM,EAAED,aAAc;IACtBK,KAAK,EAAEF,YAAa;IACpBV,aAAa,EAAEA,aAAc;IAAAD,QAAA,EAE5BA;EAAQ,CACM,CAAC;AAEnB,CAAC,CAAC;AAEF,MAAMS,MAAM,GAAGjB,UAAU,CAACsB,MAAM,CAAC;EAChCJ,OAAO,EAAE;IACRK,IAAI,EAAE;EACP;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useLayoutEffect } from "react";
|
|
3
|
+
import { useLayoutEffect, useRef } from "react";
|
|
4
4
|
import { useAnimatedReaction } from "react-native-reanimated";
|
|
5
|
-
import { scheduleOnRN } from "react-native-worklets";
|
|
5
|
+
import { scheduleOnRN, scheduleOnUI } from "react-native-worklets";
|
|
6
6
|
import { AnimationProgress } from "../../../../constants";
|
|
7
7
|
import useStableCallback from "../../../../hooks/use-stable-callback";
|
|
8
8
|
import { useBuilderStore } from "../../../../providers/screen/builder";
|
|
@@ -27,6 +27,7 @@ function getInitialProgress({
|
|
|
27
27
|
* Handles opening transition intent on mount.
|
|
28
28
|
*/
|
|
29
29
|
export function useOpenTransitionIntent(current, animations, system, onComplete) {
|
|
30
|
+
const initialized = useRef(false);
|
|
30
31
|
const isFirstKey = useBuilderStore(store => store.derivations.isFirstKey);
|
|
31
32
|
const {
|
|
32
33
|
requestLifecycleTransition
|
|
@@ -54,6 +55,20 @@ export function useOpenTransitionIntent(current, animations, system, onComplete)
|
|
|
54
55
|
|
|
55
56
|
// biome-ignore lint/correctness/useExhaustiveDependencies: Must only run once on mount
|
|
56
57
|
useLayoutEffect(() => {
|
|
58
|
+
// TODO: Find a cleaner way to handle effect setup and resumption across Activity pauses.
|
|
59
|
+
// Activity reconnects effects when a retained screen becomes visible again.
|
|
60
|
+
if (initialized.current) {
|
|
61
|
+
// Activity cleanup cancels shared-value animations; resume only unfinished opens.
|
|
62
|
+
scheduleOnUI(() => {
|
|
63
|
+
"worklet";
|
|
64
|
+
|
|
65
|
+
if (animations.entering.get() && !animations.closing.get() && !animations.progressSettled.get() && system.pendingLifecycleRequestKind.get() === LifecycleTransitionRequestKind.None) {
|
|
66
|
+
requestLifecycleTransition(LifecycleTransitionRequestKind.Open, system.targetProgress.get());
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
initialized.current = true;
|
|
57
72
|
const {
|
|
58
73
|
snapPoints,
|
|
59
74
|
initialSnapIndex = 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useLayoutEffect","useAnimatedReaction","scheduleOnRN","AnimationProgress","useStableCallback","useBuilderStore","LifecycleTransitionRequestKind","getInitialProgress","snapPoints","initialSnapIndex","undefined","clampedIndex","Math","min","max","length","useOpenTransitionIntent","current","animations","system","onComplete","isFirstKey","store","derivations","requestLifecycleTransition","actions","completeOpen","animationProgress","closing","get","Visible","complete","previouslyComplete","
|
|
1
|
+
{"version":3,"names":["useLayoutEffect","useRef","useAnimatedReaction","scheduleOnRN","scheduleOnUI","AnimationProgress","useStableCallback","useBuilderStore","LifecycleTransitionRequestKind","getInitialProgress","snapPoints","initialSnapIndex","undefined","clampedIndex","Math","min","max","length","useOpenTransitionIntent","current","animations","system","onComplete","initialized","isFirstKey","store","derivations","requestLifecycleTransition","actions","completeOpen","animationProgress","closing","get","Visible","complete","previouslyComplete","entering","progressSettled","pendingLifecycleRequestKind","None","Open","targetProgress","experimental_animateOnInitialMount","options","initialProgress","set","transitionProgress","target","progressAnimating"],"sourceRoot":"../../../../../../src","sources":["components/screen/lifecycle/hooks/use-open-transition-intent.ts"],"mappings":";;AAAA,SAASA,eAAe,EAAEC,MAAM,QAAQ,OAAO;AAC/C,SAASC,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,YA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