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
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useBoundaryPortalAttachment = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
+
var _descriptors = require("../../../../../../providers/screen/descriptors");
|
|
10
|
+
var _styles = require("../../../../../../providers/screen/styles");
|
|
11
|
+
var _state = require("../../../../../../stores/bounds/internals/state");
|
|
12
|
+
var _naming = require("../../../utils/naming");
|
|
13
|
+
var _ownership = require("../../../utils/ownership");
|
|
14
|
+
var _shallowEqual = require("../../../utils/shallow-equal");
|
|
15
|
+
var _teleportControl = require("../../../utils/teleport-control");
|
|
16
|
+
var _visibleHost = require("../../../utils/visible-host");
|
|
17
|
+
var _hostName = require("../helpers/host-name");
|
|
18
|
+
var _hostRegistry = require("../stores/host-registry.store");
|
|
19
|
+
var _portalBoundaryHost = require("../stores/portal-boundary-host.store");
|
|
20
|
+
const useBoundaryPortalAttachment = ({
|
|
21
|
+
boundaryId,
|
|
22
|
+
enabled
|
|
23
|
+
}) => {
|
|
24
|
+
const sourcePairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.sourcePairKey);
|
|
25
|
+
const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
|
|
26
|
+
const {
|
|
27
|
+
localStylesMaps,
|
|
28
|
+
nextInterpolatorReady,
|
|
29
|
+
slotsMap
|
|
30
|
+
} = (0, _styles.useScreenSlots)();
|
|
31
|
+
const [ownership, setOwnership] = (0, _react.useState)(null);
|
|
32
|
+
const requestedPortalHostName = (0, _reactNativeReanimated.useSharedValue)(null);
|
|
33
|
+
const visiblePortalHostName = (0, _reactNativeReanimated.useSharedValue)(null);
|
|
34
|
+
const mountedPortalBoundaryHostNamesRef = (0, _react.useRef)(new Set());
|
|
35
|
+
const escapeHostKey = (0, _hostRegistry.useActiveHostKey)(enabled ? currentScreenKey : null);
|
|
36
|
+
const updatePortalOwnership = (0, _react.useCallback)((hostScreenKey, ownerPairKey, ownerScreenKey) => {
|
|
37
|
+
if (hostScreenKey && ownerPairKey && ownerScreenKey) {
|
|
38
|
+
setOwnership(current => {
|
|
39
|
+
if (current?.hostScreenKey === hostScreenKey && current.ownerPairKey === ownerPairKey && current.ownerScreenKey === ownerScreenKey) {
|
|
40
|
+
return current;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
hostScreenKey,
|
|
44
|
+
ownerPairKey,
|
|
45
|
+
ownerScreenKey,
|
|
46
|
+
status: "complete"
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
setOwnership(current => current ? null : current);
|
|
52
|
+
}, []);
|
|
53
|
+
const unmountOwnedPortalBoundaryHosts = (0, _react.useCallback)(() => {
|
|
54
|
+
for (const portalHostName of mountedPortalBoundaryHostNamesRef.current) {
|
|
55
|
+
(0, _portalBoundaryHost.unmountPortalBoundaryHostByName)(portalHostName);
|
|
56
|
+
}
|
|
57
|
+
mountedPortalBoundaryHostNamesRef.current.clear();
|
|
58
|
+
}, []);
|
|
59
|
+
(0, _react.useLayoutEffect)(() => {
|
|
60
|
+
if (!enabled || !ownership || !escapeHostKey) {
|
|
61
|
+
requestedPortalHostName.set(null);
|
|
62
|
+
visiblePortalHostName.set(null);
|
|
63
|
+
unmountOwnedPortalBoundaryHosts();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const portalHostName = (0, _hostName.createBoundaryPortalHostName)(escapeHostKey, boundaryId, ownership.ownerPairKey);
|
|
67
|
+
(0, _portalBoundaryHost.mountPortalBoundaryHost)({
|
|
68
|
+
boundaryId,
|
|
69
|
+
escapeClipping: true,
|
|
70
|
+
hostKey: escapeHostKey,
|
|
71
|
+
localStylesMaps,
|
|
72
|
+
pairKey: ownership.ownerPairKey,
|
|
73
|
+
portalHostName,
|
|
74
|
+
screenKey: currentScreenKey,
|
|
75
|
+
slotsMap
|
|
76
|
+
});
|
|
77
|
+
mountedPortalBoundaryHostNamesRef.current.add(portalHostName);
|
|
78
|
+
|
|
79
|
+
// Request the new receiver immediately, but keep the currently visible
|
|
80
|
+
// receiver until the new interpolator is ready. This avoids a no-host gap
|
|
81
|
+
// during rapid close/open retargets.
|
|
82
|
+
requestedPortalHostName.set(portalHostName);
|
|
83
|
+
}, [boundaryId, currentScreenKey, enabled, escapeHostKey, localStylesMaps, ownership, requestedPortalHostName, slotsMap, unmountOwnedPortalBoundaryHosts, visiblePortalHostName]);
|
|
84
|
+
(0, _react.useLayoutEffect)(() => {
|
|
85
|
+
return () => {
|
|
86
|
+
requestedPortalHostName.set(null);
|
|
87
|
+
visiblePortalHostName.set(null);
|
|
88
|
+
unmountOwnedPortalBoundaryHosts();
|
|
89
|
+
};
|
|
90
|
+
}, [requestedPortalHostName, unmountOwnedPortalBoundaryHosts, visiblePortalHostName]);
|
|
91
|
+
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
92
|
+
"worklet";
|
|
93
|
+
|
|
94
|
+
if (!enabled || !sourcePairKey) {
|
|
95
|
+
return {
|
|
96
|
+
hostScreenKey: null,
|
|
97
|
+
ownerPairKey: sourcePairKey,
|
|
98
|
+
ownerScreenKey: null,
|
|
99
|
+
status: "clear"
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
return (0, _ownership.resolveBoundaryPortalOwnership)({
|
|
103
|
+
boundaryId,
|
|
104
|
+
currentScreenKey,
|
|
105
|
+
handoff: false,
|
|
106
|
+
pairsState: _state.pairs.get(),
|
|
107
|
+
sourcePairKey
|
|
108
|
+
});
|
|
109
|
+
}, (signal, previousSignal) => {
|
|
110
|
+
"worklet";
|
|
111
|
+
|
|
112
|
+
if ((0, _shallowEqual.shallowEqual)(previousSignal, signal)) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
(0, _reactNativeReanimated.runOnJS)(updatePortalOwnership)(signal.hostScreenKey, signal.ownerPairKey, signal.ownerScreenKey ?? undefined);
|
|
116
|
+
});
|
|
117
|
+
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
118
|
+
"worklet";
|
|
119
|
+
|
|
120
|
+
const slot = slotsMap.get()[boundaryId];
|
|
121
|
+
const teleport = slot?.props?.teleport;
|
|
122
|
+
const shouldTeleport = (0, _teleportControl.shouldAttachBoundaryPortal)({
|
|
123
|
+
enabled,
|
|
124
|
+
teleport
|
|
125
|
+
});
|
|
126
|
+
const requestedName = requestedPortalHostName.get();
|
|
127
|
+
const visibleName = visiblePortalHostName.get();
|
|
128
|
+
const isInterpolatorReady = nextInterpolatorReady.get();
|
|
129
|
+
const nextVisibleName = (0, _visibleHost.resolveNextVisiblePortalHostName)({
|
|
130
|
+
isInterpolatorReady: isInterpolatorReady === 1,
|
|
131
|
+
requestedName,
|
|
132
|
+
shouldTeleport,
|
|
133
|
+
visibleName
|
|
134
|
+
});
|
|
135
|
+
return {
|
|
136
|
+
isInterpolatorReady,
|
|
137
|
+
nextVisibleName,
|
|
138
|
+
requestedName,
|
|
139
|
+
shouldTeleport,
|
|
140
|
+
teleport,
|
|
141
|
+
visibleName
|
|
142
|
+
};
|
|
143
|
+
}, (state, previousState) => {
|
|
144
|
+
"worklet";
|
|
145
|
+
|
|
146
|
+
if ((0, _shallowEqual.shallowEqual)(previousState, state)) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
if (state.nextVisibleName !== state.visibleName) {
|
|
150
|
+
visiblePortalHostName.set(state.nextVisibleName);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (state.visibleName && state.visibleName === state.requestedName) {
|
|
154
|
+
(0, _reactNativeReanimated.runOnJS)(_portalBoundaryHost.dropStalePortalBoundaryHosts)({
|
|
155
|
+
boundaryId,
|
|
156
|
+
keepPortalHostName: state.visibleName
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
const teleportProps = (0, _reactNativeReanimated.useAnimatedProps)(() => {
|
|
161
|
+
"worklet";
|
|
162
|
+
|
|
163
|
+
const slot = slotsMap.get()[boundaryId];
|
|
164
|
+
const {
|
|
165
|
+
pointerEvents: _pointerEvents,
|
|
166
|
+
teleport,
|
|
167
|
+
...slotProps
|
|
168
|
+
} = slot?.props ?? {};
|
|
169
|
+
const shouldTeleport = (0, _teleportControl.shouldAttachBoundaryPortal)({
|
|
170
|
+
enabled,
|
|
171
|
+
teleport
|
|
172
|
+
});
|
|
173
|
+
const visibleName = visiblePortalHostName.get();
|
|
174
|
+
return {
|
|
175
|
+
...slotProps,
|
|
176
|
+
hostName: shouldTeleport && visibleName ? visibleName : _naming.PORTAL_HOST_NAME_RESET_VALUE
|
|
177
|
+
};
|
|
178
|
+
});
|
|
179
|
+
return {
|
|
180
|
+
teleportProps,
|
|
181
|
+
visiblePortalHostName
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
exports.useBoundaryPortalAttachment = useBoundaryPortalAttachment;
|
|
185
|
+
//# sourceMappingURL=use-boundary-portal-attachment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_descriptors","_styles","_state","_naming","_ownership","_shallowEqual","_teleportControl","_visibleHost","_hostName","_hostRegistry","_portalBoundaryHost","useBoundaryPortalAttachment","boundaryId","enabled","sourcePairKey","useDescriptorsStore","s","derivations","currentScreenKey","localStylesMaps","nextInterpolatorReady","slotsMap","useScreenSlots","ownership","setOwnership","useState","requestedPortalHostName","useSharedValue","visiblePortalHostName","mountedPortalBoundaryHostNamesRef","useRef","Set","escapeHostKey","useActiveHostKey","updatePortalOwnership","useCallback","hostScreenKey","ownerPairKey","ownerScreenKey","current","status","unmountOwnedPortalBoundaryHosts","portalHostName","unmountPortalBoundaryHostByName","clear","useLayoutEffect","set","createBoundaryPortalHostName","mountPortalBoundaryHost","escapeClipping","hostKey","pairKey","screenKey","add","useAnimatedReaction","resolveBoundaryPortalOwnership","handoff","pairsState","pairs","get","signal","previousSignal","shallowEqual","runOnJS","undefined","slot","teleport","props","shouldTeleport","shouldAttachBoundaryPortal","requestedName","visibleName","isInterpolatorReady","nextVisibleName","resolveNextVisiblePortalHostName","state","previousState","dropStalePortalBoundaryHosts","keepPortalHostName","teleportProps","useAnimatedProps","pointerEvents","_pointerEvents","slotProps","hostName","PORTAL_HOST_NAME_RESET_VALUE","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAMA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAIA,IAAAO,aAAA,GAAAP,OAAA;AACA,IAAAQ,gBAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AACA,IAAAW,aAAA,GAAAX,OAAA;AACA,IAAAY,mBAAA,GAAAZ,OAAA;AAWO,MAAMa,2BAA2B,GAAGA,CAAC;EAC3CC,UAAU;EACVC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,GAC1BA,WAAW,GACXc;IACL,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IACNN,aAAa;IACbnD;EACD,CAAC;AACF,CAAC;AAAC0D,OAAA,CAAA3E,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -6,16 +6,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useHostMeasurement = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
-
var _origin = require("
|
|
10
|
-
var _scroll = require("
|
|
11
|
-
var
|
|
9
|
+
var _origin = require("../../../../../../providers/screen/origin.provider");
|
|
10
|
+
var _scroll = require("../../../../../../stores/scroll.store");
|
|
11
|
+
var _visibilityBlockOffset = require("../../../../../../utils/visibility-block-offset");
|
|
12
|
+
var _measuredBounds = require("../../../../utils/measured-bounds");
|
|
12
13
|
var _hostBounds = require("../stores/host-bounds.store");
|
|
13
14
|
const HOST_MEASUREMENT_RETRY_DELAY_MS = 16;
|
|
14
15
|
const useHostMeasurement = ({
|
|
15
16
|
capturesScroll,
|
|
16
17
|
enabled,
|
|
17
18
|
hostKey,
|
|
18
|
-
screenKey
|
|
19
|
+
screenKey,
|
|
20
|
+
visibilityBlocked,
|
|
21
|
+
viewportHeight,
|
|
22
|
+
viewportWidth
|
|
19
23
|
}) => {
|
|
20
24
|
const hostRef = (0, _reactNativeReanimated.useAnimatedRef)();
|
|
21
25
|
const scrollMetadata = _scroll.ScrollStore.getValue(screenKey, "metadata");
|
|
@@ -60,7 +64,21 @@ const useHostMeasurement = ({
|
|
|
60
64
|
// position instead; clamped scroll deltas share that basis.
|
|
61
65
|
const currentScroll = scrollMetadata.get();
|
|
62
66
|
const overscrollNormalized = capturesScroll ? (0, _measuredBounds.adjustedMeasuredBoundsForOverscrollDeltas)(measured, currentScroll) : measured;
|
|
63
|
-
const normalizedMeasured = (0, _measuredBounds.
|
|
67
|
+
const normalizedMeasured = (0, _measuredBounds.normalizeMeasuredBoundsWithVisibilityGate)({
|
|
68
|
+
measured: overscrollNormalized,
|
|
69
|
+
origin: measuredOrigin,
|
|
70
|
+
visibilityBlocked: visibilityBlocked.get(),
|
|
71
|
+
visibilityBlockOffset: (0, _visibilityBlockOffset.getVisibilityBlockOffset)(viewportHeight),
|
|
72
|
+
viewportWidth,
|
|
73
|
+
viewportHeight
|
|
74
|
+
});
|
|
75
|
+
if (!(0, _measuredBounds.isMeasurementInViewport)(normalizedMeasured, viewportWidth, viewportHeight)) {
|
|
76
|
+
(0, _reactNativeReanimated.cancelAnimation)(retryToken);
|
|
77
|
+
retryToken.set((0, _reactNativeReanimated.withDelay)(HOST_MEASUREMENT_RETRY_DELAY_MS, (0, _reactNativeReanimated.withTiming)(retryToken.get() + 1, {
|
|
78
|
+
duration: 0
|
|
79
|
+
})));
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
64
82
|
(0, _hostBounds.setPortalHostBounds)(hostKey, {
|
|
65
83
|
x: normalizedMeasured.x,
|
|
66
84
|
y: normalizedMeasured.y,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_origin","_scroll","_visibilityBlockOffset","_measuredBounds","_hostBounds","HOST_MEASUREMENT_RETRY_DELAY_MS","useHostMeasurement","capturesScroll","enabled","hostKey","screenKey","visibilityBlocked","viewportHeight","viewportWidth","hostRef","useAnimatedRef","scrollMetadata","ScrollStore","getValue","canRenderHosts","setCanRenderHosts","useState","originRef","useOriginContext","hasMeasuredHost","useSharedValue","retryToken","useAnimatedReaction","get","state","cancelAnimation","hasAlreadyMeasured","measured","measure","measuredOrigin","set","withDelay","withTiming","duration","currentScroll","overscrollNormalized","adjustedMeasuredBoundsForOverscrollDeltas","normalizedMeasured","normalizeMeasuredBoundsWithVisibilityGate","origin","visibilityBlockOffset","getVisibilityBlockOffset","isMeasurementInViewport","setPortalHostBounds","x","y","width","height","pageX","pageY","scroll","runOnJS","useLayoutEffect","runOnUI","clearPortalHostBounds","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAD,OAAA;AAYA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AAKA,IAAAM,WAAA,GAAAN,OAAA;AAKA,MAAMO,+BAA+B,GAAG,EAAE;AAYnC,MAAMC,kBAAkB,GAAGA,CAAC;EAClCC,cAAc;EACdC,OAAO;EACPC,OAAO;EACPC,SAAS;EACTC,iBAAiB;EACjBC,cAAc;EACdC;AACyB,CAAC,KAAK;EAC/B,MAAMC,OAAO,GAAG,IAAAC,qCAAc,EAAO,CAAC;EACtC,MAAMC,cAAc,GAAGC,mBAAW,CAACC,QAAQ,CAACR,SAAS,EAAE,UAAU,CAAC;EAClE,MAAM,CAACS,cAAc,EAAEC,iBAAiB,CAAC,GAAG,IAAAC,eAAQ,EAAU,KAAK,CAAC;EACpE,MAAM;IAAEC;EAAU,CAAC,GAAG,IAAAC,wBAAgB,EAAC,CAAC;EACxC,MAAMC,eAAe,GAAG,IAAAC,qCAAc,EAAC,KAAK,CAAC;EAC7C,MAAMC,UAAU,GAAG,IAAAD,qCAAc,EAAC,CAAC,CAAC;EAEpC,IAAAE,0CAAmB,EAClB,MAAM;IACL,SAAS;;IACT,IAAI,CAACnB,OAAO,EAAE;MACb,OAAO,IAAI;IACZ;IAEA,OAAO,CAACgB,eAAe,CAACI,GAAG,CAAC,CAAC,EAAEF,UAAU,CAACE,GAAG,CAAC,CAAC,CAAC;EACjD,CAAC,EACAC,KAAK,IAAK;IACV,SAAS;;IACT,IAAI,CAACA,KAAK,EAAE;MACX,IAAAC,sCAAe,EAACJ,UAAU,CAAC;MAC3B;IACD;IAEA,MAAM,CAACK,kBAA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,UAAU,CAACE,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE;QAAEU,QAAQ,EAAE;MAAE,CAAC,CACjD,CACD,CAAC;MACD;IACD;IAEA,IAAAU,+BAAmB,EAACvC,OAAO,EAAE;MAC5BwC,CAAC,EAAEP,kBAAkB,CAACO,CAAC;MACvBC,CAAC,EAAER,kBAAkB,CAACQ,CAAC;MACvBC,KAAK,EAAET,kBAAkB,CAACS,KAAK;MAC/BC,MAAM,EAAEV,kBAAkB,CAACU,MAAM;MACjCC,KAAK,EAAEX,kBAAkB,CAACW,KAAK;MAC/BC,KAAK,EAAEZ,kBAAkB,CAACY,KAAK;MAC/BC,MAAM,EAAEhD,cAAc,GAAGgC,aAAa,GAAG;IAC1C,CAAC,CAAC;IAEF,IAAAiB,8BAAO,EAACpC,iBAAiB,CAAC,CAAC,IAAI,CAAC;EACjC,CACD,CAAC;EAED,IAAAqC,sBAAe,EAAC,MAAM;IACrB,OAAO,MAAM;MACZ,IAAAC,8BAAO,EAACC,iCAAqB,CAAC,CAAClD,OAAO,CAAC;IACxC,CAAC;EACF,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,OAAO;IACNU,cAAc;IACdL;EACD,CAAC;AACF,CAAC;AAAC8C,OAAA,CAAAtD,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -6,22 +6,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.usePlaceholderStyles = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
-
const usePlaceholderStyles = ({
|
|
10
|
-
visiblePortalHostName
|
|
11
|
-
}) => {
|
|
9
|
+
const usePlaceholderStyles = () => {
|
|
12
10
|
const placeholderWidth = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
13
11
|
const placeholderHeight = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
14
12
|
// Pin the placeholder to its measured size while content lives in the host,
|
|
15
|
-
// in the same UI frame the host name flips
|
|
13
|
+
// in the same UI frame the host name flips - no commit in between. Until the
|
|
16
14
|
// first layout lands (dims 0) sizing stays natural so an instant attach
|
|
17
15
|
// cannot collapse the slot.
|
|
18
16
|
const placeholderStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
19
17
|
"worklet";
|
|
20
18
|
|
|
21
|
-
const isAttached = visiblePortalHostName.get() !== null;
|
|
22
19
|
const width = placeholderWidth.get();
|
|
23
20
|
const height = placeholderHeight.get();
|
|
24
|
-
if (
|
|
21
|
+
if (width === 0) {
|
|
25
22
|
return {
|
|
26
23
|
width: "auto",
|
|
27
24
|
height: "auto"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","usePlaceholderStyles","placeholderWidth","useSharedValue","placeholderHeight","placeholderStyle","useAnimatedStyle","width","get","height","handleOnLayout","useCallback","layout","hasValidDimensions","set","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAD,OAAA;AAEO,MAAME,oBAAoB,GAAGA,CAAA,KAAM;EACzC,MAAMC,gBAAgB,GAAG,IAAAC,qCAAc,EAAC,CAAC,CAAC;EAC1C,MAAMC,iBAAiB,GAAG,IAAAD,qCAAc,EAAC,CAAC,CAAC;EAC3C;EACA;EACA;EACA;EACA,MAAME,gBAAgB,GAAG,IAAAC,uCAAgB,EAAC,MAAM;IAC/C,SAAS;;IACT,MAAMC,KAAK,GAAGL,gBAAgB,CAACM,GAAG,CAAC,CAAC;IACpC,MAAMC,MAAM,GAAGL,iBAAiB,CAACI,GAAG,CAAC,CAAC;IAEtC,IAAID,KAAK,KAAK,CAAC,EAAE;MAChB,OAAO;QAAEA,KAAK,EAAE,MAAM;QAAEE,MAAM,EAAE;MAAO,CAAC;IACzC;IAEA,OAAO;MAAEF,KAAK;MAAEE;IAAO,CAAC;EACzB,CAAC,CAAC;EAEF,MAAMC,cAAc,GAAG,IAAAC,kBAAW,EAChCC,MAAuB,IAAK;IAC5B,SAAS;;IACT,MAAM;MAAEL,KAAK;MAAEE;IAAO,CAAC,GAAGG,MAAM;IAChC,IAAIL,KAAK,KAAK,CAAC,IAAIE,MAAM,KAAK,CAAC,EAAE;MAChC;IACD;IAEA,MAAMI,kBAAkB,GACvBT,iBAAiB,CAACI,GAAG,CAAC,CAAC,KAAK,CAAC,IAAIN,gBAAgB,CAACM,GAAG,CAAC,CAAC,KAAK,CAAC;IAE9D,IAAI,CAACK,kBAAkB,EAAE;MACxBX,gBAAgB,CAACY,GAAG,CAACP,KAAK,CAAC;MAC3BH,iBAAiB,CAACU,GAAG,CAACL,MAAM,CAAC;IAC9B;EACD,CAAC,EACD,CAACL,iBAAiB,EAAEF,gBAAgB,CACrC,CAAC;EAED,OAAO;IAAEG,gBAAgB;IAAEK;EAAe,CAAC;AAC5C,CAAC;AAACK,OAAA,CAAAd,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BoundaryPortal = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _portalSlot = require("./components/portal-slot");
|
|
9
|
+
var _useBoundaryPortalAttachment = require("./hooks/use-boundary-portal-attachment");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
const BoundaryPortal = exports.BoundaryPortal = /*#__PURE__*/(0, _react.memo)(function BoundaryPortal({
|
|
12
|
+
boundaryId,
|
|
13
|
+
children,
|
|
14
|
+
enabled,
|
|
15
|
+
placeholderRef
|
|
16
|
+
}) {
|
|
17
|
+
const {
|
|
18
|
+
teleportProps
|
|
19
|
+
} = (0, _useBoundaryPortalAttachment.useBoundaryPortalAttachment)({
|
|
20
|
+
boundaryId,
|
|
21
|
+
enabled
|
|
22
|
+
});
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_portalSlot.BoundaryPortalSlot, {
|
|
24
|
+
id: boundaryId,
|
|
25
|
+
enabled: enabled,
|
|
26
|
+
animatedProps: teleportProps,
|
|
27
|
+
placeholderRef: placeholderRef,
|
|
28
|
+
children: children
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_portalSlot","_useBoundaryPortalAttachment","_jsxRuntime","BoundaryPortal","exports","memo","boundaryId","children","enabled","placeholderRef","teleportProps","useBoundaryPortalAttachment","jsx","BoundaryPortalSlot","id","animatedProps"],"sourceRoot":"../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,4BAAA,GAAAF,OAAA;AAAqF,IAAAG,WAAA,GAAAH,OAAA;AAS9E,MAAMI,cAAc,GAAAC,OAAA,CAAAD,cAAA,gBAAG,IAAAE,WAAI,EAAC,SAASF,cAAcA,CAAC;EAC1DG,UAAU;EACVC,QAAQ;EACRC,OAAO;EACPC;AACoB,CAAC,EAAE;EACvB,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,wDAA2B,EAAC;IACrDL,UAAU;IACVE;EACD,CAAC,CAAC;EAEF,oBACC,IAAAN,WAAA,CAAAU,GAAA,EAACZ,WAAA,CAAAa,kBAAkB;IAClBC,EAAE,EAAER,UAAW;IACfE,OAAO,EAAEA,OAAQ;IACjBO,aAAa,EAAEL,aAAc;IAC7BD,cAAc,EAAEA,cAAe;IAAAF,QAAA,EAE9BA;EAAQ,CACU,CAAC;AAEvB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.setPortalHostBounds = exports.getPortalHostBounds = exports.clearPortalHostBounds = void 0;
|
|
7
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
-
var _scroll = require("
|
|
8
|
+
var _scroll = require("../../../../../../stores/scroll.store");
|
|
9
9
|
const portalHostBounds = (0, _reactNativeReanimated.makeMutable)({});
|
|
10
10
|
const getPortalHostBounds = hostKey => {
|
|
11
11
|
"worklet";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_scroll","portalHostBounds","makeMutable","getPortalHostBounds","hostKey","get","exports","setPortalHostBounds","bounds","nextBounds","scroll","cloneScrollMetadataState","set","state","clearPortalHostBounds","nextState"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AASA,MAAME,gBAAgB,GAAG,IAAAC,kCAAW,EAAwB,CAAC,CAAC,CAAC;AAExD,MAAMC,mBAAmB,GAAIC,OAAe,IAAK;EACvD,SAAS;;EACT,OAAOH,gBAAgB,CAACI,GAAG,CAAC,CAAC,CAACD,OAAO,CAAC,IAAI,IAAI;AAC/C,CAAC;AAACE,OAAA,CAAAH,mBAAA,GAAAA,mBAAA;AAEK,MAAMI,mBAAmB,GAAGA,CAClCH,OAAe,EACfI,MAAwB,KACpB;EACJ,SAAS;;EACT,MAAMC,UAA4B,GAAG;IACpC,GAAGD,MAAM;IACTE,MAAM,EAAE,IAAAC,gCAAwB,EAACH,MAAM,CAACE,MAAM;EAC/C,CAAC;EAEDT,gBAAgB,CAACW,GAAG,CAAEC,KAAK,IAAK;IAC/B,SAAS;;IACT,OAAO;MACN,GAAGA,KAAK;MACR,CAACT,OAAO,GAAGK;IACZ,CAAC;EACF,CAAC,CAAC;AACH,CAAC;AAACH,OAAA,CAAAC,mBAAA,GAAAA,mBAAA;AAEK,MAAMO,qBAAqB,GAAIV,OAAe,IAAK;EACzD,SAAS;;EACTH,gBAAgB,CAACW,GAAG,CAAEC,KAAK,IAAK;IAC/B,SAAS;;IACT,MAAME,SAAgC,GAAG;MAAE,GAAGF;IAAM,CAAC;IACrD,OAAOE,SAAS,CAACX,OAAO,CAAC;IACzB,OAAOW,SAAS;EACjB,CAAC,CAAC;AACH,CAAC;AAACT,OAAA,CAAAQ,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","EMPTY_SNAPSHOT","listeners","Set","hostStacks","Map","snapshot","getActiveHostFromStack","screenKey","stack","length","index","host","fallback","hostKey","buildSnapshot","nextSnapshot","emit","listener","subscribe","add","delete","registerHost","registration","get","previousActiveHostKey","nextStack","filter","unshift","push","set","exports","unregisterHost","getActiveHostKey","useActiveHostKey","useSyncExternalStore","undefined","resetHostRegistry","clear"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAWA,MAAMC,cAAoC,GAAG,CAAC,CAAC;AAE/C,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAA6B,CAAC;AAExD,IAAIC,QAA8B,GAAGL,cAAc;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,sBAAsB,GAAGA,CAC9BC,SAAiB,EACjBC,KAAqC,KACjC;EACJ,IAAI,CAACA,KAAK,IAAIA,KAAK,CAACC,MAAM,KAAK,CAAC,EAAE;IACjC,OAAOF,SAAS;EACjB;EAEA,KAAK,IAAIG,KAAK,GAAGF,KAAK,CAACC,MAAM,GAAG,CAAC,EAA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AyB,IAAK;EAC9D,OAAO,IAAA2B,2BAAoB,EAC1BhB,SAAS,EACT,MAAOX,SAAS,GAAGyB,gBAAgB,CAACzB,SAAS,CAAC,GAAG4B,SAAU,EAC3D,MAAMA,SACP,CAAC;AACF,CAAC;AAACL,OAAA,CAAAG,gBAAA,GAAAA,gBAAA;AAEK,MAAMG,iBAAiB,GAAGA,CAAA,KAAM;EACtCjC,UAAU,CAACkC,KAAK,CAAC,CAAC;EAClBhC,QAAQ,GAAGL,cAAc;EACzBgB,IAAI,CAAC,CAAC;AACP,CAAC;AAACc,OAAA,CAAAM,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useActivePortalBoundaryHosts = exports.
|
|
6
|
+
exports.useActivePortalBoundaryHosts = exports.unmountPortalBoundaryHostByName = exports.mountPortalBoundaryHost = exports.dropStalePortalBoundaryHosts = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
const EMPTY_HOSTS = [];
|
|
9
9
|
const listeners = new Set();
|
|
@@ -40,16 +40,8 @@ const mountPortalBoundaryHost = host => {
|
|
|
40
40
|
emit();
|
|
41
41
|
};
|
|
42
42
|
exports.mountPortalBoundaryHost = mountPortalBoundaryHost;
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
for (const [hostEntryKey, host] of activeBoundaryHosts) {
|
|
46
|
-
if (host.boundaryId !== boundaryId) {
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
activeBoundaryHosts.delete(hostEntryKey);
|
|
50
|
-
didDelete = true;
|
|
51
|
-
}
|
|
52
|
-
if (!didDelete) {
|
|
43
|
+
const unmountPortalBoundaryHostByName = portalHostName => {
|
|
44
|
+
if (!portalHostName || !activeBoundaryHosts.delete(portalHostName)) {
|
|
53
45
|
return;
|
|
54
46
|
}
|
|
55
47
|
emit();
|
|
@@ -60,11 +52,14 @@ const unmountPortalBoundaryHost = boundaryId => {
|
|
|
60
52
|
* visible (`keepPortalHostName`). Called once the new host is confirmed on
|
|
61
53
|
* screen so the superseded receivers stop rendering.
|
|
62
54
|
*/
|
|
63
|
-
exports.
|
|
55
|
+
exports.unmountPortalBoundaryHostByName = unmountPortalBoundaryHostByName;
|
|
64
56
|
const dropStalePortalBoundaryHosts = ({
|
|
65
57
|
boundaryId,
|
|
66
58
|
keepPortalHostName
|
|
67
59
|
}) => {
|
|
60
|
+
if (!activeBoundaryHosts.has(keepPortalHostName)) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
68
63
|
let didDelete = false;
|
|
69
64
|
for (const [hostEntryKey, host] of activeBoundaryHosts) {
|
|
70
65
|
if (host.boundaryId !== boundaryId || host.portalHostName === keepPortalHostName) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","escapeClipping","localStylesMaps","pairKey","portalHostName","screenKey","slotsMap","mountPortalBoundaryHost","previous","get","set","exports","unmountPortalBoundaryHostByName","delete","dropStalePortalBoundaryHosts","keepPortalHostName","has","didDelete","hostEntryKey","subscribe","add","useActivePortalBoundaryHosts","useSyncExternalStore"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAoBA,MAAMC,WAAuC,GAAG,EAAE;AAElD,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,mBAAmB,GAAG,IAAIC,GAAG,CAAmC,CAAC;AAEvE,IAAIC,QAAwB,GAAG;EAC9BC,YAAY,EAAE,CAAC;AAChB,CAAC;AAED,MAAMC,aAAa,GAAGA,CAAA,KAAsB;EAC3C,MAAM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AAIX,WAAW,EACnD,MAAMA,WACP,CAAC;AACF,CAAC;AAAC6B,OAAA,CAAAU,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
|
@@ -9,19 +9,12 @@ Object.defineProperty(exports, "Host", {
|
|
|
9
9
|
return _host.Host;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "Portal", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _portal.Portal;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
12
|
Object.defineProperty(exports, "PortalProvider", {
|
|
19
13
|
enumerable: true,
|
|
20
14
|
get: function () {
|
|
21
15
|
return _portalProvider.PortalProvider;
|
|
22
16
|
}
|
|
23
17
|
});
|
|
24
|
-
var _host = require("./components/host");
|
|
25
|
-
var _portal = require("./components/portal");
|
|
18
|
+
var _host = require("./components/boundary-portal/components/host");
|
|
26
19
|
var _portalProvider = require("./components/portal-provider");
|
|
27
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_host","require","
|
|
1
|
+
{"version":3,"names":["_host","require","_portalProvider"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/portal/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA","ignoreList":[]}
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.isTeleportAvailable = exports.NativePortalProvider = exports.NativePortalHost = exports.NativePortal = void 0;
|
|
6
|
+
exports.isTeleportAvailable = exports.PORTAL_POINTER_EVENTS = exports.NativePortalProvider = exports.NativePortalHost = exports.NativePortal = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
/**
|
|
9
9
|
* `react-native-teleport` is an optional peer dependency. The require sits in a
|
|
10
10
|
* try/catch so Metro treats it as an optional dependency — an absent module no
|
|
11
11
|
* longer fails the bundle, it throws at runtime and the catch swallows it.
|
|
12
12
|
*
|
|
13
|
-
* When teleport is missing,
|
|
14
|
-
* rendering; everything else keeps working.
|
|
13
|
+
* When teleport is missing, handoff and escapeClipping boundaries degrade to
|
|
14
|
+
* inline rendering; everything else keeps working.
|
|
15
15
|
*/
|
|
16
16
|
let mod = null;
|
|
17
17
|
let managerMod = null;
|
|
@@ -30,6 +30,7 @@ const SafeNativePortalProvider = PortalManagerProvider ? ({
|
|
|
30
30
|
return NativePortalProviderView ? /*#__PURE__*/(0, _react.createElement)(NativePortalProviderView, null, managedChildren) : managedChildren;
|
|
31
31
|
} : null;
|
|
32
32
|
const isTeleportAvailable = exports.isTeleportAvailable = mod !== null && SafeNativePortalProvider !== null;
|
|
33
|
+
const PORTAL_POINTER_EVENTS = exports.PORTAL_POINTER_EVENTS = "box-none";
|
|
33
34
|
const NativePortal = exports.NativePortal = mod?.Portal ?? null;
|
|
34
35
|
const NativePortalProvider = exports.NativePortalProvider = SafeNativePortalProvider;
|
|
35
36
|
const NativePortalHost = exports.NativePortalHost = mod?.PortalHost ?? null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","mod","managerMod","providerViewMod","NativePortalProviderView","default","PortalManagerProvider","SafeNativePortalProvider","children","managedChildren","createElement","isTeleportAvailable","exports","NativePortal","Portal","NativePortalProvider","NativePortalHost","PortalHost"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/portal/teleport.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,GAAQ,GAAG,IAAI;AACnB,IAAIC,UAAe,GAAG,IAAI;AAC1B,IAAIC,eAAoB,GAAG,IAAI;AAC/B,IAAI;EACHF,GAAG,GAAGD,OAAO,CAAC,uBAAuB,CAAC;EACtCE,UAAU,GAAGF,OAAO,CAAC,yDAAyD,CAAC;EAC/EG,eAAe,GAAGH,OAAO,CAAC,uDAAuD,CAAC;AACnF,CAAC,CAAC,MAAM,CAAC;AAET,MAAMI,wBAAuE,GAC5ED,eAAe,EAAEE,OAAO,IAAI,IAAI;AACjC,MAAMC,qBAAoE,GACzEJ,UAAU,EAAEI,qBAAqB,IAAI,IAAI;AAE1C,MAAMC,wBAAuE,GAC5ED,qBAAqB,GAClB,CAAC;EAAEE;AAAkC,CAAC,KAAK;EAC3C,MAAMC,eAAe,gBAAG,IAAAC,oBAAa,EACpCJ,qBAAqB,EACrB,IAAI,EACJE,QACD,CAAC;EAED,OAAOJ,wBAAwB,gBAC5B,IAAAM,oBAAa,EAACN,wBAAwB,EAAE,IAAI,EAAEK,eAAe,CAAC,GAC9DA,eAAe;AACnB,CAAC,GACA,IAAI;AAED,MAAME,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAC/BV,GAAG,KAAK,IAAI,IAAIM,wBAAwB,KAAK,IAAI;AAC3C,MAAMM,
|
|
1
|
+
{"version":3,"names":["_react","require","mod","managerMod","providerViewMod","NativePortalProviderView","default","PortalManagerProvider","SafeNativePortalProvider","children","managedChildren","createElement","isTeleportAvailable","exports","PORTAL_POINTER_EVENTS","NativePortal","Portal","NativePortalProvider","NativePortalHost","PortalHost"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/portal/teleport.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,GAAQ,GAAG,IAAI;AACnB,IAAIC,UAAe,GAAG,IAAI;AAC1B,IAAIC,eAAoB,GAAG,IAAI;AAC/B,IAAI;EACHF,GAAG,GAAGD,OAAO,CAAC,uBAAuB,CAAC;EACtCE,UAAU,GAAGF,OAAO,CAAC,yDAAyD,CAAC;EAC/EG,eAAe,GAAGH,OAAO,CAAC,uDAAuD,CAAC;AACnF,CAAC,CAAC,MAAM,CAAC;AAET,MAAMI,wBAAuE,GAC5ED,eAAe,EAAEE,OAAO,IAAI,IAAI;AACjC,MAAMC,qBAAoE,GACzEJ,UAAU,EAAEI,qBAAqB,IAAI,IAAI;AAE1C,MAAMC,wBAAuE,GAC5ED,qBAAqB,GAClB,CAAC;EAAEE;AAAkC,CAAC,KAAK;EAC3C,MAAMC,eAAe,gBAAG,IAAAC,oBAAa,EACpCJ,qBAAqB,EACrB,IAAI,EACJE,QACD,CAAC;EAED,OAAOJ,wBAAwB,gBAC5B,IAAAM,oBAAa,EAACN,wBAAwB,EAAE,IAAI,EAAEK,eAAe,CAAC,GAC9DA,eAAe;AACnB,CAAC,GACA,IAAI;AAED,MAAME,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAC/BV,GAAG,KAAK,IAAI,IAAIM,wBAAwB,KAAK,IAAI;AAC3C,MAAMM,qBAAqB,GAAAD,OAAA,CAAAC,qBAAA,GAAG,UAAmB;AACjD,MAAMC,YAAuC,GAAAF,OAAA,CAAAE,YAAA,GAAGb,GAAG,EAAEc,MAAM,IAAI,IAAI;AACnE,MAAMC,oBAA+C,GAAAJ,OAAA,CAAAI,oBAAA,GAC3DT,wBAAwB;AAClB,MAAMU,gBAA2C,GAAAL,OAAA,CAAAK,gBAAA,GACvDhB,GAAG,EAAEiB,UAAU,IAAI,IAAI","ignoreList":[]}
|
|
@@ -3,20 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.PORTAL_HOST_NAME_RESET_VALUE = void 0;
|
|
7
7
|
const PORTAL_HOST_NAME_RESET_VALUE = exports.PORTAL_HOST_NAME_RESET_VALUE = null;
|
|
8
|
-
const PORTAL_HOST_NAME_SUFFIX = "-portal-host";
|
|
9
|
-
const BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX = "-boundary-local-portal-host";
|
|
10
|
-
const createPortalBoundaryHostName = (hostKey, boundaryId, pairKey) => {
|
|
11
|
-
"worklet";
|
|
12
|
-
|
|
13
|
-
return `${hostKey}-${pairKey ? `${pairKey}-` : ""}${boundaryId}${PORTAL_HOST_NAME_SUFFIX}`;
|
|
14
|
-
};
|
|
15
|
-
exports.createPortalBoundaryHostName = createPortalBoundaryHostName;
|
|
16
|
-
const createBoundaryLocalPortalHostName = (screenKey, boundaryId) => {
|
|
17
|
-
"worklet";
|
|
18
|
-
|
|
19
|
-
return `${screenKey}-${boundaryId}${BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX}`;
|
|
20
|
-
};
|
|
21
|
-
exports.createBoundaryLocalPortalHostName = createBoundaryLocalPortalHostName;
|
|
22
8
|
//# sourceMappingURL=naming.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","exports"
|
|
1
|
+
{"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/naming.ts"],"mappings":";;;;;;AAAO,MAAMA,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,IAAI","ignoreList":[]}
|