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
package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { useCallback, useLayoutEffect } from "react";
|
|
1
2
|
import {
|
|
2
3
|
cancelAnimation,
|
|
4
|
+
runOnUI,
|
|
3
5
|
useAnimatedReaction,
|
|
4
6
|
useSharedValue,
|
|
5
7
|
withDelay,
|
|
@@ -9,41 +11,33 @@ import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
|
9
11
|
import { AnimationStore } from "../../../../stores/animation.store";
|
|
10
12
|
import { getSourceScreenKeyFromPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
11
13
|
import { getEntry } from "../../../../stores/bounds/internals/entries";
|
|
12
|
-
import {
|
|
13
|
-
getDestination,
|
|
14
|
-
getLink,
|
|
15
|
-
} from "../../../../stores/bounds/internals/links";
|
|
14
|
+
import { getLink } from "../../../../stores/bounds/internals/links";
|
|
16
15
|
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
17
16
|
import type { BoundTag } from "../../../../stores/bounds/types";
|
|
18
|
-
import {
|
|
19
|
-
LifecycleTransitionRequestKind,
|
|
20
|
-
SystemStore,
|
|
21
|
-
} from "../../../../stores/system.store";
|
|
17
|
+
import { SystemStore } from "../../../../stores/system.store";
|
|
22
18
|
import { logger } from "../../../../utils/logger";
|
|
23
|
-
import {
|
|
24
|
-
hasHandoffEscapeContinuation,
|
|
25
|
-
usesEscapeClippingHost,
|
|
26
|
-
} from "../../portal/utils/ownership";
|
|
27
19
|
import type { MeasureBoundary } from "../../types";
|
|
28
|
-
import {
|
|
20
|
+
import { getInitialDestinationMeasurementSignal } from "../../utils/destination-signals";
|
|
29
21
|
|
|
30
|
-
const
|
|
22
|
+
const HANDSHAKE_RETRY_DELAY_MS = 100;
|
|
31
23
|
/**
|
|
32
|
-
* A destination
|
|
33
|
-
* transition gate forever
|
|
34
|
-
*
|
|
24
|
+
* A destination whose initial handshake never completes must not hold the
|
|
25
|
+
* transition gate forever. After this budget, release the block with a warning
|
|
26
|
+
* so the open proceeds without that boundary.
|
|
35
27
|
*/
|
|
36
|
-
const
|
|
28
|
+
const MAX_HANDSHAKE_RETRIES = 20;
|
|
37
29
|
|
|
38
30
|
interface UseInitialDestinationMeasurementParams {
|
|
39
31
|
boundTag: BoundTag;
|
|
40
32
|
enabled: boolean;
|
|
33
|
+
escapeClipping: boolean;
|
|
41
34
|
measureBoundary: MeasureBoundary;
|
|
42
35
|
}
|
|
43
36
|
|
|
44
37
|
export const useInitialDestinationMeasurement = ({
|
|
45
38
|
boundTag,
|
|
46
39
|
enabled,
|
|
40
|
+
escapeClipping,
|
|
47
41
|
measureBoundary,
|
|
48
42
|
}: UseInitialDestinationMeasurementParams) => {
|
|
49
43
|
const { tag, linkKey, group } = boundTag;
|
|
@@ -58,22 +52,23 @@ export const useInitialDestinationMeasurement = ({
|
|
|
58
52
|
(s) => s.derivations.ancestorDestinationPairKey,
|
|
59
53
|
);
|
|
60
54
|
const destinationEnabled = enabled && !nextScreenKey;
|
|
55
|
+
const initialDestinationPairKey =
|
|
56
|
+
destinationPairKey ?? ancestorDestinationPairKey;
|
|
61
57
|
const progress = AnimationStore.getValue(
|
|
62
58
|
currentScreenKey,
|
|
63
59
|
"transitionProgress",
|
|
64
60
|
);
|
|
65
61
|
|
|
66
62
|
const {
|
|
67
|
-
pendingLifecycleRequestKind,
|
|
68
63
|
actions: { blockLifecycleStart, unblockLifecycleStart },
|
|
69
64
|
} = SystemStore.getBag(currentScreenKey);
|
|
70
65
|
|
|
71
66
|
const isBlockingLifecycleStart = useSharedValue(0);
|
|
72
67
|
const retryToken = useSharedValue(0);
|
|
73
|
-
const
|
|
68
|
+
const handshakeRetries = useSharedValue(0);
|
|
74
69
|
const hasGivenUp = useSharedValue(0);
|
|
75
70
|
|
|
76
|
-
const releaseLifecycleStartBlock = () => {
|
|
71
|
+
const releaseLifecycleStartBlock = useCallback(() => {
|
|
77
72
|
"worklet";
|
|
78
73
|
cancelAnimation(retryToken);
|
|
79
74
|
|
|
@@ -81,53 +76,91 @@ export const useInitialDestinationMeasurement = ({
|
|
|
81
76
|
return;
|
|
82
77
|
}
|
|
83
78
|
|
|
84
|
-
unblockLifecycleStart();
|
|
85
79
|
isBlockingLifecycleStart.set(0);
|
|
86
|
-
|
|
80
|
+
unblockLifecycleStart();
|
|
81
|
+
}, [isBlockingLifecycleStart, retryToken, unblockLifecycleStart]);
|
|
82
|
+
|
|
83
|
+
useLayoutEffect(() => {
|
|
84
|
+
if (
|
|
85
|
+
!destinationEnabled ||
|
|
86
|
+
!initialDestinationPairKey ||
|
|
87
|
+
progress.get() > 0 ||
|
|
88
|
+
isBlockingLifecycleStart.get()
|
|
89
|
+
) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Boundary layout effects run before the parent screen's open intent. Claim
|
|
94
|
+
// this boundary's startup block before the transition controller can consume
|
|
95
|
+
// the request; the UI-thread handshake below releases it once matching is done.
|
|
96
|
+
blockLifecycleStart();
|
|
97
|
+
isBlockingLifecycleStart.set(1);
|
|
98
|
+
|
|
99
|
+
return () => {
|
|
100
|
+
if (escapeClipping) {
|
|
101
|
+
// The portal host owns the release after this boundary hands off.
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// This is an abandonment fallback, not a second release. Run it on the UI
|
|
106
|
+
// runtime so it serializes with the handshake's guarded release.
|
|
107
|
+
runOnUI(releaseLifecycleStartBlock)();
|
|
108
|
+
};
|
|
109
|
+
}, [
|
|
110
|
+
blockLifecycleStart,
|
|
111
|
+
destinationEnabled,
|
|
112
|
+
escapeClipping,
|
|
113
|
+
initialDestinationPairKey,
|
|
114
|
+
isBlockingLifecycleStart,
|
|
115
|
+
progress,
|
|
116
|
+
releaseLifecycleStartBlock,
|
|
117
|
+
]);
|
|
87
118
|
|
|
88
119
|
useAnimatedReaction(
|
|
89
120
|
() => {
|
|
90
121
|
"worklet";
|
|
91
122
|
const retryTick = retryToken.get();
|
|
92
|
-
|
|
93
|
-
const hasPendingOpenRequest =
|
|
94
|
-
pendingLifecycleRequestKind.get() ===
|
|
95
|
-
LifecycleTransitionRequestKind.Open;
|
|
96
|
-
|
|
97
123
|
const isWaitingForOpenToStart = progress.get() <= 0;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
124
|
+
const sourceScreenKey = initialDestinationPairKey
|
|
125
|
+
? getSourceScreenKeyFromPairKey(initialDestinationPairKey)
|
|
126
|
+
: undefined;
|
|
127
|
+
const signal = getInitialDestinationMeasurementSignal({
|
|
128
|
+
enabled:
|
|
129
|
+
destinationEnabled &&
|
|
130
|
+
isWaitingForOpenToStart &&
|
|
131
|
+
isBlockingLifecycleStart.get() > 0,
|
|
105
132
|
destinationPairKey,
|
|
106
133
|
ancestorDestinationPairKey,
|
|
107
134
|
linkId: linkKey,
|
|
108
135
|
group,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
136
|
+
destinationPresent: getEntry(tag, currentScreenKey) !== null,
|
|
137
|
+
sourcePresent:
|
|
138
|
+
sourceScreenKey !== undefined &&
|
|
139
|
+
getEntry(tag, sourceScreenKey) !== null,
|
|
140
|
+
linkState: initialDestinationPairKey ? pairs.get() : undefined,
|
|
114
141
|
});
|
|
115
142
|
|
|
116
|
-
return [
|
|
143
|
+
return [
|
|
144
|
+
signal?.pairKey ?? null,
|
|
145
|
+
signal?.action ?? null,
|
|
146
|
+
retryTick,
|
|
147
|
+
] as const;
|
|
117
148
|
},
|
|
118
|
-
([measurePairKey, retryTick], previous) => {
|
|
149
|
+
([measurePairKey, action, retryTick], previous) => {
|
|
119
150
|
"worklet";
|
|
120
|
-
if (!measurePairKey) {
|
|
151
|
+
if (!measurePairKey || !action) {
|
|
121
152
|
return;
|
|
122
153
|
}
|
|
123
154
|
|
|
124
155
|
const previousMeasurePairKey = previous?.[0];
|
|
125
|
-
const
|
|
126
|
-
const
|
|
156
|
+
const previousAction = previous?.[1];
|
|
157
|
+
const previousRetryTick = previous?.[2];
|
|
158
|
+
const shouldHandleSignal =
|
|
127
159
|
measurePairKey !== previousMeasurePairKey ||
|
|
160
|
+
action !== previousAction ||
|
|
128
161
|
retryTick !== previousRetryTick;
|
|
129
162
|
|
|
130
|
-
if (!
|
|
163
|
+
if (!shouldHandleSignal) {
|
|
131
164
|
return;
|
|
132
165
|
}
|
|
133
166
|
|
|
@@ -135,62 +168,51 @@ export const useInitialDestinationMeasurement = ({
|
|
|
135
168
|
return;
|
|
136
169
|
}
|
|
137
170
|
|
|
138
|
-
if (
|
|
139
|
-
|
|
140
|
-
|
|
171
|
+
if (action === "release") {
|
|
172
|
+
releaseLifecycleStartBlock();
|
|
173
|
+
handshakeRetries.set(0);
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (action === "measure") {
|
|
178
|
+
measureBoundary({
|
|
179
|
+
type: "destination",
|
|
180
|
+
pairKey: measurePairKey,
|
|
181
|
+
});
|
|
141
182
|
}
|
|
142
183
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
pairKey: measurePairKey,
|
|
146
|
-
});
|
|
184
|
+
const link = getLink(measurePairKey, linkKey);
|
|
185
|
+
const linkComplete = !!link?.source && !!link.destination;
|
|
147
186
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const linkState = pairs.get();
|
|
153
|
-
const link = getLink(measurePairKey, linkKey);
|
|
154
|
-
const sourceScreenKey = getSourceScreenKeyFromPairKey(measurePairKey);
|
|
155
|
-
const sourceEntry = getEntry(tag, sourceScreenKey);
|
|
156
|
-
const sourceEntryUsesDestinationEscapeHost =
|
|
157
|
-
sourceEntry?.handoff === true && sourceEntry.escapeClipping === true;
|
|
158
|
-
const shouldWaitForEscapeClippingHost =
|
|
159
|
-
usesEscapeClippingHost(link) ||
|
|
160
|
-
sourceEntryUsesDestinationEscapeHost ||
|
|
161
|
-
hasHandoffEscapeContinuation({
|
|
162
|
-
linkKey,
|
|
163
|
-
linkState,
|
|
164
|
-
sourceScreenKey,
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
if (shouldWaitForEscapeClippingHost) {
|
|
187
|
+
if (linkComplete || action === "complete") {
|
|
188
|
+
cancelAnimation(retryToken);
|
|
189
|
+
handshakeRetries.set(0);
|
|
190
|
+
if (escapeClipping) {
|
|
168
191
|
// Screen-level escape has a second readiness phase after destination
|
|
169
|
-
//
|
|
192
|
+
// matching: the host must commit before the transition starts, or
|
|
170
193
|
// the payload can disappear for a frame.
|
|
171
194
|
return;
|
|
172
195
|
}
|
|
173
196
|
releaseLifecycleStartBlock();
|
|
174
|
-
viewportRetries.set(0);
|
|
175
197
|
return;
|
|
176
198
|
}
|
|
177
199
|
|
|
178
|
-
if (
|
|
200
|
+
if (handshakeRetries.get() >= MAX_HANDSHAKE_RETRIES) {
|
|
179
201
|
hasGivenUp.set(1);
|
|
180
202
|
releaseLifecycleStartBlock();
|
|
181
203
|
logger.warn(
|
|
182
|
-
`
|
|
204
|
+
`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.`,
|
|
183
205
|
);
|
|
184
206
|
return;
|
|
185
207
|
}
|
|
186
208
|
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
|
|
209
|
+
// Keep the lifecycle blocked while registration, measurement, or source
|
|
210
|
+
// attachment settles. The retry token also retries rejected destination bounds.
|
|
211
|
+
handshakeRetries.set(handshakeRetries.get() + 1);
|
|
190
212
|
cancelAnimation(retryToken);
|
|
191
213
|
retryToken.set(
|
|
192
214
|
withDelay(
|
|
193
|
-
|
|
215
|
+
HANDSHAKE_RETRY_DELAY_MS,
|
|
194
216
|
withTiming(retryToken.get() + 1, { duration: 0 }),
|
|
195
217
|
),
|
|
196
218
|
);
|
|
@@ -8,15 +8,17 @@ import {
|
|
|
8
8
|
} from "react-native-reanimated";
|
|
9
9
|
import { applyMeasuredBoundsWrites } from "../../../providers/helpers/measured-bounds-writes";
|
|
10
10
|
import { useOriginContext } from "../../../providers/screen/origin.provider";
|
|
11
|
+
import { useScreenSlots } from "../../../providers/screen/styles";
|
|
11
12
|
import type { BoundTag } from "../../../stores/bounds/types";
|
|
12
13
|
import { ScrollStore } from "../../../stores/scroll.store";
|
|
13
14
|
import { SystemStore } from "../../../stores/system.store";
|
|
15
|
+
import { getVisibilityBlockOffset } from "../../../utils/visibility-block-offset";
|
|
14
16
|
import type { MeasureBoundary } from "../types";
|
|
15
17
|
import {
|
|
16
18
|
attachScrollSnapshotToMeasuredBounds,
|
|
17
19
|
isMeasurementInViewport,
|
|
18
20
|
measureWithOverscrollAwareness,
|
|
19
|
-
|
|
21
|
+
normalizeMeasuredBoundsWithVisibilityGate,
|
|
20
22
|
} from "../utils/measured-bounds";
|
|
21
23
|
|
|
22
24
|
interface UseMeasurerParams {
|
|
@@ -48,6 +50,7 @@ export const useMeasurer = ({
|
|
|
48
50
|
"pendingLifecycleStartBlockCount",
|
|
49
51
|
);
|
|
50
52
|
const { originRef } = useOriginContext();
|
|
53
|
+
const { visibilityBlocked } = useScreenSlots();
|
|
51
54
|
|
|
52
55
|
return useCallback(
|
|
53
56
|
(target) => {
|
|
@@ -62,10 +65,14 @@ export const useMeasurer = ({
|
|
|
62
65
|
|
|
63
66
|
if (!measured || !measuredOrigin) return;
|
|
64
67
|
|
|
65
|
-
const normalizedMeasured =
|
|
68
|
+
const normalizedMeasured = normalizeMeasuredBoundsWithVisibilityGate({
|
|
66
69
|
measured,
|
|
67
|
-
measuredOrigin,
|
|
68
|
-
|
|
70
|
+
origin: measuredOrigin,
|
|
71
|
+
visibilityBlocked: escapeClipping && visibilityBlocked.get(),
|
|
72
|
+
visibilityBlockOffset: getVisibilityBlockOffset(viewportHeight),
|
|
73
|
+
viewportWidth,
|
|
74
|
+
viewportHeight,
|
|
75
|
+
});
|
|
69
76
|
|
|
70
77
|
/**
|
|
71
78
|
* - Destination Pass -
|
|
@@ -119,6 +126,7 @@ export const useMeasurer = ({
|
|
|
119
126
|
scrollMetadata,
|
|
120
127
|
pendingLifecycleStartBlockCount,
|
|
121
128
|
originRef,
|
|
129
|
+
visibilityBlocked,
|
|
122
130
|
],
|
|
123
131
|
);
|
|
124
132
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useLayoutEffect } from "react";
|
|
2
|
+
import type { View } from "react-native";
|
|
3
|
+
import type { AnimatedRef } from "react-native-reanimated";
|
|
4
|
+
import { logger } from "../../../utils/logger";
|
|
5
|
+
import {
|
|
6
|
+
TARGET_OUTSIDE_ROOT_WARNING,
|
|
7
|
+
useBoundaryRootContext,
|
|
8
|
+
} from "../providers/boundary-root.provider";
|
|
9
|
+
|
|
10
|
+
interface RegisterTargetProps {
|
|
11
|
+
targetAnimatedRef: AnimatedRef<View>;
|
|
12
|
+
preparedStyles: Record<string, any>;
|
|
13
|
+
measurementRef: AnimatedRef<View>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const useRegisterTarget = ({
|
|
17
|
+
targetAnimatedRef,
|
|
18
|
+
preparedStyles,
|
|
19
|
+
measurementRef,
|
|
20
|
+
}: RegisterTargetProps) => {
|
|
21
|
+
const rootContext = useBoundaryRootContext();
|
|
22
|
+
const registerTargetRef = rootContext?.registerTargetRef;
|
|
23
|
+
const unregisterTargetRef = rootContext?.unregisterTargetRef;
|
|
24
|
+
useLayoutEffect(() => {
|
|
25
|
+
if (!registerTargetRef || !unregisterTargetRef) {
|
|
26
|
+
if (__DEV__) {
|
|
27
|
+
logger.warn(TARGET_OUTSIDE_ROOT_WARNING);
|
|
28
|
+
}
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
registerTargetRef(targetAnimatedRef, preparedStyles, measurementRef);
|
|
33
|
+
return () => {
|
|
34
|
+
unregisterTargetRef(targetAnimatedRef);
|
|
35
|
+
};
|
|
36
|
+
}, [
|
|
37
|
+
registerTargetRef,
|
|
38
|
+
unregisterTargetRef,
|
|
39
|
+
targetAnimatedRef,
|
|
40
|
+
preparedStyles,
|
|
41
|
+
measurementRef,
|
|
42
|
+
]);
|
|
43
|
+
};
|
|
@@ -53,7 +53,7 @@ type BoundaryRootComponent = typeof BoundaryRoot;
|
|
|
53
53
|
* Use:
|
|
54
54
|
* - `Boundary` for passive and pressable shared elements.
|
|
55
55
|
* - `Boundary.Target` to measure a nested descendant instead of the root.
|
|
56
|
-
* - `Boundary.Host` to make
|
|
56
|
+
* - `Boundary.Host` to make clipping-escape host placement explicit.
|
|
57
57
|
*/
|
|
58
58
|
export interface BoundaryComponent extends BoundaryRootComponent {
|
|
59
59
|
/**
|
|
@@ -61,7 +61,7 @@ export interface BoundaryComponent extends BoundaryRootComponent {
|
|
|
61
61
|
*/
|
|
62
62
|
Target: typeof BoundaryTarget;
|
|
63
63
|
/**
|
|
64
|
-
* Explicit
|
|
64
|
+
* Explicit host for clipping-escape placement.
|
|
65
65
|
*/
|
|
66
66
|
Host: typeof Host;
|
|
67
67
|
/**
|
package/src/shared/components/boundary/portal/components/boundary-content-portal/components/host.tsx
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { memo, type ReactNode } from "react";
|
|
2
|
+
import { StyleSheet } from "react-native";
|
|
3
|
+
import Animated from "react-native-reanimated";
|
|
4
|
+
import { NativePortalHost } from "../../../teleport";
|
|
5
|
+
import { createBoundaryContentPortalHostName } from "../helpers/host-name";
|
|
6
|
+
|
|
7
|
+
const AnimatedPortalHost = NativePortalHost
|
|
8
|
+
? Animated.createAnimatedComponent(NativePortalHost)
|
|
9
|
+
: null;
|
|
10
|
+
|
|
11
|
+
type BoundaryContentPortalHostProps = {
|
|
12
|
+
boundaryId: string;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
screenKey: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const BoundaryContentPortalHost = memo(
|
|
19
|
+
function BoundaryContentPortalHost({
|
|
20
|
+
boundaryId,
|
|
21
|
+
children,
|
|
22
|
+
enabled,
|
|
23
|
+
screenKey,
|
|
24
|
+
}: BoundaryContentPortalHostProps) {
|
|
25
|
+
if (!enabled || !AnimatedPortalHost) {
|
|
26
|
+
return <>{children}</>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const portalHostName = createBoundaryContentPortalHostName(
|
|
30
|
+
screenKey,
|
|
31
|
+
boundaryId,
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<>
|
|
36
|
+
{children}
|
|
37
|
+
<AnimatedPortalHost name={portalHostName} style={styles.host} />
|
|
38
|
+
</>
|
|
39
|
+
);
|
|
40
|
+
},
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
const styles = StyleSheet.create({
|
|
44
|
+
host: {
|
|
45
|
+
...StyleSheet.absoluteFillObject,
|
|
46
|
+
overflow: "visible",
|
|
47
|
+
},
|
|
48
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const BOUNDARY_CONTENT_PORTAL_HOST_NAME_SUFFIX = "-content-portal-host";
|
|
2
|
+
|
|
3
|
+
export const createBoundaryContentPortalHostName = (
|
|
4
|
+
screenKey: string,
|
|
5
|
+
boundaryId: string,
|
|
6
|
+
) => {
|
|
7
|
+
"worklet";
|
|
8
|
+
return `${screenKey}-${boundaryId}${BOUNDARY_CONTENT_PORTAL_HOST_NAME_SUFFIX}`;
|
|
9
|
+
};
|