react-native-screen-transitions 3.9.0-alpha.1 → 3.9.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js +21 -16
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js +88 -114
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/{use-boundary-presence.js → lifecycles/use-boundary-presence.js} +14 -7
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/{use-initial-destination-measurement.js → lifecycles/use-initial-destination-measurement.js} +51 -24
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/{use-initial-source-measurement.js → lifecycles/use-initial-source-measurement.js} +7 -10
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/{use-refresh-boundary.js → lifecycles/use-refresh-boundary.js} +10 -7
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +82 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +10 -13
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/index.js +27 -30
- package/lib/commonjs/shared/components/boundary/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js +58 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/host.js +20 -4
- package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js +53 -32
- package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js +206 -96
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js +14 -2
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js +5 -44
- package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js +37 -5
- package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/teleport.js +15 -2
- package/lib/commonjs/shared/components/boundary/portal/teleport.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js +18 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +10 -3
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js +28 -49
- package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +254 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js +38 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js +29 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js +10 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js +25 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +65 -0
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +12 -2
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +0 -21
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/source-signals.js +4 -9
- package/lib/commonjs/shared/components/boundary/utils/source-signals.js.map +1 -1
- package/lib/commonjs/shared/components/create-transition-aware-component.js +2 -20
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +1 -1
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +2 -14
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js +4 -16
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +4 -15
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.js +4 -16
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.js.map +1 -1
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +6 -3
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +143 -24
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/screen-composer.js +1 -1
- package/lib/commonjs/shared/providers/screen/screen-composer.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/compose-slot-style.js +95 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
- package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/opening-phase.js +32 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/opening-phase.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +16 -11
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +2 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js +1 -20
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js +1 -11
- package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js +96 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +36 -36
- 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 +1 -19
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +8 -3
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/index.js +38 -7
- package/lib/commonjs/shared/providers/screen/styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/{styles.provider.js → slot.provider.js} +34 -21
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +53 -0
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +37 -2
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/entries.js +11 -4
- package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +134 -51
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +1 -3
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/stores/system.store.js +5 -0
- package/lib/commonjs/shared/stores/system.store.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +10 -69
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js +59 -0
- package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +8 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js +59 -0
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/commonjs/shared/utils/logger.js +11 -0
- package/lib/commonjs/shared/utils/logger.js.map +1 -1
- package/lib/module/shared/components/boundary/components/boundary-target.js +19 -14
- package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/module/shared/components/boundary/create-boundary-component.js +93 -119
- package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js +30 -0
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/{use-initial-destination-measurement.js → lifecycles/use-initial-destination-measurement.js} +51 -24
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/{use-initial-source-measurement.js → lifecycles/use-initial-source-measurement.js} +7 -10
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/{use-refresh-boundary.js → lifecycles/use-refresh-boundary.js} +10 -7
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +77 -0
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/use-measurer.js +10 -13
- package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/boundary/index.js +27 -30
- package/lib/module/shared/components/boundary/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js +53 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/host.js +21 -5
- package/lib/module/shared/components/boundary/portal/components/host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js +53 -32
- package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/portal.js +213 -103
- package/lib/module/shared/components/boundary/portal/components/portal.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js +15 -3
- package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js +4 -41
- package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js +35 -4
- package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/teleport.js +16 -2
- package/lib/module/shared/components/boundary/portal/teleport.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js +13 -0
- package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/naming.js +8 -2
- package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/offset-style.js +29 -49
- package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/ownership.js +246 -0
- package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js +33 -0
- package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js +24 -0
- package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js +8 -0
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/visible-host.js +20 -0
- package/lib/module/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +57 -0
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -0
- package/lib/module/shared/components/boundary/utils/destination-signals.js +12 -2
- package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/refresh-signals.js +0 -21
- package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/source-signals.js +4 -9
- package/lib/module/shared/components/boundary/utils/source-signals.js.map +1 -1
- package/lib/module/shared/components/create-transition-aware-component.js +4 -22
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/float-overlay.js +2 -2
- package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/backdrop.js +4 -16
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js +4 -16
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +5 -16
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/surface-container.js +4 -16
- package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -1
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +6 -3
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/derivations.js +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +144 -25
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/screen-composer.js +2 -2
- package/lib/module/shared/providers/screen/screen-composer.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/compose-slot-style.js +89 -0
- package/lib/module/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
- package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/opening-phase.js +26 -0
- package/lib/module/shared/providers/screen/styles/helpers/opening-phase.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +16 -11
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +2 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js +0 -18
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js +0 -9
- package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js +87 -0
- package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +36 -36
- 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 +1 -19
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +9 -4
- package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/index.js +2 -1
- package/lib/module/shared/providers/screen/styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/slot.provider.js +66 -0
- package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +47 -0
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +33 -1
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/entries.js +11 -4
- package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +135 -53
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +1 -3
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/stores/system.store.js +5 -0
- package/lib/module/shared/stores/system.store.js.map +1 -1
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js +10 -69
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js +52 -0
- package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js +9 -2
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js +58 -0
- package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/module/shared/utils/logger.js +11 -0
- package/lib/module/shared/utils/logger.js.map +1 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts +0 -1
- package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts +11 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts +10 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts +10 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +28 -0
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts +5 -6
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/index.d.ts +36 -229
- package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +4 -3
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts +0 -7
- package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts +16 -1
- package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts +3 -0
- package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +2 -1
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts +16 -32
- package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +35 -0
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts +4 -0
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +37 -0
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/types.d.ts +9 -36
- package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts +1 -0
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts +0 -1
- package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +3 -215
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +3 -3
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/compose-slot-style.d.ts +4 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/compose-slot-style.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/normalize-slots.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/opening-phase.d.ts +16 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/opening-phase.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts +3 -4
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.d.ts +0 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts +0 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts +11 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +4 -6
- 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 +0 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/index.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/styles/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +18 -0
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts +6 -0
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +8 -1
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts +4 -3
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +22 -20
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/stores/system.store.d.ts +1 -0
- package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +7 -1
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts +6 -0
- package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts +9 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts.map +1 -1
- package/lib/typescript/shared/utils/logger.d.ts +6 -0
- package/lib/typescript/shared/utils/logger.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/components/boundary/components/boundary-target.tsx +30 -16
- package/src/shared/components/boundary/create-boundary-component.tsx +132 -164
- package/src/shared/components/boundary/hooks/lifecycles/use-boundary-presence.ts +41 -0
- package/src/shared/components/boundary/hooks/{use-initial-destination-measurement.ts → lifecycles/use-initial-destination-measurement.ts} +65 -22
- package/src/shared/components/boundary/hooks/{use-initial-source-measurement.ts → lifecycles/use-initial-source-measurement.ts} +10 -12
- package/src/shared/components/boundary/hooks/{use-refresh-boundary.ts → lifecycles/use-refresh-boundary.ts} +10 -10
- package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +97 -0
- package/src/shared/components/boundary/hooks/use-measurer.ts +16 -24
- package/src/shared/components/boundary/index.tsx +56 -30
- package/src/shared/components/boundary/portal/components/boundary-local-portal-host.tsx +66 -0
- package/src/shared/components/boundary/portal/components/host.tsx +20 -5
- package/src/shared/components/boundary/portal/components/portal-boundary-host.tsx +67 -52
- package/src/shared/components/boundary/portal/components/portal.tsx +281 -120
- package/src/shared/components/boundary/portal/hooks/use-host-measurement.ts +23 -2
- package/src/shared/components/boundary/portal/stores/host-registry.store.ts +4 -51
- package/src/shared/components/boundary/portal/stores/portal-boundary-host.store.ts +59 -6
- package/src/shared/components/boundary/portal/teleport.ts +28 -3
- package/src/shared/components/boundary/portal/utils/has-local-slot.ts +16 -0
- package/src/shared/components/boundary/portal/utils/naming.ts +11 -1
- package/src/shared/components/boundary/portal/utils/offset-style.ts +37 -139
- package/src/shared/components/boundary/portal/utils/ownership.ts +371 -0
- package/src/shared/components/boundary/portal/utils/resolve-portal.ts +50 -0
- package/src/shared/components/boundary/portal/utils/shallow-equal.ts +25 -0
- package/src/shared/components/boundary/portal/utils/teleport-control.ts +12 -0
- package/src/shared/components/boundary/portal/utils/visible-host.ts +24 -0
- package/src/shared/components/boundary/providers/{boundary-owner.provider.tsx → boundary-root.provider.tsx} +33 -47
- package/src/shared/components/boundary/types.ts +9 -39
- package/src/shared/components/boundary/utils/destination-signals.ts +22 -2
- package/src/shared/components/boundary/utils/refresh-signals.ts +0 -41
- package/src/shared/components/boundary/utils/source-signals.ts +5 -17
- package/src/shared/components/create-transition-aware-component.tsx +3 -25
- package/src/shared/components/overlay/variations/float-overlay.tsx +3 -3
- package/src/shared/components/screen-container/layers/backdrop.tsx +4 -17
- package/src/shared/components/screen-container/layers/content.tsx +4 -16
- package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +8 -18
- package/src/shared/components/screen-container/layers/surface-container.tsx +4 -17
- package/src/shared/index.ts +0 -5
- package/src/shared/providers/helpers/measured-bounds-writes.ts +6 -11
- package/src/shared/providers/screen/animation/helpers/derivations.ts +3 -0
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +251 -68
- package/src/shared/providers/screen/screen-composer.tsx +3 -3
- package/src/shared/providers/screen/styles/helpers/compose-slot-style.ts +129 -0
- package/src/shared/providers/screen/styles/helpers/normalize-slots.ts +45 -8
- package/src/shared/providers/screen/styles/helpers/opening-phase.ts +25 -0
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +22 -12
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.ts +3 -1
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.ts +0 -24
- package/src/shared/providers/screen/styles/helpers/visibility-gate.ts +0 -12
- package/src/shared/providers/screen/styles/hooks/slot-resolvers.tsx +111 -0
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +48 -38
- package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +0 -18
- package/src/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.tsx +17 -4
- package/src/shared/providers/screen/styles/index.tsx +13 -4
- package/src/shared/providers/screen/styles/slot.provider.tsx +93 -0
- package/src/shared/providers/screen/styles/stores/slot-references.store.ts +71 -0
- package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +41 -1
- package/src/shared/stores/bounds/internals/entries.ts +13 -5
- package/src/shared/stores/bounds/internals/links.ts +167 -85
- package/src/shared/stores/bounds/internals/resolver.ts +0 -2
- package/src/shared/stores/bounds/types.ts +24 -22
- package/src/shared/stores/system.store.ts +6 -0
- package/src/shared/types/animation.types.ts +8 -1
- package/src/shared/utils/bounds/helpers/styles/compute.ts +22 -124
- package/src/shared/utils/bounds/helpers/styles/local-transform.ts +86 -0
- package/src/shared/utils/bounds/navigation/zoom/build.ts +9 -1
- package/src/shared/utils/bounds/navigation/zoom/helpers.ts +96 -0
- package/src/shared/utils/logger.ts +12 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-presence.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js +0 -40
- package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/providers/boundary-owner.provider.js +0 -68
- package/lib/commonjs/shared/components/boundary/providers/boundary-owner.provider.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/preserve-animated-props-only.js +0 -26
- package/lib/commonjs/shared/providers/screen/styles/helpers/preserve-animated-props-only.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js +0 -23
- package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/utils/attachment.js +0 -35
- package/lib/module/shared/components/boundary/portal/utils/attachment.js.map +0 -1
- package/lib/module/shared/components/boundary/providers/boundary-owner.provider.js +0 -60
- package/lib/module/shared/components/boundary/providers/boundary-owner.provider.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/helpers/preserve-animated-props-only.js +0 -21
- package/lib/module/shared/providers/screen/styles/helpers/preserve-animated-props-only.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/styles.provider.js +0 -53
- package/lib/module/shared/providers/screen/styles/styles.provider.js.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts +0 -8
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts +0 -9
- package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts +0 -9
- package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts +0 -10
- package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts +0 -21
- package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/providers/boundary-owner.provider.d.ts +0 -44
- package/lib/typescript/shared/components/boundary/providers/boundary-owner.provider.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/preserve-animated-props-only.d.ts +0 -3
- package/lib/typescript/shared/providers/screen/styles/helpers/preserve-animated-props-only.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts +0 -14
- package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts.map +0 -1
- package/src/shared/components/boundary/hooks/use-boundary-presence.ts +0 -28
- package/src/shared/components/boundary/portal/utils/attachment.ts +0 -48
- package/src/shared/providers/screen/styles/helpers/preserve-animated-props-only.ts +0 -22
- package/src/shared/providers/screen/styles/styles.provider.tsx +0 -60
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useLayoutEffect","runOnUI","removeEntry","setEntry","useBoundaryPresence","params","enabled","boundTag","currentScreenKey","boundaryConfig","handoff","escapeClipping","tag"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-boundary-presence.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,OAAO;AACvC,SAASC,OAAO,QAAQ,yBAAyB;AACjD,SACCC,WAAW,EACXC,QAAQ,QACF,6CAA6C;AAIpD,OAAO,MAAMC,mBAAmB,GAAIC,MAOnC,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,QAAQ;IACRC,gBAAgB;IAChBC,cAAc;IACdC,OAAO;IACPC;EACD,CAAC,GAAGN,MAAM;EACV,MAAM;IAAEO;EAAI,CAAC,GAAGL,QAAQ;EAExBP,eAAe,CAAC,MAAM;IACrB,IAAI,CAACM,OAAO,EAAE;IAEdL,OAAO,CAACE,QAAQ,CAAC,CAACS,GAAG,EAAEJ,gBAAgB,EAAE;MACxCC,cAAc;MACdC,OAAO,EAAEA,OAAO,GAAG,IAAI,GAAG,IAAI;MAC9BC,cAAc,EAAEA,cAAc,GAAG,IAAI,GAAG;IACzC,CAAC,CAAC;IAEF,OAAO,MAAM;MACZV,OAAO,CAACC,WAAW,CAAC,CAACU,GAAG,EAAEJ,gBAAgB,CAAC;IAC5C,CAAC;EACF,CAAC,EAAE,CAACF,OAAO,EAAEM,GAAG,EAAEJ,gBAAgB,EAAEC,cAAc,EAAEC,OAAO,EAAEC,cAAc,CAAC,CAAC;AAC9E,CAAC","ignoreList":[]}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { cancelAnimation, useAnimatedReaction, useSharedValue, withDelay, withTiming } from "react-native-reanimated";
|
|
4
|
-
import { useDescriptorsStore } from "
|
|
5
|
-
import { AnimationStore } from "
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
4
|
+
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
5
|
+
import { AnimationStore } from "../../../../stores/animation.store";
|
|
6
|
+
import { getSourceScreenKeyFromPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
7
|
+
import { getEntry } from "../../../../stores/bounds/internals/entries";
|
|
8
|
+
import { getDestination, getLink } from "../../../../stores/bounds/internals/links";
|
|
9
|
+
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
10
|
+
import { LifecycleTransitionRequestKind, SystemStore } from "../../../../stores/system.store";
|
|
11
|
+
import { logger } from "../../../../utils/logger";
|
|
12
|
+
import { hasHandoffEscapeContinuation, usesEscapeClippingHost } from "../../portal/utils/ownership";
|
|
13
|
+
import { getInitialDestinationMeasurePairKey } from "../../utils/destination-signals";
|
|
14
|
+
const VIEWPORT_RETRY_DELAY_MS = 100;
|
|
12
15
|
/**
|
|
13
16
|
* A destination that keeps failing its measurement guards must not hold the
|
|
14
17
|
* transition gate forever — after this budget the block is released with a
|
|
@@ -16,24 +19,28 @@ const VIEWPORT_RETRY_DELAY_MS = 16;
|
|
|
16
19
|
*/
|
|
17
20
|
const MAX_VIEWPORT_RETRIES = 20;
|
|
18
21
|
export const useInitialDestinationMeasurement = ({
|
|
19
|
-
|
|
22
|
+
boundTag,
|
|
20
23
|
enabled,
|
|
21
24
|
measureBoundary
|
|
22
25
|
}) => {
|
|
26
|
+
const {
|
|
27
|
+
tag,
|
|
28
|
+
linkKey,
|
|
29
|
+
group
|
|
30
|
+
} = boundTag;
|
|
23
31
|
const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
24
32
|
const nextScreenKey = useDescriptorsStore(s => s.derivations.nextScreenKey);
|
|
25
33
|
const destinationPairKey = useDescriptorsStore(s => s.derivations.destinationPairKey);
|
|
26
34
|
const ancestorDestinationPairKey = useDescriptorsStore(s => s.derivations.ancestorDestinationPairKey);
|
|
27
35
|
const destinationEnabled = enabled && !nextScreenKey;
|
|
28
36
|
const progress = AnimationStore.getValue(currentScreenKey, "transitionProgress");
|
|
29
|
-
const system = SystemStore.getBag(currentScreenKey);
|
|
30
|
-
const {
|
|
31
|
-
pendingLifecycleRequestKind
|
|
32
|
-
} = system;
|
|
33
37
|
const {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
pendingLifecycleRequestKind,
|
|
39
|
+
actions: {
|
|
40
|
+
blockLifecycleStart,
|
|
41
|
+
unblockLifecycleStart
|
|
42
|
+
}
|
|
43
|
+
} = SystemStore.getBag(currentScreenKey);
|
|
37
44
|
const isBlockingLifecycleStart = useSharedValue(0);
|
|
38
45
|
const retryToken = useSharedValue(0);
|
|
39
46
|
const viewportRetries = useSharedValue(0);
|
|
@@ -61,17 +68,21 @@ export const useInitialDestinationMeasurement = ({
|
|
|
61
68
|
enabled: destinationEnabled,
|
|
62
69
|
destinationPairKey,
|
|
63
70
|
ancestorDestinationPairKey,
|
|
64
|
-
linkId,
|
|
71
|
+
linkId: linkKey,
|
|
72
|
+
group,
|
|
65
73
|
linkState: destinationEnabled && (destinationPairKey || ancestorDestinationPairKey) ? pairs.get() : undefined
|
|
66
74
|
});
|
|
67
75
|
return [measurePairKey, retryTick];
|
|
68
|
-
}, ([measurePairKey]) => {
|
|
76
|
+
}, ([measurePairKey, retryTick], previous) => {
|
|
69
77
|
"worklet";
|
|
70
78
|
|
|
71
79
|
if (!measurePairKey) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const previousMeasurePairKey = previous?.[0];
|
|
83
|
+
const previousRetryTick = previous?.[1];
|
|
84
|
+
const shouldAttemptMeasure = measurePairKey !== previousMeasurePairKey || retryTick !== previousRetryTick;
|
|
85
|
+
if (!shouldAttemptMeasure) {
|
|
75
86
|
return;
|
|
76
87
|
}
|
|
77
88
|
if (hasGivenUp.get()) {
|
|
@@ -85,8 +96,24 @@ export const useInitialDestinationMeasurement = ({
|
|
|
85
96
|
type: "destination",
|
|
86
97
|
pairKey: measurePairKey
|
|
87
98
|
});
|
|
88
|
-
const destinationAttached = getDestination(measurePairKey,
|
|
99
|
+
const destinationAttached = getDestination(measurePairKey, linkKey) !== null;
|
|
89
100
|
if (destinationAttached) {
|
|
101
|
+
const linkState = pairs.get();
|
|
102
|
+
const link = getLink(measurePairKey, linkKey);
|
|
103
|
+
const sourceScreenKey = getSourceScreenKeyFromPairKey(measurePairKey);
|
|
104
|
+
const sourceEntry = getEntry(tag, sourceScreenKey);
|
|
105
|
+
const sourceEntryUsesDestinationEscapeHost = sourceEntry?.handoff === true && sourceEntry.escapeClipping === true;
|
|
106
|
+
const shouldWaitForEscapeClippingHost = usesEscapeClippingHost(link) || sourceEntryUsesDestinationEscapeHost || hasHandoffEscapeContinuation({
|
|
107
|
+
linkKey,
|
|
108
|
+
linkState,
|
|
109
|
+
sourceScreenKey
|
|
110
|
+
});
|
|
111
|
+
if (shouldWaitForEscapeClippingHost) {
|
|
112
|
+
// Screen-level escape has a second readiness phase after destination
|
|
113
|
+
// measurement: the host must commit before the transition starts, or
|
|
114
|
+
// the payload can disappear for a frame.
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
90
117
|
releaseLifecycleStartBlock();
|
|
91
118
|
viewportRetries.set(0);
|
|
92
119
|
return;
|
|
@@ -94,12 +121,12 @@ export const useInitialDestinationMeasurement = ({
|
|
|
94
121
|
if (viewportRetries.get() >= MAX_VIEWPORT_RETRIES) {
|
|
95
122
|
hasGivenUp.set(1);
|
|
96
123
|
releaseLifecycleStartBlock();
|
|
97
|
-
logger.warn(`Destination boundary "${
|
|
124
|
+
logger.warn(`Destination boundary "${linkKey}" never produced a valid measurement after ${MAX_VIEWPORT_RETRIES} attempts; releasing the transition gate without it. The boundary is likely off-viewport (e.g. an inactive group member on a paged screen) or unmounted.`);
|
|
98
125
|
return;
|
|
99
126
|
}
|
|
100
127
|
|
|
101
128
|
// Destination did not attach (malformed off-screen measurement); retry
|
|
102
|
-
//
|
|
129
|
+
// after the retry token advances while the lifecycle stays blocked.
|
|
103
130
|
viewportRetries.set(viewportRetries.get() + 1);
|
|
104
131
|
cancelAnimation(retryToken);
|
|
105
132
|
retryToken.set(withDelay(VIEWPORT_RETRY_DELAY_MS, withTiming(retryToken.get() + 1, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["cancelAnimation","useAnimatedReaction","useSharedValue","withDelay","withTiming","useDescriptorsStore","AnimationStore","getSourceScreenKeyFromPairKey","getEntry","getDestination","getLink","pairs","LifecycleTransitionRequestKind","SystemStore","logger","hasHandoffEscapeContinuation","usesEscapeClippingHost","getInitialDestinationMeasurePairKey","VIEWPORT_RETRY_DELAY_MS","MAX_VIEWPORT_RETRIES","useInitialDestinationMeasurement","boundTag","enabled","measureBoundary","tag","linkKey","group","currentScreenKey","s","derivations","nextScreenKey","destinationPairKey","ancestorDestinationPairKey","destinationEnabled","progress","getValue","pendingLifecycleRequestKind","actions","blockLifecycleStart","unblockLifecycleStart","getBag","isBlockingLifecycleStart","retryToken","viewportRetries","hasGivenUp","releaseLifecycleStartBlock","get","set","retryTick","hasPendingOpenRequest","Open","isWaitingForOpenToStart","measurePairKey","linkId","linkState","undefined","previous","previousMeasurePairKey","previousRetryTick","shouldAttemptMeasure","type","pairKey","destinationAttached","link","sourceScreenKey","sourceEntry","sourceEntryUsesDestinationEscapeHost","handoff","escapeClipping","shouldWaitForEscapeClippingHost","warn","duration"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts"],"mappings":";;AAAA,SACCA,eAAe,EACfC,mBAAmB,EACnBC,cAAc,EACdC,SAAS,EACTC,UAAU,QACJ,yBAAyB;AAChC,SAASC,mBAAmB,QAAQ,0CAA0C;AAC9E,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SAASC,6BAA6B,QAAQ,sDAAsD;AACpG,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SACCC,cAAc,EACdC,OAAO,QACD,2CAA2C;AAClD,SAASC,KAAK,QAAQ,2CAA2C;AAEjE,SACCC,8BAA8B,EAC9BC,WAAW,QACL,iCAAiC;AACxC,SAASC,MAAM,QAAQ,0BAA0B;AACjD,SACCC,4BAA4B,EAC5BC,sBAAsB,QAChB,8BAA8B;AAErC,SAASC,mCAAmC,QAAQ,iCAAiC;AAErF,MAAMC,uBAAuB,GAAG,GAAG;AACnC;AACA;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAG,EAAE;AAQ/B,OAAO,MAAMC,gCAAgC,GAAGA,CAAC;EAChDC,QAAQ;EACRC,OAAO;EACPC;AACuC,CAAC,KAAK;EAC7C,MAAM;IAAEC,GAAG;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGL,QAAQ;EACxC,MAAMM,gBAAgB,GAAGtB,mBAAmB,CAC1CuB,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,gBACtB,CAAC;EACD,MAAMG,aAAa,GAAGzB,mBAAmB,CAAEuB,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,aAAa,CAAC;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AO,CAAC0C,cAAc,EAAE3B,OAAO,CAAC;MAC7C,MAAMuC,eAAe,GAAGzD,6BAA6B,CAAC6C,cAAc,CAAC;MACrE,MAAMa,WAAW,GAAGzD,QAAQ,CAACgB,GAAG,EAAEwC,eAAe,CAAC;MAClD,MAAME,oCAAoC,GACzCD,WAAW,EAAEE,OAAO,KAAK,IAAI,IAAIF,WAAW,CAACG,cAAc,KAAK,IAAI;MACrE,MAAMC,+BAA+B,GACpCrD,sBAAsB,CAAC+C,IAAI,CAAC,IAC5BG,oCAAoC,IACpCnD,4BAA4B,CAAC;QAC5BU,OAAO;QACP6B,SAAS;QACTU;MACD,CAAC,CAAC;MAEH,IAAIK,+BAA+B,EAAE;QACpC;QACA;QACA;QACA;MACD;MACAxB,0BAA0B,CAAC,CAAC;MAC5BF,eAAe,CAACI,GAAG,CAAC,CAAC,CAAC;MACtB;IACD;IAEA,IAAIJ,eAAe,CAACG,GAAG,CAAC,CAAC,IAAI3B,oBAAoB,EAAE;MAClDyB,UAAU,CAACG,GAAG,CAAC,CAAC,CAAC;MACjBF,0BAA0B,CAAC,CAAC;MAC5B/B,MAAM,CAACwD,IAAI,CACV,yBAAyB7C,OAAO,8CAA8CN,oBAAoB,0JACnG,CAAC;MACD;IACD;;IAEA;IACA;IACAwB,eAAe,CAACI,GAAG,CAACJ,eAAe,CAACG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAC9C9C,eAAe,CAAC0C,UAAU,CAAC;IAC3BA,UAAU,CAACK,GAAG,CACb5C,SAAS,CACRe,uBAAuB,EACvBd,UAAU,CAACsC,UAAU,CAACI,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE;MAAEyB,QAAQ,EAAE;IAAE,CAAC,CACjD,CACD,CAAC;EACF,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useAnimatedReaction, useSharedValue } from "react-native-reanimated";
|
|
4
|
-
import { useDescriptorsStore } from "
|
|
5
|
-
import { pairs } from "
|
|
6
|
-
import { getInitialSourceCaptureSignal } from "
|
|
4
|
+
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
5
|
+
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
6
|
+
import { getInitialSourceCaptureSignal } from "../../utils/source-signals";
|
|
7
7
|
export const useInitialSourceMeasurement = params => {
|
|
8
8
|
const {
|
|
9
9
|
enabled,
|
|
10
10
|
measureBoundary,
|
|
11
|
-
|
|
12
|
-
group,
|
|
13
|
-
shouldAutoMeasure
|
|
11
|
+
boundTag
|
|
14
12
|
} = params;
|
|
15
13
|
const sourcePairKey = useDescriptorsStore(s => s.derivations.sourcePairKey);
|
|
16
14
|
const lastSourceCaptureSignal = useSharedValue(null);
|
|
@@ -20,10 +18,9 @@ export const useInitialSourceMeasurement = params => {
|
|
|
20
18
|
return getInitialSourceCaptureSignal({
|
|
21
19
|
enabled,
|
|
22
20
|
sourcePairKey,
|
|
23
|
-
linkId,
|
|
24
|
-
group,
|
|
25
|
-
|
|
26
|
-
linkState: shouldAutoMeasure && sourcePairKey ? pairs.get() : undefined
|
|
21
|
+
linkId: boundTag.linkKey,
|
|
22
|
+
group: boundTag.group,
|
|
23
|
+
linkState: sourcePairKey ? pairs.get() : undefined
|
|
27
24
|
});
|
|
28
25
|
}, captureSignal => {
|
|
29
26
|
"worklet";
|
package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","useSharedValue","useDescriptorsStore","pairs","getInitialSourceCaptureSignal","useInitialSourceMeasurement","params","enabled","measureBoundary","boundTag","sourcePairKey","s","derivations","lastSourceCaptureSignal","linkId","linkKey","group","linkState","get","undefined","captureSignal","set","signal","type","pairKey"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.ts"],"mappings":";;AAAA,SAASA,mBAAmB,EAAEC,cAAc,QAAQ,yBAAyB;AAC7E,SAASC,mBAAmB,QAAQ,0CAA0C;AAC9E,SAASC,KAAK,QAAQ,2CAA2C;AAGjE,SAASC,6BAA6B,QAAQ,4BAA4B;AAE1E,OAAO,MAAMC,2BAA2B,GAAIC,MAI3C,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,eAAe;IAAEC;EAAS,CAAC,GAAGH,MAAM;EACrD,MAAMI,aAAa,GAAGR,mBAAmB,CAAES,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,aAAa,CAAC;EAC7E,MAAMG,uBAAuB,GAAGZ,cAAc,CAAgB,IAAI,CAAC;EAEnED,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,OAAOI,6BAA6B,CAAC;MACpCG,OAAO;MACPG,aAAa;MACbI,MAAM,EAAEL,QAAQ,CAACM,OAAO;MACxBC,KAAK,EAAEP,QAAQ,CAACO,KAAK;MACrBC,SAAS,EAAEP,aAAa,GAAGP,KAAK,CAACe,GAAG,CAAC,CAAC,GAAGC;IAC1C,CAAC,CAAC;EACH,CAAC,EACAC,aAAa,IAAK;IAClB,SAAS;;IACT,IAAI,CAACb,OAAO,IAAI,CAACa,aAAa,EAAE;MAC/BP,uBAAuB,CAACQ,GAAG,CAAC,IAAI,CAAC;MACjC;IACD;IAEA,IAAIR,uBAAuB,CAACK,GAAG,CAAC,CAAC,KAAKE,aAAa,CAACE,MAAM,EAAE;MAC3D;IACD;IAEAT,uBAAuB,CAACQ,GAAG,CAACD,aAAa,CAACE,MAAM,CAAC;IACjDd,eAAe,CAAC;MACfe,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useAnimatedReaction } from "react-native-reanimated";
|
|
4
|
-
import { useDescriptorsStore } from "
|
|
5
|
-
import { AnimationStore } from "
|
|
6
|
-
import { pairs } from "
|
|
7
|
-
import { getRefreshBoundarySignal } from "
|
|
4
|
+
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
5
|
+
import { AnimationStore } from "../../../../stores/animation.store";
|
|
6
|
+
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
7
|
+
import { getRefreshBoundarySignal } from "../../utils/refresh-signals";
|
|
8
8
|
export const useRefreshBoundary = ({
|
|
9
9
|
enabled,
|
|
10
|
-
|
|
11
|
-
group,
|
|
10
|
+
boundTag,
|
|
12
11
|
measureBoundary
|
|
13
12
|
}) => {
|
|
13
|
+
const {
|
|
14
|
+
linkKey,
|
|
15
|
+
group
|
|
16
|
+
} = boundTag;
|
|
14
17
|
const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
15
18
|
const nextScreenKey = useDescriptorsStore(s => s.derivations.nextScreenKey);
|
|
16
19
|
const sourcePairKey = useDescriptorsStore(s => s.derivations.sourcePairKey);
|
|
@@ -34,7 +37,7 @@ export const useRefreshBoundary = ({
|
|
|
34
37
|
destinationPairKey,
|
|
35
38
|
ancestorDestinationPairKey,
|
|
36
39
|
nextScreenKey,
|
|
37
|
-
linkId,
|
|
40
|
+
linkId: linkKey,
|
|
38
41
|
group,
|
|
39
42
|
shouldRefresh: !!refreshWillAnimate.get(),
|
|
40
43
|
closing: !!refreshClosing.get(),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","useDescriptorsStore","AnimationStore","pairs","getRefreshBoundarySignal","useRefreshBoundary","enabled","boundTag","measureBoundary","linkKey","group","currentScreenKey","s","derivations","nextScreenKey","sourcePairKey","destinationPairKey","ancestorDestinationPairKey","refreshScreenKey","refreshWillAnimate","getValue","refreshClosing","refreshEntering","refreshAnimating","refreshProgress","linkId","shouldRefresh","get","closing","entering","animating","progress","linkState","refreshSignal","prevRefreshSignal","signal","type","pairKey"],"sourceRoot":"../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,gBAAgB,EAChB,mBACD,CAAC;EACD,MAAMM,eAAe,GAAGtB,cAAc,CAACkB,QAAQ,CAC9CF,gBAAgB,EAChB,oBACD,CAAC;EAEDlB,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,OAAOI,wBAAwB,CAAC;MAC/BE,OAAO;MACPK,gBAAgB;MAChBI,aAAa;MACbC,kBAAkB;MAClBC,0BAA0B;MAC1BH,aAAa;MACbW,MAAM,EAAEhB,OAAO;MACfC,KAAK;MACLgB,aAAa,EAAE,CAAC,CAACP,kBAAkB,CAACQ,GAAG,CAAC,CAAC;MACzCC,OAAO,EAAE,CAAC,CAACP,cAAc,CAACM,GAAG,CAAC,CAAC;MAC/BE,QAAQ,EAAE,CAAC,CAACP,eAAe,CAACK,GAAG,CAAC,CAAC;MACjCG,SAAS,EAAE,CAAC,CAACP,gBAAgB,CAACI,GAAG,CAAC,CAAC;MACnCI,QAAQ,EAAEP,eAAe,CAACG,GAAG,CAAC,CAAC;MAC/BK,SAAS,EAAE7B,KAAK,CAACwB,GAAG,CAAC;IACtB,CAAC,CAAC;EACH,CAAC,EACD,CAACM,aAAa,EAAEC,iBAAiB,KAAK;IACrC,SAAS;;IAET,IACC,CAACD,aAAa,IACdA,aAAa,CAACE,MAAM,KAAKD,iBAAiB,EAAEC,MAAM,EACjD;MACD;IACD;IAEA3B,eAAe,CAAC;MACf4B,IAAI,EAAEH,aAAa,CAACG,IAAI;MACxBC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { prepareStyleForBounds } from "../../../utils/bounds/helpers/styles/styles";
|
|
5
|
+
import { useBoundaryPresence } from "./lifecycles/use-boundary-presence";
|
|
6
|
+
import { useInitialDestinationMeasurement } from "./lifecycles/use-initial-destination-measurement";
|
|
7
|
+
import { useInitialSourceMeasurement } from "./lifecycles/use-initial-source-measurement";
|
|
8
|
+
import { useRefreshBoundary } from "./lifecycles/use-refresh-boundary";
|
|
9
|
+
import { useMeasurer } from "./use-measurer";
|
|
10
|
+
/**
|
|
11
|
+
* Owns the full measurement lifecycle for a boundary: builds the measurer,
|
|
12
|
+
* registers presence, runs the initial source/destination + refresh reactions,
|
|
13
|
+
* and keeps the component itself away from the measurer.
|
|
14
|
+
*/
|
|
15
|
+
export const useBoundaryMeasurement = ({
|
|
16
|
+
boundTag,
|
|
17
|
+
enabled,
|
|
18
|
+
runtimeEnabled,
|
|
19
|
+
currentScreenKey,
|
|
20
|
+
measuredRef,
|
|
21
|
+
style,
|
|
22
|
+
targetPreparedStyles,
|
|
23
|
+
handoff,
|
|
24
|
+
escapeClipping,
|
|
25
|
+
config
|
|
26
|
+
}) => {
|
|
27
|
+
const {
|
|
28
|
+
anchor,
|
|
29
|
+
scaleMode,
|
|
30
|
+
target,
|
|
31
|
+
method
|
|
32
|
+
} = config;
|
|
33
|
+
const boundaryConfig = useMemo(() => ({
|
|
34
|
+
anchor,
|
|
35
|
+
scaleMode,
|
|
36
|
+
target,
|
|
37
|
+
method
|
|
38
|
+
}), [anchor, scaleMode, target, method]);
|
|
39
|
+
const rootPreparedStyles = useMemo(() => prepareStyleForBounds(style), [style]);
|
|
40
|
+
const preparedStyles = targetPreparedStyles ?? rootPreparedStyles;
|
|
41
|
+
const measureBoundary = useMeasurer({
|
|
42
|
+
enabled,
|
|
43
|
+
boundTag,
|
|
44
|
+
currentScreenKey,
|
|
45
|
+
preparedStyles,
|
|
46
|
+
measuredAnimatedRef: measuredRef,
|
|
47
|
+
handoff,
|
|
48
|
+
escapeClipping
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// Register/unregister this boundary in the presence map so source/destination
|
|
52
|
+
// matching can resolve across concrete screen keys.
|
|
53
|
+
useBoundaryPresence({
|
|
54
|
+
enabled: runtimeEnabled,
|
|
55
|
+
boundTag,
|
|
56
|
+
currentScreenKey,
|
|
57
|
+
boundaryConfig,
|
|
58
|
+
handoff,
|
|
59
|
+
escapeClipping
|
|
60
|
+
});
|
|
61
|
+
useInitialSourceMeasurement({
|
|
62
|
+
enabled: runtimeEnabled,
|
|
63
|
+
measureBoundary,
|
|
64
|
+
boundTag
|
|
65
|
+
});
|
|
66
|
+
useInitialDestinationMeasurement({
|
|
67
|
+
boundTag,
|
|
68
|
+
enabled: runtimeEnabled,
|
|
69
|
+
measureBoundary
|
|
70
|
+
});
|
|
71
|
+
useRefreshBoundary({
|
|
72
|
+
enabled: runtimeEnabled,
|
|
73
|
+
boundTag,
|
|
74
|
+
measureBoundary
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=use-boundary-measurement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useMemo","prepareStyleForBounds","useBoundaryPresence","useInitialDestinationMeasurement","useInitialSourceMeasurement","useRefreshBoundary","useMeasurer","useBoundaryMeasurement","boundTag","enabled","runtimeEnabled","currentScreenKey","measuredRef","style","targetPreparedStyles","handoff","escapeClipping","config","anchor","scaleMode","target","method","boundaryConfig","rootPreparedStyles","preparedStyles","measureBoundary","measuredAnimatedRef"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-boundary-measurement.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,OAAO;AAI/B,SAASC,qBAAqB,QAAQ,6CAA6C;AAEnF,SAASC,mBAAmB,QAAQ,oCAAoC;AACxE,SAASC,gCAAgC,QAAQ,kDAAkD;AACnG,SAASC,2BAA2B,QAAQ,6CAA6C;AACzF,SAASC,kBAAkB,QAAQ,mCAAmC;AACtE,SAASC,WAAW,QAAQ,gBAAgB;AAmB5C;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGA,CAAC;EACtCC,QAAQ;EACRC,OAAO;EACPC,cAAc;EACdC,gBAAgB;EAChBC,WAAW;EACXC,KAAK;EACLC,oBAAoB;EACpBC,OAAO;EACPC,cAAc;EACdC;AAC6B,CAAC,KAAK;EACnC,MAAM;IAAEC,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGJ,MAAM;EACpD,MAAMK,cAAc,GAAGtB,OAAO,CAC7B,OAAO;IAAEkB,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,CAAC,EAC7C,CAACH,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAEC,MAAM,CACnC,CAAC;EAED,MAAME,kBAAkB,GAAGvB,OAAO,CACjC,MAAMC,qBAAqB,CAACY,KAAK,CAAC,EAClC,CAACA,KAAK,CACP,CAAC;EACD,MAAMW,cAAc,GAAGV,oBAAoB,IAAIS,kBAAkB;EAEjE,MAAME,eAAe,GAAGnB,WAAW,CAAC;IACnCG,OAAO;IACPD,QAAQ;IACRG,gBAAgB;IAChBa,cAAc;IACdE,mBAAmB,EAAEd,WAAW;IAChCG,OAAO;IACPC;EACD,CAAC,CAAC;;EAEF;EACA;EACAd,mBAAmB,CAAC;IACnBO,OAAO,EAAEC,cAAc;IACvBF,QAAQ;IACRG,gBAAgB;IAChBW,cAAc;IACdP,OAAO;IACPC;EACD,CAAC,CAAC;EAEFZ,2BAA2B,CAAC;IAC3BK,OAAO,EAAEC,cAAc;IACvBe,eAAe;IACfjB;EACD,CAAC,CAAC;EAEFL,gCAAgC,CAAC;IAChCK,QAAQ;IACRC,OAAO,EAAEC,cAAc;IACvBe;EACD,CAAC,CAAC;EAEFpB,kBAAkB,CAAC;IAClBI,OAAO,EAAEC,cAAc;IACvBF,QAAQ;IACRiB;EACD,CAAC,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -7,17 +7,15 @@ import { applyMeasuredBoundsWrites } from "../../../providers/helpers/measured-b
|
|
|
7
7
|
import { useOriginContext } from "../../../providers/screen/origin.provider";
|
|
8
8
|
import { ScrollStore } from "../../../stores/scroll.store";
|
|
9
9
|
import { SystemStore } from "../../../stores/system.store";
|
|
10
|
-
import { getActiveScrollHost } from "../portal/stores/host-registry.store";
|
|
11
10
|
import { attachScrollSnapshotToMeasuredBounds, isMeasurementInViewport, measureWithOverscrollAwareness, normalizeMeasuredBoundsToOrigin } from "../utils/measured-bounds";
|
|
12
11
|
export const useMeasurer = ({
|
|
13
12
|
enabled,
|
|
14
|
-
|
|
15
|
-
linkId,
|
|
16
|
-
group,
|
|
13
|
+
boundTag,
|
|
17
14
|
currentScreenKey,
|
|
18
15
|
preparedStyles,
|
|
19
16
|
measuredAnimatedRef,
|
|
20
|
-
|
|
17
|
+
handoff,
|
|
18
|
+
escapeClipping
|
|
21
19
|
}) => {
|
|
22
20
|
const {
|
|
23
21
|
width: viewportWidth,
|
|
@@ -45,22 +43,21 @@ export const useMeasurer = ({
|
|
|
45
43
|
* and malformed off-screen destination measurements should keep the
|
|
46
44
|
* lifecycle blocked until a valid retry lands.
|
|
47
45
|
*/
|
|
48
|
-
const shouldGuardDestinationViewport = pendingLifecycleStartBlockCount.get() > 0 || !!group;
|
|
46
|
+
const shouldGuardDestinationViewport = pendingLifecycleStartBlockCount.get() > 0 || !!boundTag.group;
|
|
49
47
|
const viewportAllowsDestinationWrite = target.type !== "destination" || !shouldGuardDestinationViewport || isMeasurementInViewport(normalizedMeasured, viewportWidth, viewportHeight);
|
|
50
48
|
if (!viewportAllowsDestinationWrite) return;
|
|
51
49
|
const measuredWithScroll = attachScrollSnapshotToMeasuredBounds(normalizedMeasured, scrollMetadata.get());
|
|
52
|
-
const sourceHost = target.type === "source" ? getActiveScrollHost(currentScreenKey) ?? undefined : undefined;
|
|
53
50
|
applyMeasuredBoundsWrites({
|
|
54
|
-
entryTag,
|
|
55
|
-
linkId,
|
|
56
|
-
group,
|
|
51
|
+
entryTag: boundTag.tag,
|
|
52
|
+
linkId: boundTag.linkKey,
|
|
53
|
+
group: boundTag.group,
|
|
57
54
|
currentScreenKey,
|
|
58
55
|
measured: measuredWithScroll,
|
|
59
56
|
preparedStyles,
|
|
60
57
|
linkWrite: target,
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
handoff,
|
|
59
|
+
escapeClipping
|
|
63
60
|
});
|
|
64
|
-
}, [enabled,
|
|
61
|
+
}, [enabled, boundTag, currentScreenKey, preparedStyles, measuredAnimatedRef, handoff, escapeClipping, viewportWidth, viewportHeight, scrollState, scrollMetadata, pendingLifecycleStartBlockCount, originRef]);
|
|
65
62
|
};
|
|
66
63
|
//# sourceMappingURL=use-measurer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useWindowDimensions","measure","applyMeasuredBoundsWrites","useOriginContext","ScrollStore","SystemStore","
|
|
1
|
+
{"version":3,"names":["useCallback","useWindowDimensions","measure","applyMeasuredBoundsWrites","useOriginContext","ScrollStore","SystemStore","attachScrollSnapshotToMeasuredBounds","isMeasurementInViewport","measureWithOverscrollAwareness","normalizeMeasuredBoundsToOrigin","useMeasurer","enabled","boundTag","currentScreenKey","preparedStyles","measuredAnimatedRef","handoff","escapeClipping","width","viewportWidth","height","viewportHeight","scrollState","getValue","scrollMetadata","pendingLifecycleStartBlockCount","originRef","target","measured","get","measuredOrigin","normalizedMeasured","shouldGuardDestinationViewport","group","viewportAllowsDestinationWrite","type","measuredWithScroll","entryTag","tag","linkId","linkKey","linkWrite"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-measurer.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,OAAO;AAEnC,SAASC,mBAAmB,QAAQ,cAAc;AAClD,SAECC,OAAO,QAED,yBAAyB;AAChC,SAASC,yBAAyB,QAAQ,mDAAmD;AAC7F,SAASC,gBAAgB,QAAQ,2CAA2C;AAE5E,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,WAAW,QAAQ,8BAA8B;AAE1D,SACCC,oCAAoC,EACpCC,uBAAuB,EACvBC,8BAA8B,EAC9BC,+BAA+B,QACzB,0BAA0B;AAYjC,OAAO,MA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AME,kBAAkB,GAAG9B,oCAAoC,CAC9DyB,kBAAkB,EAClBP,cAAc,CAACK,GAAG,CAAC,CACpB,CAAC;IAED3B,yBAAyB,CAAC;MACzBmC,QAAQ,EAAEzB,QAAQ,CAAC0B,GAAG;MACtBC,MAAM,EAAE3B,QAAQ,CAAC4B,OAAO;MACxBP,KAAK,EAAErB,QAAQ,CAACqB,KAAK;MACrBpB,gBAAgB;MAChBe,QAAQ,EAAEQ,kBAAkB;MAC5BtB,cAAc;MACd2B,SAAS,EAAEd,MAAM;MACjBX,OAAO;MACPC;IACD,CAAC,CAAC;EACH,CAAC,EACD,CACCN,OAAO,EACPC,QAAQ,EACRC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,EACnBC,OAAO,EACPC,cAAc,EACdE,aAAa,EACbE,cAAc,EACdC,WAAW,EACXE,cAAc,EACdC,+BAA+B,EAC/BC,SAAS,CAEX,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,54 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { forwardRef } from "react";
|
|
3
4
|
import { Pressable, View } from "react-native";
|
|
4
5
|
import { BoundaryTarget } from "./components/boundary-target";
|
|
5
6
|
import { createBoundaryComponent } from "./create-boundary-component";
|
|
6
7
|
import { Host } from "./portal";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
9
|
export { createBoundaryComponent };
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
+
const BoundaryPrimitive = /*#__PURE__*/forwardRef((props, ref) => {
|
|
11
|
+
const Component = "onPress" in props ? Pressable : View;
|
|
12
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
13
|
+
...props,
|
|
14
|
+
ref: ref
|
|
15
|
+
});
|
|
10
16
|
});
|
|
17
|
+
BoundaryPrimitive.displayName = "Transition.Boundary.Primitive";
|
|
18
|
+
const BoundaryRoot = createBoundaryComponent(BoundaryPrimitive);
|
|
19
|
+
const BoundaryView = createBoundaryComponent(View);
|
|
11
20
|
const BoundaryTrigger = createBoundaryComponent(Pressable);
|
|
21
|
+
BoundaryRoot.displayName = "Transition.Boundary";
|
|
12
22
|
BoundaryView.displayName = "Transition.Boundary.View";
|
|
13
23
|
BoundaryTrigger.displayName = "Transition.Boundary.Trigger";
|
|
14
24
|
BoundaryTarget.displayName = "Transition.Boundary.Target";
|
|
15
25
|
Host.displayName = "Transition.Boundary.Host";
|
|
16
26
|
|
|
17
27
|
/**
|
|
18
|
-
* Shared-boundary
|
|
28
|
+
* Shared-boundary component with static helpers.
|
|
19
29
|
*
|
|
20
30
|
* How measurement works:
|
|
21
|
-
* 1.
|
|
22
|
-
* 2.
|
|
23
|
-
* 3. The link is updated as layout changes
|
|
31
|
+
* 1. Destination screen captures bounds for a tag.
|
|
32
|
+
* 2. Source screen captures bounds for the same concrete pair.
|
|
33
|
+
* 3. The link is updated as layout changes.
|
|
24
34
|
*
|
|
25
|
-
*
|
|
26
|
-
* -
|
|
27
|
-
*
|
|
28
|
-
* fresh source geometry on the first frame.
|
|
35
|
+
* Runtime primitive:
|
|
36
|
+
* - With an `onPress` handler, the root renders as a Pressable.
|
|
37
|
+
* - Without an `onPress` handler, the root renders as a View.
|
|
29
38
|
*
|
|
30
39
|
* Use:
|
|
31
|
-
* - `Boundary
|
|
32
|
-
* - `Boundary.
|
|
33
|
-
* - `Boundary.Target` to measure a nested descendant instead of the owner.
|
|
40
|
+
* - `Boundary` for passive and pressable shared elements.
|
|
41
|
+
* - `Boundary.Target` to measure a nested descendant instead of the root.
|
|
34
42
|
* - `Boundary.Host` to make nested portal placement explicit.
|
|
35
43
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
* Passive boundary wrapper (no built-in press semantics).
|
|
39
|
-
*/
|
|
40
|
-
View: BoundaryView,
|
|
41
|
-
/**
|
|
42
|
-
* Pressable boundary wrapper with press-priority source capture.
|
|
43
|
-
*/
|
|
44
|
-
Trigger: BoundaryTrigger,
|
|
45
|
-
/**
|
|
46
|
-
* Optional nested measurement override inside a boundary owner.
|
|
47
|
-
*/
|
|
44
|
+
|
|
45
|
+
export const Boundary = Object.assign(BoundaryRoot, {
|
|
48
46
|
Target: BoundaryTarget,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
};
|
|
47
|
+
Host,
|
|
48
|
+
View: BoundaryView,
|
|
49
|
+
Trigger: BoundaryTrigger
|
|
50
|
+
});
|
|
54
51
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Pressable","View","BoundaryTarget","createBoundaryComponent","Host","
|
|
1
|
+
{"version":3,"names":["forwardRef","Pressable","View","BoundaryTarget","createBoundaryComponent","Host","jsx","_jsx","BoundaryPrimitive","props","ref","Component","displayName","BoundaryRoot","BoundaryView","BoundaryTrigger","Boundary","Object","assign","Target","Trigger"],"sourceRoot":"../../../../../src","sources":["shared/components/boundary/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SACCC,SAAS,EAETC,IAAI,QAEE,cAAc;AACrB,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,uBAAuB,QAAQ,6BAA6B;AACrE,SAASC,IAAI,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGhC,SAASH,uBAAuB;AAOhC,MAAMI,iBAAiB,gBAAGR,UAAU,CACnC,CAACS,KAAK,EAAEC,GAAG,KAAK;EACf,MAAMC,SAAS,GAAG,SAAS,IAAIF,KAAK,GAAGR,SAAS,GAAGC,IAAI;EAEvD,oBAAOK,IAAA,CAACI,SAAS;IAAA,GAAMF,KAAK;IAAUC,GAAG,EAAEA;EAAW,CAAE,CAAC;AAC1D,CACD,CAAC;AAEDF,iBAAiB,CAACI,WAAW,GAAG,+BAA+B;AAE/D,MAAMC,YAAY,GAAGT,uBAAuB,CAACI,iBAAiB,CAAC;AAC/D,MAAMM,YAAY,GAAGV,uBAAuB,CAACF,IAAI,CAAC;AAClD,MAAMa,eAAe,GAAGX,uBAAuB,CAACH,SAAS,CAAC;AAC1DY,YAAY,CAACD,WAAW,GAAG,qBAAqB;AAChDE,YAAY,CAACF,WAAW,GAAG,0BAA0B;AACrDG,eAAe,CAACH,WAAW,GAAG,6BAA6B;AAC3DT,cAAc,CAACS,WAAW,GAAG,4BAA4B;AACzDP,IAAI,CAACO,WAAW,GAAG,0BAA0B;;AAI7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAsBA,OAAO,MAAMI,QAAQ,GAAGC,MAAM,CAACC,MAAM,CAACL,YAAY,EAAE;EACnDM,MAAM,EAAEhB,cAAc;EACtBE,IAAI;EACJH,IAAI,EAAEY,YAAY;EAClBM,OAAO,EAAEL;AACV,CAAC,CAAsB","ignoreList":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { memo, useCallback, useLayoutEffect } from "react";
|
|
4
|
+
import { StyleSheet, View } from "react-native";
|
|
5
|
+
import Animated from "react-native-reanimated";
|
|
6
|
+
import { SystemStore } from "../../../../stores/system.store";
|
|
7
|
+
import { NativePortalHost } from "../teleport";
|
|
8
|
+
import { createBoundaryLocalPortalHostName } from "../utils/naming";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
const AnimatedPortalHost = NativePortalHost ? Animated.createAnimatedComponent(NativePortalHost) : null;
|
|
11
|
+
export const BoundaryLocalPortalHost = /*#__PURE__*/memo(function BoundaryLocalPortalHost({
|
|
12
|
+
boundaryId,
|
|
13
|
+
enabled,
|
|
14
|
+
screenKey
|
|
15
|
+
}) {
|
|
16
|
+
const {
|
|
17
|
+
drainLifecycleStartBlocks
|
|
18
|
+
} = SystemStore.getBag(screenKey).actions;
|
|
19
|
+
const handleLayout = useCallback(() => {
|
|
20
|
+
drainLifecycleStartBlocks();
|
|
21
|
+
}, [drainLifecycleStartBlocks]);
|
|
22
|
+
useLayoutEffect(() => {
|
|
23
|
+
if (!enabled || !AnimatedPortalHost) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
drainLifecycleStartBlocks();
|
|
27
|
+
}, [enabled, drainLifecycleStartBlocks]);
|
|
28
|
+
if (!enabled || !AnimatedPortalHost) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
const portalHostName = createBoundaryLocalPortalHostName(screenKey, boundaryId);
|
|
32
|
+
return /*#__PURE__*/_jsx(View, {
|
|
33
|
+
pointerEvents: "none",
|
|
34
|
+
style: styles.hostWrapper,
|
|
35
|
+
onLayout: handleLayout,
|
|
36
|
+
collapsable: false,
|
|
37
|
+
children: /*#__PURE__*/_jsx(AnimatedPortalHost, {
|
|
38
|
+
name: portalHostName,
|
|
39
|
+
style: styles.host
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
const styles = StyleSheet.create({
|
|
44
|
+
host: {
|
|
45
|
+
...StyleSheet.absoluteFillObject,
|
|
46
|
+
overflow: "visible"
|
|
47
|
+
},
|
|
48
|
+
hostWrapper: {
|
|
49
|
+
...StyleSheet.absoluteFillObject,
|
|
50
|
+
overflow: "visible"
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=boundary-local-portal-host.js.map
|
package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","useCallback","useLayoutEffect","StyleSheet","View","Animated","SystemStore","NativePortalHost","createBoundaryLocalPortalHostName","jsx","_jsx","AnimatedPortalHost","createAnimatedComponent","BoundaryLocalPortalHost","boundaryId","enabled","screenKey","drainLifecycleStartBlocks","getBag","actions","handleLayout","portalHostName","pointerEvents","style","styles","hostWrapper","onLayout","collapsable","children","name","host","create","absoluteFillObject","overflow"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-local-port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,kBAAkB;MAACkB,IAAI,EAAER,cAAe;MAACE,KAAK,EAAEC,MAAM,CAACM;IAAK,CAAE;EAAC,CAC3D,CAAC;AAET,CAAC,CAAC;AAEF,MAAMN,MAAM,GAAGrB,UAAU,CAAC4B,MAAM,CAAC;EAChCD,IAAI,EAAE;IACL,GAAG3B,UAAU,CAAC6B,kBAAkB;IAChCC,QAAQ,EAAE;EACX,CAAC;EACDR,WAAW,EAAE;IACZ,GAAGtB,UAAU,CAAC6B,kBAAkB;IAChCC,QAAQ,EAAE;EACX;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { memo, useLayoutEffect, useRef } from "react";
|
|
3
|
+
import { memo, useCallback, useLayoutEffect, useRef } from "react";
|
|
4
4
|
import { StyleSheet, useWindowDimensions, View } from "react-native";
|
|
5
5
|
import Animated from "react-native-reanimated";
|
|
6
6
|
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
7
|
+
import { SystemStore } from "../../../../stores/system.store";
|
|
7
8
|
import { useHostMeasurement } from "../hooks/use-host-measurement";
|
|
8
9
|
import { registerHost, unregisterHost } from "../stores/host-registry.store";
|
|
9
10
|
import { useActivePortalBoundaryHosts } from "../stores/portal-boundary-host.store";
|
|
@@ -15,6 +16,9 @@ function HostImpl({
|
|
|
15
16
|
style
|
|
16
17
|
}) {
|
|
17
18
|
const screenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
19
|
+
const {
|
|
20
|
+
drainLifecycleStartBlocks
|
|
21
|
+
} = SystemStore.getBag(screenKey).actions;
|
|
18
22
|
const generatedHostKeyRef = useRef(null);
|
|
19
23
|
if (generatedHostKeyRef.current === null) {
|
|
20
24
|
generatedHostKeyRef.current = `${screenKey}-host-${nextHostId++}`;
|
|
@@ -43,20 +47,32 @@ function HostImpl({
|
|
|
43
47
|
unregisterHost(screenKey, hostKey);
|
|
44
48
|
};
|
|
45
49
|
}, [capturesScroll, fallback, hostKey, screenKey]);
|
|
46
|
-
const
|
|
47
|
-
|
|
50
|
+
const handleUnblocking = useCallback(() => {
|
|
51
|
+
// Screen-level escape keeps the open transition gated until portal hosts
|
|
52
|
+
// have committed layout. A screen may render more than one portal boundary
|
|
53
|
+
// host for the same lifecycle request, so the final host layout drains the
|
|
54
|
+
// outstanding start blocks for this screen.
|
|
55
|
+
drainLifecycleStartBlocks();
|
|
56
|
+
}, [drainLifecycleStartBlocks]);
|
|
57
|
+
const boundaryHosts = measurement.canRenderHosts ? activeBoundaryHosts.map((host, idx, list) => /*#__PURE__*/_jsx(View, {
|
|
58
|
+
pointerEvents: "none",
|
|
48
59
|
style: [styles.boundaryHostViewport, {
|
|
49
60
|
width: viewportWidth,
|
|
50
61
|
height: viewportHeight
|
|
51
62
|
}],
|
|
63
|
+
onLayout: () => {
|
|
64
|
+
if (list.length - 1 === idx) {
|
|
65
|
+
handleUnblocking();
|
|
66
|
+
}
|
|
67
|
+
},
|
|
52
68
|
children: /*#__PURE__*/_jsx(PortalBoundaryHost, {
|
|
53
69
|
host: host,
|
|
54
70
|
style: StyleSheet.absoluteFill
|
|
55
71
|
})
|
|
56
|
-
}, host.
|
|
72
|
+
}, host.portalHostName)) : null;
|
|
57
73
|
return /*#__PURE__*/_jsx(Animated.View, {
|
|
58
74
|
ref: measurement.hostRef,
|
|
59
|
-
pointerEvents: "
|
|
75
|
+
pointerEvents: "none",
|
|
60
76
|
style: [styles.host, {
|
|
61
77
|
width: viewportWidth,
|
|
62
78
|
height: viewportHeight
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","useLayoutEffect","useRef","StyleSheet","useWindowDimensions","View","Animated","useDescriptorsStore","useHostMeasurement","registerHost","unregisterHost","useActivePortalBoundaryHosts","PortalBoundaryHost","jsx","_jsx","nextHostId","HostImpl","fallback","style","screenKey","s","derivations","currentScreenKey","generatedHostKeyRef","current","hostKey","capturesScroll","activeBoundaryHosts","height","viewportHeight","width","viewportWidth","measurement","enabled","length","boundaryHosts","canRenderHosts","map","host","pointerEvents","styles","boundaryHostViewport","children","absoluteFill","
|
|
1
|
+
{"version":3,"names":["memo","useCallback","useLayoutEffect","useRef","StyleSheet","useWindowDimensions","View","Animated","useDescriptorsStore","SystemStore","useHostMeasurement","registerHost","unregisterHost","useActivePortalBoundaryHosts","PortalBoundaryHost","jsx","_jsx","nextHostId","HostImpl","fallback","style","screenKey","s","derivations","currentScreenKey","drainLifecycleStartBlocks","getBag","actions","generatedHostKeyRef","current","hostKey","capturesScroll","activeBoundaryHosts","height","viewportHeight","width","viewportWidth","measurement","enabled","length","handleUnblocking","boundaryHosts","canRenderHosts","map","host","idx","list","pointerEvents","styles","boundaryHostViewport","onLayout","children","absoluteFill","portalHostName","ref","hostRef","collapsable","Host","props","ScreenFallbackHost","create","elevation","left","overflow","position","top","zIndex"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/components/host.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,WAAW,EAAEC,eAAe,EAAEC,MAAM,QAAQ,OAAO;AAClE,SAECC,UAAU,EACVC,mBAAmB,EACnBC,IAAI,QAEE,cAAc;AACrB,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,mBAAmB,QAAQ,0CAA0C;AAC9E,SAASC,WAAW,QAAQ,iCAAiC;AAC7D,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,SAASC,YAAY,EAAEC,cAAc,QAAQ,+BAA+B;AAC5E,SAASC,4BAA4B,QAAQ,sCAAsC;AACnF,SAASC,kBAAkB,QAAQ,wBAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5D,IAAIC,UAAU,GAAG,CAAC;AAUlB,SAASC,QAAQA,CAAC;EAAEC,QAAQ,GAAG,KAAK;EAAEC;AAAqB,CAAC,EAAE;EAC7D,MAAMC,SAAS,GAAGb,mBAAmB,CAAEc,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,gBAAgB,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