react-native-screen-transitions 3.9.0-beta.1 → 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/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/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/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/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
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BoundaryPortal = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _portalSlot = require("./components/portal-slot");
|
|
9
|
+
var _useBoundaryPortalAttachment = require("./hooks/use-boundary-portal-attachment");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
const BoundaryPortal = exports.BoundaryPortal = /*#__PURE__*/(0, _react.memo)(function BoundaryPortal({
|
|
12
|
+
boundaryId,
|
|
13
|
+
children,
|
|
14
|
+
enabled,
|
|
15
|
+
placeholderRef,
|
|
16
|
+
pointerEvents
|
|
17
|
+
}) {
|
|
18
|
+
const {
|
|
19
|
+
teleportProps
|
|
20
|
+
} = (0, _useBoundaryPortalAttachment.useBoundaryPortalAttachment)({
|
|
21
|
+
boundaryId,
|
|
22
|
+
enabled
|
|
23
|
+
});
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_portalSlot.BoundaryPortalSlot, {
|
|
25
|
+
id: boundaryId,
|
|
26
|
+
enabled: enabled,
|
|
27
|
+
animatedProps: teleportProps,
|
|
28
|
+
placeholderRef: placeholderRef,
|
|
29
|
+
pointerEvents: pointerEvents,
|
|
30
|
+
children: children
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_portalSlot","_useBoundaryPortalAttachment","_jsxRuntime","BoundaryPortal","exports","memo","boundaryId","children","enabled","placeholderRef","pointerEvents","teleportProps","useBoundaryPortalAttachment","jsx","BoundaryPortalSlot","id","animatedProps"],"sourceRoot":"../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,4BAAA,GAAAF,OAAA;AAAqF,IAAAG,WAAA,GAAAH,OAAA;AAU9E,MAAMI,cAAc,GAAAC,OAAA,CAAAD,cAAA,gBAAG,IAAAE,WAAI,EAAC,SAASF,cAAcA,CAAC;EAC1DG,UAAU;EACVC,QAAQ;EACRC,OAAO;EACPC,cAAc;EACdC;AACoB,CAAC,EAAE;EACvB,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,wDAA2B,EAAC;IACrDN,UAAU;IACVE;EACD,CAAC,CAAC;EAEF,oBACC,IAAAN,WAAA,CAAAW,GAAA,EAACb,WAAA,CAAAc,kBAAkB;IAClBC,EAAE,EAAET,UAAW;IACfE,OAAO,EAAEA,OAAQ;IACjBQ,aAAa,EAAEL,aAAc;IAC7BF,cAAc,EAAEA,cAAe;IAC/BC,aAAa,EAAEA,aAAc;IAAAH,QAAA,EAE5BA;EAAQ,CACU,CAAC;AAEvB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.setPortalHostBounds = exports.getPortalHostBounds = exports.clearPortalHostBounds = void 0;
|
|
7
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
-
var _scroll = require("
|
|
8
|
+
var _scroll = require("../../../../../../stores/scroll.store");
|
|
9
9
|
const portalHostBounds = (0, _reactNativeReanimated.makeMutable)({});
|
|
10
10
|
const getPortalHostBounds = hostKey => {
|
|
11
11
|
"worklet";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_scroll","portalHostBounds","makeMutable","getPortalHostBounds","hostKey","get","exports","setPortalHostBounds","bounds","nextBounds","scroll","cloneScrollMetadataState","set","state","clearPortalHostBounds","nextState"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AASA,MAAME,gBAAgB,GAAG,IAAAC,kCAAW,EAAwB,CAAC,CAAC,CAAC;AAExD,MAAMC,mBAAmB,GAAIC,OAAe,IAAK;EACvD,SAAS;;EACT,OAAOH,gBAAgB,CAACI,GAAG,CAAC,CAAC,CAACD,OAAO,CAAC,IAAI,IAAI;AAC/C,CAAC;AAACE,OAAA,CAAAH,mBAAA,GAAAA,mBAAA;AAEK,MAAMI,mBAAmB,GAAGA,CAClCH,OAAe,EACfI,MAAwB,KACpB;EACJ,SAAS;;EACT,MAAMC,UAA4B,GAAG;IACpC,GAAGD,MAAM;IACTE,MAAM,EAAE,IAAAC,gCAAwB,EAACH,MAAM,CAACE,MAAM;EAC/C,CAAC;EAEDT,gBAAgB,CAACW,GAAG,CAAEC,KAAK,IAAK;IAC/B,SAAS;;IACT,OAAO;MACN,GAAGA,KAAK;MACR,CAACT,OAAO,GAAGK;IACZ,CAAC;EACF,CAAC,CAAC;AACH,CAAC;AAACH,OAAA,CAAAC,mBAAA,GAAAA,mBAAA;AAEK,MAAMO,qBAAqB,GAAIV,OAAe,IAAK;EACzD,SAAS;;EACTH,gBAAgB,CAACW,GAAG,CAAEC,KAAK,IAAK;IAC/B,SAAS;;IACT,MAAME,SAAgC,GAAG;MAAE,GAAGF;IAAM,CAAC;IACrD,OAAOE,SAAS,CAACX,OAAO,CAAC;IACzB,OAAOW,SAAS;EACjB,CAAC,CAAC;AACH,CAAC;AAACT,OAAA,CAAAQ,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","EMPTY_SNAPSHOT","listeners","Set","hostStacks","Map","snapshot","getActiveHostFromStack","screenKey","stack","length","index","host","fallback","hostKey","buildSnapshot","nextSnapshot","emit","listener","subscribe","add","delete","registerHost","registration","get","previousActiveHostKey","nextStack","filter","unshift","push","set","exports","unregisterHost","getActiveHostKey","useActiveHostKey","useSyncExternalStore","undefined","resetHostRegistry","clear"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAWA,MAAMC,cAAoC,GAAG,CAAC,CAAC;AAE/C,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAA6B,CAAC;AAExD,IAAIC,QAA8B,GAAGL,cAAc;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,sBAAsB,GAAGA,CAC9BC,SAAiB,EACjBC,KAAqC,KACjC;EACJ,IAAI,CAACA,KAAK,IAAIA,KAAK,CAACC,MAAM,KAAK,CAAC,EAAE;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AAS;AACxC,CAAC;AAACuB,OAAA,CAAAE,gBAAA,GAAAA,gBAAA;AAEK,MAAMC,gBAAgB,GAAI1B,SAAyB,IAAK;EAC9D,OAAO,IAAA2B,2BAAoB,EAC1BhB,SAAS,EACT,MAAOX,SAAS,GAAGyB,gBAAgB,CAACzB,SAAS,CAAC,GAAG4B,SAAU,EAC3D,MAAMA,SACP,CAAC;AACF,CAAC;AAACL,OAAA,CAAAG,gBAAA,GAAAA,gBAAA;AAEK,MAAMG,iBAAiB,GAAGA,CAAA,KAAM;EACtCjC,UAAU,CAACkC,KAAK,CAAC,CAAC;EAClBhC,QAAQ,GAAGL,cAAc;EACzBgB,IAAI,CAAC,CAAC;AACP,CAAC;AAACc,OAAA,CAAAM,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useActivePortalBoundaryHosts = exports.
|
|
6
|
+
exports.useActivePortalBoundaryHosts = exports.unmountPortalBoundaryHostByName = exports.mountPortalBoundaryHost = exports.dropStalePortalBoundaryHosts = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
const EMPTY_HOSTS = [];
|
|
9
9
|
const listeners = new Set();
|
|
@@ -40,16 +40,8 @@ const mountPortalBoundaryHost = host => {
|
|
|
40
40
|
emit();
|
|
41
41
|
};
|
|
42
42
|
exports.mountPortalBoundaryHost = mountPortalBoundaryHost;
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
for (const [hostEntryKey, host] of activeBoundaryHosts) {
|
|
46
|
-
if (host.boundaryId !== boundaryId) {
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
activeBoundaryHosts.delete(hostEntryKey);
|
|
50
|
-
didDelete = true;
|
|
51
|
-
}
|
|
52
|
-
if (!didDelete) {
|
|
43
|
+
const unmountPortalBoundaryHostByName = portalHostName => {
|
|
44
|
+
if (!portalHostName || !activeBoundaryHosts.delete(portalHostName)) {
|
|
53
45
|
return;
|
|
54
46
|
}
|
|
55
47
|
emit();
|
|
@@ -60,11 +52,14 @@ const unmountPortalBoundaryHost = boundaryId => {
|
|
|
60
52
|
* visible (`keepPortalHostName`). Called once the new host is confirmed on
|
|
61
53
|
* screen so the superseded receivers stop rendering.
|
|
62
54
|
*/
|
|
63
|
-
exports.
|
|
55
|
+
exports.unmountPortalBoundaryHostByName = unmountPortalBoundaryHostByName;
|
|
64
56
|
const dropStalePortalBoundaryHosts = ({
|
|
65
57
|
boundaryId,
|
|
66
58
|
keepPortalHostName
|
|
67
59
|
}) => {
|
|
60
|
+
if (!activeBoundaryHosts.has(keepPortalHostName)) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
68
63
|
let didDelete = false;
|
|
69
64
|
for (const [hostEntryKey, host] of activeBoundaryHosts) {
|
|
70
65
|
if (host.boundaryId !== boundaryId || host.portalHostName === keepPortalHostName) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","escapeClipping","localStylesMaps","pairKey","portalHostName","screenKey","slotsMap","mountPortalBoundaryHost","previous","get","set","exports","unmountPortalBoundaryHostByName","delete","dropStalePortalBoundaryHosts","keepPortalHostName","has","didDelete","hostEntryKey","subscribe","add","useActivePortalBoundaryHosts","useSyncExternalStore"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAoBA,MAAMC,WAAuC,GAAG,EAAE;AAElD,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,mBAAmB,GAAG,IAAIC,GAAG,CAAmC,CAAC;AAEvE,IAAIC,QAAwB,GAA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E,OAAO,IAAA6B,2BAAoB,EAC1BH,SAAS,EACT,MAAMhC,QAAQ,CAACC,YAAY,CAACK,OAAO,CAAC,IAAIX,WAAW,EACnD,MAAMA,WACP,CAAC;AACF,CAAC;AAAC6B,OAAA,CAAAU,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
|
@@ -9,19 +9,12 @@ Object.defineProperty(exports, "Host", {
|
|
|
9
9
|
return _host.Host;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "Portal", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _portal.Portal;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
12
|
Object.defineProperty(exports, "PortalProvider", {
|
|
19
13
|
enumerable: true,
|
|
20
14
|
get: function () {
|
|
21
15
|
return _portalProvider.PortalProvider;
|
|
22
16
|
}
|
|
23
17
|
});
|
|
24
|
-
var _host = require("./components/host");
|
|
25
|
-
var _portal = require("./components/portal");
|
|
18
|
+
var _host = require("./components/boundary-portal/components/host");
|
|
26
19
|
var _portalProvider = require("./components/portal-provider");
|
|
27
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_host","require","
|
|
1
|
+
{"version":3,"names":["_host","require","_portalProvider"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/portal/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA","ignoreList":[]}
|
|
@@ -10,8 +10,8 @@ var _react = require("react");
|
|
|
10
10
|
* try/catch so Metro treats it as an optional dependency — an absent module no
|
|
11
11
|
* longer fails the bundle, it throws at runtime and the catch swallows it.
|
|
12
12
|
*
|
|
13
|
-
* When teleport is missing,
|
|
14
|
-
* rendering; everything else keeps working.
|
|
13
|
+
* When teleport is missing, handoff and escapeClipping boundaries degrade to
|
|
14
|
+
* inline rendering; everything else keeps working.
|
|
15
15
|
*/
|
|
16
16
|
let mod = null;
|
|
17
17
|
let managerMod = null;
|
|
@@ -3,20 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.PORTAL_HOST_NAME_RESET_VALUE = void 0;
|
|
7
7
|
const PORTAL_HOST_NAME_RESET_VALUE = exports.PORTAL_HOST_NAME_RESET_VALUE = null;
|
|
8
|
-
const PORTAL_HOST_NAME_SUFFIX = "-portal-host";
|
|
9
|
-
const BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX = "-boundary-local-portal-host";
|
|
10
|
-
const createPortalBoundaryHostName = (hostKey, boundaryId, pairKey) => {
|
|
11
|
-
"worklet";
|
|
12
|
-
|
|
13
|
-
return `${hostKey}-${pairKey ? `${pairKey}-` : ""}${boundaryId}${PORTAL_HOST_NAME_SUFFIX}`;
|
|
14
|
-
};
|
|
15
|
-
exports.createPortalBoundaryHostName = createPortalBoundaryHostName;
|
|
16
|
-
const createBoundaryLocalPortalHostName = (screenKey, boundaryId) => {
|
|
17
|
-
"worklet";
|
|
18
|
-
|
|
19
|
-
return `${screenKey}-${boundaryId}${BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX}`;
|
|
20
|
-
};
|
|
21
|
-
exports.createBoundaryLocalPortalHostName = createBoundaryLocalPortalHostName;
|
|
22
8
|
//# sourceMappingURL=naming.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","exports"
|
|
1
|
+
{"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/naming.ts"],"mappings":";;;;;;AAAO,MAAMA,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,IAAI","ignoreList":[]}
|
|
@@ -3,8 +3,21 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.resolveBoundaryPortalOwnership = exports.isHandoffHostClosingComplete = exports.canSwitchHandoffHostImmediately = void 0;
|
|
7
7
|
var _linkPairs = require("../../../../stores/bounds/helpers/link-pairs.helpers");
|
|
8
|
+
const isHandoffHostClosingComplete = ({
|
|
9
|
+
closing,
|
|
10
|
+
progressAnimating,
|
|
11
|
+
progressSettled,
|
|
12
|
+
willAnimate
|
|
13
|
+
}) => {
|
|
14
|
+
"worklet";
|
|
15
|
+
|
|
16
|
+
// A close request marks `closing` before its animation starts. Springs can
|
|
17
|
+
// also enter their settle-distance threshold before their final frame.
|
|
18
|
+
return !!closing && willAnimate === 0 && progressSettled === 1 && progressAnimating === 0;
|
|
19
|
+
};
|
|
20
|
+
exports.isHandoffHostClosingComplete = isHandoffHostClosingComplete;
|
|
8
21
|
const hasSeenScreenKey = (screenKeys, screenKey) => {
|
|
9
22
|
"worklet";
|
|
10
23
|
|
|
@@ -15,12 +28,6 @@ const hasSeenScreenKey = (screenKeys, screenKey) => {
|
|
|
15
28
|
}
|
|
16
29
|
return false;
|
|
17
30
|
};
|
|
18
|
-
const usesEscapeClippingHost = link => {
|
|
19
|
-
"worklet";
|
|
20
|
-
|
|
21
|
-
return link?.source?.handoff === true && link.source.escapeClipping === true;
|
|
22
|
-
};
|
|
23
|
-
exports.usesEscapeClippingHost = usesEscapeClippingHost;
|
|
24
31
|
const isReturningToPreviousSourceHost = ({
|
|
25
32
|
hostScreenKey,
|
|
26
33
|
ownerPairKey,
|
|
@@ -33,7 +40,7 @@ const isReturningToPreviousSourceHost = ({
|
|
|
33
40
|
const ownerDestinationScreenKey = (0, _linkPairs.getDestinationScreenKeyFromPairKey)(ownerPairKey);
|
|
34
41
|
return previousDestinationScreenKey !== "" && ownerDestinationScreenKey !== "" && previousDestinationScreenKey !== previousSourceScreenKey && ownerDestinationScreenKey === previousSourceScreenKey && hostScreenKey === previousSourceScreenKey;
|
|
35
42
|
};
|
|
36
|
-
const
|
|
43
|
+
const canSwitchHandoffHostImmediately = ({
|
|
37
44
|
hostScreenKey,
|
|
38
45
|
ownerPairKey,
|
|
39
46
|
previousOwnerPairKey
|
|
@@ -55,7 +62,7 @@ const canSwitchBoundaryLocalHandoffImmediately = ({
|
|
|
55
62
|
previousOwnerPairKey
|
|
56
63
|
});
|
|
57
64
|
};
|
|
58
|
-
exports.
|
|
65
|
+
exports.canSwitchHandoffHostImmediately = canSwitchHandoffHostImmediately;
|
|
59
66
|
const isActiveHandoffLink = ({
|
|
60
67
|
link,
|
|
61
68
|
linkKey,
|
|
@@ -70,7 +77,7 @@ const isActiveHandoffLink = ({
|
|
|
70
77
|
const activeId = pairsState[pairKey]?.groups?.[link.group]?.activeId;
|
|
71
78
|
return !activeId || activeId === linkKey;
|
|
72
79
|
};
|
|
73
|
-
const
|
|
80
|
+
const resolveHandoffStyleOwnerScreenKey = ({
|
|
74
81
|
hostScreenKey,
|
|
75
82
|
isSettledHostReady,
|
|
76
83
|
settledHostScreenKey,
|
|
@@ -106,7 +113,6 @@ const clearSignal = sourcePairKey => {
|
|
|
106
113
|
const resolveBoundaryPortalOwnership = ({
|
|
107
114
|
boundaryId,
|
|
108
115
|
currentScreenKey,
|
|
109
|
-
escapeClipping,
|
|
110
116
|
handoff,
|
|
111
117
|
isSettledHostClosingComplete = false,
|
|
112
118
|
isSettledHostReady = false,
|
|
@@ -139,7 +145,6 @@ const resolveBoundaryPortalOwnership = ({
|
|
|
139
145
|
}
|
|
140
146
|
let hostScreenKey = link.destination.screenKey;
|
|
141
147
|
let ownerPairKey = sourcePairKey;
|
|
142
|
-
let previousOwnerPairKey = null;
|
|
143
148
|
const seenScreenKeys = [(0, _linkPairs.getSourceScreenKeyFromPairKey)(sourcePairKey), hostScreenKey];
|
|
144
149
|
const pairKeys = Object.keys(pairsState);
|
|
145
150
|
for (let hop = 0; hop < pairKeys.length; hop++) {
|
|
@@ -171,7 +176,6 @@ const resolveBoundaryPortalOwnership = ({
|
|
|
171
176
|
continue;
|
|
172
177
|
}
|
|
173
178
|
const nextHostScreenKey = candidate.destination.screenKey;
|
|
174
|
-
previousOwnerPairKey = ownerPairKey;
|
|
175
179
|
ownerPairKey = candidatePairKey;
|
|
176
180
|
hostScreenKey = nextHostScreenKey;
|
|
177
181
|
if (hasSeenScreenKey(seenScreenKeys, nextHostScreenKey)) {
|
|
@@ -193,12 +197,10 @@ const resolveBoundaryPortalOwnership = ({
|
|
|
193
197
|
}
|
|
194
198
|
break;
|
|
195
199
|
}
|
|
196
|
-
|
|
197
|
-
const ownerUsesEscapeClipping = ownerLink?.source?.escapeClipping ?? escapeClipping;
|
|
198
|
-
if (!ownerUsesEscapeClipping && isSettledHostClosingComplete && settledHostScreenKey === hostScreenKey && previousOwnerPairKey) {
|
|
200
|
+
if (isSettledHostClosingComplete && settledHostScreenKey === hostScreenKey) {
|
|
199
201
|
hostScreenKey = (0, _linkPairs.getSourceScreenKeyFromPairKey)(ownerPairKey);
|
|
200
202
|
}
|
|
201
|
-
const ownerScreenKey =
|
|
203
|
+
const ownerScreenKey = resolveHandoffStyleOwnerScreenKey({
|
|
202
204
|
hostScreenKey,
|
|
203
205
|
isSettledHostReady,
|
|
204
206
|
settledHostScreenKey,
|
|
@@ -212,43 +214,4 @@ const resolveBoundaryPortalOwnership = ({
|
|
|
212
214
|
};
|
|
213
215
|
};
|
|
214
216
|
exports.resolveBoundaryPortalOwnership = resolveBoundaryPortalOwnership;
|
|
215
|
-
const hasHandoffEscapeContinuation = ({
|
|
216
|
-
linkKey,
|
|
217
|
-
linkState,
|
|
218
|
-
sourceScreenKey
|
|
219
|
-
}) => {
|
|
220
|
-
"worklet";
|
|
221
|
-
|
|
222
|
-
const pairKeys = Object.keys(linkState);
|
|
223
|
-
const visitedScreenKeys = [];
|
|
224
|
-
let cursorScreenKey = sourceScreenKey;
|
|
225
|
-
for (let hop = 0; hop < pairKeys.length; hop++) {
|
|
226
|
-
if (hasSeenScreenKey(visitedScreenKeys, cursorScreenKey)) {
|
|
227
|
-
return false;
|
|
228
|
-
}
|
|
229
|
-
visitedScreenKeys.push(cursorScreenKey);
|
|
230
|
-
let previousScreenKey = null;
|
|
231
|
-
for (let index = 0; index < pairKeys.length; index++) {
|
|
232
|
-
const candidatePairKey = pairKeys[index];
|
|
233
|
-
const link = candidatePairKey ? linkState[candidatePairKey]?.links?.[linkKey] : null;
|
|
234
|
-
if (!link?.source || !link.destination || link.destination.screenKey !== cursorScreenKey) {
|
|
235
|
-
continue;
|
|
236
|
-
}
|
|
237
|
-
if (usesEscapeClippingHost(link)) {
|
|
238
|
-
return true;
|
|
239
|
-
}
|
|
240
|
-
if (!link.source.handoff) {
|
|
241
|
-
return false;
|
|
242
|
-
}
|
|
243
|
-
previousScreenKey = link.source.screenKey;
|
|
244
|
-
break;
|
|
245
|
-
}
|
|
246
|
-
if (!previousScreenKey) {
|
|
247
|
-
return false;
|
|
248
|
-
}
|
|
249
|
-
cursorScreenKey = previousScreenKey;
|
|
250
|
-
}
|
|
251
|
-
return false;
|
|
252
|
-
};
|
|
253
|
-
exports.hasHandoffEscapeContinuation = hasHandoffEscapeContinuation;
|
|
254
217
|
//# sourceMappingURL=ownership.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_linkPairs","require","
|
|
1
|
+
{"version":3,"names":["_linkPairs","require","isHandoffHostClosingComplete","closing","progressAnimating","progressSettled","willAnimate","exports","hasSeenScreenKey","screenKeys","screenKey","index","length","isReturningToPreviousSourceHost","hostScreenKey","ownerPairKey","previousOwnerPairKey","previousSourceScreenKey","getSourceScreenKeyFromPairKey","previousDestinationScreenKey","getDestinationScreenKeyFromPairKey","ownerDestinationScreenKey","canSwitchHandoffHostImmediately","isActiveHandoffLink","link","linkKey","pairKey","pairsState","group","activeId","groups","resolveHandoffStyleOwnerScreenKey","isSettledHostReady","settledHostScreenKey","sourceScreenKey","pendingSignal","sourcePairKey","ownerScreenKey","status","clearSignal","resolveBoundaryPortalOwnership","boundaryId","currentScreenKey","handoff","isSettledHostClosingComplete","getLinkKeyFromTag","getPairLink","destination","seenScreenKeys","pairKeys","Object","keys","hop","didAdvance","hasPendingNextHop","didHitVisitedScreen","candidatePairKey","candidate","source","nextHostScreenKey","push"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/ownership.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AA4BO,MAAMC,4BAA4B,GAAGA,CAAC;EAC5CC,OAAO;EACPC,iBAAiB;EACjBC,eAAe;EACfC;AAMD,CAAC,KAAK;EACL,SAAS;;EAET;EACA;EACA,OACC,CAAC,CAACH,OAAO,IACTG,WAAW,KAAK,CAAC,IACjBD,eAAe,KAAK,CAAC,IACrBD,iBAAiB,KAAK,CAAC;AAEzB,CAAC;AAACG,OAAA,CAAAL,4BAAA,GAAAA,4BAAA;AAEF,MAAMM,gBAAgB,GAAGA,CAACC,UAAuB,EAAEC,SAAoB,KAAK;EAC3E,SAAS;;EACT,KAAK,IAAIC,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGF,UAAU,CAACG,MAAM,EAAED,KAAK,EAAE,EAAE;IACvD,IAAIF,UAAU,CAACE,KAAK,CAAC,KAAKD,SAAS,EAAE;MACpC,OAAO,IAAI;IACZ;EACD;EACA,OAAO,KAAK;AACb,CAAC;AAED,MAAMG,+BAA+B,GAAGA,CAAC;EACxCC,aAAa;EACbC,YAAY;EACZC;AAKD,CAAC,KAAK;EACL,SAAS;;EACT,MAAMC,uBAAuB,GAC5B,IAAAC,wCAA6B,EAACF,oBAAoB,CAAC;EACpD,MAAMG,4BAA4B,GACjC,IAAAC,6CAAkC,EAACJ,oBAAoB,CAAC;EACzD,MAAMK,yBAAyB,GAC9B,IAAAD,6CAAkC,EAACL,YAAY,CAAC;EAEjD,OACCI,4BAA4B,KAAK,EAAE,IACnCE,yBAAyB,KAAK,EAAE,IAChCF,4BAA4B,KAAKF,uB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IAAI,CAACD,iBAAiB,CAAC;MACtCN,UAAU,GAAG,IAAI;MACjB;IACD;IAEA,IAAIE,mBAAmB,EAAE;MACxB;IACD;IAEA,IAAIF,UAAU,EAAE;MACf;IACD;IAEA,IAAIC,iBAAiB,EAAE;MACtB,OAAOnB,aAAa,CAACpB,YAAY,CAAC;IACnC;IAEA;EACD;EAEA,IAAI6B,4BAA4B,IAAIX,oBAAoB,KAAKnB,aAAa,EAAE;IAC3EA,aAAa,GAAG,IAAAI,wCAA6B,EAACH,YAAY,CAAC;EAC5D;EAEA,MAAMsB,cAAc,GAAGN,iCAAiC,CAAC;IACxDjB,aAAa;IACbkB,kBAAkB;IAClBC,oBAAoB;IACpBC,eAAe,EAAE,IAAAhB,wCAA6B,EAACH,YAAY;EAC5D,CAAC,CAAC;EAEF,OAAO;IACND,aAAa;IACbC,YAAY;IACZsB,cAAc;IACdC,MAAM,EAAE;EACT,CAAC;AACF,CAAC;AAAC/B,OAAA,CAAAiC,8BAAA,GAAAA,8BAAA","ignoreList":[]}
|
|
@@ -3,30 +3,53 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.useBoundaryRootStore = exports.useBoundaryRootContext = exports.TARGET_OUTSIDE_ROOT_WARNING = exports.BoundaryRootProvider = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
+
var _descriptors = require("../../../providers/screen/descriptors");
|
|
10
|
+
var _styles = require("../../../providers/screen/styles");
|
|
11
|
+
var _linkPairs = require("../../../stores/bounds/helpers/link-pairs.helpers");
|
|
9
12
|
var _createProvider = _interopRequireDefault(require("../../../utils/create-provider"));
|
|
10
13
|
var _logger = require("../../../utils/logger");
|
|
14
|
+
var _useBoundaryMeasurement = require("../hooks/use-boundary-measurement");
|
|
15
|
+
var _resolvePortal = require("../portal/utils/resolve-portal");
|
|
11
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
17
|
// logger.warn prepends the library prefix.
|
|
13
18
|
const MULTIPLE_TARGETS_WARNING = "Multiple Boundary.Target elements were rendered under the same boundary root. The first registered target will be measured.";
|
|
14
19
|
const TARGET_OUTSIDE_ROOT_WARNING = exports.TARGET_OUTSIDE_ROOT_WARNING = "Boundary.Target must be rendered inside Transition.Boundary or a component created by createBoundaryComponent.";
|
|
15
20
|
const {
|
|
16
21
|
BoundaryRootProvider,
|
|
17
|
-
useBoundaryRootContext
|
|
22
|
+
useBoundaryRootContext,
|
|
23
|
+
useBoundaryRootStore
|
|
18
24
|
} = (0, _createProvider.default)("BoundaryRoot", {
|
|
19
25
|
guarded: false
|
|
20
|
-
})(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
})(({
|
|
27
|
+
children,
|
|
28
|
+
config,
|
|
29
|
+
enabled = true,
|
|
30
|
+
escapeClipping,
|
|
31
|
+
forwardedRef,
|
|
32
|
+
group,
|
|
33
|
+
handoff,
|
|
34
|
+
id,
|
|
35
|
+
style
|
|
36
|
+
}) => {
|
|
37
|
+
const boundTag = (0, _react.useMemo)(() => (0, _linkPairs.createBoundTag)(String(id), group), [id, group]);
|
|
38
|
+
const portalRuntime = (0, _resolvePortal.resolveBoundaryPortal)({
|
|
39
|
+
handoff,
|
|
40
|
+
escapeClipping
|
|
41
|
+
});
|
|
42
|
+
const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
|
|
43
|
+
const hasConfiguredInterpolator = (0, _descriptors.useDescriptorsStore)(s => s.derivations.hasConfiguredInterpolator);
|
|
44
|
+
const runtimeEnabled = enabled && hasConfiguredInterpolator;
|
|
45
|
+
// Associated slot styles attach whenever the boundary is enabled,
|
|
46
|
+
// independent of whether an interpolator is configured for this transition.
|
|
47
|
+
const shouldAttachAssociatedStyles = enabled;
|
|
48
|
+
const shouldEscapeBoundaryRootToScreenHost = portalRuntime.escapeClipping;
|
|
49
|
+
const associatedStyles = (0, _styles.useComposedSlotStyles)(boundTag.tag, style);
|
|
50
|
+
const associatedStackingStyles = (0, _styles.useSlotStackingStyles)(boundTag.tag);
|
|
29
51
|
const rootRef = (0, _reactNativeReanimated.useAnimatedRef)();
|
|
52
|
+
const rootEscapePlaceholderRef = (0, _reactNativeReanimated.useAnimatedRef)();
|
|
30
53
|
const [targetEntry, setTargetEntry] = (0, _react.useState)(null);
|
|
31
54
|
const registerTargetRef = (0, _react.useCallback)((targetRef, preparedStyles, measurementRef) => {
|
|
32
55
|
setTargetEntry(prev => {
|
|
@@ -46,20 +69,51 @@ const useBoundaryRootState = params => {
|
|
|
46
69
|
const unregisterTargetRef = (0, _react.useCallback)(targetRef => {
|
|
47
70
|
setTargetEntry(prev => prev?.ref === targetRef ? null : prev);
|
|
48
71
|
}, []);
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
72
|
+
const rootMeasurementRef = shouldEscapeBoundaryRootToScreenHost ? rootEscapePlaceholderRef : rootRef;
|
|
73
|
+
const measuredRef = targetEntry?.measurementRef ?? rootMeasurementRef;
|
|
74
|
+
const hasActiveTarget = targetEntry !== null;
|
|
75
|
+
const targetPreparedStyles = targetEntry?.preparedStyles;
|
|
76
|
+
(0, _react.useImperativeHandle)(forwardedRef, () => rootRef.current, [rootRef]);
|
|
77
|
+
(0, _useBoundaryMeasurement.useBoundaryMeasurement)({
|
|
78
|
+
boundTag,
|
|
79
|
+
enabled,
|
|
80
|
+
runtimeEnabled,
|
|
81
|
+
currentScreenKey,
|
|
82
|
+
measuredRef,
|
|
83
|
+
style,
|
|
84
|
+
targetPreparedStyles,
|
|
85
|
+
handoff: portalRuntime.handoff,
|
|
86
|
+
escapeClipping: portalRuntime.escapeClipping,
|
|
87
|
+
config
|
|
88
|
+
});
|
|
89
|
+
const shouldRenderBoundaryRootThroughPortal = shouldEscapeBoundaryRootToScreenHost && !hasActiveTarget;
|
|
90
|
+
// A nested active target takes the full associated style, so the root keeps
|
|
91
|
+
// only its stacking context. Root-owned escape-clipping moves the root
|
|
92
|
+
// through a screen host, so its associated style is applied through the
|
|
93
|
+
// host instead of inline on the escaped element.
|
|
94
|
+
// Host-only handoff receivers still need the associated style: their
|
|
95
|
+
// handoff host is absolute-filled inside this root, so the root is the
|
|
96
|
+
// visual frame that animates the received payload.
|
|
97
|
+
const attachedStyle = shouldAttachAssociatedStyles ? hasActiveTarget ? associatedStackingStyles : shouldRenderBoundaryRootThroughPortal ? undefined : associatedStyles : undefined;
|
|
98
|
+
const value = (0, _react.useMemo)(() => ({
|
|
99
|
+
attachedStyle,
|
|
52
100
|
activeTargetRef: targetEntry?.ref ?? null,
|
|
53
101
|
boundTag,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
102
|
+
currentScreenKey,
|
|
103
|
+
portalRuntime,
|
|
104
|
+
registerTargetRef,
|
|
57
105
|
ref: rootRef,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
106
|
+
rootEscapePlaceholderRef,
|
|
107
|
+
shouldRenderBoundaryRootThroughPortal,
|
|
108
|
+
shouldRenderHandoffHost: enabled && portalRuntime.handoff,
|
|
109
|
+
unregisterTargetRef
|
|
110
|
+
}), [attachedStyle, boundTag, currentScreenKey, enabled, portalRuntime, registerTargetRef, rootRef, rootEscapePlaceholderRef, shouldRenderBoundaryRootThroughPortal, targetEntry, unregisterTargetRef]);
|
|
111
|
+
return {
|
|
112
|
+
value,
|
|
113
|
+
children: children(value)
|
|
62
114
|
};
|
|
63
|
-
};
|
|
64
|
-
exports.
|
|
115
|
+
});
|
|
116
|
+
exports.useBoundaryRootStore = useBoundaryRootStore;
|
|
117
|
+
exports.useBoundaryRootContext = useBoundaryRootContext;
|
|
118
|
+
exports.BoundaryRootProvider = BoundaryRootProvider;
|
|
65
119
|
//# sourceMappingURL=boundary-root.provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_createProvider","_interopRequireDefault","_logger","e","__esModule","default","MULTIPLE_TARGETS_WARNING","TARGET_OUTSIDE_ROOT_WARNING","exports","BoundaryRootProvider","useBoundaryRootContext","createProvider","guarded","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_descriptors","_styles","_linkPairs","_createProvider","_interopRequireDefault","_logger","_useBoundaryMeasurement","_resolvePortal","e","__esModule","default","MULTIPLE_TARGETS_WARNING","TARGET_OUTSIDE_ROOT_WARNING","exports","BoundaryRootProvider","useBoundaryRootContext","useBoundaryRootStore","createProvider","guarded","children","config","enabled","escapeClipping","forwardedRef","group","handoff","id","style","boundTag","useMemo","createBoundTag","String","portalRuntime","resolveBoundaryPortal","currentScreenKey","useDescriptorsStore","s","derivations","hasConfiguredInterpolator","runtimeEnabled","shouldAttachAssociatedStyles","shouldEscapeBoundaryRootToScreenHost","associatedStyles","useComposedSlotStyles","tag","associatedStackingStyles","useSlotStackingStyles","rootRef","useAnimatedRef","rootEscapePlaceholderRef","targetEntry","setTargetEntry","useState","registerTargetRef","useCallback","targetRef","preparedStyles","measurementRef","prev","ref","__DEV__","logger","warnOnce","unregisterTargetRef","rootMeasurementRef","measuredRef","hasActiveTarget","targetPreparedStyles","useImperativeHandle","current","useBoundaryMeasurement","shouldRenderBoundaryRootThroughPortal","attachedStyle","undefined","value","activeTargetRef","shouldRenderHandoffHost"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/providers/boundary-root.provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAUA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAIA,IAAAI,UAAA,GAAAJ,OAAA;AAEA,IAAAK,eAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAA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@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getInitialDestinationMeasurementSignal = void 0;
|
|
7
7
|
var _linkPairs = require("../../../stores/bounds/helpers/link-pairs.helpers");
|
|
8
|
-
const
|
|
8
|
+
const getInitialDestinationMeasurementSignal = params => {
|
|
9
9
|
"worklet";
|
|
10
10
|
|
|
11
11
|
const {
|
|
@@ -14,22 +14,51 @@ const getInitialDestinationMeasurePairKey = params => {
|
|
|
14
14
|
ancestorDestinationPairKey,
|
|
15
15
|
linkId,
|
|
16
16
|
group,
|
|
17
|
+
destinationPresent,
|
|
18
|
+
sourcePresent,
|
|
17
19
|
linkState
|
|
18
20
|
} = params;
|
|
19
|
-
const
|
|
20
|
-
if (!enabled || !
|
|
21
|
+
const pairKey = destinationPairKey ?? ancestorDestinationPairKey;
|
|
22
|
+
if (!enabled || !pairKey) {
|
|
21
23
|
return null;
|
|
22
24
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
if (!destinationPresent) {
|
|
26
|
+
return {
|
|
27
|
+
pairKey,
|
|
28
|
+
action: "wait"
|
|
29
|
+
};
|
|
27
30
|
}
|
|
28
|
-
|
|
31
|
+
if (!sourcePresent) {
|
|
32
|
+
return {
|
|
33
|
+
pairKey,
|
|
34
|
+
action: "release"
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const linkKey = (0, _linkPairs.getLinkKeyFromTag)(linkId);
|
|
38
|
+
const activeGroupId = group && linkState ? (0, _linkPairs.getActiveGroupId)(linkState, pairKey, group) : null;
|
|
29
39
|
if (activeGroupId && activeGroupId !== linkKey) {
|
|
30
|
-
return
|
|
40
|
+
return {
|
|
41
|
+
pairKey,
|
|
42
|
+
action: "release"
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const link = linkState?.[pairKey]?.links?.[linkKey];
|
|
46
|
+
if (!link?.destination) {
|
|
47
|
+
return {
|
|
48
|
+
pairKey,
|
|
49
|
+
action: "measure"
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (!link.source) {
|
|
53
|
+
return {
|
|
54
|
+
pairKey,
|
|
55
|
+
action: "wait"
|
|
56
|
+
};
|
|
31
57
|
}
|
|
32
|
-
return
|
|
58
|
+
return {
|
|
59
|
+
pairKey,
|
|
60
|
+
action: "complete"
|
|
61
|
+
};
|
|
33
62
|
};
|
|
34
|
-
exports.
|
|
63
|
+
exports.getInitialDestinationMeasurementSignal = getInitialDestinationMeasurementSignal;
|
|
35
64
|
//# sourceMappingURL=destination-signals.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_linkPairs","require","
|
|
1
|
+
{"version":3,"names":["_linkPairs","require","getInitialDestinationMeasurementSignal","params","enabled","destinationPairKey","ancestorDestinationPairKey","linkId","group","destinationPresent","sourcePresent","linkState","pairKey","action","linkKey","getLinkKeyFromTag","activeGroupId","getActiveGroupId","link","links","destination","source","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/utils/destination-signals.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAoBO,MAAMC,sCAAsC,GAAIC,MAStD,IAAiD;EACjD,SAAS;;EACT,MAAM;IACLC,OAAO;IACPC,kBAAkB;IAClBC,0BAA0B;IAC1BC,MAAM;IACNC,KAAK;IACLC,kBAAkB;IAClBC,aAAa;IACbC;EACD,CAAC,GAAGR,MAAM;EACV,MAAMS,OAAO,GAAGP,kBAAkB,IAAIC,0BAA0B;EAEhE,IAAI,CAACF,OAAO,IAAI,CAACQ,OAAO,EAAE;IACzB,OAAO,IAAI;EACZ;EAEA,IAAI,CAACH,kBAAkB,EAAE;IACxB,OAAO;MAAEG,OAAO;MAAEC,MAAM,EAAE;IAAO,CAAC;EACnC;EAEA,IAAI,CAACH,aAAa,EAAE;IACnB,OAAO;MAAEE,OAAO;MAAE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