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
|
@@ -2,45 +2,53 @@ import {
|
|
|
2
2
|
type ComponentType,
|
|
3
3
|
forwardRef,
|
|
4
4
|
memo,
|
|
5
|
-
|
|
5
|
+
type ReactNode,
|
|
6
6
|
useImperativeHandle,
|
|
7
7
|
useMemo,
|
|
8
|
-
useRef,
|
|
9
8
|
} from "react";
|
|
10
9
|
import type { View } from "react-native";
|
|
11
|
-
import Animated, {
|
|
12
|
-
runOnUI,
|
|
13
|
-
useAnimatedRef,
|
|
14
|
-
useAnimatedStyle,
|
|
15
|
-
} from "react-native-reanimated";
|
|
16
|
-
import { NO_STYLES } from "../../constants";
|
|
10
|
+
import Animated, { useAnimatedRef } from "react-native-reanimated";
|
|
17
11
|
import { useDescriptorsStore } from "../../providers/screen/descriptors";
|
|
18
|
-
import { useScreenStyles } from "../../providers/screen/styles";
|
|
19
|
-
import { createPendingPairKey } from "../../stores/bounds/helpers/link-pairs.helpers";
|
|
20
|
-
import { prepareStyleForBounds } from "../../utils/bounds/helpers/styles/styles";
|
|
21
|
-
import { logger } from "../../utils/logger";
|
|
22
|
-
import { useBoundaryPresence } from "./hooks/use-boundary-presence";
|
|
23
|
-
import { useInitialDestinationMeasurement } from "./hooks/use-initial-destination-measurement";
|
|
24
|
-
import { useInitialSourceMeasurement } from "./hooks/use-initial-source-measurement";
|
|
25
|
-
import { useMeasurer } from "./hooks/use-measurer";
|
|
26
|
-
import { useRefreshBoundary } from "./hooks/use-refresh-boundary";
|
|
27
|
-
import { isTeleportAvailable } from "./portal/teleport";
|
|
28
12
|
import {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} from "
|
|
32
|
-
import
|
|
13
|
+
useComposedSlotStyles,
|
|
14
|
+
useSlotStackingStyles,
|
|
15
|
+
} from "../../providers/screen/styles";
|
|
16
|
+
import { createBoundTag } from "../../stores/bounds/helpers/link-pairs.helpers";
|
|
17
|
+
import { useBoundaryMeasurement } from "./hooks/use-boundary-measurement";
|
|
18
|
+
import { BoundaryLocalPortalHost } from "./portal/components/boundary-local-portal-host";
|
|
19
|
+
import { Portal } from "./portal/components/portal";
|
|
20
|
+
import { resolveBoundaryPortal } from "./portal/utils/resolve-portal";
|
|
21
|
+
import {
|
|
22
|
+
BoundaryRootProvider,
|
|
23
|
+
useBoundaryRootState,
|
|
24
|
+
} from "./providers/boundary-root.provider";
|
|
25
|
+
import type { BoundaryComponentProps } from "./types";
|
|
33
26
|
|
|
34
27
|
interface CreateBoundaryComponentOptions {
|
|
35
28
|
alreadyAnimated?: boolean;
|
|
36
|
-
shouldAutoMeasure?: boolean;
|
|
37
29
|
}
|
|
38
30
|
|
|
31
|
+
const hasRenderableChildren = (children: ReactNode): boolean => {
|
|
32
|
+
if (
|
|
33
|
+
children === null ||
|
|
34
|
+
children === undefined ||
|
|
35
|
+
typeof children === "boolean"
|
|
36
|
+
) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (Array.isArray(children)) {
|
|
41
|
+
return children.some(hasRenderableChildren);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return true;
|
|
45
|
+
};
|
|
46
|
+
|
|
39
47
|
export function createBoundaryComponent<P extends object>(
|
|
40
48
|
Wrapped: ComponentType<P>,
|
|
41
49
|
options: CreateBoundaryComponentOptions = {},
|
|
42
50
|
) {
|
|
43
|
-
const { alreadyAnimated = false
|
|
51
|
+
const { alreadyAnimated = false } = options;
|
|
44
52
|
const AnimatedComponent = alreadyAnimated
|
|
45
53
|
? Wrapped
|
|
46
54
|
: Animated.createAnimatedComponent(Wrapped);
|
|
@@ -49,7 +57,6 @@ export function createBoundaryComponent<P extends object>(
|
|
|
49
57
|
React.ComponentRef<typeof AnimatedComponent>,
|
|
50
58
|
BoundaryComponentProps<P>
|
|
51
59
|
>((props, forwardedRef) => {
|
|
52
|
-
const ownerRef = useAnimatedRef<View>();
|
|
53
60
|
const {
|
|
54
61
|
enabled = true,
|
|
55
62
|
group,
|
|
@@ -60,12 +67,20 @@ export function createBoundaryComponent<P extends object>(
|
|
|
60
67
|
method,
|
|
61
68
|
style,
|
|
62
69
|
onPress,
|
|
63
|
-
|
|
70
|
+
handoff,
|
|
71
|
+
escapeClipping,
|
|
72
|
+
children,
|
|
64
73
|
...rest
|
|
65
74
|
} = props as any;
|
|
66
75
|
|
|
67
|
-
const
|
|
68
|
-
|
|
76
|
+
const boundTag = useMemo(
|
|
77
|
+
() => createBoundTag(String(id), group),
|
|
78
|
+
[id, group],
|
|
79
|
+
);
|
|
80
|
+
const portalRuntime = resolveBoundaryPortal({
|
|
81
|
+
handoff,
|
|
82
|
+
escapeClipping,
|
|
83
|
+
});
|
|
69
84
|
|
|
70
85
|
const currentScreenKey = useDescriptorsStore(
|
|
71
86
|
(s) => s.derivations.currentScreenKey,
|
|
@@ -73,157 +88,110 @@ export function createBoundaryComponent<P extends object>(
|
|
|
73
88
|
const hasConfiguredInterpolator = useDescriptorsStore(
|
|
74
89
|
(s) => s.derivations.hasConfiguredInterpolator,
|
|
75
90
|
);
|
|
76
|
-
|
|
77
91
|
const runtimeEnabled = enabled && hasConfiguredInterpolator;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
method,
|
|
84
|
-
};
|
|
85
|
-
}, [anchor, scaleMode, target, method]);
|
|
86
|
-
|
|
87
|
-
const ownerPreparedStyles = useMemo(
|
|
88
|
-
() => prepareStyleForBounds(style),
|
|
89
|
-
[style],
|
|
90
|
-
);
|
|
91
|
-
const { stylesMap } = useScreenStyles();
|
|
92
|
+
// Associated slot styles attach whenever the boundary is enabled,
|
|
93
|
+
// independent of whether an interpolator is configured for this transition.
|
|
94
|
+
const shouldAttachAssociatedStyles = enabled;
|
|
95
|
+
const canPortalRoot =
|
|
96
|
+
portalRuntime.enabled && hasRenderableChildren(children);
|
|
92
97
|
|
|
93
|
-
const associatedStyles =
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
const associatedStackingStyles = useAnimatedStyle(() => {
|
|
99
|
-
"worklet";
|
|
100
|
-
const baseStyle = stylesMap.get()[entryTag]?.style;
|
|
101
|
-
const zIndex = baseStyle?.zIndex ?? 0;
|
|
102
|
-
const elevation = baseStyle?.elevation ?? 0;
|
|
98
|
+
const associatedStyles = useComposedSlotStyles(boundTag.tag, style);
|
|
99
|
+
const associatedStackingStyles = useSlotStackingStyles(boundTag.tag);
|
|
100
|
+
const rootPlaceholderRef = useAnimatedRef<View>();
|
|
103
101
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
const {
|
|
103
|
+
ref,
|
|
104
|
+
contextValue,
|
|
105
|
+
measuredRef,
|
|
106
|
+
hasActiveTarget,
|
|
107
|
+
targetPreparedStyles,
|
|
108
|
+
} = useBoundaryRootState({
|
|
109
|
+
boundTag,
|
|
110
|
+
portalRuntime,
|
|
111
|
+
rootMeasurementRef: canPortalRoot ? rootPlaceholderRef : undefined,
|
|
109
112
|
});
|
|
110
113
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
if (!hasWarned.current && !isTeleportAvailable && portal) {
|
|
115
|
-
logger.warn(
|
|
116
|
-
"react-native-teleport is not installed and will fallback to default behavior.",
|
|
117
|
-
);
|
|
118
|
-
hasWarned.current = true;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const { contextValue, measuredRef, hasActiveTarget, targetPreparedStyles } =
|
|
122
|
-
useBoundaryOwner({
|
|
123
|
-
ownerRef,
|
|
124
|
-
associatedTargetStyles: runtimeEnabled ? associatedStyles : undefined,
|
|
125
|
-
entryTag,
|
|
126
|
-
portal: adjustedPortal,
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
const preparedStyles = targetPreparedStyles ?? ownerPreparedStyles;
|
|
130
|
-
|
|
131
|
-
const portalHost =
|
|
132
|
-
typeof adjustedPortal === "object"
|
|
133
|
-
? (adjustedPortal.attachTo ?? "current-screen")
|
|
134
|
-
: adjustedPortal
|
|
135
|
-
? "current-screen"
|
|
136
|
-
: undefined;
|
|
137
|
-
|
|
138
|
-
const measureBoundary = useMeasurer({
|
|
114
|
+
useBoundaryMeasurement({
|
|
115
|
+
boundTag,
|
|
139
116
|
enabled,
|
|
140
|
-
|
|
141
|
-
linkId,
|
|
142
|
-
group,
|
|
143
|
-
currentScreenKey,
|
|
144
|
-
preparedStyles,
|
|
145
|
-
measuredAnimatedRef: measuredRef,
|
|
146
|
-
portalHost,
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
// Register/unregister this boundary in the presence map so source/destination
|
|
150
|
-
// matching can resolve across concrete screen keys.
|
|
151
|
-
useBoundaryPresence({
|
|
152
|
-
enabled: runtimeEnabled,
|
|
153
|
-
entryTag,
|
|
117
|
+
runtimeEnabled,
|
|
154
118
|
currentScreenKey,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
useInitialSourceMeasurement({
|
|
162
|
-
enabled: runtimeEnabled,
|
|
163
|
-
measureBoundary,
|
|
164
|
-
linkId,
|
|
165
|
-
group,
|
|
166
|
-
shouldAutoMeasure: shouldPassivelyMeasureSource,
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
useInitialDestinationMeasurement({
|
|
170
|
-
linkId,
|
|
171
|
-
enabled: runtimeEnabled,
|
|
172
|
-
measureBoundary,
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
useRefreshBoundary({
|
|
176
|
-
enabled: runtimeEnabled,
|
|
177
|
-
linkId,
|
|
178
|
-
group,
|
|
179
|
-
measureBoundary,
|
|
119
|
+
measuredRef,
|
|
120
|
+
style,
|
|
121
|
+
targetPreparedStyles,
|
|
122
|
+
handoff: portalRuntime.handoff,
|
|
123
|
+
escapeClipping: portalRuntime.escapeClipping,
|
|
124
|
+
config: { anchor, scaleMode, target, method },
|
|
180
125
|
});
|
|
181
126
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
127
|
+
useImperativeHandle(forwardedRef, () => ref.current as any, [ref]);
|
|
128
|
+
|
|
129
|
+
const shouldPortalRoot = canPortalRoot && !hasActiveTarget;
|
|
130
|
+
// A nested active target takes the full associated style, so the root keeps
|
|
131
|
+
// only its stacking context. Without a nested target, a portal'd root is the
|
|
132
|
+
// target, so its associated style is applied through the portal host instead
|
|
133
|
+
// of inline on the teleported element.
|
|
134
|
+
// Host-only handoff receivers still need the associated style: their local
|
|
135
|
+
// portal host is absolute-filled inside this root, so the root is the visual
|
|
136
|
+
// frame that animates the received payload.
|
|
137
|
+
const attachedStyle = shouldAttachAssociatedStyles
|
|
138
|
+
? hasActiveTarget
|
|
139
|
+
? associatedStackingStyles
|
|
140
|
+
: shouldPortalRoot
|
|
141
|
+
? undefined
|
|
142
|
+
: associatedStyles
|
|
143
|
+
: undefined;
|
|
144
|
+
const pressProps = typeof onPress === "function" ? { onPress } : undefined;
|
|
145
|
+
|
|
146
|
+
const localPortalHost = (
|
|
147
|
+
<BoundaryLocalPortalHost
|
|
148
|
+
boundaryId={boundTag.tag}
|
|
149
|
+
enabled={enabled && portalRuntime.handoff}
|
|
150
|
+
screenKey={currentScreenKey}
|
|
151
|
+
/>
|
|
152
|
+
);
|
|
153
|
+
const canInjectLocalPortalHost = typeof children !== "function";
|
|
154
|
+
|
|
155
|
+
const renderBoundaryRoot = (extraChildren?: ReactNode) => (
|
|
156
|
+
<AnimatedComponent
|
|
157
|
+
{...rest}
|
|
158
|
+
{...pressProps}
|
|
159
|
+
ref={ref}
|
|
160
|
+
style={[style, attachedStyle]}
|
|
161
|
+
collapsable={false}
|
|
162
|
+
>
|
|
163
|
+
{children}
|
|
164
|
+
{canInjectLocalPortalHost ? extraChildren : null}
|
|
165
|
+
</AnimatedComponent>
|
|
166
|
+
);
|
|
167
|
+
const boundaryRoot = renderBoundaryRoot(
|
|
168
|
+
shouldPortalRoot ? undefined : localPortalHost,
|
|
195
169
|
);
|
|
196
|
-
|
|
197
|
-
const resolvedOnPress =
|
|
198
|
-
typeof onPress === "function" ? handlePress : undefined;
|
|
199
|
-
|
|
200
|
-
useImperativeHandle(forwardedRef, () => ownerRef.current as any, [
|
|
201
|
-
ownerRef,
|
|
202
|
-
]);
|
|
203
170
|
|
|
204
171
|
return (
|
|
205
|
-
<
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
172
|
+
<BoundaryRootProvider value={contextValue}>
|
|
173
|
+
{shouldPortalRoot ? (
|
|
174
|
+
<Portal
|
|
175
|
+
id={boundTag.tag}
|
|
176
|
+
handoff={portalRuntime.handoff}
|
|
177
|
+
escapeClipping={portalRuntime.escapeClipping}
|
|
178
|
+
placeholderRef={rootPlaceholderRef}
|
|
179
|
+
placeholderChildren={
|
|
180
|
+
portalRuntime.handoff ? localPortalHost : undefined
|
|
181
|
+
}
|
|
182
|
+
>
|
|
183
|
+
{boundaryRoot}
|
|
184
|
+
</Portal>
|
|
185
|
+
) : (
|
|
186
|
+
boundaryRoot
|
|
187
|
+
)}
|
|
188
|
+
</BoundaryRootProvider>
|
|
221
189
|
);
|
|
222
190
|
});
|
|
223
191
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
) as unknown as React.MemoExoticComponent<
|
|
192
|
+
// The HOC's runtime identity (animated + memoized forwardRef) is not
|
|
193
|
+
// expressible against the public boundary props, so assert it here.
|
|
194
|
+
return memo(Inner) as unknown as React.MemoExoticComponent<
|
|
227
195
|
React.ForwardRefExoticComponent<
|
|
228
196
|
BoundaryComponentProps<P> &
|
|
229
197
|
React.RefAttributes<React.ComponentRef<typeof Wrapped>>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useLayoutEffect } from "react";
|
|
2
|
+
import { runOnUI } from "react-native-reanimated";
|
|
3
|
+
import {
|
|
4
|
+
removeEntry,
|
|
5
|
+
setEntry,
|
|
6
|
+
} from "../../../../stores/bounds/internals/entries";
|
|
7
|
+
import type { BoundTag } from "../../../../stores/bounds/types";
|
|
8
|
+
import type { BoundaryConfigProps } from "../../types";
|
|
9
|
+
|
|
10
|
+
export const useBoundaryPresence = (params: {
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
boundTag: BoundTag;
|
|
13
|
+
currentScreenKey: string;
|
|
14
|
+
boundaryConfig?: BoundaryConfigProps;
|
|
15
|
+
handoff?: boolean;
|
|
16
|
+
escapeClipping?: boolean;
|
|
17
|
+
}) => {
|
|
18
|
+
const {
|
|
19
|
+
enabled,
|
|
20
|
+
boundTag,
|
|
21
|
+
currentScreenKey,
|
|
22
|
+
boundaryConfig,
|
|
23
|
+
handoff,
|
|
24
|
+
escapeClipping,
|
|
25
|
+
} = params;
|
|
26
|
+
const { tag } = boundTag;
|
|
27
|
+
|
|
28
|
+
useLayoutEffect(() => {
|
|
29
|
+
if (!enabled) return;
|
|
30
|
+
|
|
31
|
+
runOnUI(setEntry)(tag, currentScreenKey, {
|
|
32
|
+
boundaryConfig,
|
|
33
|
+
handoff: handoff ? true : null,
|
|
34
|
+
escapeClipping: escapeClipping ? true : null,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
return () => {
|
|
38
|
+
runOnUI(removeEntry)(tag, currentScreenKey);
|
|
39
|
+
};
|
|
40
|
+
}, [enabled, tag, currentScreenKey, boundaryConfig, handoff, escapeClipping]);
|
|
41
|
+
};
|
|
@@ -5,19 +5,29 @@ import {
|
|
|
5
5
|
withDelay,
|
|
6
6
|
withTiming,
|
|
7
7
|
} from "react-native-reanimated";
|
|
8
|
-
import { useDescriptorsStore } from "
|
|
9
|
-
import { AnimationStore } from "
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
9
|
+
import { AnimationStore } from "../../../../stores/animation.store";
|
|
10
|
+
import { getSourceScreenKeyFromPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
11
|
+
import { getEntry } from "../../../../stores/bounds/internals/entries";
|
|
12
|
+
import {
|
|
13
|
+
getDestination,
|
|
14
|
+
getLink,
|
|
15
|
+
} from "../../../../stores/bounds/internals/links";
|
|
16
|
+
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
17
|
+
import type { BoundTag } from "../../../../stores/bounds/types";
|
|
12
18
|
import {
|
|
13
19
|
LifecycleTransitionRequestKind,
|
|
14
20
|
SystemStore,
|
|
15
|
-
} from "
|
|
16
|
-
import { logger } from "
|
|
17
|
-
import
|
|
18
|
-
|
|
21
|
+
} from "../../../../stores/system.store";
|
|
22
|
+
import { logger } from "../../../../utils/logger";
|
|
23
|
+
import {
|
|
24
|
+
hasHandoffEscapeContinuation,
|
|
25
|
+
usesEscapeClippingHost,
|
|
26
|
+
} from "../../portal/utils/ownership";
|
|
27
|
+
import type { MeasureBoundary } from "../../types";
|
|
28
|
+
import { getInitialDestinationMeasurePairKey } from "../../utils/destination-signals";
|
|
19
29
|
|
|
20
|
-
const VIEWPORT_RETRY_DELAY_MS =
|
|
30
|
+
const VIEWPORT_RETRY_DELAY_MS = 100;
|
|
21
31
|
/**
|
|
22
32
|
* A destination that keeps failing its measurement guards must not hold the
|
|
23
33
|
* transition gate forever — after this budget the block is released with a
|
|
@@ -26,16 +36,17 @@ const VIEWPORT_RETRY_DELAY_MS = 16;
|
|
|
26
36
|
const MAX_VIEWPORT_RETRIES = 20;
|
|
27
37
|
|
|
28
38
|
interface UseInitialDestinationMeasurementParams {
|
|
29
|
-
|
|
39
|
+
boundTag: BoundTag;
|
|
30
40
|
enabled: boolean;
|
|
31
41
|
measureBoundary: MeasureBoundary;
|
|
32
42
|
}
|
|
33
43
|
|
|
34
44
|
export const useInitialDestinationMeasurement = ({
|
|
35
|
-
|
|
45
|
+
boundTag,
|
|
36
46
|
enabled,
|
|
37
47
|
measureBoundary,
|
|
38
48
|
}: UseInitialDestinationMeasurementParams) => {
|
|
49
|
+
const { tag, linkKey, group } = boundTag;
|
|
39
50
|
const currentScreenKey = useDescriptorsStore(
|
|
40
51
|
(s) => s.derivations.currentScreenKey,
|
|
41
52
|
);
|
|
@@ -51,9 +62,12 @@ export const useInitialDestinationMeasurement = ({
|
|
|
51
62
|
currentScreenKey,
|
|
52
63
|
"transitionProgress",
|
|
53
64
|
);
|
|
54
|
-
|
|
55
|
-
const {
|
|
56
|
-
|
|
65
|
+
|
|
66
|
+
const {
|
|
67
|
+
pendingLifecycleRequestKind,
|
|
68
|
+
actions: { blockLifecycleStart, unblockLifecycleStart },
|
|
69
|
+
} = SystemStore.getBag(currentScreenKey);
|
|
70
|
+
|
|
57
71
|
const isBlockingLifecycleStart = useSharedValue(0);
|
|
58
72
|
const retryToken = useSharedValue(0);
|
|
59
73
|
const viewportRetries = useSharedValue(0);
|
|
@@ -90,7 +104,8 @@ export const useInitialDestinationMeasurement = ({
|
|
|
90
104
|
enabled: destinationEnabled,
|
|
91
105
|
destinationPairKey,
|
|
92
106
|
ancestorDestinationPairKey,
|
|
93
|
-
linkId,
|
|
107
|
+
linkId: linkKey,
|
|
108
|
+
group,
|
|
94
109
|
linkState:
|
|
95
110
|
destinationEnabled &&
|
|
96
111
|
(destinationPairKey || ancestorDestinationPairKey)
|
|
@@ -100,12 +115,19 @@ export const useInitialDestinationMeasurement = ({
|
|
|
100
115
|
|
|
101
116
|
return [measurePairKey, retryTick] as const;
|
|
102
117
|
},
|
|
103
|
-
([measurePairKey]) => {
|
|
118
|
+
([measurePairKey, retryTick], previous) => {
|
|
104
119
|
"worklet";
|
|
105
120
|
if (!measurePairKey) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const previousMeasurePairKey = previous?.[0];
|
|
125
|
+
const previousRetryTick = previous?.[1];
|
|
126
|
+
const shouldAttemptMeasure =
|
|
127
|
+
measurePairKey !== previousMeasurePairKey ||
|
|
128
|
+
retryTick !== previousRetryTick;
|
|
129
|
+
|
|
130
|
+
if (!shouldAttemptMeasure) {
|
|
109
131
|
return;
|
|
110
132
|
}
|
|
111
133
|
|
|
@@ -124,9 +146,30 @@ export const useInitialDestinationMeasurement = ({
|
|
|
124
146
|
});
|
|
125
147
|
|
|
126
148
|
const destinationAttached =
|
|
127
|
-
getDestination(measurePairKey,
|
|
149
|
+
getDestination(measurePairKey, linkKey) !== null;
|
|
128
150
|
|
|
129
151
|
if (destinationAttached) {
|
|
152
|
+
const linkState = pairs.get();
|
|
153
|
+
const link = getLink(measurePairKey, linkKey);
|
|
154
|
+
const sourceScreenKey = getSourceScreenKeyFromPairKey(measurePairKey);
|
|
155
|
+
const sourceEntry = getEntry(tag, sourceScreenKey);
|
|
156
|
+
const sourceEntryUsesDestinationEscapeHost =
|
|
157
|
+
sourceEntry?.handoff === true && sourceEntry.escapeClipping === true;
|
|
158
|
+
const shouldWaitForEscapeClippingHost =
|
|
159
|
+
usesEscapeClippingHost(link) ||
|
|
160
|
+
sourceEntryUsesDestinationEscapeHost ||
|
|
161
|
+
hasHandoffEscapeContinuation({
|
|
162
|
+
linkKey,
|
|
163
|
+
linkState,
|
|
164
|
+
sourceScreenKey,
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
if (shouldWaitForEscapeClippingHost) {
|
|
168
|
+
// Screen-level escape has a second readiness phase after destination
|
|
169
|
+
// measurement: the host must commit before the transition starts, or
|
|
170
|
+
// the payload can disappear for a frame.
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
130
173
|
releaseLifecycleStartBlock();
|
|
131
174
|
viewportRetries.set(0);
|
|
132
175
|
return;
|
|
@@ -136,13 +179,13 @@ export const useInitialDestinationMeasurement = ({
|
|
|
136
179
|
hasGivenUp.set(1);
|
|
137
180
|
releaseLifecycleStartBlock();
|
|
138
181
|
logger.warn(
|
|
139
|
-
`Destination boundary "${
|
|
182
|
+
`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.`,
|
|
140
183
|
);
|
|
141
184
|
return;
|
|
142
185
|
}
|
|
143
186
|
|
|
144
187
|
// Destination did not attach (malformed off-screen measurement); retry
|
|
145
|
-
//
|
|
188
|
+
// after the retry token advances while the lifecycle stays blocked.
|
|
146
189
|
viewportRetries.set(viewportRetries.get() + 1);
|
|
147
190
|
cancelAnimation(retryToken);
|
|
148
191
|
retryToken.set(
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { useAnimatedReaction, useSharedValue } from "react-native-reanimated";
|
|
2
|
-
import { useDescriptorsStore } from "
|
|
3
|
-
import { pairs } from "
|
|
4
|
-
import type {
|
|
5
|
-
import {
|
|
2
|
+
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
3
|
+
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
4
|
+
import type { BoundTag } from "../../../../stores/bounds/types";
|
|
5
|
+
import type { MeasureBoundary } from "../../types";
|
|
6
|
+
import { getInitialSourceCaptureSignal } from "../../utils/source-signals";
|
|
6
7
|
|
|
7
8
|
export const useInitialSourceMeasurement = (params: {
|
|
8
9
|
enabled: boolean;
|
|
9
10
|
measureBoundary: MeasureBoundary;
|
|
10
|
-
|
|
11
|
-
group?: string;
|
|
12
|
-
shouldAutoMeasure: boolean;
|
|
11
|
+
boundTag: BoundTag;
|
|
13
12
|
}) => {
|
|
14
|
-
const { enabled, measureBoundary,
|
|
13
|
+
const { enabled, measureBoundary, boundTag } = params;
|
|
15
14
|
const sourcePairKey = useDescriptorsStore((s) => s.derivations.sourcePairKey);
|
|
16
15
|
const lastSourceCaptureSignal = useSharedValue<string | null>(null);
|
|
17
16
|
|
|
@@ -21,10 +20,9 @@ export const useInitialSourceMeasurement = (params: {
|
|
|
21
20
|
return getInitialSourceCaptureSignal({
|
|
22
21
|
enabled,
|
|
23
22
|
sourcePairKey,
|
|
24
|
-
linkId,
|
|
25
|
-
group,
|
|
26
|
-
|
|
27
|
-
linkState: shouldAutoMeasure && sourcePairKey ? pairs.get() : undefined,
|
|
23
|
+
linkId: boundTag.linkKey,
|
|
24
|
+
group: boundTag.group,
|
|
25
|
+
linkState: sourcePairKey ? pairs.get() : undefined,
|
|
28
26
|
});
|
|
29
27
|
},
|
|
30
28
|
(captureSignal) => {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { useAnimatedReaction } from "react-native-reanimated";
|
|
2
|
-
import { useDescriptorsStore } from "
|
|
3
|
-
import { AnimationStore } from "
|
|
4
|
-
import { pairs } from "
|
|
5
|
-
import type {
|
|
6
|
-
import {
|
|
2
|
+
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
3
|
+
import { AnimationStore } from "../../../../stores/animation.store";
|
|
4
|
+
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
5
|
+
import type { BoundTag } from "../../../../stores/bounds/types";
|
|
6
|
+
import type { MeasureBoundary } from "../../types";
|
|
7
|
+
import { getRefreshBoundarySignal } from "../../utils/refresh-signals";
|
|
7
8
|
|
|
8
9
|
interface UseRefreshBoundaryParams {
|
|
9
10
|
enabled: boolean;
|
|
10
|
-
|
|
11
|
-
group?: string;
|
|
11
|
+
boundTag: BoundTag;
|
|
12
12
|
measureBoundary: MeasureBoundary;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export const useRefreshBoundary = ({
|
|
16
16
|
enabled,
|
|
17
|
-
|
|
18
|
-
group,
|
|
17
|
+
boundTag,
|
|
19
18
|
measureBoundary,
|
|
20
19
|
}: UseRefreshBoundaryParams) => {
|
|
20
|
+
const { linkKey, group } = boundTag;
|
|
21
21
|
const currentScreenKey = useDescriptorsStore(
|
|
22
22
|
(s) => s.derivations.currentScreenKey,
|
|
23
23
|
);
|
|
@@ -57,7 +57,7 @@ export const useRefreshBoundary = ({
|
|
|
57
57
|
destinationPairKey,
|
|
58
58
|
ancestorDestinationPairKey,
|
|
59
59
|
nextScreenKey,
|
|
60
|
-
linkId,
|
|
60
|
+
linkId: linkKey,
|
|
61
61
|
group,
|
|
62
62
|
shouldRefresh: !!refreshWillAnimate.get(),
|
|
63
63
|
closing: !!refreshClosing.get(),
|