react-native-screen-transitions 3.9.0-beta.0 → 3.9.0-beta.2
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 +30 -30
- 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 +68 -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 +40 -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 +194 -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 +44 -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} +17 -16
- 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} +11 -11
- 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 +52 -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 +184 -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 +33 -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 +2 -2
- 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 +77 -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/index.js +13 -0
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js +6 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/collect-interpolator-shared-values.js +50 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/collect-interpolator-shared-values.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +7 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +2 -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/system.store.js +10 -2
- package/lib/commonjs/shared/stores/system.store.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/zoom/build.js +3 -3
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- 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 +32 -32
- 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 +72 -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 +35 -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 +189 -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 +33 -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} +17 -16
- 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} +11 -11
- 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 +47 -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 +179 -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 +29 -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 +2 -2
- 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 +74 -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/index.js +1 -0
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js +6 -1
- package/lib/module/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/collect-interpolator-shared-values.js +45 -0
- package/lib/module/shared/providers/screen/styles/helpers/collect-interpolator-shared-values.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +7 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +2 -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/system.store.js +10 -2
- package/lib/module/shared/stores/system.store.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/zoom/build.js +3 -3
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- 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.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 +11 -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 +14 -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 +13 -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/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 +21 -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/index.d.ts +1 -0
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/read-screen-animation-revisions.d.ts +4 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/read-screen-animation-revisions.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/collect-interpolator-shared-values.d.ts +4 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/collect-interpolator-shared-values.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +1 -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/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 +7 -2
- package/lib/typescript/shared/types/bounds.types.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/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 +43 -50
- package/src/shared/components/boundary/create-boundary-component.tsx +35 -150
- package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +103 -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 +48 -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 +274 -0
- package/src/shared/components/boundary/portal/components/boundary-content-portal/index.tsx +59 -0
- package/src/shared/components/boundary/portal/components/{host.tsx → boundary-portal/components/host.tsx} +14 -15
- package/src/shared/components/boundary/portal/components/{portal-boundary-host.tsx → boundary-portal/components/portal-boundary-host.tsx} +12 -12
- package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.tsx +80 -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 +250 -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 +38 -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 +2 -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 +198 -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/index.ts +4 -0
- package/src/shared/providers/screen/animation/helpers/read-screen-animation-revisions.ts +14 -0
- package/src/shared/providers/screen/styles/helpers/collect-interpolator-shared-values.ts +75 -0
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +11 -0
- package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +1 -0
- 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/system.store.ts +10 -4
- package/src/shared/types/animation.types.ts +3 -3
- package/src/shared/types/bounds.types.ts +9 -2
- 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/zoom/build.ts +3 -3
- 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/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/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/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/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,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useInitialDestinationMeasurement = void 0;
|
|
7
|
+
var _react = require("react");
|
|
7
8
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
9
|
var _descriptors = require("../../../../providers/screen/descriptors");
|
|
9
10
|
var _animation = require("../../../../stores/animation.store");
|
|
@@ -13,18 +14,18 @@ var _links = require("../../../../stores/bounds/internals/links");
|
|
|
13
14
|
var _state = require("../../../../stores/bounds/internals/state");
|
|
14
15
|
var _system = require("../../../../stores/system.store");
|
|
15
16
|
var _logger = require("../../../../utils/logger");
|
|
16
|
-
var _ownership = require("../../portal/utils/ownership");
|
|
17
17
|
var _destinationSignals = require("../../utils/destination-signals");
|
|
18
|
-
const
|
|
18
|
+
const HANDSHAKE_RETRY_DELAY_MS = 100;
|
|
19
19
|
/**
|
|
20
|
-
* A destination
|
|
21
|
-
* transition gate forever
|
|
22
|
-
*
|
|
20
|
+
* A destination whose initial handshake never completes must not hold the
|
|
21
|
+
* transition gate forever. After this budget, release the block with a warning
|
|
22
|
+
* so the open proceeds without that boundary.
|
|
23
23
|
*/
|
|
24
|
-
const
|
|
24
|
+
const MAX_HANDSHAKE_RETRIES = 20;
|
|
25
25
|
const useInitialDestinationMeasurement = ({
|
|
26
26
|
boundTag,
|
|
27
27
|
enabled,
|
|
28
|
+
escapeClipping,
|
|
28
29
|
measureBoundary
|
|
29
30
|
}) => {
|
|
30
31
|
const {
|
|
@@ -37,9 +38,9 @@ const useInitialDestinationMeasurement = ({
|
|
|
37
38
|
const destinationPairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.destinationPairKey);
|
|
38
39
|
const ancestorDestinationPairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.ancestorDestinationPairKey);
|
|
39
40
|
const destinationEnabled = enabled && !nextScreenKey;
|
|
41
|
+
const initialDestinationPairKey = destinationPairKey ?? ancestorDestinationPairKey;
|
|
40
42
|
const progress = _animation.AnimationStore.getValue(currentScreenKey, "transitionProgress");
|
|
41
43
|
const {
|
|
42
|
-
pendingLifecycleRequestKind,
|
|
43
44
|
actions: {
|
|
44
45
|
blockLifecycleStart,
|
|
45
46
|
unblockLifecycleStart
|
|
@@ -47,93 +48,109 @@ const useInitialDestinationMeasurement = ({
|
|
|
47
48
|
} = _system.SystemStore.getBag(currentScreenKey);
|
|
48
49
|
const isBlockingLifecycleStart = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
49
50
|
const retryToken = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
50
|
-
const
|
|
51
|
+
const handshakeRetries = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
51
52
|
const hasGivenUp = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
52
|
-
const releaseLifecycleStartBlock = () => {
|
|
53
|
+
const releaseLifecycleStartBlock = (0, _react.useCallback)(() => {
|
|
53
54
|
"worklet";
|
|
54
55
|
|
|
55
56
|
(0, _reactNativeReanimated.cancelAnimation)(retryToken);
|
|
56
57
|
if (!isBlockingLifecycleStart.get()) {
|
|
57
58
|
return;
|
|
58
59
|
}
|
|
59
|
-
unblockLifecycleStart();
|
|
60
60
|
isBlockingLifecycleStart.set(0);
|
|
61
|
-
|
|
61
|
+
unblockLifecycleStart();
|
|
62
|
+
}, [isBlockingLifecycleStart, retryToken, unblockLifecycleStart]);
|
|
63
|
+
(0, _react.useLayoutEffect)(() => {
|
|
64
|
+
if (!destinationEnabled || !initialDestinationPairKey || progress.get() > 0 || isBlockingLifecycleStart.get()) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Boundary layout effects run before the parent screen's open intent. Claim
|
|
69
|
+
// this boundary's startup block before the transition controller can consume
|
|
70
|
+
// the request; the UI-thread handshake below releases it once matching is done.
|
|
71
|
+
blockLifecycleStart();
|
|
72
|
+
isBlockingLifecycleStart.set(1);
|
|
73
|
+
return () => {
|
|
74
|
+
if (escapeClipping) {
|
|
75
|
+
// The portal host owns the release after this boundary hands off.
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// This is an abandonment fallback, not a second release. Run it on the UI
|
|
80
|
+
// runtime so it serializes with the handshake's guarded release.
|
|
81
|
+
(0, _reactNativeReanimated.runOnUI)(releaseLifecycleStartBlock)();
|
|
82
|
+
};
|
|
83
|
+
}, [blockLifecycleStart, destinationEnabled, escapeClipping, initialDestinationPairKey, isBlockingLifecycleStart, progress, releaseLifecycleStartBlock]);
|
|
62
84
|
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
63
85
|
"worklet";
|
|
64
86
|
|
|
65
87
|
const retryTick = retryToken.get();
|
|
66
|
-
const hasPendingOpenRequest = pendingLifecycleRequestKind.get() === _system.LifecycleTransitionRequestKind.Open;
|
|
67
88
|
const isWaitingForOpenToStart = progress.get() <= 0;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const measurePairKey = (0, _destinationSignals.getInitialDestinationMeasurePairKey)({
|
|
72
|
-
enabled: destinationEnabled,
|
|
89
|
+
const sourceScreenKey = initialDestinationPairKey ? (0, _linkPairs.getSourceScreenKeyFromPairKey)(initialDestinationPairKey) : undefined;
|
|
90
|
+
const signal = (0, _destinationSignals.getInitialDestinationMeasurementSignal)({
|
|
91
|
+
enabled: destinationEnabled && isWaitingForOpenToStart && isBlockingLifecycleStart.get() > 0,
|
|
73
92
|
destinationPairKey,
|
|
74
93
|
ancestorDestinationPairKey,
|
|
75
94
|
linkId: linkKey,
|
|
76
95
|
group,
|
|
77
|
-
|
|
96
|
+
destinationPresent: (0, _entries.getEntry)(tag, currentScreenKey) !== null,
|
|
97
|
+
sourcePresent: sourceScreenKey !== undefined && (0, _entries.getEntry)(tag, sourceScreenKey) !== null,
|
|
98
|
+
linkState: initialDestinationPairKey ? _state.pairs.get() : undefined
|
|
78
99
|
});
|
|
79
|
-
return [
|
|
80
|
-
}, ([measurePairKey, retryTick], previous) => {
|
|
100
|
+
return [signal?.pairKey ?? null, signal?.action ?? null, retryTick];
|
|
101
|
+
}, ([measurePairKey, action, retryTick], previous) => {
|
|
81
102
|
"worklet";
|
|
82
103
|
|
|
83
|
-
if (!measurePairKey) {
|
|
104
|
+
if (!measurePairKey || !action) {
|
|
84
105
|
return;
|
|
85
106
|
}
|
|
86
107
|
const previousMeasurePairKey = previous?.[0];
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
|
|
108
|
+
const previousAction = previous?.[1];
|
|
109
|
+
const previousRetryTick = previous?.[2];
|
|
110
|
+
const shouldHandleSignal = measurePairKey !== previousMeasurePairKey || action !== previousAction || retryTick !== previousRetryTick;
|
|
111
|
+
if (!shouldHandleSignal) {
|
|
90
112
|
return;
|
|
91
113
|
}
|
|
92
114
|
if (hasGivenUp.get()) {
|
|
93
115
|
return;
|
|
94
116
|
}
|
|
95
|
-
if (
|
|
96
|
-
|
|
97
|
-
|
|
117
|
+
if (action === "release") {
|
|
118
|
+
releaseLifecycleStartBlock();
|
|
119
|
+
handshakeRetries.set(0);
|
|
120
|
+
return;
|
|
98
121
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const destinationAttached = (0, _links.getDestination)(measurePairKey, linkKey) !== null;
|
|
104
|
-
if (destinationAttached) {
|
|
105
|
-
const linkState = _state.pairs.get();
|
|
106
|
-
const link = (0, _links.getLink)(measurePairKey, linkKey);
|
|
107
|
-
const sourceScreenKey = (0, _linkPairs.getSourceScreenKeyFromPairKey)(measurePairKey);
|
|
108
|
-
const sourceEntry = (0, _entries.getEntry)(tag, sourceScreenKey);
|
|
109
|
-
const sourceEntryUsesDestinationEscapeHost = sourceEntry?.handoff === true && sourceEntry.escapeClipping === true;
|
|
110
|
-
const shouldWaitForEscapeClippingHost = (0, _ownership.usesEscapeClippingHost)(link) || sourceEntryUsesDestinationEscapeHost || (0, _ownership.hasHandoffEscapeContinuation)({
|
|
111
|
-
linkKey,
|
|
112
|
-
linkState,
|
|
113
|
-
sourceScreenKey
|
|
122
|
+
if (action === "measure") {
|
|
123
|
+
measureBoundary({
|
|
124
|
+
type: "destination",
|
|
125
|
+
pairKey: measurePairKey
|
|
114
126
|
});
|
|
115
|
-
|
|
127
|
+
}
|
|
128
|
+
const link = (0, _links.getLink)(measurePairKey, linkKey);
|
|
129
|
+
const linkComplete = !!link?.source && !!link.destination;
|
|
130
|
+
if (linkComplete || action === "complete") {
|
|
131
|
+
(0, _reactNativeReanimated.cancelAnimation)(retryToken);
|
|
132
|
+
handshakeRetries.set(0);
|
|
133
|
+
if (escapeClipping) {
|
|
116
134
|
// Screen-level escape has a second readiness phase after destination
|
|
117
|
-
//
|
|
135
|
+
// matching: the host must commit before the transition starts, or
|
|
118
136
|
// the payload can disappear for a frame.
|
|
119
137
|
return;
|
|
120
138
|
}
|
|
121
139
|
releaseLifecycleStartBlock();
|
|
122
|
-
viewportRetries.set(0);
|
|
123
140
|
return;
|
|
124
141
|
}
|
|
125
|
-
if (
|
|
142
|
+
if (handshakeRetries.get() >= MAX_HANDSHAKE_RETRIES) {
|
|
126
143
|
hasGivenUp.set(1);
|
|
127
144
|
releaseLifecycleStartBlock();
|
|
128
|
-
_logger.logger.warn(`
|
|
145
|
+
_logger.logger.warn(`Boundary "${linkKey}" never formed a complete source/destination link after ${MAX_HANDSHAKE_RETRIES} attempts; releasing the transition gate without it. One side is likely off-viewport or unmounted.`);
|
|
129
146
|
return;
|
|
130
147
|
}
|
|
131
148
|
|
|
132
|
-
//
|
|
133
|
-
//
|
|
134
|
-
|
|
149
|
+
// Keep the lifecycle blocked while registration, measurement, or source
|
|
150
|
+
// attachment settles. The retry token also retries rejected destination bounds.
|
|
151
|
+
handshakeRetries.set(handshakeRetries.get() + 1);
|
|
135
152
|
(0, _reactNativeReanimated.cancelAnimation)(retryToken);
|
|
136
|
-
retryToken.set((0, _reactNativeReanimated.withDelay)(
|
|
153
|
+
retryToken.set((0, _reactNativeReanimated.withDelay)(HANDSHAKE_RETRY_DELAY_MS, (0, _reactNativeReanimated.withTiming)(retryToken.get() + 1, {
|
|
137
154
|
duration: 0
|
|
138
155
|
})));
|
|
139
156
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_descriptors","_animation","_linkPairs","_entries","_links","_state","_system","_logger","_destinationSignals","HANDSHAKE_RETRY_DELAY_MS","MAX_HANDSHAKE_RETRIES","useInitialDestinationMeasurement","boundTag","enabled","escapeClipping","measureBoundary","tag","linkKey","group","currentScreenKey","useDescriptorsStore","s","derivations","nextScreenKey","destinationPairKey","ancestorDestinationPairKey","destinationEnabled","initialDestinationPairKey","progress","AnimationStore","getValue","actions","blockLifecycleStart","unblockLifecycleStart","SystemStore","getBag","isBlockingLifecycleStart","useSharedValue","retryToken","handshakeRetries","hasGivenUp","releaseLifecycleStartBlock","useCallback","cancelAnimation","get","set","useLayoutEffect","runOnUI","useAnimatedReaction","retryTick","isWaitingForOpenToStart","sourceScreenKey","getSourceScreenKeyFromPairKey","undefined","signal","getInitialDestinationMeasurementSignal","linkId","destinationPresent","getEntry","sourcePresent","linkState","pairs","pairKey","action","measurePairKey","previous","previousMeasurePairKey","previousAction","previousRetryTick","shouldHandleSignal","type","link","getLink","linkComplete","source","destination","logger","warn","withDelay","withTiming","duration","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAQA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAEA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AAEA,IAAAU,mBAAA,GAAAV,OAAA;AAEA,MAAMW,wBAAwB,GAAG,GAAG;AACpC;AACA;AACA;AACA;AACA;AACA,MAAMC,qBAAqB,GAAG,EAAE;AASzB,MAAMC,gCAAgC,GAAGA,CAAC;EAChDC,QAAQ;EACRC,OAAO;EACPC,cAAc;EACdC;AACuC,CAAC,KAAK;EAC7C,MAAM;IAAEC,GAAG;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGN,QAAQ;EACxC,MAAMO,gBAAgB,GAAG,IAAAC,gCAAmB,EAC1CC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACH,gBACtB,CAAC;EACD,MAAMI,aAAa,GAAG,IAAAH,gCAAmB,EAAEC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,aAAa,CAAC;EAC7E,MAAMC,kBAAkB,GAAG,IAAAJ,gCAAmB,EAC5CC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACE,kBACtB,CAAC;EACD,MAAMC,0BAA0B,GAAG,IAAAL,gCAAmB,EACpD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AM,CAACC,IAAI,CACV,aAAa5D,OAAO,2DAA2DP,qBAAqB,oGACrG,CAAC;MACD;IACD;;IAEA;IACA;IACA6B,gBAAgB,CAACM,GAAG,CAACN,gBAAgB,CAACK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAChD,IAAAD,sCAAe,EAACL,UAAU,CAAC;IAC3BA,UAAU,CAACO,GAAG,CACb,IAAAiC,gCAAS,EACRrE,wBAAwB,EACxB,IAAAsE,iCAAU,EAACzC,UAAU,CAACM,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE;MAAEoC,QAAQ,EAAE;IAAE,CAAC,CACjD,CACD,CAAC;EACF,CACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAAtE,gCAAA,GAAAA,gCAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_styles","_useBoundaryPresence","_useInitialDestinationMeasurement","_useInitialSourceMeasurement","_useRefreshBoundary","_useMeasurer","useBoundaryMeasurement","boundTag","enabled","runtimeEnabled","currentScreenKey","measuredRef","style","targetPreparedStyles","handoff","escapeClipping","config","anchor","scaleMode","target","method","boundaryConfig","useMemo","rootPreparedStyles","prepareStyleForBounds","preparedStyles","measureBoundary","useMeasurer","measuredAnimatedRef","useBoundaryPresence","useInitialSourceMeasurement","useInitialDestinationMeasurement","useRefreshBoundary","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-boundary-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,iCAAA,GAAAH,OAAA;AACA,IAAAI,4BAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAmBA;AACA;AACA;AACA;AACA;AACO,MAAMO,sBAAsB,GAAGA,CAAC;EACtCC,QAAQ;EACRC,OAAO;EACPC,cAAc;EACdC,gBAAgB;EAChBC,WAAW;EACXC,KAAK;EACLC,oBAAoB;EACpBC,OAAO;EACPC,cAAc;EACdC;AAC6B,CAAC,KAAK;EACnC,MAAM;IAAEC,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGJ,MAAM;EACpD,MAAMK,cAAc,GAAG,IAAAC,cAAO,EAC7B,OAAO;IAAEL,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,CAAC,EAC7C,CAACH,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAEC,MAAM,CACnC,CAAC;EAED,MAAMG,kBAAkB,GAAG,IAAAD,cAAO,EACjC,MAAM,IAAAE,6BAAqB,EAACZ,KAAK,CAAC,EAClC,CAACA,KAAK,CACP,CAAC;EACD,MAAMa,cAAc,GAAGZ,oBAAoB,IAAIU,kBAAkB;EAEjE,MAAMG,eAAe,GAAG,IAAAC,wBAAW,EAAC;IACnCnB,OAAO;IACPD,QAAQ;IACRG,gBAAgB;IAChBe,cAAc;IACdG,mBAAmB,EAAEjB,WAAW;IAChCG,OAAO;IACPC;EACD,CAAC,CAAC;;EAEF;EACA;EACA,IAAAc,wCAAmB,EAAC;IACnBrB,OAAO,EAAEC,cAAc;IACvBF,QAAQ;IACRG,gBAAgB;IAChBW,cAAc;IACdP,OAAO;IACPC;EACD,CAAC,CAAC;EAEF,IAAAe,wDAA2B,EAAC;IAC3BtB,OAAO,EAAEC,cAAc;IACvBiB,eAAe;IACfnB;EACD,CAAC,CAAC;EAEF,IAAAwB,kEAAgC,EAAC;IAChCxB,QAAQ;IACRC,OAAO,EAAEC,cAAc;
|
|
1
|
+
{"version":3,"names":["_react","require","_styles","_useBoundaryPresence","_useInitialDestinationMeasurement","_useInitialSourceMeasurement","_useRefreshBoundary","_useMeasurer","useBoundaryMeasurement","boundTag","enabled","runtimeEnabled","currentScreenKey","measuredRef","style","targetPreparedStyles","handoff","escapeClipping","config","anchor","scaleMode","target","method","boundaryConfig","useMemo","rootPreparedStyles","prepareStyleForBounds","preparedStyles","measureBoundary","useMeasurer","measuredAnimatedRef","useBoundaryPresence","useInitialSourceMeasurement","useInitialDestinationMeasurement","useRefreshBoundary","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-boundary-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,iCAAA,GAAAH,OAAA;AACA,IAAAI,4BAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAmBA;AACA;AACA;AACA;AACA;AACO,MAAMO,sBAAsB,GAAGA,CAAC;EACtCC,QAAQ;EACRC,OAAO;EACPC,cAAc;EACdC,gBAAgB;EAChBC,WAAW;EACXC,KAAK;EACLC,oBAAoB;EACpBC,OAAO;EACPC,cAAc;EACdC;AAC6B,CAAC,KAAK;EACnC,MAAM;IAAEC,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGJ,MAAM;EACpD,MAAMK,cAAc,GAAG,IAAAC,cAAO,EAC7B,OAAO;IAAEL,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,CAAC,EAC7C,CAACH,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAEC,MAAM,CACnC,CAAC;EAED,MAAMG,kBAAkB,GAAG,IAAAD,cAAO,EACjC,MAAM,IAAAE,6BAAqB,EAACZ,KAAK,CAAC,EAClC,CAACA,KAAK,CACP,CAAC;EACD,MAAMa,cAAc,GAAGZ,oBAAoB,IAAIU,kBAAkB;EAEjE,MAAMG,eAAe,GAAG,IAAAC,wBAAW,EAAC;IACnCnB,OAAO;IACPD,QAAQ;IACRG,gBAAgB;IAChBe,cAAc;IACdG,mBAAmB,EAAEjB,WAAW;IAChCG,OAAO;IACPC;EACD,CAAC,CAAC;;EAEF;EACA;EACA,IAAAc,wCAAmB,EAAC;IACnBrB,OAAO,EAAEC,cAAc;IACvBF,QAAQ;IACRG,gBAAgB;IAChBW,cAAc;IACdP,OAAO;IACPC;EACD,CAAC,CAAC;EAEF,IAAAe,wDAA2B,EAAC;IAC3BtB,OAAO,EAAEC,cAAc;IACvBiB,eAAe;IACfnB;EACD,CAAC,CAAC;EAEF,IAAAwB,kEAAgC,EAAC;IAChCxB,QAAQ;IACRC,OAAO,EAAEC,cAAc;IACvBM,cAAc;IACdW;EACD,CAAC,CAAC;EAEF,IAAAM,sCAAkB,EAAC;IAClBxB,OAAO,EAAEC,cAAc;IACvBF,QAAQ;IACRmB;EACD,CAAC,CAAC;AACH,CAAC;AAACO,OAAA,CAAA3B,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -9,8 +9,10 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
10
10
|
var _measuredBoundsWrites = require("../../../providers/helpers/measured-bounds-writes");
|
|
11
11
|
var _origin = require("../../../providers/screen/origin.provider");
|
|
12
|
+
var _styles = require("../../../providers/screen/styles");
|
|
12
13
|
var _scroll = require("../../../stores/scroll.store");
|
|
13
14
|
var _system = require("../../../stores/system.store");
|
|
15
|
+
var _visibilityBlockOffset = require("../../../utils/visibility-block-offset");
|
|
14
16
|
var _measuredBounds = require("../utils/measured-bounds");
|
|
15
17
|
const useMeasurer = ({
|
|
16
18
|
enabled,
|
|
@@ -31,6 +33,9 @@ const useMeasurer = ({
|
|
|
31
33
|
const {
|
|
32
34
|
originRef
|
|
33
35
|
} = (0, _origin.useOriginContext)();
|
|
36
|
+
const {
|
|
37
|
+
visibilityBlocked
|
|
38
|
+
} = (0, _styles.useScreenSlots)();
|
|
34
39
|
return (0, _react.useCallback)(target => {
|
|
35
40
|
"worklet";
|
|
36
41
|
|
|
@@ -38,7 +43,14 @@ const useMeasurer = ({
|
|
|
38
43
|
const measured = (0, _measuredBounds.measureWithOverscrollAwareness)(measuredAnimatedRef, scrollState.get());
|
|
39
44
|
const measuredOrigin = (0, _reactNativeReanimated.measure)(originRef);
|
|
40
45
|
if (!measured || !measuredOrigin) return;
|
|
41
|
-
const normalizedMeasured = (0, _measuredBounds.
|
|
46
|
+
const normalizedMeasured = (0, _measuredBounds.normalizeMeasuredBoundsWithVisibilityGate)({
|
|
47
|
+
measured,
|
|
48
|
+
origin: measuredOrigin,
|
|
49
|
+
visibilityBlocked: escapeClipping && visibilityBlocked.get(),
|
|
50
|
+
visibilityBlockOffset: (0, _visibilityBlockOffset.getVisibilityBlockOffset)(viewportHeight),
|
|
51
|
+
viewportWidth,
|
|
52
|
+
viewportHeight
|
|
53
|
+
});
|
|
42
54
|
|
|
43
55
|
/**
|
|
44
56
|
* - Destination Pass -
|
|
@@ -62,7 +74,7 @@ const useMeasurer = ({
|
|
|
62
74
|
handoff,
|
|
63
75
|
escapeClipping
|
|
64
76
|
});
|
|
65
|
-
}, [enabled, boundTag, currentScreenKey, preparedStyles, measuredAnimatedRef, handoff, escapeClipping, viewportWidth, viewportHeight, scrollState, scrollMetadata, pendingLifecycleStartBlockCount, originRef]);
|
|
77
|
+
}, [enabled, boundTag, currentScreenKey, preparedStyles, measuredAnimatedRef, handoff, escapeClipping, viewportWidth, viewportHeight, scrollState, scrollMetadata, pendingLifecycleStartBlockCount, originRef, visibilityBlocked]);
|
|
66
78
|
};
|
|
67
79
|
exports.useMeasurer = useMeasurer;
|
|
68
80
|
//# sourceMappingURL=use-measurer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_measuredBoundsWrites","_origin","_scroll","_system","_measuredBounds","useMeasurer","enabled","boundTag","currentScreenKey","preparedStyles","measuredAnimatedRef","handoff","escapeClipping","width","viewportWidth","height","viewportHeight","useWindowDimensions","scrollState","ScrollStore","getValue","scrollMetadata","pendingLifecycleStartBlockCount","SystemStore","originRef","useOriginContext","useCallback","target","measured","measureWithOverscrollAwareness","get","measuredOrigin","measure","normalizedMeasured","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_measuredBoundsWrites","_origin","_styles","_scroll","_system","_visibilityBlockOffset","_measuredBounds","useMeasurer","enabled","boundTag","currentScreenKey","preparedStyles","measuredAnimatedRef","handoff","escapeClipping","width","viewportWidth","height","viewportHeight","useWindowDimensions","scrollState","ScrollStore","getValue","scrollMetadata","pendingLifecycleStartBlockCount","SystemStore","originRef","useOriginContext","visibilityBlocked","useScreenSlots","useCallback","target","measured","measureWithOverscrollAwareness","get","measuredOrigin","measure","normalizedMeasured","normalizeMeasuredBoundsWithVisibilityGate","origin","visibilityBlockOffset","getVisibilityBlockOffset","shouldGuardDestinationViewport","group","viewportAllowsDestinationWrite","type","isMeasurementInViewport","measuredWithScroll","attachScrollSnapshotToMeasuredBounds","applyMeasuredBoundsWrites","entryTag","tag","linkId","linkKey","linkWrite","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-measurer.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AAKA,IAAAG,qBAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAEA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAR,OAAA;AAEA,IAAAS,eAAA,GAAAT,OAAA;AAiBO,MAAMU,WAAW,GAAGA,CAAC;EAC3BC,OAAO;EACPC,QAAQ;EACRC,gBAAgB;EAChBC,cAAc;EACdC,mBAAmB;EACnBC,OAAO;EACPC;AACkB,CAAC,KAAsB;EACzC,MAAM;IAAEC,KAAK,EAAEC,aAAa;IAAEC,MAAM,EAAEC;EAAe,CAAC,GACr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,EAClBrB,aAAa,EACbE,cACD,CAAC;IAEF,IAAI,CAAC0B,8BAA8B,EAAE;IAErC,MAAMG,kBAAkB,GAAG,IAAAC,oDAAoC,EAC9DX,kBAAkB,EAClBd,cAAc,CAACW,GAAG,CAAC,CACpB,CAAC;IAED,IAAAe,+CAAyB,EAAC;MACzBC,QAAQ,EAAEzC,QAAQ,CAAC0C,GAAG;MACtBC,MAAM,EAAE3C,QAAQ,CAAC4C,OAAO;MACxBV,KAAK,EAAElC,QAAQ,CAACkC,KAAK;MACrBjC,gBAAgB;MAChBsB,QAAQ,EAAEe,kBAAkB;MAC5BpC,cAAc;MACd2C,SAAS,EAAEvB,MAAM;MACjBlB,OAAO;MACPC;IACD,CAAC,CAAC;EACH,CAAC,EACD,CACCN,OAAO,EACPC,QAAQ,EACRC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,EACnBC,OAAO,EACPC,cAAc,EACdE,aAAa,EACbE,cAAc,EACdE,WAAW,EACXG,cAAc,EACdC,+BAA+B,EAC/BE,SAAS,EACTE,iBAAiB,CAEnB,CAAC;AACF,CAAC;AAAC2B,OAAA,CAAAhD,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useRegisterTarget = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _logger = require("../../../utils/logger");
|
|
9
|
+
var _boundaryRoot = require("../providers/boundary-root.provider");
|
|
10
|
+
const useRegisterTarget = ({
|
|
11
|
+
targetAnimatedRef,
|
|
12
|
+
preparedStyles,
|
|
13
|
+
measurementRef
|
|
14
|
+
}) => {
|
|
15
|
+
const rootContext = (0, _boundaryRoot.useBoundaryRootContext)();
|
|
16
|
+
const registerTargetRef = rootContext?.registerTargetRef;
|
|
17
|
+
const unregisterTargetRef = rootContext?.unregisterTargetRef;
|
|
18
|
+
(0, _react.useLayoutEffect)(() => {
|
|
19
|
+
if (!registerTargetRef || !unregisterTargetRef) {
|
|
20
|
+
if (__DEV__) {
|
|
21
|
+
_logger.logger.warn(_boundaryRoot.TARGET_OUTSIDE_ROOT_WARNING);
|
|
22
|
+
}
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
registerTargetRef(targetAnimatedRef, preparedStyles, measurementRef);
|
|
26
|
+
return () => {
|
|
27
|
+
unregisterTargetRef(targetAnimatedRef);
|
|
28
|
+
};
|
|
29
|
+
}, [registerTargetRef, unregisterTargetRef, targetAnimatedRef, preparedStyles, measurementRef]);
|
|
30
|
+
};
|
|
31
|
+
exports.useRegisterTarget = useRegisterTarget;
|
|
32
|
+
//# sourceMappingURL=use-register-target.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_logger","_boundaryRoot","useRegisterTarget","targetAnimatedRef","preparedStyles","measurementRef","rootContext","useBoundaryRootContext","registerTargetRef","unregisterTargetRef","useLayoutEffect","__DEV__","logger","warn","TARGET_OUTSIDE_ROOT_WARNING","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-register-target.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAWO,MAAMG,iBAAiB,GAAGA,CAAC;EACjCC,iBAAiB;EACjBC,cAAc;EACdC;AACoB,CAAC,KAAK;EAC1B,MAAMC,WAAW,GAAG,IAAAC,oCAAsB,EAAC,CAAC;EAC5C,MAAMC,iBAAiB,GAAGF,WAAW,EAAEE,iBAAiB;EACxD,MAAMC,mBAAmB,GAAGH,WAAW,EAAEG,mBAAmB;EAC5D,IAAAC,sBAAe,EAAC,MAAM;IACrB,IAAI,CAACF,iBAAiB,IAAI,CAACC,mBAAmB,EAAE;MAC/C,IAAIE,OAAO,EAAE;QACZC,cAAM,CAACC,IAAI,CAACC,yCAA2B,CAAC;MACzC;MACA;IACD;IAEAN,iBAAiB,CAACL,iBAAiB,EAAEC,cAAc,EAAEC,cAAc,CAAC;IACpE,OAAO,MAAM;MACZI,mBAAmB,CAACN,iBAAiB,CAAC;IACvC,CAAC;EACF,CAAC,EAAE,CACFK,iBAAiB,EACjBC,mBAAmB,EACnBN,iBAAiB,EACjBC,cAAc,EACdC,cAAc,CACd,CAAC;AACH,CAAC;AAACU,OAAA,CAAAb,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -48,7 +48,7 @@ _portal.Host.displayName = "Transition.Boundary.Host";
|
|
|
48
48
|
* Use:
|
|
49
49
|
* - `Boundary` for passive and pressable shared elements.
|
|
50
50
|
* - `Boundary.Target` to measure a nested descendant instead of the root.
|
|
51
|
-
* - `Boundary.Host` to make
|
|
51
|
+
* - `Boundary.Host` to make clipping-escape host placement explicit.
|
|
52
52
|
*/
|
|
53
53
|
|
|
54
54
|
const Boundary = exports.Boundary = Object.assign(BoundaryRoot, {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BoundaryContentPortalHost = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
|
|
10
|
+
var _teleport = require("../../../teleport");
|
|
11
|
+
var _hostName = require("../helpers/host-name");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
const AnimatedPortalHost = _teleport.NativePortalHost ? _reactNativeReanimated.default.createAnimatedComponent(_teleport.NativePortalHost) : null;
|
|
15
|
+
const BoundaryContentPortalHost = exports.BoundaryContentPortalHost = /*#__PURE__*/(0, _react.memo)(function BoundaryContentPortalHost({
|
|
16
|
+
boundaryId,
|
|
17
|
+
children,
|
|
18
|
+
enabled,
|
|
19
|
+
screenKey
|
|
20
|
+
}) {
|
|
21
|
+
if (!enabled || !AnimatedPortalHost) {
|
|
22
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
23
|
+
children: children
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
const portalHostName = (0, _hostName.createBoundaryContentPortalHostName)(screenKey, boundaryId);
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
28
|
+
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedPortalHost, {
|
|
29
|
+
name: portalHostName,
|
|
30
|
+
style: styles.host
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
const styles = _reactNative.StyleSheet.create({
|
|
35
|
+
host: {
|
|
36
|
+
..._reactNative.StyleSheet.absoluteFillObject,
|
|
37
|
+
overflow: "visible"
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_teleport","_hostName","_jsxRuntime","e","__esModule","default","AnimatedPortalHost","NativePortalHost","Animated","createAnimatedComponent","BoundaryContentPortalHost","exports","memo","boundaryId","children","enabled","screenKey","jsx","Fragment","portalHostName","createBoundaryContentPortalHostName","jsxs","name","style","styles","host","StyleSheet","create","absoluteFillObject","overflow"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-content-portal/components/host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,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alHostName = void 0;
|
|
7
|
+
const BOUNDARY_CONTENT_PORTAL_HOST_NAME_SUFFIX = "-content-portal-host";
|
|
8
|
+
const createBoundaryContentPortalHostName = (screenKey, boundaryId) => {
|
|
9
|
+
"worklet";
|
|
10
|
+
|
|
11
|
+
return `${screenKey}-${boundaryId}${BOUNDARY_CONTENT_PORTAL_HOST_NAME_SUFFIX}`;
|
|
12
|
+
};
|
|
13
|
+
exports.createBoundaryContentPortalHostName = createBoundaryContentPortalHostName;
|
|
14
|
+
//# sourceMappingURL=host-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BOUNDARY_CONTENT_PORTAL_HOST_NAME_SUFFIX","createBoundaryContentPortalHostName","screenKey","boundaryId","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.ts"],"mappings":";;;;;;AAAA,MAAMA,wCAAwC,GAAG,sBAAsB;AAEhE,MAAMC,mCAAmC,GAAGA,CAClDC,SAAiB,EACjBC,UAAkB,KACd;EACJ,SAAS;;EACT,OAAO,GAAGD,SAAS,IAAIC,UAAU,GAAGH,wCAAwC,EAAE;AAC/E,CAAC;AAACI,OAAA,CAAAH,mCAAA,GAAAA,mCAAA","ignoreList":[]}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useBoundaryContentPortalAttachment = 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 _slotReferences = require("../../../../../../providers/screen/styles/stores/slot-references.store");
|
|
12
|
+
var _animation = require("../../../../../../stores/animation.store");
|
|
13
|
+
var _state = require("../../../../../../stores/bounds/internals/state");
|
|
14
|
+
var _naming = require("../../../utils/naming");
|
|
15
|
+
var _ownership = require("../../../utils/ownership");
|
|
16
|
+
var _shallowEqual = require("../../../utils/shallow-equal");
|
|
17
|
+
var _teleportControl = require("../../../utils/teleport-control");
|
|
18
|
+
var _visibleHost = require("../../../utils/visible-host");
|
|
19
|
+
var _hostName = require("../helpers/host-name");
|
|
20
|
+
const useBoundaryContentPortalAttachment = ({
|
|
21
|
+
boundaryId,
|
|
22
|
+
enabled
|
|
23
|
+
}) => {
|
|
24
|
+
const ownScreenSlots = (0, _styles.useScreenSlots)();
|
|
25
|
+
const sourcePairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.sourcePairKey);
|
|
26
|
+
const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
|
|
27
|
+
const [ownership, setOwnership] = (0, _react.useState)(null);
|
|
28
|
+
const styleOwnerScreenKey = ownership?.ownerScreenKey ?? currentScreenKey;
|
|
29
|
+
const ownerScreenSlots = (0, _slotReferences.useRegisteredScreenSlots)(styleOwnerScreenKey);
|
|
30
|
+
const activeScreenSlots = ownerScreenSlots ?? ownScreenSlots;
|
|
31
|
+
const {
|
|
32
|
+
nextInterpolatorReady: activeNextInterpolatorReady,
|
|
33
|
+
slotsMap: activeSlotsMap
|
|
34
|
+
} = activeScreenSlots;
|
|
35
|
+
const requestedPortalHostName = (0, _reactNativeReanimated.useSharedValue)(null);
|
|
36
|
+
const visiblePortalHostName = (0, _reactNativeReanimated.useSharedValue)(null);
|
|
37
|
+
const canSwitchPortalHostImmediately = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
38
|
+
const targetScreenKey = ownership ? ownership.hostScreenKey : null;
|
|
39
|
+
const settledHostScreenKey = ownership?.hostScreenKey ?? null;
|
|
40
|
+
const settledHostProgress = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "progressSettled");
|
|
41
|
+
const settledHostAnimating = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "progressAnimating");
|
|
42
|
+
const settledHostWillAnimate = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "willAnimate");
|
|
43
|
+
const settledHostClosing = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "closing");
|
|
44
|
+
const handoffHostName = targetScreenKey !== null ? (0, _hostName.createBoundaryContentPortalHostName)(targetScreenKey, boundaryId) : null;
|
|
45
|
+
const updatePortalOwnership = (0, _react.useCallback)((hostScreenKey, ownerPairKey, ownerScreenKey) => {
|
|
46
|
+
if (hostScreenKey && ownerPairKey && ownerScreenKey) {
|
|
47
|
+
setOwnership(current => {
|
|
48
|
+
if (current?.hostScreenKey === hostScreenKey && current.ownerPairKey === ownerPairKey && current.ownerScreenKey === ownerScreenKey) {
|
|
49
|
+
return current;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
hostScreenKey,
|
|
53
|
+
ownerPairKey,
|
|
54
|
+
ownerScreenKey,
|
|
55
|
+
status: "complete"
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
setOwnership(current => current ? null : current);
|
|
61
|
+
}, []);
|
|
62
|
+
(0, _react.useLayoutEffect)(() => {
|
|
63
|
+
if (!enabled || !ownership || !handoffHostName) {
|
|
64
|
+
requestedPortalHostName.set(null);
|
|
65
|
+
visiblePortalHostName.set(null);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
requestedPortalHostName.set(handoffHostName);
|
|
69
|
+
}, [enabled, handoffHostName, ownership, requestedPortalHostName, visiblePortalHostName]);
|
|
70
|
+
(0, _react.useLayoutEffect)(() => {
|
|
71
|
+
return () => {
|
|
72
|
+
requestedPortalHostName.set(null);
|
|
73
|
+
visiblePortalHostName.set(null);
|
|
74
|
+
};
|
|
75
|
+
}, [requestedPortalHostName, visiblePortalHostName]);
|
|
76
|
+
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
77
|
+
"worklet";
|
|
78
|
+
|
|
79
|
+
if (!enabled || !sourcePairKey) {
|
|
80
|
+
return {
|
|
81
|
+
hostScreenKey: null,
|
|
82
|
+
ownerPairKey: sourcePairKey,
|
|
83
|
+
ownerScreenKey: null,
|
|
84
|
+
status: "clear"
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
const progressAnimating = settledHostAnimating.get();
|
|
88
|
+
const progressSettled = settledHostProgress.get();
|
|
89
|
+
const willAnimate = settledHostWillAnimate.get();
|
|
90
|
+
return (0, _ownership.resolveBoundaryPortalOwnership)({
|
|
91
|
+
boundaryId,
|
|
92
|
+
currentScreenKey,
|
|
93
|
+
handoff: true,
|
|
94
|
+
isSettledHostClosingComplete: (0, _ownership.isHandoffHostClosingComplete)({
|
|
95
|
+
closing: settledHostClosing.get(),
|
|
96
|
+
progressAnimating,
|
|
97
|
+
progressSettled,
|
|
98
|
+
willAnimate
|
|
99
|
+
}),
|
|
100
|
+
isSettledHostReady: progressSettled === 1 && progressAnimating === 0,
|
|
101
|
+
pairsState: _state.pairs.get(),
|
|
102
|
+
settledHostScreenKey,
|
|
103
|
+
sourcePairKey
|
|
104
|
+
});
|
|
105
|
+
}, (signal, previousSignal) => {
|
|
106
|
+
"worklet";
|
|
107
|
+
|
|
108
|
+
if ((0, _shallowEqual.shallowEqual)(previousSignal, signal)) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (signal.status === "pending") {
|
|
112
|
+
canSwitchPortalHostImmediately.set(0);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const hostScreenKey = signal.status === "complete" ? signal.hostScreenKey : null;
|
|
116
|
+
let previousOwnerPairKey;
|
|
117
|
+
if (previousSignal?.status === "complete") {
|
|
118
|
+
previousOwnerPairKey = previousSignal.ownerPairKey ?? undefined;
|
|
119
|
+
}
|
|
120
|
+
const canSwitchImmediately = (0, _ownership.canSwitchHandoffHostImmediately)({
|
|
121
|
+
hostScreenKey,
|
|
122
|
+
ownerPairKey: signal.status === "complete" ? signal.ownerPairKey : undefined,
|
|
123
|
+
previousOwnerPairKey
|
|
124
|
+
});
|
|
125
|
+
canSwitchPortalHostImmediately.set(canSwitchImmediately ? 1 : 0);
|
|
126
|
+
if (canSwitchImmediately && hostScreenKey) {
|
|
127
|
+
const hostName = (0, _hostName.createBoundaryContentPortalHostName)(hostScreenKey, boundaryId);
|
|
128
|
+
requestedPortalHostName.set(hostName);
|
|
129
|
+
visiblePortalHostName.set(hostName);
|
|
130
|
+
}
|
|
131
|
+
(0, _reactNativeReanimated.runOnJS)(updatePortalOwnership)(signal.hostScreenKey, signal.ownerPairKey, signal.ownerScreenKey ?? undefined);
|
|
132
|
+
});
|
|
133
|
+
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
134
|
+
"worklet";
|
|
135
|
+
|
|
136
|
+
const slot = activeSlotsMap.get()[boundaryId];
|
|
137
|
+
const teleport = slot?.props?.teleport;
|
|
138
|
+
const shouldTeleport = (0, _teleportControl.shouldAttachBoundaryPortal)({
|
|
139
|
+
enabled,
|
|
140
|
+
teleport
|
|
141
|
+
});
|
|
142
|
+
const requestedName = requestedPortalHostName.get();
|
|
143
|
+
const visibleName = visiblePortalHostName.get();
|
|
144
|
+
const isInterpolatorReady = activeNextInterpolatorReady.get();
|
|
145
|
+
const nextVisibleName = (0, _visibleHost.resolveNextVisiblePortalHostName)({
|
|
146
|
+
canSwitchImmediately: canSwitchPortalHostImmediately.get() === 1,
|
|
147
|
+
isInterpolatorReady: isInterpolatorReady === 1,
|
|
148
|
+
requestedName,
|
|
149
|
+
shouldTeleport,
|
|
150
|
+
visibleName
|
|
151
|
+
});
|
|
152
|
+
return {
|
|
153
|
+
isInterpolatorReady,
|
|
154
|
+
nextVisibleName,
|
|
155
|
+
requestedName,
|
|
156
|
+
shouldTeleport,
|
|
157
|
+
teleport,
|
|
158
|
+
visibleName
|
|
159
|
+
};
|
|
160
|
+
}, (state, previousState) => {
|
|
161
|
+
"worklet";
|
|
162
|
+
|
|
163
|
+
if ((0, _shallowEqual.shallowEqual)(previousState, state)) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (state.nextVisibleName !== state.visibleName) {
|
|
167
|
+
visiblePortalHostName.set(state.nextVisibleName);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
const teleportProps = (0, _reactNativeReanimated.useAnimatedProps)(() => {
|
|
171
|
+
"worklet";
|
|
172
|
+
|
|
173
|
+
const slot = activeSlotsMap.get()[boundaryId];
|
|
174
|
+
const {
|
|
175
|
+
teleport,
|
|
176
|
+
...slotProps
|
|
177
|
+
} = slot?.props ?? {};
|
|
178
|
+
const shouldTeleport = (0, _teleportControl.shouldAttachBoundaryPortal)({
|
|
179
|
+
enabled,
|
|
180
|
+
teleport
|
|
181
|
+
});
|
|
182
|
+
const visibleName = visiblePortalHostName.get();
|
|
183
|
+
return {
|
|
184
|
+
...slotProps,
|
|
185
|
+
hostName: shouldTeleport && visibleName ? visibleName : _naming.PORTAL_HOST_NAME_RESET_VALUE
|
|
186
|
+
};
|
|
187
|
+
});
|
|
188
|
+
return {
|
|
189
|
+
teleportProps,
|
|
190
|
+
visiblePortalHostName
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
exports.useBoundaryContentPortalAttachment = useBoundaryContentPortalAttachment;
|
|
194
|
+
//# sourceMappingURL=use-boundary-content-portal-attachment.js.map
|