react-native-screen-transitions 3.9.0-beta.1 → 3.9.0-beta.3
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/shared/adapters/with-screen-transitions/index.js +20 -4
- package/lib/commonjs/shared/adapters/with-screen-transitions/index.js.map +1 -1
- package/lib/commonjs/shared/animation/transition-blocking.js +71 -0
- package/lib/commonjs/shared/animation/transition-blocking.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js +33 -28
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js +30 -95
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +75 -51
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +14 -2
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-register-target.js +32 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-register-target.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/index.js +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/components/host.js +41 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js +14 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +224 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js +45 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/{host.js → boundary-portal/components/host.js} +20 -18
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/{portal-boundary-host.js → boundary-portal/components/portal-boundary-host.js} +13 -12
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +51 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js +14 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.js +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +185 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.js +23 -5
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-placeholder-styles.js +3 -6
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js +31 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.js +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.js +7 -12
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/index.js +1 -8
- package/lib/commonjs/shared/components/boundary/portal/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/teleport.js +4 -3
- package/lib/commonjs/shared/components/boundary/portal/teleport.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +1 -15
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +19 -56
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +90 -23
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +41 -12
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/measured-bounds.js +36 -1
- package/lib/commonjs/shared/components/boundary/utils/measured-bounds.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js +1 -1
- package/lib/commonjs/shared/configs/presets.js +2 -2
- package/lib/commonjs/shared/configs/presets.js.map +1 -1
- package/lib/commonjs/shared/constants.js +4 -0
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/index.js +13 -0
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +4 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/activation/use-pan-activation.js +10 -10
- package/lib/commonjs/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +10 -2
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/use-build-pan-gesture.js +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/use-build-pan-gesture.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +25 -3
- package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -6
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js +6 -1
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/snapshot.js +2 -0
- package/lib/commonjs/shared/providers/screen/gestures/shared/snapshot.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/values.js +2 -0
- package/lib/commonjs/shared/providers/screen/gestures/shared/values.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +13 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +5 -3
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +1 -1
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -1
- package/lib/commonjs/shared/stores/gesture.store.js +8 -0
- package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
- package/lib/commonjs/shared/stores/system.store.js +10 -2
- package/lib/commonjs/shared/stores/system.store.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js +24 -7
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +15 -9
- package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +2 -2
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +2 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +178 -315
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/config.js +12 -18
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/config.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js +196 -0
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js +94 -108
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/mask.js +72 -0
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/mask.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/targets.js +55 -0
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/targets.js.map +1 -0
- package/lib/module/shared/adapters/with-screen-transitions/index.js +19 -5
- package/lib/module/shared/adapters/with-screen-transitions/index.js.map +1 -1
- package/lib/module/shared/animation/transition-blocking.js +66 -0
- package/lib/module/shared/animation/transition-blocking.js.map +1 -0
- package/lib/module/shared/components/boundary/components/boundary-target.js +35 -30
- package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/module/shared/components/boundary/create-boundary-component.js +32 -97
- package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +79 -55
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +1 -0
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-measurer.js +15 -3
- package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-register-target.js +27 -0
- package/lib/module/shared/components/boundary/hooks/use-register-target.js.map +1 -0
- package/lib/module/shared/components/boundary/index.js +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js +36 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js +9 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +219 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js +34 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/{host.js → boundary-portal/components/host.js} +20 -18
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/{portal-boundary-host.js → boundary-portal/components/portal-boundary-host.js} +13 -12
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +46 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js +9 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.js +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +180 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.js +23 -5
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-placeholder-styles.js +3 -6
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js +27 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.js +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.js +5 -10
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/index.js +1 -2
- package/lib/module/shared/components/boundary/portal/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/teleport.js +3 -2
- package/lib/module/shared/components/boundary/portal/teleport.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/naming.js +0 -12
- package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/ownership.js +16 -52
- package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +1 -1
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +87 -20
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/destination-signals.js +39 -10
- package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/measured-bounds.js +34 -0
- package/lib/module/shared/components/boundary/utils/measured-bounds.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/configs/presets.js +2 -2
- package/lib/module/shared/configs/presets.js.map +1 -1
- package/lib/module/shared/constants.js +4 -0
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/index.js +1 -0
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +4 -0
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/activation/use-pan-activation.js +10 -10
- package/lib/module/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +10 -2
- package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/use-build-pan-gesture.js +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/use-build-pan-gesture.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +23 -2
- package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -6
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -2
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js +6 -1
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/snapshot.js +2 -0
- package/lib/module/shared/providers/screen/gestures/shared/snapshot.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/values.js +2 -0
- package/lib/module/shared/providers/screen/gestures/shared/values.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +13 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/slot.provider.js +5 -3
- package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +1 -1
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -1
- package/lib/module/shared/stores/gesture.store.js +8 -0
- package/lib/module/shared/stores/gesture.store.js.map +1 -1
- package/lib/module/shared/stores/system.store.js +10 -2
- package/lib/module/shared/stores/system.store.js.map +1 -1
- package/lib/module/shared/types/bounds.types.js +26 -0
- package/lib/module/shared/types/bounds.types.js.map +1 -1
- package/lib/module/shared/utils/animation/animate-to-progress.js +24 -7
- package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +15 -9
- package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js +2 -2
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js +2 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js +182 -319
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/config.js +11 -17
- package/lib/module/shared/utils/bounds/navigation/zoom/config.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/drag.js +184 -0
- package/lib/module/shared/utils/bounds/navigation/zoom/drag.js.map +1 -0
- package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js +91 -102
- package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/mask.js +67 -0
- package/lib/module/shared/utils/bounds/navigation/zoom/mask.js.map +1 -0
- package/lib/module/shared/utils/bounds/navigation/zoom/targets.js +50 -0
- package/lib/module/shared/utils/bounds/navigation/zoom/targets.js.map +1 -0
- package/lib/typescript/shared/adapters/with-screen-transitions/index.d.ts +4 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/index.d.ts.map +1 -1
- package/lib/typescript/shared/animation/transition-blocking.d.ts +33 -0
- package/lib/typescript/shared/animation/transition-blocking.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +3 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts +2 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts +10 -0
- package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/index.d.ts +2 -2
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/components/host.d.ts +10 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/components/host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.d.ts +2 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts +9 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts +13 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts +3 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.d.ts +2 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.d.ts +5 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.d.ts +3 -3
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/index.d.ts +1 -2
- package/lib/typescript/shared/components/boundary/portal/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts +1 -0
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +0 -2
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +9 -10
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +22 -21
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts +9 -2
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +2 -1
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/activation/use-pan-activation.d.ts +2 -0
- package/lib/typescript/shared/providers/screen/gestures/pan/activation/use-pan-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/use-build-pan-gesture.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts +2 -0
- package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/snapshot.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/values.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +5 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/gesture.store.d.ts +4 -0
- package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +3 -3
- package/lib/typescript/shared/types/bounds.types.d.ts +122 -90
- package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/gesture.types.d.ts +10 -0
- package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +1 -1
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/config.d.ts +7 -17
- package/lib/typescript/shared/utils/bounds/navigation/zoom/config.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts +55 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts +31 -34
- package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/mask.d.ts +25 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/mask.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/targets.d.ts +16 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/targets.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/types.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/options.d.ts +6 -2
- package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/adapters/with-screen-transitions/index.tsx +30 -9
- package/src/shared/animation/transition-blocking.ts +79 -0
- package/src/shared/components/boundary/components/boundary-target.tsx +47 -43
- package/src/shared/components/boundary/create-boundary-component.tsx +35 -150
- package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +106 -81
- package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +1 -0
- package/src/shared/components/boundary/hooks/use-measurer.ts +12 -4
- package/src/shared/components/boundary/hooks/use-register-target.ts +43 -0
- package/src/shared/components/boundary/index.tsx +2 -2
- package/src/shared/components/boundary/portal/components/boundary-content-portal/components/host.tsx +52 -0
- package/src/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.ts +9 -0
- package/src/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +317 -0
- package/src/shared/components/boundary/portal/components/boundary-content-portal/index.tsx +62 -0
- package/src/shared/components/boundary/portal/components/{host.tsx → boundary-portal/components/host.tsx} +17 -17
- package/src/shared/components/boundary/portal/components/{portal-boundary-host.tsx → boundary-portal/components/portal-boundary-host.tsx} +14 -13
- package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.tsx +79 -0
- package/src/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/has-local-slot.ts +1 -1
- package/src/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.ts +10 -0
- package/src/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.ts +2 -2
- package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +254 -0
- package/src/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.ts +38 -8
- package/src/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-placeholder-styles.ts +4 -15
- package/src/shared/components/boundary/portal/components/boundary-portal/index.tsx +35 -0
- package/src/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.ts +2 -2
- package/src/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.ts +10 -15
- package/src/shared/components/boundary/portal/index.ts +1 -2
- package/src/shared/components/boundary/portal/teleport.ts +3 -2
- package/src/shared/components/boundary/portal/utils/naming.ts +0 -19
- package/src/shared/components/boundary/portal/utils/ownership.ts +32 -88
- package/src/shared/components/boundary/providers/boundary-root.provider.tsx +218 -78
- package/src/shared/components/boundary/utils/destination-signals.ts +38 -14
- package/src/shared/components/boundary/utils/measured-bounds.ts +48 -0
- package/src/shared/components/screen-container/layers/content.tsx +1 -1
- package/src/shared/configs/presets.ts +2 -2
- package/src/shared/constants.ts +4 -0
- package/src/shared/index.ts +6 -0
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +8 -0
- package/src/shared/providers/screen/gestures/pan/activation/use-pan-activation.ts +16 -7
- package/src/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.ts +18 -1
- package/src/shared/providers/screen/gestures/pan/use-build-pan-gesture.ts +1 -0
- package/src/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.ts +40 -2
- package/src/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.ts +7 -11
- package/src/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.ts +12 -15
- package/src/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.ts +6 -1
- package/src/shared/providers/screen/gestures/shared/snapshot.ts +2 -0
- package/src/shared/providers/screen/gestures/shared/values.ts +2 -0
- package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +15 -1
- package/src/shared/providers/screen/styles/slot.provider.tsx +4 -2
- package/src/shared/providers/screen/styles/stores/slot-references.store.ts +2 -1
- package/src/shared/stores/gesture.store.ts +12 -0
- package/src/shared/stores/system.store.ts +10 -4
- package/src/shared/types/animation.types.ts +3 -3
- package/src/shared/types/bounds.types.ts +128 -92
- package/src/shared/types/gesture.types.ts +10 -0
- package/src/shared/types/index.ts +2 -0
- package/src/shared/utils/animation/animate-to-progress.ts +23 -7
- package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +18 -11
- package/src/shared/utils/bounds/navigation/reveal/build.ts +2 -2
- package/src/shared/utils/bounds/navigation/reveal/math.ts +2 -1
- package/src/shared/utils/bounds/navigation/zoom/build.ts +224 -412
- package/src/shared/utils/bounds/navigation/zoom/config.ts +15 -18
- package/src/shared/utils/bounds/navigation/zoom/drag.ts +327 -0
- package/src/shared/utils/bounds/navigation/zoom/helpers.ts +122 -184
- package/src/shared/utils/bounds/navigation/zoom/mask.ts +130 -0
- package/src/shared/utils/bounds/navigation/zoom/targets.ts +74 -0
- package/src/shared/utils/bounds/navigation/zoom/types.ts +1 -1
- package/src/shared/utils/bounds/types/options.ts +9 -2
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js +0 -58
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js +0 -272
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/stores/host-bounds.store.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/math.js +0 -25
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/math.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js +0 -53
- package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/components/host.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/components/portal.js +0 -267
- package/lib/module/shared/components/boundary/portal/components/portal.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/stores/host-bounds.store.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +0 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/math.js +0 -20
- package/lib/module/shared/utils/bounds/navigation/zoom/math.js.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts +0 -8
- package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +0 -20
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts +0 -17
- package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/stores/host-bounds.store.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts +0 -3
- package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/math.d.ts +0 -8
- package/lib/typescript/shared/utils/bounds/navigation/zoom/math.d.ts.map +0 -1
- package/src/shared/components/boundary/portal/components/boundary-local-portal-host.tsx +0 -66
- package/src/shared/components/boundary/portal/components/portal.tsx +0 -412
- package/src/shared/utils/bounds/navigation/zoom/math.ts +0 -25
- /package/lib/commonjs/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/has-local-slot.js +0 -0
- /package/lib/commonjs/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.js +0 -0
- /package/lib/module/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/has-local-slot.js +0 -0
- /package/lib/module/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.js +0 -0
- /package/lib/typescript/shared/components/boundary/portal/components/{host.d.ts → boundary-portal/components/host.d.ts} +0 -0
- /package/lib/typescript/shared/components/boundary/portal/components/{portal-boundary-host.d.ts → boundary-portal/components/portal-boundary-host.d.ts} +0 -0
- /package/lib/typescript/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.d.ts +0 -0
- /package/src/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.ts +0 -0
|
@@ -4,7 +4,13 @@ import { Children, cloneElement, forwardRef, isValidElement, useCallback, useMem
|
|
|
4
4
|
import { adaptNativeStackTransitionOptions } from "./options";
|
|
5
5
|
import { ScreenTransitionsScreenLayout, ScreenTransitionsStackLayout } from "./stack-layout";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
function
|
|
7
|
+
export function createTransitionScreenLayout(screenLayout) {
|
|
8
|
+
return screenLayoutArgs => /*#__PURE__*/_jsx(ScreenTransitionsScreenLayout, {
|
|
9
|
+
screenLayout: screenLayout,
|
|
10
|
+
screenLayoutArgs: screenLayoutArgs
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export function adaptNavigatorChildren(children) {
|
|
8
14
|
return Children.map(children, child => {
|
|
9
15
|
if (! /*#__PURE__*/isValidElement(child)) {
|
|
10
16
|
return child;
|
|
@@ -20,6 +26,17 @@ function adaptNavigatorChildren(children) {
|
|
|
20
26
|
nextProps.screenOptions = adaptNativeStackTransitionOptions(props.screenOptions);
|
|
21
27
|
changed = true;
|
|
22
28
|
}
|
|
29
|
+
|
|
30
|
+
// Screen and group layouts replace the navigator default, so each override
|
|
31
|
+
// must carry the transition screen layout with it.
|
|
32
|
+
if (typeof props.layout === "function") {
|
|
33
|
+
nextProps.layout = createTransitionScreenLayout(props.layout);
|
|
34
|
+
changed = true;
|
|
35
|
+
}
|
|
36
|
+
if (typeof props.screenLayout === "function") {
|
|
37
|
+
nextProps.screenLayout = createTransitionScreenLayout(props.screenLayout);
|
|
38
|
+
changed = true;
|
|
39
|
+
}
|
|
23
40
|
if (props.children !== undefined && typeof props.children !== "function") {
|
|
24
41
|
nextProps.children = adaptNavigatorChildren(props.children);
|
|
25
42
|
changed = true;
|
|
@@ -41,10 +58,7 @@ export function withScreenTransitions(navigator) {
|
|
|
41
58
|
layout: layout,
|
|
42
59
|
layoutArgs: layoutArgs
|
|
43
60
|
}), [layout]);
|
|
44
|
-
const transitionScreenLayout =
|
|
45
|
-
screenLayout: screenLayout,
|
|
46
|
-
screenLayoutArgs: screenLayoutArgs
|
|
47
|
-
}), [screenLayout]);
|
|
61
|
+
const transitionScreenLayout = useMemo(() => createTransitionScreenLayout(screenLayout), [screenLayout]);
|
|
48
62
|
const screenOptions = useMemo(() => adaptNativeStackTransitionOptions(props.screenOptions), [props.screenOptions]);
|
|
49
63
|
const children = useMemo(() => adaptNavigatorChildren(props.children), [props.children]);
|
|
50
64
|
return /*#__PURE__*/_jsx(BaseNavigator, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Children","cloneElement","forwardRef","isValidElement","useCallback","useMemo","adaptNativeStackTransitionOptions","ScreenTransitionsScreenLayout","ScreenTransitionsStackLayout","jsx","_jsx","adaptNavigatorChildren","children","map","child","props","nextProps","changed","options","screenOptions","undefined","withScreenTransitions","navigator","BaseNavigator","Navigator","ScreenTransitionsNavigator","
|
|
1
|
+
{"version":3,"names":["Children","cloneElement","forwardRef","isValidElement","useCallback","useMemo","adaptNativeStackTransitionOptions","ScreenTransitionsScreenLayout","ScreenTransitionsStackLayout","jsx","_jsx","createTransitionScreenLayout","screenLayout","screenLayoutArgs","adaptNavigatorChildren","children","map","child","props","nextProps","changed","options","screenOptions","layout","undefined","withScreenTransitions","navigator","BaseNavigator","Navigator","ScreenTransitionsNavigator","ref","transitionLayout","layoutArgs","transitionScreenLayout","displayName","name"],"sourceRoot":"../../../../../src","sources":["shared/adapters/with-screen-transitions/index.tsx"],"mappings":";;AAKA,SACCA,QAAQ,EACRC,YAAY,EACZC,UAAU,EACVC,cAAc,EACdC,WAAW,EACXC,OAAO,QACD,OAAO;AAKd,SAASC,iCAAiC,QAAQ,WAAW;AAC7D,SACCC,6BAA6B,EAC7BC,4BAA4B,QACtB,gBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAqBxB,OAAO,SAASC,4BAA4BA,CAC3CC,YAA2B,EACZ;EACf,OAAQC,gBAAgB,iBACvBH,IAAA,CAACH,6BAA6B;IAC7BK,YAAY,EAAEA,YAAa;IAC3BC,gBAAgB,EAAEA;EAAiB,CACnC,CACD;AACF;AAEA,OAAO,SAASC,sBAAsBA,CAACC,QAAmB,EAAa;EACtE,OAAOf,QAAQ,CAACgB,GAAG,CAACD,QAAQ,EAAGE,KAAK,IAAK;IACxC,IAAI,eAACd,cAAc,CAACc,KAAK,CAAC,EAAE;MAC3B,OAAOA,KAAK;IACb;IAEA,MAAMC,KAAK,GAAGD,KAAK,CAACC,KAAgC;IACpD,MAAMC,SAAkC,GAAG,CAAC,CAAC;IAC7C,IAAIC,OAAO,GAAG,KAAK;IAEnB,IAAI,SAAS,IAAIF,KAAK,EAAE;MACvBC,SAAS,CAACE,OAAO,GAAGf,iCAAiC,CACpDY,KAAK,CAACG,OACP,CAAC;MACDD,OAAO,GAAG,IAAI;IACf;IAEA,IAAI,eAAe,IAAIF,KAAK,EAAE;MAC7BC,SAAS,CAACG,aAAa,GAAGhB,iCAAiC,CAC1DY,KAAK,CAACI,aACP,CAAC;MACDF,OAAO,GAAG,IAAI;IACf;;IAEA;IACA;IACA,IAAI,OAAOF,KAAK,CAACK,MAAM,KAAK,UAAU,EAAE;MACvCJ,SAAS,CAACI,MAAM,GAAGZ,4BAA4B,CAC9CO,KAAK,CAACK,MACP,CAAC;MACDH,OAAO,GAAG,IAAI;IACf;IAEA,IAAI,OAAOF,KA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IAED,oBACCL,IAAA,CAACiB,aAAa;MAAA,GACTT,KAAK;MACTI,aAAa,EAAEA,aAAc;MAC7BQ,GAAG,EAAEA,GAAa;MAClBP,MAAM,EAAEQ,gBAAiB;MACzBnB,YAAY,EAAEqB,sBAAuB;MAAAlB,QAAA,EAEpCA;IAAQ,CACK,CAAC;EAElB,CACD,CAAC;EAEDa,SAAS,CAACM,WAAW,GAAG,yBACvBP,aAAa,CAACO,WAAW,IAAIP,aAAa,CAACQ,IAAI,IAAI,WAAW,GAC5D;EAEH,OAAO;IACN,GAAGT,SAAS;IACZE;EACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { HistoryStore } from "../stores/history.store";
|
|
4
|
+
import { SystemStore } from "../stores/system.store";
|
|
5
|
+
import { logger } from "../utils/logger";
|
|
6
|
+
const resolveTransitionRouteKey = (routeKey, actionName) => {
|
|
7
|
+
if (routeKey !== undefined) {
|
|
8
|
+
if (routeKey.length === 0) {
|
|
9
|
+
logger.warn(`${actionName}: routeKey must not be empty`);
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
return routeKey;
|
|
13
|
+
}
|
|
14
|
+
const entry = HistoryStore.getMostRecent();
|
|
15
|
+
if (!entry) {
|
|
16
|
+
logger.warn(`${actionName}: No screens in history`);
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
return entry.descriptor.route.key;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Prevents a screen's pending lifecycle transition from starting.
|
|
24
|
+
*
|
|
25
|
+
* Calls are reference-counted. Every call must be paired with one
|
|
26
|
+
* {@linkcode unblockTransition} call for the same route. When `routeKey` is
|
|
27
|
+
* omitted, the most recently focused screen in navigation history is used.
|
|
28
|
+
*
|
|
29
|
+
* @param routeKey - Route key of the screen to block.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* blockTransition(route.key);
|
|
34
|
+
* // Render or prepare the destination screen.
|
|
35
|
+
* unblockTransition(route.key);
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @see {@linkcode unblockTransition}
|
|
39
|
+
*/
|
|
40
|
+
export function blockTransition(routeKey) {
|
|
41
|
+
const resolvedRouteKey = resolveTransitionRouteKey(routeKey, "blockTransition");
|
|
42
|
+
if (!resolvedRouteKey) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
SystemStore.getBag(resolvedRouteKey).actions.blockLifecycleStart();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Releases one lifecycle transition block for a screen.
|
|
50
|
+
*
|
|
51
|
+
* The pending transition can start when the screen's final block is released.
|
|
52
|
+
* Extra calls are safe and leave the block count at zero. When `routeKey` is
|
|
53
|
+
* omitted, the most recently focused screen in navigation history is used.
|
|
54
|
+
*
|
|
55
|
+
* @param routeKey - Route key of the screen to unblock.
|
|
56
|
+
*
|
|
57
|
+
* @see {@linkcode blockTransition}
|
|
58
|
+
*/
|
|
59
|
+
export function unblockTransition(routeKey) {
|
|
60
|
+
const resolvedRouteKey = resolveTransitionRouteKey(routeKey, "unblockTransition");
|
|
61
|
+
if (!resolvedRouteKey) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
SystemStore.getBag(resolvedRouteKey).actions.unblockLifecycleStart();
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=transition-blocking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["HistoryStore","SystemStore","logger","resolveTransitionRouteKey","routeKey","actionName","undefined","length","warn","entry","getMostRecent","descriptor","route","key","blockTransition","resolvedRouteKey","getBag","actions","blockLifecycleStart","unblockTransition","unblockLifecycleStart"],"sourceRoot":"../../../../src","sources":["shared/animation/transition-blocking.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,yBAAyB;AACtD,S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,55 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { memo,
|
|
3
|
+
import { memo, useMemo } from "react";
|
|
4
4
|
import Animated, { useAnimatedRef } from "react-native-reanimated";
|
|
5
5
|
import { useComposedSlotStyles, useSlotLayoutStyles } from "../../../providers/screen/styles";
|
|
6
6
|
import { prepareStyleForBounds } from "../../../utils/bounds/helpers/styles/styles";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { useRegisterTarget } from "../hooks/use-register-target";
|
|
8
|
+
import { BoundaryContentPortal, BoundaryContentPortalHost } from "../portal/components/boundary-content-portal";
|
|
9
|
+
import { BoundaryPortal } from "../portal/components/boundary-portal";
|
|
10
|
+
import { useBoundaryRootContext } from "../providers/boundary-root.provider";
|
|
10
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
12
|
export const BoundaryTarget = /*#__PURE__*/memo(function BoundaryTarget(props) {
|
|
12
13
|
const {
|
|
14
|
+
children,
|
|
15
|
+
pointerEvents,
|
|
13
16
|
style,
|
|
14
17
|
...rest
|
|
15
18
|
} = props;
|
|
16
19
|
const targetAnimatedRef = useAnimatedRef();
|
|
17
|
-
const
|
|
20
|
+
const targetEscapePlaceholderRef = useAnimatedRef();
|
|
18
21
|
const rootContext = useBoundaryRootContext();
|
|
19
|
-
const
|
|
20
|
-
const unregisterTargetRef = rootContext?.unregisterTargetRef;
|
|
22
|
+
const boundaryId = rootContext?.boundTag.tag;
|
|
21
23
|
const isActiveTarget = rootContext?.activeTargetRef === targetAnimatedRef;
|
|
22
24
|
const portalRuntime = rootContext?.portalRuntime;
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
+
const handoffEnabled = isActiveTarget && rootContext?.handoffEnabled === true;
|
|
26
|
+
const shouldEscapeTargetToScreenHost = portalRuntime?.escapeClipping === true && boundaryId !== undefined;
|
|
27
|
+
const shouldApplyAssociatedStyleInline = isActiveTarget && portalRuntime?.escapeClipping !== true;
|
|
28
|
+
const shouldApplyPortalLayoutStyle = isActiveTarget && portalRuntime?.escapeClipping === true;
|
|
25
29
|
const associatedTargetStyles = useComposedSlotStyles(rootContext?.boundTag.tag, style);
|
|
26
30
|
const portalLayoutStyle = useSlotLayoutStyles(rootContext?.boundTag.tag);
|
|
27
31
|
const preparedStyles = useMemo(() => prepareStyleForBounds(style), [style]);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
registerTargetRef(targetAnimatedRef, preparedStyles, measurementRef);
|
|
39
|
-
return () => {
|
|
40
|
-
unregisterTargetRef(targetAnimatedRef);
|
|
41
|
-
};
|
|
42
|
-
}, [registerTargetRef, unregisterTargetRef, targetAnimatedRef, preparedStyles, measurementRef]);
|
|
43
|
-
return /*#__PURE__*/_jsx(Portal, {
|
|
44
|
-
id: rootContext?.boundTag.tag,
|
|
45
|
-
handoff: portalRuntime?.handoff,
|
|
46
|
-
escapeClipping: portalRuntime?.escapeClipping,
|
|
47
|
-
placeholderRef: placeholderAnimatedRef,
|
|
32
|
+
const measurementRef = shouldEscapeTargetToScreenHost ? targetEscapePlaceholderRef : targetAnimatedRef;
|
|
33
|
+
useRegisterTarget({
|
|
34
|
+
preparedStyles,
|
|
35
|
+
measurementRef,
|
|
36
|
+
targetAnimatedRef
|
|
37
|
+
});
|
|
38
|
+
return /*#__PURE__*/_jsx(BoundaryPortal, {
|
|
39
|
+
boundaryId: boundaryId ?? "",
|
|
40
|
+
enabled: shouldEscapeTargetToScreenHost,
|
|
41
|
+
placeholderRef: targetEscapePlaceholderRef,
|
|
48
42
|
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
49
43
|
...rest,
|
|
44
|
+
pointerEvents: pointerEvents,
|
|
50
45
|
ref: targetAnimatedRef,
|
|
51
46
|
style: [style, shouldApplyAssociatedStyleInline ? associatedTargetStyles : undefined, shouldApplyPortalLayoutStyle ? portalLayoutStyle : undefined],
|
|
52
|
-
collapsable: false
|
|
47
|
+
collapsable: false,
|
|
48
|
+
children: /*#__PURE__*/_jsx(BoundaryContentPortalHost, {
|
|
49
|
+
boundaryId: boundaryId ?? "",
|
|
50
|
+
enabled: handoffEnabled,
|
|
51
|
+
screenKey: rootContext?.currentScreenKey ?? "",
|
|
52
|
+
children: /*#__PURE__*/_jsx(BoundaryContentPortal, {
|
|
53
|
+
boundaryId: boundaryId,
|
|
54
|
+
enabled: handoffEnabled,
|
|
55
|
+
children: children
|
|
56
|
+
})
|
|
57
|
+
})
|
|
53
58
|
})
|
|
54
59
|
});
|
|
55
60
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","
|
|
1
|
+
{"version":3,"names":["memo","useMemo","Animated","useAnimatedRef","useComposedSlotStyles","useSlotLayoutStyles","prepareStyleForBounds","useRegisterTarget","BoundaryContentPortal","BoundaryContentPortalHost","BoundaryPortal","useBoundaryRootContext","jsx","_jsx","BoundaryTarget","props","children","pointerEvents","style","rest","targetAnimatedRef","targetEscapePlaceholderRef","rootContext","boundaryId","boundTag","tag","isActiveTarget","activeTargetRef","portalRuntime","handoffEnabled","shouldEscapeTargetToScreenHost","escapeClipping","undefined","shouldApplyAssociatedStyleInline","shouldApplyPortalLayoutStyle","associatedTargetStyles","portalLayoutStyle","preparedStyles","measurementRef","enabled","placeholderRef","View","ref","collapsable","screenKey","currentScreenKey"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/components/boundary-target.tsx"],"mappings":";;AACA,SAASA,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAErC,OAAOC,QAAQ,IAAIC,cAAc,QAAQ,yBAAyB;AAClE,SACCC,qBAAqB,EACrBC,mBAAmB,QACb,kCAAkC;AACzC,SAASC,qBAAqB,QAAQ,6CAA6C;AACnF,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SACCC,qBAAqB,EACrBC,yBAAyB,QACn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,GAClDT,0BAA0B,GAC1BD,iBAAiB;EAEpBb,iBAAiB,CAAC;IAAE8B,cAAc;IAAEC,cAAc;IAAElB;EAAkB,CAAC,CAAC;EAExE,oBACCP,IAAA,CAACH,cAAc;IACda,UAAU,EAAEA,UAAU,IAAI,EAAG;IAC7BgB,OAAO,EAAET,8BAA+B;IACxCU,cAAc,EAAEnB,0BAA2B;IAAAL,QAAA,eAE3CH,IAAA,CAACX,QAAQ,CAACuC,IAAI;MAAA,GACTtB,IAAI;MACRF,aAAa,EAAEA,aAAc;MAC7ByB,GAAG,EAAEtB,iBAAkB;MACvBF,KAAK,EAAE,CACNA,KAAK,EACLe,gCAAgC,GAAGE,sBAAsB,GAAGH,SAAS,EACrEE,4BAA4B,GAAGE,iBAAiB,GAAGJ,SAAS,CAC3D;MACFW,WAAW,EAAE,KAAM;MAAA3B,QAAA,eAEnBH,IAAA,CAACJ,yBAAyB;QACzBc,UAAU,EAAEA,UAAU,IAAI,EAAG;QAC7BgB,OAAO,EAAEV,cAAe;QACxBe,SAAS,EAAEtB,WAAW,EAAEuB,gBAAgB,IAAI,EAAG;QAAA7B,QAAA,eAE/CH,IAAA,CAACL,qBAAqB;UACrBe,UAAU,EAAEA,UAAW;UACvBgB,OAAO,EAAEV,cAAe;UAAAb,QAAA,EAEvBA;QAAQ,CACa;MAAC,CACE;IAAC,CACd;EAAC,CACD,CAAC;AAEnB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { forwardRef, memo
|
|
4
|
-
import Animated
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { BoundaryLocalPortalHost } from "./portal/components/boundary-local-portal-host";
|
|
10
|
-
import { Portal } from "./portal/components/portal";
|
|
11
|
-
import { resolveBoundaryPortal } from "./portal/utils/resolve-portal";
|
|
12
|
-
import { BoundaryRootProvider, useBoundaryRootState } from "./providers/boundary-root.provider";
|
|
13
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
const hasRenderableChildren = children => {
|
|
15
|
-
if (children === null || children === undefined || typeof children === "boolean") {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
if (Array.isArray(children)) {
|
|
19
|
-
return children.some(hasRenderableChildren);
|
|
20
|
-
}
|
|
21
|
-
return true;
|
|
22
|
-
};
|
|
3
|
+
import { forwardRef, memo } from "react";
|
|
4
|
+
import Animated from "react-native-reanimated";
|
|
5
|
+
import { BoundaryContentPortalHost } from "./portal/components/boundary-content-portal";
|
|
6
|
+
import { BoundaryPortal } from "./portal/components/boundary-portal";
|
|
7
|
+
import { BoundaryRootProvider } from "./providers/boundary-root.provider";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
9
|
export function createBoundaryComponent(Wrapped, options = {}) {
|
|
24
10
|
const {
|
|
25
11
|
alreadyAnimated = false
|
|
@@ -35,93 +21,42 @@ export function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
35
21
|
target,
|
|
36
22
|
method,
|
|
37
23
|
style,
|
|
38
|
-
onPress,
|
|
39
24
|
handoff,
|
|
40
25
|
escapeClipping,
|
|
41
26
|
children,
|
|
42
27
|
...rest
|
|
43
28
|
} = props;
|
|
44
|
-
|
|
45
|
-
const portalRuntime = resolveBoundaryPortal({
|
|
46
|
-
handoff,
|
|
47
|
-
escapeClipping
|
|
48
|
-
});
|
|
49
|
-
const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
50
|
-
const hasConfiguredInterpolator = useDescriptorsStore(s => s.derivations.hasConfiguredInterpolator);
|
|
51
|
-
const runtimeEnabled = enabled && hasConfiguredInterpolator;
|
|
52
|
-
// Associated slot styles attach whenever the boundary is enabled,
|
|
53
|
-
// independent of whether an interpolator is configured for this transition.
|
|
54
|
-
const shouldAttachAssociatedStyles = enabled;
|
|
55
|
-
const canPortalRoot = portalRuntime.enabled && hasRenderableChildren(children);
|
|
56
|
-
const associatedStyles = useComposedSlotStyles(boundTag.tag, style);
|
|
57
|
-
const associatedStackingStyles = useSlotStackingStyles(boundTag.tag);
|
|
58
|
-
const rootPlaceholderRef = useAnimatedRef();
|
|
59
|
-
const {
|
|
60
|
-
ref,
|
|
61
|
-
contextValue,
|
|
62
|
-
measuredRef,
|
|
63
|
-
hasActiveTarget,
|
|
64
|
-
targetPreparedStyles
|
|
65
|
-
} = useBoundaryRootState({
|
|
66
|
-
boundTag,
|
|
67
|
-
portalRuntime,
|
|
68
|
-
rootMeasurementRef: canPortalRoot ? rootPlaceholderRef : undefined
|
|
69
|
-
});
|
|
70
|
-
useBoundaryMeasurement({
|
|
71
|
-
boundTag,
|
|
72
|
-
enabled,
|
|
73
|
-
runtimeEnabled,
|
|
74
|
-
currentScreenKey,
|
|
75
|
-
measuredRef,
|
|
76
|
-
style,
|
|
77
|
-
targetPreparedStyles,
|
|
78
|
-
handoff: portalRuntime.handoff,
|
|
79
|
-
escapeClipping: portalRuntime.escapeClipping,
|
|
29
|
+
return /*#__PURE__*/_jsx(BoundaryRootProvider, {
|
|
80
30
|
config: {
|
|
81
31
|
anchor,
|
|
82
32
|
scaleMode,
|
|
83
33
|
target,
|
|
84
34
|
method
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
style: [style, attachedStyle],
|
|
111
|
-
collapsable: false,
|
|
112
|
-
children: [children, canInjectLocalPortalHost ? extraChildren : null]
|
|
113
|
-
});
|
|
114
|
-
const boundaryRoot = renderBoundaryRoot(shouldPortalRoot ? undefined : localPortalHost);
|
|
115
|
-
return /*#__PURE__*/_jsx(BoundaryRootProvider, {
|
|
116
|
-
value: contextValue,
|
|
117
|
-
children: shouldPortalRoot ? /*#__PURE__*/_jsx(Portal, {
|
|
118
|
-
id: boundTag.tag,
|
|
119
|
-
handoff: portalRuntime.handoff,
|
|
120
|
-
escapeClipping: portalRuntime.escapeClipping,
|
|
121
|
-
placeholderRef: rootPlaceholderRef,
|
|
122
|
-
placeholderChildren: portalRuntime.handoff ? localPortalHost : undefined,
|
|
123
|
-
children: boundaryRoot
|
|
124
|
-
}) : boundaryRoot
|
|
35
|
+
},
|
|
36
|
+
enabled: enabled,
|
|
37
|
+
escapeClipping: escapeClipping,
|
|
38
|
+
forwardedRef: forwardedRef,
|
|
39
|
+
group: group,
|
|
40
|
+
handoff: handoff,
|
|
41
|
+
id: id,
|
|
42
|
+
style: style,
|
|
43
|
+
children: root => /*#__PURE__*/_jsx(BoundaryPortal, {
|
|
44
|
+
boundaryId: root.boundTag.tag,
|
|
45
|
+
enabled: root.shouldRenderBoundaryRootThroughPortal,
|
|
46
|
+
placeholderRef: root.rootEscapePlaceholderRef,
|
|
47
|
+
children: /*#__PURE__*/_jsx(AnimatedComponent, {
|
|
48
|
+
...rest,
|
|
49
|
+
ref: root.ref,
|
|
50
|
+
style: [style, root.attachedStyle],
|
|
51
|
+
collapsable: false,
|
|
52
|
+
children: /*#__PURE__*/_jsx(BoundaryContentPortalHost, {
|
|
53
|
+
boundaryId: root.boundTag.tag,
|
|
54
|
+
enabled: root.shouldRenderHandoffHost,
|
|
55
|
+
screenKey: root.currentScreenKey,
|
|
56
|
+
children: children
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
})
|
|
125
60
|
});
|
|
126
61
|
});
|
|
127
62
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","memo","
|
|
1
|
+
{"version":3,"names":["forwardRef","memo","Animated","BoundaryContentPortalHost","BoundaryPortal","BoundaryRootProvider","jsx","_jsx","createBoundaryComponent","Wrapped","options","alreadyAnimated","AnimatedComponent","createAnimatedComponent","Inner","props","forwardedRef","enabled","group","id","anchor","scaleMode","target","method","style","handoff","escapeClipping","children","rest","config","root","boundaryId","boundTag","tag","shouldRenderBoundaryRootThroughPortal","placeholderRef","rootEscapePlaceholderRef","ref","attachedStyle","collapsable","shouldRenderHandoffHost","screenKey","currentScreenKey"],"sourceRoot":"../../../../../src","sources":["shared/components/boundary/create-boundary-component.tsx"],"mappings":";;AAAA,SAA6BA,UAAU,EAAEC,IAAI,QAAQ,OAAO;AAC5D,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,yBAAyB,QAAQ,6CAA6C;AACvF,SAASC,cAAc,QAAQ,qCAAqC;AACpE,SAASC,oBAAoB,QAAQ,oCAAoC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAO1E,OAAO,SAASC,uBAAuBA,CACtCC,OAAyB,EACzBC,OAAuC,GAAG,CAAC,CAAC,EAC3C;EACD,MAAM;IAAEC,eAAe,GAAG;EAAM,CAAC,GAAGD,OAAO;EAC3C,MAAME,iBAAiB,GAAGD,eAAe,GACtCF,OAAO,GACPP,QAAQ,CAACW,uBAAuB,CAACJ,OAAO,CAAC;EAE5C,MAAMK,KAAK,gBAAGd,UAAU,CAGtB,CAACe,KAAK,EAAEC,YAAY,KAAK;IAC1B,MAAM;MACLC,OAAO,GAAG,IAAI;MACdC,KAAK;MACLC,EAAE;MACFC,MAAM;MACNC,SAAS;MACTC,MAAM;MACNC,MAAM;MACNC,KAAK;MACLC,OAAO;MACPC,cAAc;MACdC,QAAQ;MACR,GAAGC;IACJ,CAAC,GAAGb,KAAY;IAEhB,oBACCR,IAAA,CAACF,oBAAoB;MACpBwB,MAAM,EAAE;QAAET,MAAM;QAAEC,SAAS;QAAEC,MAAM;QAAEC;MAAO,CAAE;MAC9CN,OAAO,EAAEA,OAAQ;MACjBS,cAAc,EAAEA,cAAe;MA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